Merge pull request #7 from brightcove/feature/basic-playback
Single-bitrate playback
Showing
103 changed files
with
2485 additions
and
473 deletions
.travis.yml
0 → 100644
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | var basename = require('path').basename; | ||
4 | |||
3 | module.exports = function(grunt) { | 5 | module.exports = function(grunt) { |
4 | 6 | ||
5 | // Project configuration. | 7 | // Project configuration. |
... | @@ -12,7 +14,7 @@ module.exports = function(grunt) { | ... | @@ -12,7 +14,7 @@ module.exports = function(grunt) { |
12 | ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', | 14 | ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', |
13 | // Task configuration. | 15 | // Task configuration. |
14 | clean: { | 16 | clean: { |
15 | files: ['dist'] | 17 | files: ['build', 'dist', 'tmp'] |
16 | }, | 18 | }, |
17 | concat: { | 19 | concat: { |
18 | options: { | 20 | options: { |
... | @@ -26,13 +28,8 @@ module.exports = function(grunt) { | ... | @@ -26,13 +28,8 @@ module.exports = function(grunt) { |
26 | 'src/h264-stream.js', | 28 | 'src/h264-stream.js', |
27 | 'src/aac-stream.js', | 29 | 'src/aac-stream.js', |
28 | 'src/segment-parser.js', | 30 | 'src/segment-parser.js', |
29 | 'src/segment-controller.js', | 31 | 'src/m3u8/m3u8-parser.js' |
30 | 'src/m3u8/m3u8.js', | 32 | ], |
31 | 'src/m3u8/m3u8-tag-types.js', | ||
32 | 'src/m3u8/m3u8-parser.js', | ||
33 | 'src/manifest-controller.js', | ||
34 | 'src/segment-controller.js', | ||
35 | 'src/hls-playback-controller.js'], | ||
36 | dest: 'dist/videojs.hls.js' | 33 | dest: 'dist/videojs.hls.js' |
37 | }, | 34 | }, |
38 | }, | 35 | }, |
... | @@ -65,7 +62,10 @@ module.exports = function(grunt) { | ... | @@ -65,7 +62,10 @@ module.exports = function(grunt) { |
65 | options: { | 62 | options: { |
66 | jshintrc: 'test/.jshintrc' | 63 | jshintrc: 'test/.jshintrc' |
67 | }, | 64 | }, |
68 | src: ['test/**/*.js', '!test/tsSegment.js', '!test/fixtures/*.js'] | 65 | src: ['test/**/*.js', |
66 | '!test/tsSegment.js', | ||
67 | '!test/fixtures/*.js', | ||
68 | '!test/manifest/**'] | ||
69 | }, | 69 | }, |
70 | }, | 70 | }, |
71 | watch: { | 71 | watch: { |
... | @@ -92,8 +92,57 @@ module.exports = function(grunt) { | ... | @@ -92,8 +92,57 @@ module.exports = function(grunt) { |
92 | grunt.loadNpmTasks('grunt-contrib-jshint'); | 92 | grunt.loadNpmTasks('grunt-contrib-jshint'); |
93 | grunt.loadNpmTasks('grunt-contrib-watch'); | 93 | grunt.loadNpmTasks('grunt-contrib-watch'); |
94 | 94 | ||
95 | grunt.registerTask('manifests-to-js', 'Wrap the test fixtures and output' + | ||
96 | ' so they can be loaded in a browser', | ||
97 | function() { | ||
98 | var | ||
99 | jsManifests = 'window.manifests = {\n', | ||
100 | jsExpected = 'window.expected = {\n'; | ||
101 | grunt.file.recurse('test/manifest/', | ||
102 | function(abspath, root, sub, filename) { | ||
103 | if ((/\.m3u8$/).test(abspath)) { | ||
104 | |||
105 | // translate this manifest | ||
106 | jsManifests += ' \'' + basename(filename, '.m3u8') + '\': ' + | ||
107 | grunt.file.read(abspath) | ||
108 | .split('\n') | ||
109 | |||
110 | // quote and concatenate | ||
111 | .map(function(line) { | ||
112 | return ' \'' + line + '\\n\' +\n'; | ||
113 | }).join('') | ||
114 | |||
115 | // strip leading spaces and the trailing '+' | ||
116 | .slice(4, -3); | ||
117 | jsManifests += ',\n'; | ||
118 | } | ||
119 | |||
120 | if ((/\.json$/).test(abspath)) { | ||
121 | |||
122 | // append the JSON | ||
123 | jsExpected += ' "' + basename(filename, '.json') + '": ' + | ||
124 | grunt.file.read(abspath) + ',\n'; | ||
125 | } | ||
126 | }); | ||
127 | |||
128 | // clean up and close the objects | ||
129 | jsManifests = jsManifests.slice(0, -2); | ||
130 | jsManifests += '\n};\n'; | ||
131 | jsExpected = jsExpected.slice(0, -2); | ||
132 | jsExpected += '\n};\n'; | ||
133 | |||
134 | // write out the manifests | ||
135 | grunt.file.write('tmp/manifests.js', jsManifests); | ||
136 | grunt.file.write('tmp/expected.js', jsExpected); | ||
137 | }); | ||
138 | |||
95 | // Default task. | 139 | // Default task. |
96 | grunt.registerTask('default', | 140 | grunt.registerTask('default', |
97 | ['jshint', 'qunit', 'clean', 'concat', 'uglify']); | 141 | ['clean', |
142 | 'jshint', | ||
143 | 'manifests-to-js', | ||
144 | 'qunit', | ||
145 | 'concat', | ||
146 | 'uglify']); | ||
98 | 147 | ||
99 | }; | 148 | }; | ... | ... |
1 | [![Build Status](https://travis-ci.org/brightcove/videojs-contrib-hls.png)](https://travis-ci.org/brightcove/videojs-contrib-hls) | ||
2 | |||
1 | # video.js HLS Plugin | 3 | # video.js HLS Plugin |
2 | 4 | ||
3 | A video.js plugin that plays HLS video on platforms that don't support it but have Flash. | 5 | A video.js plugin that plays HLS video on platforms that don't support it but have Flash. |
4 | 6 | ||
5 | ## Getting Started | 7 | ## Getting Started |
6 | Download the [production version][min] or the [development version][max]. | 8 | Download the [plugin](https://raw.github.com/videojs/videojs-contrib-hls/master/dist/videojs-hls.min.js). On your web page: |
7 | |||
8 | [min]: https://raw.bithub.com/dlapalomento/video-js-hls/master/dist/videojs-hls.min.js | ||
9 | [max]: https://raw.bithub.com/dlapalomento/video-js-hls/master/dist/videojs-hls.js | ||
10 | |||
11 | In your web page: | ||
12 | 9 | ||
13 | ```html | 10 | ```html |
14 | <script src="video.js"></script> | 11 | <script src="video.js"></script> |
15 | <script src="dist/videojs-hls.min.js"></script> | 12 | <script src="videojs-hls.min.js"></script> |
16 | <script> | 13 | <script> |
17 | var player = videojs('video'); | 14 | var player = videojs('video'); |
18 | player.hls(); | 15 | player.hls('http://example.com/video.m3u8'); |
16 | player.play(); | ||
19 | </script> | 17 | </script> |
20 | ``` | 18 | ``` |
21 | 19 | ||
22 | ## Documentation | 20 | ## Documentation |
23 | _(Coming soon)_ | 21 | [HTTP Live Streaming](https://developer.apple.com/streaming/) (HLS) has |
22 | become a de-facto standard for streaming video on mobile devices | ||
23 | thanks to its native support on iOS and Android. There are a number of | ||
24 | reasons independent of platform to recommend the format, though: | ||
25 | |||
26 | - Supports (client-driven) adaptive bitrate selection | ||
27 | - Delivered over standard HTTP ports | ||
28 | - Simple, text-based manifest format | ||
29 | - No proprietary streaming servers required | ||
30 | |||
31 | Unfortunately, all the major desktop browsers except for Safari are | ||
32 | missing HLS support. That leaves web developers in the unfortunate | ||
33 | position of having to maintain alternate renditions of the same video | ||
34 | and potentially having to forego HTML-based video entirely to provide | ||
35 | the best desktop viewing experience. | ||
36 | |||
37 | This plugin attempts to address that situation by providing a polyfill | ||
38 | for HLS on browsers that have Flash support. You can deploy a single | ||
39 | HLS stream, code against the regular HTML5 video APIs, and create a | ||
40 | fast, high-quality video experience across all the big web device | ||
41 | categories. | ||
42 | |||
43 | The videojs-hls plugin is still working towards a 1.0 release so it | ||
44 | may not fit your requirements today. Specifically, there is _no_ | ||
45 | support for: | ||
46 | |||
47 | - Alternate audio and video tracks | ||
48 | - Subtitles | ||
49 | - Segment codecs _other than_ H.264 with AAC audio | ||
50 | - Live streams | ||
51 | - Internet Explorer < 10 | ||
52 | |||
53 | ### Runtime Properties | ||
54 | #### player.hls.master | ||
55 | Type: `object` | ||
56 | |||
57 | An object representing the parsed master playlist. If a media playlist | ||
58 | is loaded directly, a master playlist with only one entry will be | ||
59 | created. | ||
60 | |||
61 | #### player.hls.media | ||
62 | Type: `object` | ||
63 | |||
64 | An object representing the currently selected media playlist. This is | ||
65 | the playlist that is being referred to when a additional video data | ||
66 | needs to be downloaded. | ||
67 | |||
68 | #### player.hls.mediaIndex | ||
69 | Type: `number` | ||
70 | |||
71 | The index of the next video segment to be downloaded from | ||
72 | `player.hls.media`. | ||
73 | |||
74 | #### player.hls.selectPlaylist | ||
75 | Type: `function` | ||
76 | |||
77 | A function that returns the media playlist object to use to download | ||
78 | the next segment. It is invoked by the plugin immediately before a new | ||
79 | segment is downloaded. You can override this function to provide your | ||
80 | adaptive streaming logic. You must, however, be sure to return a valid | ||
81 | media playlist object that is present in `player.hls.master`. | ||
82 | |||
83 | ### Events | ||
84 | #### loadedmetadata | ||
85 | |||
86 | Fired after the first media playlist is downloaded for a stream. | ||
87 | |||
88 | #### loadedmanifest | ||
89 | |||
90 | Fired immediately after a new master or media playlist has been | ||
91 | downloaded. By default, the plugin only downloads playlists as they | ||
92 | are needed. | ||
93 | |||
94 | ## Hosting Considerations | ||
95 | Unlike a native HLS implementation, the HLS plugin has to comply with | ||
96 | the browser's security policies. That means that all the files that | ||
97 | make up the stream must be served from the same domain as the page | ||
98 | hosting the video player or from a server that has appropriate [CORS | ||
99 | headers](https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS) | ||
100 | configured. Easy [instructions are | ||
101 | available](http://enable-cors.org/server.html) for popular webservers | ||
102 | and most CDNs should have no trouble turning CORS on for your account. | ||
103 | |||
104 | ## MBR Rendition Selection Logic | ||
105 | In situations where manifests have multiple renditions, the player will | ||
106 | go through the following algorithm to determine the best rendition by | ||
107 | bandwidth and viewport dimensions. | ||
24 | 108 | ||
25 | ## Examples | 109 | - Start on index 0 as defined in the HLS Spec (link above) |
26 | _(Coming soon)_ | 110 | - On a successful load complete per segment determine the following; |
111 | - player.hls.bandwidth set to value as segment byte size over download time | ||
112 | - Viewport width/height as determined by player.width()/player.height() | ||
113 | - Playlists mapped and sorted by BANDWIDTH less than or equal to 1.1x player.hls.bandwidth | ||
114 | - Best playlist variant by BANDWIDTH determined | ||
115 | - Subset of bandwidth appropriate renditions mapped | ||
116 | - Subset validated for RESOLUTION attributes less than or equal to player dimensions | ||
117 | - Best playlist variant by RESOLUTION determined | ||
118 | - Result is as follows; | ||
119 | - [Best RESOLUTION variant] OR [Best BANDWIDTH variant] OR [inital playlist in manifest] | ||
27 | 120 | ||
28 | ## Release History | 121 | ## Release History |
29 | _(Nothing yet)_ | 122 | _(Nothing yet)_ | ... | ... |
... | @@ -4,16 +4,16 @@ | ... | @@ -4,16 +4,16 @@ |
4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
5 | <title>video.js HLS Plugin Example</title> | 5 | <title>video.js HLS Plugin Example</title> |
6 | 6 | ||
7 | <link href="node_modules/video.js/video-js.css" rel="stylesheet"> | 7 | <link href="node_modules/video.js/dist/video-js/video-js.css" rel="stylesheet"> |
8 | 8 | ||
9 | <!-- video.js --> | 9 | <!-- video.js --> |
10 | <script src="node_modules/video.js/video.dev.js"></script> | 10 | <script src="node_modules/video.js/dist/video-js/video.js"></script> |
11 | 11 | ||
12 | <!-- Media Sources plugin --> | 12 | <!-- Media Sources plugin --> |
13 | <script src="node_modules/videojs-media-sources/videojs-media-sources.js"></script> | 13 | <script src="node_modules/videojs-contrib-media-sources/videojs-media-sources.js"></script> |
14 | 14 | ||
15 | <!-- HLS plugin --> | 15 | <!-- HLS plugin --> |
16 | <script src="src/video-js-hls.js"></script> | 16 | <script src="src/videojs-hls.js"></script> |
17 | 17 | ||
18 | <!-- segment handling --> | 18 | <!-- segment handling --> |
19 | <script src="src/flv-tag.js"></script> | 19 | <script src="src/flv-tag.js"></script> |
... | @@ -21,15 +21,10 @@ | ... | @@ -21,15 +21,10 @@ |
21 | <script src="src/h264-stream.js"></script> | 21 | <script src="src/h264-stream.js"></script> |
22 | <script src="src/aac-stream.js"></script> | 22 | <script src="src/aac-stream.js"></script> |
23 | <script src="src/segment-parser.js"></script> | 23 | <script src="src/segment-parser.js"></script> |
24 | <script src="src/segment-controller.js"></script> | ||
25 | 24 | ||
26 | <!-- m3u8 handling --> | 25 | <!-- m3u8 handling --> |
27 | <script src="src/m3u8/m3u8.js"></script> | 26 | <script src="src/stream.js"></script> |
28 | <script src="src/m3u8/m3u8-tag-types.js"></script> | ||
29 | <script src="src/m3u8/m3u8-parser.js"></script> | 27 | <script src="src/m3u8/m3u8-parser.js"></script> |
30 | <script src="src/manifest-controller.js"></script> | ||
31 | <script src="src/segment-controller.js"></script> | ||
32 | <script src="src/hls-playback-controller.js"></script> | ||
33 | 28 | ||
34 | <!-- example MPEG2-TS segments --> | 29 | <!-- example MPEG2-TS segments --> |
35 | <!-- bipbop --> | 30 | <!-- bipbop --> |
... | @@ -44,20 +39,17 @@ | ... | @@ -44,20 +39,17 @@ |
44 | height="300" | 39 | height="300" |
45 | width="600" | 40 | width="600" |
46 | controls> | 41 | controls> |
42 | <source | ||
43 | src="http://solutions.brightcove.com/jwhisenant/hls/apple/bipbop/bipbopall.m3u8" | ||
44 | type="application/x-mpegURL"> | ||
47 | </video> | 45 | </video> |
48 | <script> | 46 | <script> |
49 | var video, mediaSource; | 47 | videojs.options.flash.swf = 'node_modules/video.js/dist/video-js/video-js.swf'; |
50 | |||
51 | // initialize the player | 48 | // initialize the player |
52 | videojs.options.flash.swf = 'node_modules/videojs-media-sources/video-js-with-mse.swf'; | 49 | var player = videojs('video'); |
53 | video = videojs('video',{},function(){ | ||
54 | this.playbackController = new window.videojs.hls.HLSPlaybackController(this); | ||
55 | this.playbackController.loadManifest('test/fixtures/prog_index.m3u8', function(data) { | ||
56 | console.log(data); | ||
57 | }); | ||
58 | }); | ||
59 | </script> | ||
60 | |||
61 | 50 | ||
51 | // initialize the plugin | ||
52 | player.hls(); | ||
53 | </script> | ||
62 | </body> | 54 | </body> |
63 | </html> | 55 | </html> | ... | ... |
... | @@ -6,7 +6,7 @@ | ... | @@ -6,7 +6,7 @@ |
6 | }, | 6 | }, |
7 | "license": "Apache 2", | 7 | "license": "Apache 2", |
8 | "scripts": { | 8 | "scripts": { |
9 | "test": "grunt qunit" | 9 | "test": "grunt" |
10 | }, | 10 | }, |
11 | "devDependencies": { | 11 | "devDependencies": { |
12 | "grunt-contrib-jshint": "~0.6.0", | 12 | "grunt-contrib-jshint": "~0.6.0", |
... | @@ -18,7 +18,7 @@ | ... | @@ -18,7 +18,7 @@ |
18 | "grunt": "~0.4.1" | 18 | "grunt": "~0.4.1" |
19 | }, | 19 | }, |
20 | "dependencies": { | 20 | "dependencies": { |
21 | "video.js": "~4.2.2", | 21 | "video.js": "git+https://github.com/dmlap/video-js.git#v4.3.0-10", |
22 | "videojs-contrib-media-sources": "git+ssh://git@github.com/videojs/videojs-contrib-media-sources.git" | 22 | "videojs-contrib-media-sources": "git+https://github.com/dmlap/videojs-contrib-media-sources.git#hotfix/misc-fixes" |
23 | } | 23 | } |
24 | } | 24 | } | ... | ... |
... | @@ -296,8 +296,8 @@ hls.FlvTag = function(type, extraData) { | ... | @@ -296,8 +296,8 @@ hls.FlvTag = function(type, extraData) { |
296 | 296 | ||
297 | // trim down the byte buffer to what is actually being used | 297 | // trim down the byte buffer to what is actually being used |
298 | this.bytes = this.bytes.subarray(0, this.length); | 298 | this.bytes = this.bytes.subarray(0, this.length); |
299 | this.frameTime = hls.FlvTag.frameTime(this.bytes); | ||
299 | console.assert(this.bytes.byteLength === this.length); | 300 | console.assert(this.bytes.byteLength === this.length); |
300 | |||
301 | return this; | 301 | return this; |
302 | }; | 302 | }; |
303 | }; | 303 | }; | ... | ... |
src/hls-playback-controller.js
deleted
100644 → 0
1 | (function(window) { | ||
2 | var | ||
3 | ManifestController = window.videojs.hls.ManifestController, | ||
4 | SegmentController = window.videojs.hls.SegmentController, | ||
5 | MediaSource = window.videojs.MediaSource, | ||
6 | SegmentParser = window.videojs.hls.SegmentParser; | ||
7 | |||
8 | |||
9 | window.videojs.hls.HLSPlaybackController = function(player) { | ||
10 | |||
11 | var self = this; | ||
12 | |||
13 | self.player = player; | ||
14 | self.mediaSource = new MediaSource(); | ||
15 | self.parser = new SegmentParser(); | ||
16 | |||
17 | self.manifestLoaded = false; | ||
18 | self.currentSegment = 0; | ||
19 | |||
20 | // register external callbacks | ||
21 | self.rendition = function(rendition) { | ||
22 | self.currentRendition = rendition; | ||
23 | self.loadManifestWithMediaSources(self.currentRendition.url, self.onM3U8LoadComplete, self.onM3U8LoadError, self.onM3U8Update); | ||
24 | }; | ||
25 | |||
26 | self.loadManifestWithMediaSources = function(manifestUrl,onDataCallback) { | ||
27 | self.manifestController = new ManifestController(); | ||
28 | self.manifestController.loadManifest(manifestUrl, self.onM3U8LoadComplete, self.onM3U8LoadError, self.onM3U8Update); | ||
29 | if (onDataCallback) { | ||
30 | self.manifestLoadCompleteCallback = onDataCallback; | ||
31 | } | ||
32 | }; | ||
33 | |||
34 | self.loadManifest = function(manifestUrl, onDataCallback) { | ||
35 | self.mediaSource.addEventListener('sourceopen', function() { | ||
36 | // feed parsed bytes into the player | ||
37 | self.sourceBuffer = self.mediaSource.addSourceBuffer('video/flv; codecs="vp6,aac"'); | ||
38 | |||
39 | self.parser = new SegmentParser(); | ||
40 | |||
41 | self.sourceBuffer.appendBuffer(self.parser.getFlvHeader(), self.player); | ||
42 | |||
43 | if (onDataCallback) { | ||
44 | self.manifestLoadCompleteCallback = onDataCallback; | ||
45 | } | ||
46 | |||
47 | self.manifestController = new ManifestController(); | ||
48 | self.manifestController.loadManifest(manifestUrl, self.onM3U8LoadComplete, self.onM3U8LoadError, self.onM3U8Update); | ||
49 | |||
50 | }, false); | ||
51 | |||
52 | self.player.src({ | ||
53 | src: window.videojs.URL.createObjectURL(self.mediaSource), | ||
54 | type: "video/flv" | ||
55 | }); | ||
56 | }; | ||
57 | |||
58 | self.onM3U8LoadComplete = function(m3u8) { | ||
59 | if (m3u8.invalidReasons.length === 0) { | ||
60 | if (m3u8.isPlaylist) { | ||
61 | self.currentPlaylist = m3u8; | ||
62 | self.rendition(self.currentPlaylist.playlistItems[0]); | ||
63 | } else { | ||
64 | self.currentManifest = m3u8; | ||
65 | self.manifestLoaded = true; | ||
66 | |||
67 | self.loadSegment(self.currentManifest.mediaItems[0]); | ||
68 | |||
69 | if (self.manifestLoadCompleteCallback) { | ||
70 | self.manifestLoadCompleteCallback(m3u8); | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | }; | ||
75 | |||
76 | self.onM3U8LoadError = function() {}; | ||
77 | self.onM3U8Update = function() {}; | ||
78 | |||
79 | self.loadSegment = function(segment) { | ||
80 | self.segmentController = new SegmentController(); | ||
81 | self.segmentController.loadSegment(segment.url, self.onSegmentLoadComplete, self.onSegmentLoadError); | ||
82 | }; | ||
83 | |||
84 | self.onSegmentLoadComplete = function(segment) { | ||
85 | self.parser.parseSegmentBinaryData(segment.binaryData); | ||
86 | |||
87 | while (self.parser.tagsAvailable()) { | ||
88 | self.sourceBuffer.appendBuffer(self.parser.getNextTag().bytes, self.player); | ||
89 | } | ||
90 | |||
91 | if (self.currentSegment < self.currentManifest.mediaItems.length-1) { | ||
92 | self.loadNextSegment(); | ||
93 | } | ||
94 | }; | ||
95 | |||
96 | self.loadNextSegment = function() { | ||
97 | self.currentSegment++; | ||
98 | self.loadSegment(self.currentManifest.mediaItems[self.currentSegment]); | ||
99 | }; | ||
100 | |||
101 | self.onSegmentLoadError = function() {}; | ||
102 | |||
103 | }; | ||
104 | })(this); |
This diff is collapsed.
Click to expand it.
src/m3u8/m3u8-tag-types.js
deleted
100644 → 0
1 | (function(window) { | ||
2 | window.videojs.hls.m3u8TagType = { | ||
3 | /* | ||
4 | * Derived from the HTTP Live Streaming Spec V8 | ||
5 | * http://tools.ietf.org/html/draft-pantos-http-live-streaming-08 | ||
6 | */ | ||
7 | |||
8 | /** | ||
9 | * Identifies manifest as Extended M3U - must be present on first line! | ||
10 | */ | ||
11 | EXTM3U:"#EXTM3U", | ||
12 | |||
13 | /** | ||
14 | * Specifies duration. | ||
15 | * Syntax: #EXTINF:<duration>,<title> | ||
16 | * Example: #EXTINF:10, | ||
17 | */ | ||
18 | EXTINF:"#EXTINF:", | ||
19 | |||
20 | /** | ||
21 | * Indicates that a media segment is a sub-range of the resource identified by its media URI. | ||
22 | * Syntax: #EXT-X-BYTERANGE:<n>[@o] | ||
23 | */ | ||
24 | BYTERANGE:"#EXT-X-BYTERANGE:", | ||
25 | |||
26 | /** | ||
27 | * Specifies the maximum media segment duration - applies to entire manifest. | ||
28 | * Syntax: #EXT-X-TARGETDURATION:<s> | ||
29 | * Example: #EXT-X-TARGETDURATION:10 | ||
30 | */ | ||
31 | TARGETDURATION:"#EXT-X-TARGETDURATION:", | ||
32 | |||
33 | /** | ||
34 | * Specifies the sequence number of the first URI in a manifest. | ||
35 | * Syntax: #EXT-X-MEDIA-SEQUENCE:<i> | ||
36 | * Example: #EXT-X-MEDIA-SEQUENCE:50 | ||
37 | */ | ||
38 | MEDIA_SEQUENCE:"#EXT-X-MEDIA-SEQUENCE:", | ||
39 | |||
40 | /** | ||
41 | * Specifies a method by which media segments can be decrypted, if encryption is present. | ||
42 | * Syntax: #EXT-X-KEY:<attribute-list> | ||
43 | * Note: This is likely irrelevant in the context of the Flash Player. | ||
44 | */ | ||
45 | KEY:"#EXT-X-KEY:", | ||
46 | |||
47 | /** | ||
48 | * Associates the first sample of a media segment with an absolute date and/or time. Applies only to the next media URI. | ||
49 | * Syntax: #EXT-X-PROGRAM-DATE-TIME:<YYYY-MM-DDThh:mm:ssZ> | ||
50 | * Example: #EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031+08:00 | ||
51 | */ | ||
52 | PROGRAM_DATE_TIME:"#EXT-X-PROGRAM-DATE-TIME:", | ||
53 | |||
54 | /** | ||
55 | * Indicates whether the client MAY or MUST NOT cache downloaded media segments for later replay. | ||
56 | * Syntax: #EXT-X-ALLOW-CACHE:<YES|NO> | ||
57 | * Note: This is likely irrelevant in the context of the Flash Player. | ||
58 | */ | ||
59 | ALLOW_CACHE:"#EXT-X-ALLOW_CACHE:", | ||
60 | |||
61 | /** | ||
62 | * Provides mutability information about the manifest. | ||
63 | * Syntax: #EXT-X-PLAYLIST-TYPE:<EVENT|VOD> | ||
64 | */ | ||
65 | PLAYLIST_TYPE:"#EXT-X-PLAYLIST-TYPE:", | ||
66 | |||
67 | /** | ||
68 | * Indicates that no more media segments will be added to the manifest. May occur ONCE, anywhere in the mainfest file. | ||
69 | */ | ||
70 | ENDLIST:"#EXT-X-ENDLIST", | ||
71 | |||
72 | /** | ||
73 | * Used to relate Playlists that contain alternative renditions of the same content. | ||
74 | * Syntax: #EXT-X-MEDIA:<attribute-list> | ||
75 | */ | ||
76 | MEDIA:"#EXT-X-MEDIA:", | ||
77 | |||
78 | /** | ||
79 | * Identifies a media URI as a Playlist file containing a multimedia presentation and provides information about that presentation. | ||
80 | * Syntax: #EXT-X-STREAM-INF:<attribute-list> | ||
81 | * <URI> | ||
82 | */ | ||
83 | STREAM_INF:"#EXT-X-STREAM-INF:", | ||
84 | |||
85 | /** | ||
86 | * Indicates an encoding discontinuity between the media segment that follows it and the one that preceded it. | ||
87 | */ | ||
88 | DISCONTINUITY:"#EXT-X-DISCONTINUITY", | ||
89 | |||
90 | /** | ||
91 | * Indicates that each media segment in the manifest describes a single I-frame. | ||
92 | */ | ||
93 | I_FRAMES_ONLY:"#EXT-X-I-FRAMES-ONLY", | ||
94 | |||
95 | /** | ||
96 | * Identifies a manifest file containing the I-frames of a multimedia presentation. It stands alone, in that it does not apply to a particular URI in the manifest. | ||
97 | * Syntax: #EXT-X-I-FRAME-STREAM-INF:<attribute-list> | ||
98 | */ | ||
99 | I_FRAME_STREAM_INF:"#EXT-X-I-FRAME-STREAM-INF:", | ||
100 | |||
101 | /** | ||
102 | * Indicates the compatibility version of the Playlist file. | ||
103 | * Syntax: #EXT-X-VERSION:<n> | ||
104 | */ | ||
105 | VERSION:"#EXT-X-VERSION:", | ||
106 | |||
107 | /** | ||
108 | * Indicates the total duration as reported by Zencoder. | ||
109 | * Syntax: #ZEN-TOTAL-DURATION:<n> | ||
110 | */ | ||
111 | ZEN_TOTAL_DURATION: "#ZEN-TOTAL-DURATION:" | ||
112 | |||
113 | }; | ||
114 | })(this); |
src/m3u8/m3u8.js
deleted
100644 → 0
1 | (function (window) { | ||
2 | window.videojs.hls.M3U8 = function () { | ||
3 | this.directory = ""; | ||
4 | this.allowCache = "NO"; | ||
5 | this.playlistItems = []; | ||
6 | this.mediaItems = []; | ||
7 | this.iFrameItems = []; | ||
8 | this.invalidReasons = []; | ||
9 | this.hasValidM3UTag = false; | ||
10 | this.hasEndTag = false; | ||
11 | this.targetDuration = -1; | ||
12 | this.totalDuration = -1; | ||
13 | this.isPlaylist = false; | ||
14 | this.playlistType = ""; | ||
15 | this.mediaSequence = -1; | ||
16 | this.version = -1; | ||
17 | }; | ||
18 | })(this); |
src/manifest-controller.js
deleted
100644 → 0
1 | (function (window) { | ||
2 | var | ||
3 | M3U8Parser = window.videojs.hls.M3U8Parser; | ||
4 | |||
5 | window.videojs.hls.ManifestController = function() { | ||
6 | var self = this; | ||
7 | |||
8 | self.loadManifest = function(manifestUrl, onDataCallback, onErrorCallback, onUpdateCallback) { | ||
9 | self.url = manifestUrl; | ||
10 | |||
11 | if (onDataCallback) { | ||
12 | self.onDataCallback = onDataCallback; | ||
13 | } | ||
14 | if (onErrorCallback) { | ||
15 | self.onErrorCallback = onErrorCallback; | ||
16 | } | ||
17 | |||
18 | if (onUpdateCallback) { | ||
19 | self.onUpdateCallback = onUpdateCallback; | ||
20 | } | ||
21 | |||
22 | window.vjs.get(manifestUrl, self.onManifestLoadComplete, self.onManifestLoadError); | ||
23 | }; | ||
24 | |||
25 | self.parseManifest = function(dataAsString) { | ||
26 | self.parser = new M3U8Parser(); | ||
27 | self.parser.directory = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(self.url).slice(1)[1]; | ||
28 | self.data = self.parser.parse(dataAsString); | ||
29 | |||
30 | return self.data; | ||
31 | }; | ||
32 | |||
33 | self.onManifestLoadComplete = function(response) { | ||
34 | var output = self.parseManifest(response); | ||
35 | |||
36 | if (self.onDataCallback !== undefined) { | ||
37 | self.onDataCallback(output); | ||
38 | } | ||
39 | }; | ||
40 | |||
41 | self.onManifestLoadError = function(err) { | ||
42 | if (self.onErrorCallback !== undefined) { | ||
43 | self.onErrorCallback((err !== undefined) ? err : null); | ||
44 | } | ||
45 | }; | ||
46 | }; | ||
47 | })(this); |
src/segment-controller.js
deleted
100644 → 0
1 | (function(window) { | ||
2 | |||
3 | window.videojs.hls.SegmentController = function() { | ||
4 | var self = this; | ||
5 | |||
6 | self.loadSegment = function(segmentUrl, onDataCallback, onErrorCallback, onUpdateCallback) { | ||
7 | var request = new XMLHttpRequest(); | ||
8 | |||
9 | self.url = segmentUrl; | ||
10 | self.onDataCallback = onDataCallback; | ||
11 | self.onErrorCallback = onErrorCallback; | ||
12 | self.onUpdateCallback = onUpdateCallback; | ||
13 | self.requestTimestamp = +new Date(); | ||
14 | |||
15 | request.open('GET', segmentUrl, true); | ||
16 | request.responseType = 'arraybuffer'; | ||
17 | request.onload = function() { | ||
18 | self.onSegmentLoadComplete(new Uint8Array(request.response)); | ||
19 | }; | ||
20 | |||
21 | request.send(null); | ||
22 | }; | ||
23 | |||
24 | self.parseSegment = function(incomingData) { | ||
25 | self.data = {}; | ||
26 | self.data.binaryData = incomingData; | ||
27 | self.data.url = self.url; | ||
28 | self.data.isCached = false; | ||
29 | self.data.requestTimestamp = self.requestTimestamp; | ||
30 | self.data.responseTimestamp = self.responseTimestamp; | ||
31 | self.data.byteLength = incomingData.byteLength; | ||
32 | self.data.isCached = parseInt(self.responseTimestamp - self.requestTimestamp,10) < 75; | ||
33 | self.data.throughput = self.calculateThroughput(self.data.byteLength, self.requestTimestamp ,self.responseTimestamp); | ||
34 | |||
35 | return self.data; | ||
36 | }; | ||
37 | |||
38 | self.calculateThroughput = function(dataAmount, startTime, endTime) { | ||
39 | return Math.round(dataAmount / (endTime - startTime) * 1000) * 8; | ||
40 | }; | ||
41 | |||
42 | self.onSegmentLoadComplete = function(response) { | ||
43 | var output; | ||
44 | |||
45 | self.responseTimestamp = +new Date(); | ||
46 | |||
47 | output = self.parseSegment(response); | ||
48 | |||
49 | if (self.onDataCallback !== undefined) { | ||
50 | self.onDataCallback(output); | ||
51 | } | ||
52 | }; | ||
53 | |||
54 | self.onSegmentLoadError = function(error) { | ||
55 | if (error) { | ||
56 | throw error; | ||
57 | } | ||
58 | |||
59 | if (self.onErrorCallback !== undefined) { | ||
60 | self.onErrorCallback(error); | ||
61 | } | ||
62 | }; | ||
63 | }; | ||
64 | })(this); |
This diff is collapsed.
Click to expand it.
src/stream.js
0 → 100644
1 | /** | ||
2 | * A lightweight readable stream implemention that handles event dispatching. | ||
3 | * Objects that inherit from streams should call init in their constructors. | ||
4 | */ | ||
5 | (function(videojs, undefined) { | ||
6 | var Stream = function() { | ||
7 | this.init = function() { | ||
8 | var listeners = {}; | ||
9 | /** | ||
10 | * Add a listener for a specified event type. | ||
11 | * @param type {string} the event name | ||
12 | * @param listener {function} the callback to be invoked when an event of | ||
13 | * the specified type occurs | ||
14 | */ | ||
15 | this.on = function(type, listener) { | ||
16 | if (!listeners[type]) { | ||
17 | listeners[type] = []; | ||
18 | } | ||
19 | listeners[type].push(listener); | ||
20 | }; | ||
21 | /** | ||
22 | * Remove a listener for a specified event type. | ||
23 | * @param type {string} the event name | ||
24 | * @param listener {function} a function previously registered for this | ||
25 | * type of event through `on` | ||
26 | */ | ||
27 | this.off = function(type, listener) { | ||
28 | var index; | ||
29 | if (!listeners[type]) { | ||
30 | return false; | ||
31 | } | ||
32 | index = listeners[type].indexOf(listener); | ||
33 | listeners[type].splice(index, 1); | ||
34 | return index > -1; | ||
35 | }; | ||
36 | /** | ||
37 | * Trigger an event of the specified type on this stream. Any additional | ||
38 | * arguments to this function are passed as parameters to event listeners. | ||
39 | * @param type {string} the event name | ||
40 | */ | ||
41 | this.trigger = function(type) { | ||
42 | var callbacks, i, length, args; | ||
43 | callbacks = listeners[type]; | ||
44 | if (!callbacks) { | ||
45 | return; | ||
46 | } | ||
47 | args = Array.prototype.slice.call(arguments, 1); | ||
48 | length = callbacks.length; | ||
49 | for (i = 0; i < length; ++i) { | ||
50 | callbacks[i].apply(this, args); | ||
51 | } | ||
52 | }; | ||
53 | }; | ||
54 | }; | ||
55 | /** | ||
56 | * Forwards all `data` events on this stream to the destination stream. The | ||
57 | * destination stream should provide a method `push` to receive the data | ||
58 | * events as they arrive. | ||
59 | * @param destination {stream} the stream that will receive all `data` events | ||
60 | * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options | ||
61 | */ | ||
62 | Stream.prototype.pipe = function(destination) { | ||
63 | this.on('data', function(data) { | ||
64 | destination.push(data); | ||
65 | }); | ||
66 | }; | ||
67 | |||
68 | videojs.hls.Stream = Stream; | ||
69 | })(window.videojs); |
src/video-js-hls.js
deleted
100644 → 0
src/videojs-hls.js
0 → 100644
This diff is collapsed.
Click to expand it.
1 | #EXTM3U | 1 | #EXTM3U |
2 | #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000 | 2 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000 |
3 | prog_index.m3u8 | 3 | prog_index.m3u8 |
4 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000 | ||
5 | prog_index1.m3u8 | ||
6 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000 | ||
7 | prog_index2.m3u8 | ||
8 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000 | ||
9 | prog_index3.m3u8 | ... | ... |
test/m3u8_test.js
0 → 100644
This diff is collapsed.
Click to expand it.
test/manifest/absoluteUris.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "http://example.com/00001.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 10, | ||
12 | "uri": "https://example.com/00002.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 10, | ||
16 | "uri": "//example.com/00003.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 10, | ||
20 | "uri": "http://example.com/00004.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 10 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/absoluteUris.m3u8
0 → 100644
test/manifest/allowCache.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | }, | ||
14 | { | ||
15 | "byterange": { | ||
16 | "length": 587500, | ||
17 | "offset": 522828 | ||
18 | }, | ||
19 | "duration": 10, | ||
20 | "uri": "hls_450k_video.ts" | ||
21 | }, | ||
22 | { | ||
23 | "byterange": { | ||
24 | "length": 713084, | ||
25 | "offset": 1110328 | ||
26 | }, | ||
27 | "duration": 10, | ||
28 | "uri": "hls_450k_video.ts" | ||
29 | }, | ||
30 | { | ||
31 | "byterange": { | ||
32 | "length": 476580, | ||
33 | "offset": 1823412 | ||
34 | }, | ||
35 | "duration": 10, | ||
36 | "uri": "hls_450k_video.ts" | ||
37 | }, | ||
38 | { | ||
39 | "byterange": { | ||
40 | "length": 535612, | ||
41 | "offset": 2299992 | ||
42 | }, | ||
43 | "duration": 10, | ||
44 | "uri": "hls_450k_video.ts" | ||
45 | }, | ||
46 | { | ||
47 | "byterange": { | ||
48 | "length": 207176, | ||
49 | "offset": 2835604 | ||
50 | }, | ||
51 | "duration": 10, | ||
52 | "uri": "hls_450k_video.ts" | ||
53 | }, | ||
54 | { | ||
55 | "byterange": { | ||
56 | "length": 455900, | ||
57 | "offset": 3042780 | ||
58 | }, | ||
59 | "duration": 10, | ||
60 | "uri": "hls_450k_video.ts" | ||
61 | }, | ||
62 | { | ||
63 | "byterange": { | ||
64 | "length": 657248, | ||
65 | "offset": 3498680 | ||
66 | }, | ||
67 | "duration": 10, | ||
68 | "uri": "hls_450k_video.ts" | ||
69 | }, | ||
70 | { | ||
71 | "byterange": { | ||
72 | "length": 571708, | ||
73 | "offset": 4155928 | ||
74 | }, | ||
75 | "duration": 10, | ||
76 | "uri": "hls_450k_video.ts" | ||
77 | }, | ||
78 | { | ||
79 | "byterange": { | ||
80 | "length": 485040, | ||
81 | "offset": 4727636 | ||
82 | }, | ||
83 | "duration": 10, | ||
84 | "uri": "hls_450k_video.ts" | ||
85 | }, | ||
86 | { | ||
87 | "byterange": { | ||
88 | "length": 709136, | ||
89 | "offset": 5212676 | ||
90 | }, | ||
91 | "duration": 10, | ||
92 | "uri": "hls_450k_video.ts" | ||
93 | }, | ||
94 | { | ||
95 | "byterange": { | ||
96 | "length": 730004, | ||
97 | "offset": 5921812 | ||
98 | }, | ||
99 | "duration": 10, | ||
100 | "uri": "hls_450k_video.ts" | ||
101 | }, | ||
102 | { | ||
103 | "byterange": { | ||
104 | "length": 456276, | ||
105 | "offset": 6651816 | ||
106 | }, | ||
107 | "duration": 10, | ||
108 | "uri": "hls_450k_video.ts" | ||
109 | }, | ||
110 | { | ||
111 | "byterange": { | ||
112 | "length": 468684, | ||
113 | "offset": 7108092 | ||
114 | }, | ||
115 | "duration": 10, | ||
116 | "uri": "hls_450k_video.ts" | ||
117 | }, | ||
118 | { | ||
119 | "byterange": { | ||
120 | "length": 444996, | ||
121 | "offset": 7576776 | ||
122 | }, | ||
123 | "duration": 10, | ||
124 | "uri": "hls_450k_video.ts" | ||
125 | }, | ||
126 | { | ||
127 | "byterange": { | ||
128 | "length": 331444, | ||
129 | "offset": 8021772 | ||
130 | }, | ||
131 | "duration": 10, | ||
132 | "uri": "hls_450k_video.ts" | ||
133 | }, | ||
134 | { | ||
135 | "byterange": { | ||
136 | "length": 44556, | ||
137 | "offset": 8353216 | ||
138 | }, | ||
139 | "duration": 1.4167, | ||
140 | "uri": "hls_450k_video.ts" | ||
141 | } | ||
142 | ], | ||
143 | "targetDuration": 10 | ||
144 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/allowCache.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION:10 | ||
3 | #EXT-X-VERSION:4 | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | #EXT-X-MEDIA-SEQUENCE:0 | ||
6 | #EXT-X-PLAYLIST-TYPE:VOD | ||
7 | #EXTINF:10, | ||
8 | #EXT-X-BYTERANGE:522828@0 | ||
9 | hls_450k_video.ts | ||
10 | #EXTINF:10, | ||
11 | #EXT-X-BYTERANGE:587500@522828 | ||
12 | hls_450k_video.ts | ||
13 | #EXTINF:10, | ||
14 | #EXT-X-BYTERANGE:713084@1110328 | ||
15 | hls_450k_video.ts | ||
16 | #EXTINF:10, | ||
17 | #EXT-X-BYTERANGE:476580@1823412 | ||
18 | hls_450k_video.ts | ||
19 | #EXTINF:10, | ||
20 | #EXT-X-BYTERANGE:535612@2299992 | ||
21 | hls_450k_video.ts | ||
22 | #EXTINF:10, | ||
23 | #EXT-X-BYTERANGE:207176@2835604 | ||
24 | hls_450k_video.ts | ||
25 | #EXTINF:10, | ||
26 | #EXT-X-BYTERANGE:455900@3042780 | ||
27 | hls_450k_video.ts | ||
28 | #EXTINF:10, | ||
29 | #EXT-X-BYTERANGE:657248@3498680 | ||
30 | hls_450k_video.ts | ||
31 | #EXTINF:10, | ||
32 | #EXT-X-BYTERANGE:571708@4155928 | ||
33 | hls_450k_video.ts | ||
34 | #EXTINF:10, | ||
35 | #EXT-X-BYTERANGE:485040@4727636 | ||
36 | hls_450k_video.ts | ||
37 | #EXTINF:10, | ||
38 | #EXT-X-BYTERANGE:709136@5212676 | ||
39 | hls_450k_video.ts | ||
40 | #EXTINF:10, | ||
41 | #EXT-X-BYTERANGE:730004@5921812 | ||
42 | hls_450k_video.ts | ||
43 | #EXTINF:10, | ||
44 | #EXT-X-BYTERANGE:456276@6651816 | ||
45 | hls_450k_video.ts | ||
46 | #EXTINF:10, | ||
47 | #EXT-X-BYTERANGE:468684@7108092 | ||
48 | hls_450k_video.ts | ||
49 | #EXTINF:10, | ||
50 | #EXT-X-BYTERANGE:444996@7576776 | ||
51 | hls_450k_video.ts | ||
52 | #EXTINF:10, | ||
53 | #EXT-X-BYTERANGE:331444@8021772 | ||
54 | hls_450k_video.ts | ||
55 | #EXTINF:1.4167, | ||
56 | #EXT-X-BYTERANGE:44556@8353216 | ||
57 | hls_450k_video.ts | ||
58 | #EXT-X-ENDLIST | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/allowCacheInvalid.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | } | ||
14 | ], | ||
15 | "targetDuration": 10 | ||
16 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/allowCacheInvalid.m3u8
0 → 100644
test/manifest/brightcove.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "playlists": [{ | ||
4 | "attributes": { | ||
5 | "PROGRAM-ID": 1, | ||
6 | "BANDWIDTH": 240000, | ||
7 | "RESOLUTION": { | ||
8 | "width": 396, | ||
9 | "height": 224 | ||
10 | } | ||
11 | }, | ||
12 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001" | ||
13 | }, { | ||
14 | "attributes": { | ||
15 | "PROGRAM-ID": 1, | ||
16 | "BANDWIDTH": 40000 | ||
17 | }, | ||
18 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001" | ||
19 | }, { | ||
20 | "attributes": { | ||
21 | "PROGRAM-ID": 1, | ||
22 | "BANDWIDTH": 440000, | ||
23 | "RESOLUTION": { | ||
24 | "width": 396, | ||
25 | "height": 224 | ||
26 | } | ||
27 | }, | ||
28 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001" | ||
29 | }, { | ||
30 | "attributes": { | ||
31 | "PROGRAM-ID": 1, | ||
32 | "BANDWIDTH": 1928000, | ||
33 | "RESOLUTION": { | ||
34 | "width": 960, | ||
35 | "height": 540 | ||
36 | } | ||
37 | }, | ||
38 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001" | ||
39 | }] | ||
40 | } |
test/manifest/brightcove.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=396x224 | ||
3 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001 | ||
4 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000 | ||
5 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001 | ||
6 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000,RESOLUTION=396x224 | ||
7 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001 | ||
8 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=960x540 | ||
9 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001 |
1 | window.brightcove_playlist_data = '#EXTM3U\n'+ | ||
2 | '#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=396x224\n'+ | ||
3 | 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001\n'+ | ||
4 | '#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000\n'+ | ||
5 | 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001\n'+ | ||
6 | '#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000,RESOLUTION=396x224\n'+ | ||
7 | 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001\n'+ | ||
8 | '#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=960x540\n'+ | ||
9 | 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001'; |
test/manifest/byteRange.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "hls_450k_video.ts" | ||
9 | }, | ||
10 | { | ||
11 | "byterange": { | ||
12 | "length": 587500, | ||
13 | "offset": 522828 | ||
14 | }, | ||
15 | "duration": 10, | ||
16 | "uri": "hls_450k_video.ts" | ||
17 | }, | ||
18 | { | ||
19 | "byterange": { | ||
20 | "length": 713084, | ||
21 | "offset": 0 | ||
22 | }, | ||
23 | "duration": 10, | ||
24 | "uri": "hls_450k_video2.ts" | ||
25 | }, | ||
26 | { | ||
27 | "byterange": { | ||
28 | "length": 476580, | ||
29 | "offset": 1823412 | ||
30 | }, | ||
31 | "duration": 10, | ||
32 | "uri": "hls_450k_video.ts" | ||
33 | }, | ||
34 | { | ||
35 | "byterange": { | ||
36 | "length": 535612, | ||
37 | "offset": 2299992 | ||
38 | }, | ||
39 | "duration": 10, | ||
40 | "uri": "hls_450k_video.ts" | ||
41 | }, | ||
42 | { | ||
43 | "byterange": { | ||
44 | "length": 207176, | ||
45 | "offset": 2835604 | ||
46 | }, | ||
47 | "duration": 10, | ||
48 | "uri": "hls_450k_video.ts" | ||
49 | }, | ||
50 | { | ||
51 | "byterange": { | ||
52 | "length": 455900, | ||
53 | "offset": 3042780 | ||
54 | }, | ||
55 | "duration": 10, | ||
56 | "uri": "hls_450k_video.ts" | ||
57 | }, | ||
58 | { | ||
59 | "byterange": { | ||
60 | "length": 657248, | ||
61 | "offset": 3498680 | ||
62 | }, | ||
63 | "duration": 10, | ||
64 | "uri": "hls_450k_video.ts" | ||
65 | }, | ||
66 | { | ||
67 | "byterange": { | ||
68 | "length": 571708, | ||
69 | "offset": 4155928 | ||
70 | }, | ||
71 | "duration": 10, | ||
72 | "uri": "hls_450k_video.ts" | ||
73 | }, | ||
74 | { | ||
75 | "byterange": { | ||
76 | "length": 485040, | ||
77 | "offset": 4727636 | ||
78 | }, | ||
79 | "duration": 10, | ||
80 | "uri": "hls_450k_video.ts" | ||
81 | }, | ||
82 | { | ||
83 | "byterange": { | ||
84 | "length": 709136, | ||
85 | "offset": 5212676 | ||
86 | }, | ||
87 | "duration": 10, | ||
88 | "uri": "hls_450k_video.ts" | ||
89 | }, | ||
90 | { | ||
91 | "byterange": { | ||
92 | "length": 730004, | ||
93 | "offset": 5921812 | ||
94 | }, | ||
95 | "duration": 10, | ||
96 | "uri": "hls_450k_video.ts" | ||
97 | }, | ||
98 | { | ||
99 | "byterange": { | ||
100 | "length": 456276, | ||
101 | "offset": 6651816 | ||
102 | }, | ||
103 | "duration": 10, | ||
104 | "uri": "hls_450k_video.ts" | ||
105 | }, | ||
106 | { | ||
107 | "byterange": { | ||
108 | "length": 468684, | ||
109 | "offset": 7108092 | ||
110 | }, | ||
111 | "duration": 10, | ||
112 | "uri": "hls_450k_video.ts" | ||
113 | }, | ||
114 | { | ||
115 | "byterange": { | ||
116 | "length": 444996, | ||
117 | "offset": 7576776 | ||
118 | }, | ||
119 | "duration": 10, | ||
120 | "uri": "hls_450k_video.ts" | ||
121 | }, | ||
122 | { | ||
123 | "byterange": { | ||
124 | "length": 331444, | ||
125 | "offset": 8021772 | ||
126 | }, | ||
127 | "duration": 10, | ||
128 | "uri": "hls_450k_video.ts" | ||
129 | }, | ||
130 | { | ||
131 | "byterange": { | ||
132 | "length": 44556, | ||
133 | "offset": 8353216 | ||
134 | }, | ||
135 | "duration": 1.4167, | ||
136 | "uri": "hls_450k_video.ts" | ||
137 | } | ||
138 | ], | ||
139 | "targetDuration": 10 | ||
140 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/byteRange.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION:10 | ||
3 | #EXT-X-VERSION:3 | ||
4 | #EXT-X-MEDIA-SEQUENCE:0 | ||
5 | #EXT-X-PLAYLIST-TYPE:VOD | ||
6 | #EXTINF:10, | ||
7 | hls_450k_video.ts | ||
8 | #EXTINF:10, | ||
9 | #EXT-X-BYTERANGE:587500@522828 | ||
10 | hls_450k_video.ts | ||
11 | #EXTINF:10, | ||
12 | #EXT-X-BYTERANGE:713084 | ||
13 | hls_450k_video2.ts | ||
14 | #EXTINF:10, | ||
15 | #EXT-X-BYTERANGE:476580@1823412 | ||
16 | hls_450k_video.ts | ||
17 | #EXTINF:10, | ||
18 | #EXT-X-BYTERANGE:535612@2299992 | ||
19 | hls_450k_video.ts | ||
20 | #EXTINF:10, | ||
21 | #EXT-X-BYTERANGE:207176@2835604 | ||
22 | hls_450k_video.ts | ||
23 | #EXTINF:10, | ||
24 | #EXT-X-BYTERANGE:455900@3042780 | ||
25 | hls_450k_video.ts | ||
26 | #EXTINF:10, | ||
27 | #EXT-X-BYTERANGE:657248@3498680 | ||
28 | hls_450k_video.ts | ||
29 | #EXTINF:10, | ||
30 | #EXT-X-BYTERANGE:571708@4155928 | ||
31 | hls_450k_video.ts | ||
32 | #EXTINF:10, | ||
33 | #EXT-X-BYTERANGE:485040@4727636 | ||
34 | hls_450k_video.ts | ||
35 | #EXTINF:10, | ||
36 | #EXT-X-BYTERANGE:709136@5212676 | ||
37 | hls_450k_video.ts | ||
38 | #EXTINF:10, | ||
39 | #EXT-X-BYTERANGE:730004@5921812 | ||
40 | hls_450k_video.ts | ||
41 | #EXTINF:10, | ||
42 | #EXT-X-BYTERANGE:456276@6651816 | ||
43 | hls_450k_video.ts | ||
44 | #EXTINF:10, | ||
45 | #EXT-X-BYTERANGE:468684@7108092 | ||
46 | hls_450k_video.ts | ||
47 | #EXTINF:10, | ||
48 | #EXT-X-BYTERANGE:444996@7576776 | ||
49 | hls_450k_video.ts | ||
50 | #EXTINF:10, | ||
51 | #EXT-X-BYTERANGE:331444@8021772 | ||
52 | hls_450k_video.ts | ||
53 | #EXTINF:1.4167, | ||
54 | #EXT-X-BYTERANGE:44556@8353216 | ||
55 | hls_450k_video.ts | ||
56 | #EXT-X-ENDLIST | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/disallowCache.json
0 → 100644
1 | { | ||
2 | "allowCache": false, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | } | ||
14 | ], | ||
15 | "targetDuration": 10 | ||
16 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/disallowCache.m3u8
0 → 100644
test/manifest/domainUris.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "/00001.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 10, | ||
12 | "uri": "/subdir/00002.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 10, | ||
16 | "uri": "/00003.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 10, | ||
20 | "uri": "/00004.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 10 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/domainUris.m3u8
0 → 100644
test/manifest/emptyAllowCache.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | } | ||
14 | ], | ||
15 | "targetDuration": 10 | ||
16 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/emptyAllowCache.m3u8
0 → 100644
test/manifest/emptyMediaSequence.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 6.08, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 6.6, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 5, | ||
20 | "uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 8 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/emptyMediaSequence.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE: | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | #EXT-X-TARGETDURATION:8 | ||
6 | #EXTINF:6.640,{} | ||
7 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
8 | #EXTINF:6.080,{} | ||
9 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
10 | #EXTINF:6.600,{} | ||
11 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
12 | #EXTINF:5.000,{} | ||
13 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
14 | #EXT-X-ENDLIST |
test/manifest/emptyPlaylistType.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 10, | ||
12 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 10, | ||
16 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 10, | ||
20 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts" | ||
21 | }, | ||
22 | { | ||
23 | "duration": 10, | ||
24 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts" | ||
25 | }, | ||
26 | { | ||
27 | "duration": 8, | ||
28 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts" | ||
29 | } | ||
30 | ], | ||
31 | "targetDuration": 10 | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/emptyPlaylistType.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE: | ||
3 | #EXT-X-TARGETDURATION:10 | ||
4 | #EXTINF:10, | ||
5 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts | ||
6 | #EXTINF:10, | ||
7 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts | ||
8 | #EXTINF:10, | ||
9 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts | ||
10 | #EXTINF:10, | ||
11 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts | ||
12 | #EXTINF:10, | ||
13 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts | ||
14 | #EXTINF:8, | ||
15 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts | ||
16 | #ZEN-TOTAL-DURATION:57.9911 | ||
17 | #EXT-X-ENDLIST |
test/manifest/emptyTargetDuration.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "playlists": [{ | ||
4 | "attributes": { | ||
5 | "PROGRAM-ID": 1, | ||
6 | "BANDWIDTH": 240000, | ||
7 | "RESOLUTION": { | ||
8 | "width": 396, | ||
9 | "height": 224 | ||
10 | } | ||
11 | }, | ||
12 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001" | ||
13 | }, { | ||
14 | "attributes": { | ||
15 | "PROGRAM-ID": 1, | ||
16 | "BANDWIDTH": 40000 | ||
17 | }, | ||
18 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001" | ||
19 | }, { | ||
20 | "attributes": { | ||
21 | "PROGRAM-ID": 1, | ||
22 | "BANDWIDTH": 440000, | ||
23 | "RESOLUTION": { | ||
24 | "width": 396, | ||
25 | "height": 224 | ||
26 | } | ||
27 | }, | ||
28 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001" | ||
29 | }, { | ||
30 | "attributes": { | ||
31 | "PROGRAM-ID": 1, | ||
32 | "BANDWIDTH": 1928000, | ||
33 | "RESOLUTION": { | ||
34 | "width": 960, | ||
35 | "height": 540 | ||
36 | } | ||
37 | }, | ||
38 | "uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001" | ||
39 | }] | ||
40 | } |
test/manifest/emptyTargetDuration.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION: | ||
3 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=396x224 | ||
4 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001 | ||
5 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000 | ||
6 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001 | ||
7 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000,RESOLUTION=396x224 | ||
8 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001 | ||
9 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=960x540 | ||
10 | http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001 |
test/manifest/event.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "EVENT", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 10, | ||
12 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 10, | ||
16 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 10, | ||
20 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts" | ||
21 | }, | ||
22 | { | ||
23 | "duration": 10, | ||
24 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts" | ||
25 | }, | ||
26 | { | ||
27 | "duration": 8, | ||
28 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts" | ||
29 | } | ||
30 | ], | ||
31 | "targetDuration": 10 | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/event.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:EVENT | ||
3 | #EXT-X-TARGETDURATION:10 | ||
4 | #EXTINF:10, | ||
5 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts | ||
6 | #EXTINF:10, | ||
7 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts | ||
8 | #EXTINF:10, | ||
9 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts | ||
10 | #EXTINF:10, | ||
11 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts | ||
12 | #EXTINF:10, | ||
13 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts | ||
14 | #EXTINF:8, | ||
15 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts | ||
16 | #ZEN-TOTAL-DURATION:57.9911 | ||
17 | #EXT-X-ENDLIST |
test/manifest/extinf.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | }, | ||
14 | { | ||
15 | "byterange": { | ||
16 | "length": 587500, | ||
17 | "offset": 522828 | ||
18 | }, | ||
19 | "duration": 10, | ||
20 | "uri": "hls_450k_video.ts" | ||
21 | }, | ||
22 | { | ||
23 | "byterange": { | ||
24 | "length": 713084, | ||
25 | "offset": 1110328 | ||
26 | }, | ||
27 | "duration": 5, | ||
28 | "uri": "hls_450k_video.ts" | ||
29 | }, | ||
30 | { | ||
31 | "byterange": { | ||
32 | "length": 476580, | ||
33 | "offset": 1823412 | ||
34 | }, | ||
35 | "duration": 9.7, | ||
36 | "uri": "hls_450k_video.ts" | ||
37 | }, | ||
38 | { | ||
39 | "byterange": { | ||
40 | "length": 535612, | ||
41 | "offset": 2299992 | ||
42 | }, | ||
43 | "duration": 10, | ||
44 | "uri": "hls_450k_video.ts" | ||
45 | }, | ||
46 | { | ||
47 | "byterange": { | ||
48 | "length": 207176, | ||
49 | "offset": 2835604 | ||
50 | }, | ||
51 | "duration": 10, | ||
52 | "uri": "hls_450k_video.ts" | ||
53 | }, | ||
54 | { | ||
55 | "byterange": { | ||
56 | "length": 455900, | ||
57 | "offset": 3042780 | ||
58 | }, | ||
59 | "duration": 10, | ||
60 | "uri": "hls_450k_video.ts" | ||
61 | }, | ||
62 | { | ||
63 | "byterange": { | ||
64 | "length": 657248, | ||
65 | "offset": 3498680 | ||
66 | }, | ||
67 | "duration": 10, | ||
68 | "uri": "hls_450k_video.ts" | ||
69 | }, | ||
70 | { | ||
71 | "byterange": { | ||
72 | "length": 571708, | ||
73 | "offset": 4155928 | ||
74 | }, | ||
75 | "duration": 10, | ||
76 | "uri": "hls_450k_video.ts" | ||
77 | }, | ||
78 | { | ||
79 | "byterange": { | ||
80 | "length": 485040, | ||
81 | "offset": 4727636 | ||
82 | }, | ||
83 | "duration": 10, | ||
84 | "uri": "hls_450k_video.ts" | ||
85 | }, | ||
86 | { | ||
87 | "byterange": { | ||
88 | "length": 709136, | ||
89 | "offset": 5212676 | ||
90 | }, | ||
91 | "duration": 10, | ||
92 | "uri": "hls_450k_video.ts" | ||
93 | }, | ||
94 | { | ||
95 | "byterange": { | ||
96 | "length": 730004, | ||
97 | "offset": 5921812 | ||
98 | }, | ||
99 | "duration": 10, | ||
100 | "uri": "hls_450k_video.ts" | ||
101 | }, | ||
102 | { | ||
103 | "byterange": { | ||
104 | "length": 456276, | ||
105 | "offset": 6651816 | ||
106 | }, | ||
107 | "duration": 10, | ||
108 | "uri": "hls_450k_video.ts" | ||
109 | }, | ||
110 | { | ||
111 | "byterange": { | ||
112 | "length": 468684, | ||
113 | "offset": 7108092 | ||
114 | }, | ||
115 | "duration": 10, | ||
116 | "uri": "hls_450k_video.ts" | ||
117 | }, | ||
118 | { | ||
119 | "byterange": { | ||
120 | "length": 444996, | ||
121 | "offset": 7576776 | ||
122 | }, | ||
123 | "duration": 10, | ||
124 | "uri": "hls_450k_video.ts" | ||
125 | }, | ||
126 | { | ||
127 | "byterange": { | ||
128 | "length": 331444, | ||
129 | "offset": 8021772 | ||
130 | }, | ||
131 | "duration": 10, | ||
132 | "uri": "hls_450k_video.ts" | ||
133 | }, | ||
134 | { | ||
135 | "byterange": { | ||
136 | "length": 44556, | ||
137 | "offset": 8353216 | ||
138 | }, | ||
139 | "duration": 10, | ||
140 | "uri": "hls_450k_video.ts" | ||
141 | } | ||
142 | ], | ||
143 | "targetDuration": 10 | ||
144 | } |
test/manifest/extinf.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION:10 | ||
3 | #EXT-X-VERSION:3 | ||
4 | #EXT-X-MEDIA-SEQUENCE:0 | ||
5 | #EXT-X-PLAYLIST-TYPE:VOD | ||
6 | #EXTINF:10 | ||
7 | #EXT-X-BYTERANGE:522828@0 | ||
8 | hls_450k_video.ts | ||
9 | #EXTINF:;asljasdfii11)))00, | ||
10 | #EXT-X-BYTERANGE:587500@522828 | ||
11 | hls_450k_video.ts | ||
12 | #EXTINF:5, | ||
13 | #EXT-X-BYTERANGE:713084@1110328 | ||
14 | hls_450k_video.ts | ||
15 | #EXTINF:9.7, | ||
16 | #EXT-X-BYTERANGE:476580@1823412 | ||
17 | hls_450k_video.ts | ||
18 | #EXTINF:10, | ||
19 | #EXT-X-BYTERANGE:535612@2299992 | ||
20 | hls_450k_video.ts | ||
21 | #EXTINF:10, | ||
22 | #EXT-X-BYTERANGE:207176@2835604 | ||
23 | hls_450k_video.ts | ||
24 | #EXTINF:10, | ||
25 | #EXT-X-BYTERANGE:455900@3042780 | ||
26 | hls_450k_video.ts | ||
27 | #EXTINF:10, | ||
28 | #EXT-X-BYTERANGE:657248@3498680 | ||
29 | hls_450k_video.ts | ||
30 | #EXTINF:10, | ||
31 | #EXT-X-BYTERANGE:571708@4155928 | ||
32 | hls_450k_video.ts | ||
33 | #EXTINF:10, | ||
34 | #EXT-X-BYTERANGE:485040@4727636 | ||
35 | hls_450k_video.ts | ||
36 | #EXTINF:10, | ||
37 | #EXT-X-BYTERANGE:709136@5212676 | ||
38 | hls_450k_video.ts | ||
39 | #EXTINF:10, | ||
40 | #EXT-X-BYTERANGE:730004@5921812 | ||
41 | hls_450k_video.ts | ||
42 | #EXTINF:10, | ||
43 | #EXT-X-BYTERANGE:456276@6651816 | ||
44 | hls_450k_video.ts | ||
45 | #EXTINF:10, | ||
46 | #EXT-X-BYTERANGE:468684@7108092 | ||
47 | hls_450k_video.ts | ||
48 | #EXTINF:10, | ||
49 | #EXT-X-BYTERANGE:444996@7576776 | ||
50 | hls_450k_video.ts | ||
51 | #EXTINF:22, | ||
52 | #EXTINF:10, | ||
53 | #EXT-X-BYTERANGE:331444@8021772 | ||
54 | hls_450k_video.ts | ||
55 | #EXT-X-BYTERANGE:44556@8353216 | ||
56 | hls_450k_video.ts | ||
57 | #EXT-X-ENDLIST |
test/manifest/invalidAllowCache.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | } | ||
14 | ], | ||
15 | "targetDuration": 10 | ||
16 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/invalidAllowCache.m3u8
0 → 100644
test/manifest/invalidMediaSequence.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 6.08, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 6.6, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 5, | ||
20 | "uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 8 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/invalidMediaSequence.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE:gobblegobble | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | #EXT-X-TARGETDURATION:8 | ||
6 | #EXTINF:6.640,{} | ||
7 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
8 | #EXTINF:6.080,{} | ||
9 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
10 | #EXTINF:6.600,{} | ||
11 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
12 | #EXTINF:5.000,{} | ||
13 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
14 | #EXT-X-ENDLIST |
test/manifest/invalidPlaylistType.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 10, | ||
12 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 10, | ||
16 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 10, | ||
20 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts" | ||
21 | }, | ||
22 | { | ||
23 | "duration": 10, | ||
24 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts" | ||
25 | }, | ||
26 | { | ||
27 | "duration": 8, | ||
28 | "uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts" | ||
29 | } | ||
30 | ], | ||
31 | "targetDuration": 10 | ||
32 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/invalidPlaylistType.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:asdRASDfasdR | ||
3 | #EXT-X-TARGETDURATION:10 | ||
4 | #EXTINF:10, | ||
5 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts | ||
6 | #EXTINF:10, | ||
7 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts | ||
8 | #EXTINF:10, | ||
9 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts | ||
10 | #EXTINF:10, | ||
11 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts | ||
12 | #EXTINF:10, | ||
13 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts | ||
14 | #EXTINF:8, | ||
15 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts | ||
16 | #ZEN-TOTAL-DURATION:57.9911 | ||
17 | #EXT-X-ENDLIST |
test/manifest/invalidTargetDuration.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | }, | ||
14 | { | ||
15 | "byterange": { | ||
16 | "length": 587500, | ||
17 | "offset": 522828 | ||
18 | }, | ||
19 | "duration": 10, | ||
20 | "uri": "hls_450k_video.ts" | ||
21 | }, | ||
22 | { | ||
23 | "byterange": { | ||
24 | "length": 713084, | ||
25 | "offset": 1110328 | ||
26 | }, | ||
27 | "duration": 10, | ||
28 | "uri": "hls_450k_video.ts" | ||
29 | }, | ||
30 | { | ||
31 | "byterange": { | ||
32 | "length": 476580, | ||
33 | "offset": 1823412 | ||
34 | }, | ||
35 | "duration": 10, | ||
36 | "uri": "hls_450k_video.ts" | ||
37 | }, | ||
38 | { | ||
39 | "byterange": { | ||
40 | "length": 535612, | ||
41 | "offset": 2299992 | ||
42 | }, | ||
43 | "duration": 10, | ||
44 | "uri": "hls_450k_video.ts" | ||
45 | }, | ||
46 | { | ||
47 | "byterange": { | ||
48 | "length": 207176, | ||
49 | "offset": 2835604 | ||
50 | }, | ||
51 | "duration": 10, | ||
52 | "uri": "hls_450k_video.ts" | ||
53 | }, | ||
54 | { | ||
55 | "byterange": { | ||
56 | "length": 455900, | ||
57 | "offset": 3042780 | ||
58 | }, | ||
59 | "duration": 10, | ||
60 | "uri": "hls_450k_video.ts" | ||
61 | }, | ||
62 | { | ||
63 | "byterange": { | ||
64 | "length": 657248, | ||
65 | "offset": 3498680 | ||
66 | }, | ||
67 | "duration": 10, | ||
68 | "uri": "hls_450k_video.ts" | ||
69 | }, | ||
70 | { | ||
71 | "byterange": { | ||
72 | "length": 571708, | ||
73 | "offset": 4155928 | ||
74 | }, | ||
75 | "duration": 10, | ||
76 | "uri": "hls_450k_video.ts" | ||
77 | }, | ||
78 | { | ||
79 | "byterange": { | ||
80 | "length": 485040, | ||
81 | "offset": 4727636 | ||
82 | }, | ||
83 | "duration": 10, | ||
84 | "uri": "hls_450k_video.ts" | ||
85 | }, | ||
86 | { | ||
87 | "byterange": { | ||
88 | "length": 709136, | ||
89 | "offset": 5212676 | ||
90 | }, | ||
91 | "duration": 10, | ||
92 | "uri": "hls_450k_video.ts" | ||
93 | }, | ||
94 | { | ||
95 | "byterange": { | ||
96 | "length": 730004, | ||
97 | "offset": 5921812 | ||
98 | }, | ||
99 | "duration": 10, | ||
100 | "uri": "hls_450k_video.ts" | ||
101 | }, | ||
102 | { | ||
103 | "byterange": { | ||
104 | "length": 456276, | ||
105 | "offset": 6651816 | ||
106 | }, | ||
107 | "duration": 10, | ||
108 | "uri": "hls_450k_video.ts" | ||
109 | }, | ||
110 | { | ||
111 | "byterange": { | ||
112 | "length": 468684, | ||
113 | "offset": 7108092 | ||
114 | }, | ||
115 | "duration": 10, | ||
116 | "uri": "hls_450k_video.ts" | ||
117 | }, | ||
118 | { | ||
119 | "byterange": { | ||
120 | "length": 444996, | ||
121 | "offset": 7576776 | ||
122 | }, | ||
123 | "duration": 10, | ||
124 | "uri": "hls_450k_video.ts" | ||
125 | }, | ||
126 | { | ||
127 | "byterange": { | ||
128 | "length": 331444, | ||
129 | "offset": 8021772 | ||
130 | }, | ||
131 | "duration": 10, | ||
132 | "uri": "hls_450k_video.ts" | ||
133 | }, | ||
134 | { | ||
135 | "byterange": { | ||
136 | "length": 44556, | ||
137 | "offset": 8353216 | ||
138 | }, | ||
139 | "duration": 1.4167, | ||
140 | "uri": "hls_450k_video.ts" | ||
141 | } | ||
142 | ] | ||
143 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/invalidTargetDuration.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION:NaN | ||
3 | #EXT-X-VERSION:4 | ||
4 | #EXT-X-MEDIA-SEQUENCE:0 | ||
5 | #EXT-X-PLAYLIST-TYPE:VOD | ||
6 | #EXTINF:10, | ||
7 | #EXT-X-BYTERANGE:522828@0 | ||
8 | hls_450k_video.ts | ||
9 | #EXTINF:10, | ||
10 | #EXT-X-BYTERANGE:587500@522828 | ||
11 | hls_450k_video.ts | ||
12 | #EXTINF:10, | ||
13 | #EXT-X-BYTERANGE:713084@1110328 | ||
14 | hls_450k_video.ts | ||
15 | #EXTINF:10, | ||
16 | #EXT-X-BYTERANGE:476580@1823412 | ||
17 | hls_450k_video.ts | ||
18 | #EXTINF:10, | ||
19 | #EXT-X-BYTERANGE:535612@2299992 | ||
20 | hls_450k_video.ts | ||
21 | #EXTINF:10, | ||
22 | #EXT-X-BYTERANGE:207176@2835604 | ||
23 | hls_450k_video.ts | ||
24 | #EXTINF:10, | ||
25 | #EXT-X-BYTERANGE:455900@3042780 | ||
26 | hls_450k_video.ts | ||
27 | #EXTINF:10, | ||
28 | #EXT-X-BYTERANGE:657248@3498680 | ||
29 | hls_450k_video.ts | ||
30 | #EXTINF:10, | ||
31 | #EXT-X-BYTERANGE:571708@4155928 | ||
32 | hls_450k_video.ts | ||
33 | #EXTINF:10, | ||
34 | #EXT-X-BYTERANGE:485040@4727636 | ||
35 | hls_450k_video.ts | ||
36 | #EXTINF:10, | ||
37 | #EXT-X-BYTERANGE:709136@5212676 | ||
38 | hls_450k_video.ts | ||
39 | #EXTINF:10, | ||
40 | #EXT-X-BYTERANGE:730004@5921812 | ||
41 | hls_450k_video.ts | ||
42 | #EXTINF:10, | ||
43 | #EXT-X-BYTERANGE:456276@6651816 | ||
44 | hls_450k_video.ts | ||
45 | #EXTINF:10, | ||
46 | #EXT-X-BYTERANGE:468684@7108092 | ||
47 | hls_450k_video.ts | ||
48 | #EXTINF:10, | ||
49 | #EXT-X-BYTERANGE:444996@7576776 | ||
50 | hls_450k_video.ts | ||
51 | #EXTINF:10, | ||
52 | #EXT-X-BYTERANGE:331444@8021772 | ||
53 | hls_450k_video.ts | ||
54 | #EXTINF:1.4167, | ||
55 | #EXT-X-BYTERANGE:44556@8353216 | ||
56 | hls_450k_video.ts | ||
57 | #EXT-X-ENDLIST |
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 8, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 8, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | } | ||
18 | ], | ||
19 | "targetDuration": 8 | ||
20 | } |
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE:0 | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | #EXT-X-TARGETDURATION:8 | ||
6 | #EXTINF:6.640,{} | ||
7 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
8 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
9 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts |
test/manifest/manifestExtXEndlistEarly.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "/test/ts-files/zencoder/gogo/00001.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 10, | ||
12 | "uri": "/test/ts-files/zencoder/gogo/00002.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 10, | ||
16 | "uri": "/test/ts-files/zencoder/gogo/00003.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 10, | ||
20 | "uri": "/test/ts-files/zencoder/gogo/00004.ts" | ||
21 | }, | ||
22 | { | ||
23 | "duration": 10, | ||
24 | "uri": "/test/ts-files/zencoder/gogo/00005.ts" | ||
25 | } | ||
26 | ], | ||
27 | "targetDuration": 10 | ||
28 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/manifestExtXEndlistEarly.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #ZEN-TOTAL-DURATION:50 | ||
3 | #EXT-X-TARGETDURATION:10 | ||
4 | #EXTINF:10, | ||
5 | /test/ts-files/zencoder/gogo/00001.ts | ||
6 | #EXTINF:10, | ||
7 | /test/ts-files/zencoder/gogo/00002.ts | ||
8 | #EXTINF:10, | ||
9 | /test/ts-files/zencoder/gogo/00003.ts | ||
10 | #EXT-X-ENDLIST | ||
11 | #EXTINF:10, | ||
12 | /test/ts-files/zencoder/gogo/00004.ts | ||
13 | #EXTINF:10, | ||
14 | /test/ts-files/zencoder/gogo/00005.ts | ||
15 |
test/manifest/manifestNoExtM3u.json
0 → 100644
test/manifest/manifestNoExtM3u.m3u8
0 → 100644
test/manifest/master.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "playlists": [{ | ||
4 | "attributes": { | ||
5 | "PROGRAM-ID": 1, | ||
6 | "BANDWIDTH": 240000, | ||
7 | "RESOLUTION": { | ||
8 | "width": 396, | ||
9 | "height": 224 | ||
10 | } | ||
11 | }, | ||
12 | "uri": "media.m3u8" | ||
13 | }, { | ||
14 | "attributes": { | ||
15 | "PROGRAM-ID": 1, | ||
16 | "BANDWIDTH": 40000 | ||
17 | }, | ||
18 | "uri": "media1.m3u8" | ||
19 | }, { | ||
20 | "attributes": { | ||
21 | "PROGRAM-ID": 1, | ||
22 | "BANDWIDTH": 440000, | ||
23 | "RESOLUTION": { | ||
24 | "width": 396, | ||
25 | "height": 224 | ||
26 | } | ||
27 | }, | ||
28 | "uri": "media2.m3u8" | ||
29 | }, { | ||
30 | "attributes": { | ||
31 | "PROGRAM-ID": 1, | ||
32 | "BANDWIDTH": 1928000, | ||
33 | "RESOLUTION": { | ||
34 | "width": 960, | ||
35 | "height": 540 | ||
36 | } | ||
37 | }, | ||
38 | "uri": "media3.m3u8" | ||
39 | }] | ||
40 | } |
test/manifest/master.m3u8
0 → 100644
1 | # A simple master playlist with multiple variant streams | ||
2 | #EXTM3U | ||
3 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=396x224 | ||
4 | media.m3u8 | ||
5 | #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=40000 | ||
6 | media1.m3u8 | ||
7 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000,RESOLUTION=396x224 | ||
8 | media2.m3u8 | ||
9 | #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=960x540 | ||
10 | media3.m3u8 |
test/manifest/media.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 10, | ||
8 | "uri": "00001.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 10, | ||
12 | "uri": "00002.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 10, | ||
16 | "uri": "00003.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 10, | ||
20 | "uri": "00004.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 10 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/media.m3u8
0 → 100644
test/manifest/media1.m3u8
0 → 100644
test/manifest/media3.m3u8
0 → 100644
test/manifest/mediaSequence.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 6.08, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 6.6, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 5, | ||
20 | "uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 8 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/mediaSequence.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE:0 | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | #EXT-X-TARGETDURATION:8 | ||
6 | #EXTINF:6.640,{} | ||
7 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
8 | #EXTINF:6.080,{} | ||
9 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
10 | #EXTINF:6.600,{} | ||
11 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
12 | #EXTINF:5.000,{} | ||
13 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
14 | #EXT-X-ENDLIST |
test/manifest/missingExtinf.json
0 → 100644
test/manifest/missingExtinf.m3u8
0 → 100644
test/manifest/missingMediaSequence.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 6.08, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 6.6, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 5, | ||
20 | "uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 8 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/missingMediaSequence.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-ALLOW-CACHE:YES | ||
4 | #EXT-X-TARGETDURATION:8 | ||
5 | #EXTINF:6.640,{} | ||
6 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
7 | #EXTINF:6.080,{} | ||
8 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
9 | #EXTINF:6.600,{} | ||
10 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
11 | #EXTINF:5.000,{} | ||
12 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
13 | #EXT-X-ENDLIST |
test/manifest/missingSegmentDuration.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 8, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 8, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 8, | ||
20 | "uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 8 | ||
24 | } |
test/manifest/missingSegmentDuration.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE:0 | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | #EXT-X-TARGETDURATION:8 | ||
6 | #EXTINF:6.640,{} | ||
7 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
8 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
9 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
10 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
11 | #EXT-X-ENDLIST |
test/manifest/multipleTargetDurations.json
0 → 100644
test/manifest/multipleTargetDurations.m3u8
0 → 100644
test/manifest/negativeMediaSequence.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": -11, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 6.08, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 6.6, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 5, | ||
20 | "uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 8 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/negativeMediaSequence.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE:-11 | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | #EXT-X-TARGETDURATION:8 | ||
6 | #EXTINF:6.640,{} | ||
7 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
8 | #EXTINF:6.080,{} | ||
9 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
10 | #EXTINF:6.600,{} | ||
11 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
12 | #EXTINF:5.000,{} | ||
13 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
14 | #EXT-X-ENDLIST |
test/manifest/playlist.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 0, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "byterange": { | ||
8 | "length": 522828, | ||
9 | "offset": 0 | ||
10 | }, | ||
11 | "duration": 10, | ||
12 | "uri": "hls_450k_video.ts" | ||
13 | }, | ||
14 | { | ||
15 | "byterange": { | ||
16 | "length": 587500, | ||
17 | "offset": 522828 | ||
18 | }, | ||
19 | "duration": 10, | ||
20 | "uri": "hls_450k_video.ts" | ||
21 | }, | ||
22 | { | ||
23 | "byterange": { | ||
24 | "length": 713084, | ||
25 | "offset": 1110328 | ||
26 | }, | ||
27 | "duration": 10, | ||
28 | "uri": "hls_450k_video.ts" | ||
29 | }, | ||
30 | { | ||
31 | "byterange": { | ||
32 | "length": 476580, | ||
33 | "offset": 1823412 | ||
34 | }, | ||
35 | "duration": 10, | ||
36 | "uri": "hls_450k_video.ts" | ||
37 | }, | ||
38 | { | ||
39 | "byterange": { | ||
40 | "length": 535612, | ||
41 | "offset": 2299992 | ||
42 | }, | ||
43 | "duration": 10, | ||
44 | "uri": "hls_450k_video.ts" | ||
45 | }, | ||
46 | { | ||
47 | "byterange": { | ||
48 | "length": 207176, | ||
49 | "offset": 2835604 | ||
50 | }, | ||
51 | "duration": 10, | ||
52 | "uri": "hls_450k_video.ts" | ||
53 | }, | ||
54 | { | ||
55 | "byterange": { | ||
56 | "length": 455900, | ||
57 | "offset": 3042780 | ||
58 | }, | ||
59 | "duration": 10, | ||
60 | "uri": "hls_450k_video.ts" | ||
61 | }, | ||
62 | { | ||
63 | "byterange": { | ||
64 | "length": 657248, | ||
65 | "offset": 3498680 | ||
66 | }, | ||
67 | "duration": 10, | ||
68 | "uri": "hls_450k_video.ts" | ||
69 | }, | ||
70 | { | ||
71 | "byterange": { | ||
72 | "length": 571708, | ||
73 | "offset": 4155928 | ||
74 | }, | ||
75 | "duration": 10, | ||
76 | "uri": "hls_450k_video.ts" | ||
77 | }, | ||
78 | { | ||
79 | "byterange": { | ||
80 | "length": 485040, | ||
81 | "offset": 4727636 | ||
82 | }, | ||
83 | "duration": 10, | ||
84 | "uri": "hls_450k_video.ts" | ||
85 | }, | ||
86 | { | ||
87 | "byterange": { | ||
88 | "length": 709136, | ||
89 | "offset": 5212676 | ||
90 | }, | ||
91 | "duration": 10, | ||
92 | "uri": "hls_450k_video.ts" | ||
93 | }, | ||
94 | { | ||
95 | "byterange": { | ||
96 | "length": 730004, | ||
97 | "offset": 5921812 | ||
98 | }, | ||
99 | "duration": 10, | ||
100 | "uri": "hls_450k_video.ts" | ||
101 | }, | ||
102 | { | ||
103 | "byterange": { | ||
104 | "length": 456276, | ||
105 | "offset": 6651816 | ||
106 | }, | ||
107 | "duration": 10, | ||
108 | "uri": "hls_450k_video.ts" | ||
109 | }, | ||
110 | { | ||
111 | "byterange": { | ||
112 | "length": 468684, | ||
113 | "offset": 7108092 | ||
114 | }, | ||
115 | "duration": 10, | ||
116 | "uri": "hls_450k_video.ts" | ||
117 | }, | ||
118 | { | ||
119 | "byterange": { | ||
120 | "length": 444996, | ||
121 | "offset": 7576776 | ||
122 | }, | ||
123 | "duration": 10, | ||
124 | "uri": "hls_450k_video.ts" | ||
125 | }, | ||
126 | { | ||
127 | "byterange": { | ||
128 | "length": 331444, | ||
129 | "offset": 8021772 | ||
130 | }, | ||
131 | "duration": 10, | ||
132 | "uri": "hls_450k_video.ts" | ||
133 | }, | ||
134 | { | ||
135 | "byterange": { | ||
136 | "length": 44556, | ||
137 | "offset": 8353216 | ||
138 | }, | ||
139 | "duration": 1.4167, | ||
140 | "uri": "hls_450k_video.ts" | ||
141 | } | ||
142 | ], | ||
143 | "targetDuration": 10 | ||
144 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/playlistM3U8data.js
deleted
100644 → 0
1 | window.playlistData = '#EXTM3U\n'+ | ||
2 | '#EXT-X-TARGETDURATION:10\n' + | ||
3 | '#EXT-X-VERSION:4\n' + | ||
4 | '#EXT-X-MEDIA-SEQUENCE:0\n' + | ||
5 | '#EXT-X-PLAYLIST-TYPE:VOD\n' + | ||
6 | '#EXTINF:10,\n' + | ||
7 | '#EXT-X-BYTERANGE:522828@0\n' + | ||
8 | 'hls_450k_video.ts\n' + | ||
9 | '#EXTINF:10,\n' + | ||
10 | '#EXT-X-BYTERANGE:587500@522828\n' + | ||
11 | 'hls_450k_video.ts\n' + | ||
12 | '#EXTINF:10,\n' + | ||
13 | '#EXT-X-BYTERANGE:713084@1110328\n' + | ||
14 | 'hls_450k_video.ts\n' + | ||
15 | '#EXTINF:10,\n' + | ||
16 | '#EXT-X-BYTERANGE:476580@1823412\n' + | ||
17 | 'hls_450k_video.ts\n' + | ||
18 | '#EXTINF:10,\n' + | ||
19 | '#EXT-X-BYTERANGE:535612@2299992\n' + | ||
20 | 'hls_450k_video.ts\n' + | ||
21 | '#EXTINF:10,\n' + | ||
22 | '#EXT-X-BYTERANGE:207176@2835604\n' + | ||
23 | 'hls_450k_video.ts\n' + | ||
24 | '#EXTINF:10,\n' + | ||
25 | '#EXT-X-BYTERANGE:455900@3042780\n' + | ||
26 | 'hls_450k_video.ts\n' + | ||
27 | '#EXTINF:10,\n' + | ||
28 | '#EXT-X-BYTERANGE:657248@3498680\n' + | ||
29 | 'hls_450k_video.ts\n' + | ||
30 | '#EXTINF:10,\n' + | ||
31 | '#EXT-X-BYTERANGE:571708@4155928\n' + | ||
32 | 'hls_450k_video.ts\n' + | ||
33 | '#EXTINF:10,\n' + | ||
34 | '#EXT-X-BYTERANGE:485040@4727636\n' + | ||
35 | 'hls_450k_video.ts\n' + | ||
36 | '#EXTINF:10,\n' + | ||
37 | '#EXT-X-BYTERANGE:709136@5212676\n' + | ||
38 | 'hls_450k_video.ts\n' + | ||
39 | '#EXTINF:10,\n' + | ||
40 | '#EXT-X-BYTERANGE:730004@5921812\n' + | ||
41 | 'hls_450k_video.ts\n' + | ||
42 | '#EXTINF:10,\n' + | ||
43 | '#EXT-X-BYTERANGE:456276@6651816\n' + | ||
44 | 'hls_450k_video.ts\n' + | ||
45 | '#EXTINF:10,\n' + | ||
46 | '#EXT-X-BYTERANGE:468684@7108092\n' + | ||
47 | 'hls_450k_video.ts' + | ||
48 | '#EXTINF:10,\n' + | ||
49 | '#EXT-X-BYTERANGE:444996@7576776\n' + | ||
50 | 'hls_450k_video.ts\n' + | ||
51 | '#EXTINF:10,\n' + | ||
52 | '#EXT-X-BYTERANGE:331444@8021772\n' + | ||
53 | 'hls_450k_video.ts\n' + | ||
54 | '#EXTINF:1.4167,\n' + | ||
55 | '#EXT-X-BYTERANGE:44556@8353216\n' + | ||
56 | 'hls_450k_video.ts\n' + | ||
57 | '#EXT-X-ENDLIST'; |
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION:10 | ||
3 | #EXT-X-VERSION:{{{version}}} | ||
4 | {{#if allowCache}}#EXT-X-ALLOW-CACHE:{{{allowCache}}}{{/if}} | ||
5 | #EXT-X-MEDIA-SEQUENCE:0 | ||
6 | #EXT-X-PLAYLIST-TYPE:VOD | ||
7 | #EXTINF:10, | ||
8 | #EXT-X-BYTERANGE:522828@0 | ||
9 | hls_450k_video.ts | ||
10 | #EXTINF:10, | ||
11 | #EXT-X-BYTERANGE:587500@522828 | ||
12 | hls_450k_video.ts | ||
13 | #EXTINF:10, | ||
14 | #EXT-X-BYTERANGE:713084@1110328 | ||
15 | hls_450k_video.ts | ||
16 | #EXTINF:10, | ||
17 | #EXT-X-BYTERANGE:476580@1823412 | ||
18 | hls_450k_video.ts | ||
19 | #EXTINF:10, | ||
20 | #EXT-X-BYTERANGE:535612@2299992 | ||
21 | hls_450k_video.ts | ||
22 | #EXTINF:10, | ||
23 | #EXT-X-BYTERANGE:207176@2835604 | ||
24 | hls_450k_video.ts | ||
25 | #EXTINF:10, | ||
26 | #EXT-X-BYTERANGE:455900@3042780 | ||
27 | hls_450k_video.ts | ||
28 | #EXTINF:10, | ||
29 | #EXT-X-BYTERANGE:657248@3498680 | ||
30 | hls_450k_video.ts | ||
31 | #EXTINF:10, | ||
32 | #EXT-X-BYTERANGE:571708@4155928 | ||
33 | hls_450k_video.ts | ||
34 | #EXTINF:10, | ||
35 | #EXT-X-BYTERANGE:485040@4727636 | ||
36 | hls_450k_video.ts | ||
37 | #EXTINF:10, | ||
38 | #EXT-X-BYTERANGE:709136@5212676 | ||
39 | hls_450k_video.ts | ||
40 | #EXTINF:10, | ||
41 | #EXT-X-BYTERANGE:730004@5921812 | ||
42 | hls_450k_video.ts | ||
43 | #EXTINF:10, | ||
44 | #EXT-X-BYTERANGE:456276@6651816 | ||
45 | hls_450k_video.ts | ||
46 | #EXTINF:10, | ||
47 | #EXT-X-BYTERANGE:468684@7108092 | ||
48 | hls_450k_video.ts | ||
49 | #EXTINF:10, | ||
50 | #EXT-X-BYTERANGE:444996@7576776 | ||
51 | hls_450k_video.ts | ||
52 | #EXTINF:10, | ||
53 | #EXT-X-BYTERANGE:331444@8021772 | ||
54 | hls_450k_video.ts | ||
55 | #EXTINF:1.4167, | ||
56 | #EXT-X-BYTERANGE:44556@8353216 | ||
57 | hls_450k_video.ts | ||
58 | #EXT-X-ENDLIST | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION:10 | ||
3 | #EXT-X-VERSION:{{{version}}} | ||
4 | #EXT-X-MEDIA-SEQUENCE:0 | ||
5 | #EXT-X-PLAYLIST-TYPE:VOD | ||
6 | #EXTINF:10, | ||
7 | {{#if byteRange}}#EXT-X-BYTERANGE:{{{byteRange}}}{{/if}} | ||
8 | //#EXT-X-BYTERANGE:522828@0 | ||
9 | hls_450k_video.ts | ||
10 | #EXTINF:10, | ||
11 | {{#if byteRange1}}#EXT-X-BYTERANGE:{{{byteRange1}}}{{/if}} | ||
12 | //#EXT-X-BYTERANGE:587500@522828 | ||
13 | hls_450k_video.ts | ||
14 | #EXTINF:10, | ||
15 | #EXT-X-BYTERANGE:713084@1110328 | ||
16 | hls_450k_video.ts | ||
17 | #EXTINF:10, | ||
18 | #EXT-X-BYTERANGE:476580@1823412 | ||
19 | hls_450k_video.ts | ||
20 | #EXTINF:10, | ||
21 | #EXT-X-BYTERANGE:535612@2299992 | ||
22 | hls_450k_video.ts | ||
23 | #EXTINF:10, | ||
24 | #EXT-X-BYTERANGE:207176@2835604 | ||
25 | hls_450k_video.ts | ||
26 | #EXTINF:10, | ||
27 | #EXT-X-BYTERANGE:455900@3042780 | ||
28 | hls_450k_video.ts | ||
29 | #EXTINF:10, | ||
30 | #EXT-X-BYTERANGE:657248@3498680 | ||
31 | hls_450k_video.ts | ||
32 | #EXTINF:10, | ||
33 | #EXT-X-BYTERANGE:571708@4155928 | ||
34 | hls_450k_video.ts | ||
35 | #EXTINF:10, | ||
36 | #EXT-X-BYTERANGE:485040@4727636 | ||
37 | hls_450k_video.ts | ||
38 | #EXTINF:10, | ||
39 | #EXT-X-BYTERANGE:709136@5212676 | ||
40 | hls_450k_video.ts | ||
41 | #EXTINF:10, | ||
42 | #EXT-X-BYTERANGE:730004@5921812 | ||
43 | hls_450k_video.ts | ||
44 | #EXTINF:10, | ||
45 | #EXT-X-BYTERANGE:456276@6651816 | ||
46 | hls_450k_video.ts | ||
47 | #EXTINF:10, | ||
48 | #EXT-X-BYTERANGE:468684@7108092 | ||
49 | hls_450k_video.ts | ||
50 | #EXTINF:10, | ||
51 | #EXT-X-BYTERANGE:444996@7576776 | ||
52 | hls_450k_video.ts | ||
53 | #EXTINF:10, | ||
54 | #EXT-X-BYTERANGE:331444@8021772 | ||
55 | hls_450k_video.ts | ||
56 | #EXTINF:1.4167, | ||
57 | {{#if byteRange2}}#EXT-X-BYTERANGE:{{{byteRange2}}}{{/if}} | ||
58 | //#EXT-X-BYTERANGE:44556@8353216 | ||
59 | hls_450k_video.ts | ||
60 | #EXT-X-ENDLIST | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/playlist_extinf_template.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-TARGETDURATION:10 | ||
3 | #EXT-X-VERSION:{{{version}}} | ||
4 | #EXT-X-MEDIA-SEQUENCE:0 | ||
5 | #EXT-X-PLAYLIST-TYPE:VOD | ||
6 | {{#if extInf}}#EXTINF:{{{extInf}}}{{/if}} | ||
7 | #EXT-X-BYTERANGE:522828@0 | ||
8 | {{#if segment}}{{{segment}}}\n{{/if}} | ||
9 | {{#if extInf1}}#EXTINF:{{{extInf1}}}{{/if}} | ||
10 | #EXT-X-BYTERANGE:587500@522828 | ||
11 | hls_450k_video.ts | ||
12 | #EXTINF:10, | ||
13 | #EXT-X-BYTERANGE:713084@1110328 | ||
14 | hls_450k_video.ts | ||
15 | #EXTINF:10, | ||
16 | #EXT-X-BYTERANGE:476580@1823412 | ||
17 | hls_450k_video.ts | ||
18 | #EXTINF:10, | ||
19 | #EXT-X-BYTERANGE:535612@2299992 | ||
20 | hls_450k_video.ts | ||
21 | #EXTINF:10, | ||
22 | #EXT-X-BYTERANGE:207176@2835604 | ||
23 | hls_450k_video.ts | ||
24 | #EXTINF:10, | ||
25 | #EXT-X-BYTERANGE:455900@3042780 | ||
26 | hls_450k_video.ts | ||
27 | #EXTINF:10, | ||
28 | #EXT-X-BYTERANGE:657248@3498680 | ||
29 | hls_450k_video.ts | ||
30 | #EXTINF:10, | ||
31 | #EXT-X-BYTERANGE:571708@4155928 | ||
32 | hls_450k_video.ts | ||
33 | #EXTINF:10, | ||
34 | #EXT-X-BYTERANGE:485040@4727636 | ||
35 | hls_450k_video.ts | ||
36 | #EXTINF:10, | ||
37 | #EXT-X-BYTERANGE:709136@5212676 | ||
38 | hls_450k_video.ts | ||
39 | #EXTINF:10, | ||
40 | #EXT-X-BYTERANGE:730004@5921812 | ||
41 | hls_450k_video.ts | ||
42 | #EXTINF:10, | ||
43 | #EXT-X-BYTERANGE:456276@6651816 | ||
44 | hls_450k_video.ts | ||
45 | #EXTINF:10, | ||
46 | #EXT-X-BYTERANGE:468684@7108092 | ||
47 | hls_450k_video.ts | ||
48 | #EXTINF:10, | ||
49 | #EXT-X-BYTERANGE:444996@7576776 | ||
50 | hls_450k_video.ts | ||
51 | #EXTINF:10, | ||
52 | #EXT-X-BYTERANGE:331444@8021772 | ||
53 | hls_450k_video.ts | ||
54 | {{#if extInf2}}#EXTINF:{{{extInf2}}}{{/if}} | ||
55 | #EXT-X-BYTERANGE:44556@8353216 | ||
56 | hls_450k_video.ts | ||
57 | #EXT-X-ENDLIST |
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | {{#if mediaSequence}}#EXT-X-MEDIA-SEQUENCE:{{{mediaSequence}}}{{/if}} | ||
4 | {{#if mediaSequence1}}#EXT-X-MEDIA-SEQUENCE:{{{mediaSequence2}}}{{/if}} | ||
5 | #EXT-X-ALLOW-CACHE:YES | ||
6 | #EXT-X-TARGETDURATION:8 | ||
7 | #EXTINF:6.640,{} | ||
8 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
9 | #EXTINF:6.080,{} | ||
10 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
11 | #EXTINF:6.600,{} | ||
12 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
13 | #EXTINF:5.000,{} | ||
14 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
15 | #EXT-X-ENDLIST |
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE:0 | ||
4 | #EXT-X-ALLOW-CACHE:YES | ||
5 | {{#if targetDuration}}#EXT-X-TARGETDURATION:{{{targetDuration}}}{{/if}} | ||
6 | #EXTINF:6.640,{} | ||
7 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
8 | #EXTINF:6.080,{} | ||
9 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
10 | #EXTINF:6.600,{} | ||
11 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
12 | #EXTINF:5.000,{} | ||
13 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
14 | #EXT-X-ENDLIST |
test/manifest/playlist_type_template.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | {{#if playlistType}}#EXT-X-PLAYLIST-TYPE:{{{playlistType}}}{{/if}} | ||
3 | #EXT-X-TARGETDURATION:10 | ||
4 | #EXTINF:10, | ||
5 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts | ||
6 | #EXTINF:10, | ||
7 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts | ||
8 | #EXTINF:10, | ||
9 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts | ||
10 | #EXTINF:10, | ||
11 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts | ||
12 | #EXTINF:10, | ||
13 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts | ||
14 | #EXTINF:8, | ||
15 | /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts | ||
16 | #ZEN-TOTAL-DURATION:57.9911 | ||
17 | #EXT-X-ENDLIST |
test/manifest/remove-trs.js
0 → 100644
1 | var grunt = require('grunt'), | ||
2 | extname = require('path').extname; | ||
3 | |||
4 | grunt.file.recurse(process.cwd(), function(path) { | ||
5 | var json; | ||
6 | if (extname(path) === '.json') { | ||
7 | json = grunt.file.readJSON(path); | ||
8 | if (json.totalDuration) { | ||
9 | delete json.totalDuration; | ||
10 | grunt.file.write(path, JSON.stringify(json, null, ' ')); | ||
11 | } | ||
12 | } | ||
13 | }); |
test/manifest/streamInfInvalid.json
0 → 100644
test/manifest/streamInfInvalid.m3u8
0 → 100644
test/manifest/twoMediaSequences.json
0 → 100644
1 | { | ||
2 | "allowCache": true, | ||
3 | "mediaSequence": 11, | ||
4 | "playlistType": "VOD", | ||
5 | "segments": [ | ||
6 | { | ||
7 | "duration": 6.64, | ||
8 | "uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts" | ||
9 | }, | ||
10 | { | ||
11 | "duration": 6.08, | ||
12 | "uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts" | ||
13 | }, | ||
14 | { | ||
15 | "duration": 6.6, | ||
16 | "uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts" | ||
17 | }, | ||
18 | { | ||
19 | "duration": 5, | ||
20 | "uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts" | ||
21 | } | ||
22 | ], | ||
23 | "targetDuration": 8 | ||
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test/manifest/twoMediaSequences.m3u8
0 → 100644
1 | #EXTM3U | ||
2 | #EXT-X-PLAYLIST-TYPE:VOD | ||
3 | #EXT-X-MEDIA-SEQUENCE:0 | ||
4 | #EXT-X-MEDIA-SEQUENCE:11 | ||
5 | #EXT-X-ALLOW-CACHE:YES | ||
6 | #EXT-X-TARGETDURATION:8 | ||
7 | #EXTINF:6.640,{} | ||
8 | /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts | ||
9 | #EXTINF:6.080,{} | ||
10 | /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts | ||
11 | #EXTINF:6.600,{} | ||
12 | /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts | ||
13 | #EXTINF:5.000,{} | ||
14 | /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts | ||
15 | #EXT-X-ENDLIST |
test/manifest/versionInvalid.json
0 → 100644
test/manifest/versionInvalid.m3u8
0 → 100644
test/segment-parser.js
0 → 100644
This diff is collapsed.
Click to expand it.
test/video-js-hls_test.js
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
test/videojs-hls_test.js
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment