From ec31104f50229d05633251c44cace8384e67cd5f Mon Sep 17 00:00:00 2001 From: Andrew Cross Date: Thu, 19 Mar 2015 11:57:54 -0600 Subject: [PATCH 1/3] use bower to grab runtime dependencies. create a build path and example for using mpegts as an external library --- .gitignore | 1 + README.md | 9 +- bower.json | 26 ++ browser.js | 2 +- dist/hlsplayer.js | 160 ++++++++ dist/worker.js | 1 + gulpfile.js | 48 +++ index-lib.html | 29 ++ index.html | 1 + lib/async.js | 955 ---------------------------------------------- lib/require.js | 36 -- package.json | 8 +- require-config.js | 20 + worker-lib.js | 149 ++++++++ worker-main.js | 8 + worker.js | 28 +- 16 files changed, 463 insertions(+), 1018 deletions(-) create mode 100644 bower.json create mode 100644 dist/hlsplayer.js create mode 100644 dist/worker.js create mode 100644 gulpfile.js create mode 100644 index-lib.html delete mode 100644 lib/async.js delete mode 100644 lib/require.js create mode 100644 require-config.js create mode 100644 worker-lib.js create mode 100644 worker-main.js diff --git a/.gitignore b/.gitignore index 6684c76..580bf9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.idea /node_modules +/bower_components diff --git a/README.md b/README.md index e359562..d3ed75d 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,11 @@ Can I use it in Node.js? What license is it issued under? -------------------------------- -It's regular [MIT license](MIT-license.txt). \ No newline at end of file +It's regular [MIT license](MIT-license.txt). + +Running locally and building as a library +-------------------------------- +* Install development dependencies using `npm install` +* Install runtime dependencies using `bower install` +* Build the the library and open the demo by simply running `gulp` +* For an example of using the library, see index-lib.html diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..f84b624 --- /dev/null +++ b/bower.json @@ -0,0 +1,26 @@ +{ + "name": "mpegts_to_mp4", + "version": "1.0.1", + "homepage": "https://github.com/RReverser/mpegts", + "authors": [ + "Ingvar Stepanyan (http://rreverser.com/)" + ], + "main": "dist/hlsplayer.js", + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "jbinary": "~2.1.2", + "jdataview": "~2.5.0", + "async": "~0.9.2" + }, + "devDependencies": { + "requirejs": "~2.1.16", + "almond": "~0.3.1" + } +} diff --git a/browser.js b/browser.js index 0d8fb29..a4c5b2f 100644 --- a/browser.js +++ b/browser.js @@ -7,7 +7,7 @@ // preconfiguration using + + + + +
+ + +
+ + + + diff --git a/index.html b/index.html index 7fb0589..aa0d98d 100644 --- a/index.html +++ b/index.html @@ -31,6 +31,7 @@

HTTP Live Streaming
JavaScript converter and player demo

Works best in Chrome (stable branch), having lags when switching videos but still working in latest Firefox and IE10+.

+

Check out the demo as an external library

Please note that demo uses 3rd-party HLS demo source and service http://www.corsproxy.com/ for proxying it with needed Cross-Origin-Request headers, so it may be unstable.