Skip to content

Commit 91896ec

Browse files
committed
add support for bower/npm
inspired from https://github.com/dailymotion/chromecast-sender-js/
1 parent 93433ca commit 91896ec

File tree

7 files changed

+310
-8
lines changed

7 files changed

+310
-8
lines changed

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# http://editorconfig.org
2+
root = true
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
[*.md]
11+
trim_trailing_whitespace = false

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
node_modules/*
3+
bower_components/*

.jshintrc

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"bitwise" : true,
3+
"browser" : true,
4+
"camelcase" : true,
5+
"curly" : true,
6+
"eqeqeq" : true,
7+
"eqnull" : true,
8+
"es5" : false,
9+
"esnext" : true,
10+
"immed" : true,
11+
"indent" : 4,
12+
"latedef" : true,
13+
"newcap" : true,
14+
"noarg" : true,
15+
"node" : true,
16+
"quotmark" : "single",
17+
"regexp" : true,
18+
"smarttabs" : true,
19+
"strict" : false,
20+
"trailing" : true,
21+
"undef" : true,
22+
"unused" : true,
23+
"white" : true
24+
}

bower.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "mse-hls",
3+
"version": "0.0.1",
4+
"description": "Media Source Extension - HLS library, by/for Dailymotion",
5+
"homepage": "https://github.com/dailymotion/mse-hls",
6+
"authors": [
7+
"Guillaume du Pontavice <[email protected]>"
8+
],
9+
"main": "dist/hls.js",
10+
"private": true,
11+
"ignore": [
12+
"**/.*",
13+
"node_modules",
14+
"bower_components",
15+
"test",
16+
"tests"
17+
]
18+
}

mse-demo.html demo/index.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ <h1 class="title">HLS Media Sources Demo</h1>
4343
<footer class="wrapper">
4444
</footer>
4545
</div>
46-
<script src="src/hls.js"></script>
47-
<script src="src/utils/log.js"></script>
48-
<script src="src/utils/stream.js"></script>
49-
<script src="src/loader/playlist-loader.js"></script>
50-
<script src="src/loader/fragment-loader.js"></script>
51-
<script src="src/remux/mp4-generator.js"></script>
52-
<script src="src/demux/exp-golomb.js"></script>
53-
<script src="src/demux/tsdemuxer.js"></script>
46+
<script src="../src/hls.js"></script>
47+
<script src="../src/utils/log.js"></script>
48+
<script src="../src/utils/stream.js"></script>
49+
<script src="../src/loader/playlist-loader.js"></script>
50+
<script src="../src/loader/fragment-loader.js"></script>
51+
<script src="../src/remux/mp4-generator.js"></script>
52+
<script src="../src/demux/exp-golomb.js"></script>
53+
<script src="../src/demux/tsdemuxer.js"></script>
5454
<!--<script src="test/mp4-inspector.js"></script> -->
5555
<script>
5656
var video = document.getElementById('video');

dist/hls.js

+205
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "mse-hls",
3+
"version": "0.0.1",
4+
"description": "Media Source Extension - HLS library, by/for Dailymotion",
5+
"homepage": "https://github.com/dailymotion/mse-hls",
6+
"authors": "Guillaume du Pontavice <[email protected]>",
7+
"main": "src/hls.js",
8+
"private": true,
9+
"scripts": {
10+
"clean": "rm -r dist/*",
11+
"prebuild": "npm run clean & npm run test",
12+
"build": "browserify -s hls src/hls.js -o dist/hls.js",
13+
"postbuild": "npm run minify",
14+
"minify": "uglifyjs dist/hls.js > dist/hls.min.js",
15+
"watch": "watchify --debug -s hls src/hls.js -o dist/hls.js",
16+
"pretest": "npm run lint",
17+
"test": "mocha tests/",
18+
"lint": "jshint src/*.js",
19+
"serve": "http-server -p 8000 .",
20+
"open": "opener http://localhost:8000/demo/",
21+
"live-reload": "live-reload --port 8001 dist/",
22+
"dev": "npm run open -s & parallelshell 'npm run live-reload -s' 'npm run serve -s' 'npm run watch -s'"
23+
},
24+
"browserify": {
25+
"transform": [
26+
"6to5ify"
27+
]
28+
},
29+
"devDependencies": {
30+
"6to5ify": "^3.1.2",
31+
"browserify": "^8.1.1",
32+
"http-server": "^0.7.4",
33+
"jshint": "^2.5.11",
34+
"live-reload": "^0.2.0",
35+
"mocha": "^2.1.0",
36+
"opener": "^1.4.0",
37+
"parallelshell": "^1.0.3",
38+
"uglify-js": "^2.4.16",
39+
"watchify": "^2.2.1"
40+
}
41+
}

0 commit comments

Comments
 (0)