These files should not be added
This commit is contained in:
107
build/javascript/node_modules/m3u8-parser/CHANGELOG.md
generated
vendored
107
build/javascript/node_modules/m3u8-parser/CHANGELOG.md
generated
vendored
@@ -1,107 +0,0 @@
|
||||
<a name="4.4.3"></a>
|
||||
## [4.4.3](https://github.com/videojs/m3u8-parser/compare/v4.4.2...v4.4.3) (2020-08-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix default EXT-X-BYTERANGE offset to start after the previous segment ([#98](https://github.com/videojs/m3u8-parser/issues/98)) ([08aca73](https://github.com/videojs/m3u8-parser/commit/08aca73))
|
||||
|
||||
### Tests
|
||||
|
||||
* run tests on node ([#97](https://github.com/videojs/m3u8-parser/issues/97)) ([4ad5c2d](https://github.com/videojs/m3u8-parser/commit/4ad5c2d))
|
||||
|
||||
<a name="4.4.2"></a>
|
||||
## [4.4.2](https://github.com/videojs/m3u8-parser/compare/v4.4.1...v4.4.2) (2019-08-30)
|
||||
|
||||
### Chores
|
||||
|
||||
* **package:** update [@videojs](https://github.com/videojs)/vhs-utils ([651b4ae](https://github.com/videojs/m3u8-parser/commit/651b4ae))
|
||||
|
||||
<a name="4.4.1"></a>
|
||||
## [4.4.1](https://github.com/videojs/m3u8-parser/compare/v4.4.0...v4.4.1) (2019-08-21)
|
||||
|
||||
### Chores
|
||||
|
||||
* update generator version and use [@videojs](https://github.com/videojs)/vhs-utils ([#95](https://github.com/videojs/m3u8-parser/issues/95)) ([7985794](https://github.com/videojs/m3u8-parser/commit/7985794))
|
||||
|
||||
<a name="4.4.0"></a>
|
||||
# [4.4.0](https://github.com/videojs/m3u8-parser/compare/v4.3.0...v4.4.0) (2019-06-25)
|
||||
|
||||
### Features
|
||||
|
||||
* parse key attributes for Widevine HLS ([#88](https://github.com/videojs/m3u8-parser/issues/88)) ([d835fa8](https://github.com/videojs/m3u8-parser/commit/d835fa8))
|
||||
|
||||
### Chores
|
||||
|
||||
* **package:** update all dev dependencies ([#89](https://github.com/videojs/m3u8-parser/issues/89)) ([e991447](https://github.com/videojs/m3u8-parser/commit/e991447))
|
||||
|
||||
<a name="4.3.0"></a>
|
||||
# [4.3.0](https://github.com/videojs/m3u8-parser/compare/v4.2.0...v4.3.0) (2019-01-10)
|
||||
|
||||
### Features
|
||||
|
||||
* custom tag mapping ([#73](https://github.com/videojs/m3u8-parser/issues/73)) ([0ef040a](https://github.com/videojs/m3u8-parser/commit/0ef040a))
|
||||
|
||||
### Chores
|
||||
|
||||
* Update to plugin generator 7 standards ([#53](https://github.com/videojs/m3u8-parser/issues/53)) ([35ff471](https://github.com/videojs/m3u8-parser/commit/35ff471))
|
||||
* **package:** update rollup to version 0.66.0 ([#55](https://github.com/videojs/m3u8-parser/issues/55)) ([2407466](https://github.com/videojs/m3u8-parser/commit/2407466))
|
||||
* Update videojs-generate-karma-config to the latest version 🚀 ([#59](https://github.com/videojs/m3u8-parser/issues/59)) ([023c6c9](https://github.com/videojs/m3u8-parser/commit/023c6c9))
|
||||
* Update videojs-generate-karma-config to the latest version 🚀 ([#60](https://github.com/videojs/m3u8-parser/issues/60)) ([2773819](https://github.com/videojs/m3u8-parser/commit/2773819))
|
||||
* Update videojs-generate-rollup-config to the latest version 🚀 ([#58](https://github.com/videojs/m3u8-parser/issues/58)) ([8c28a8b](https://github.com/videojs/m3u8-parser/commit/8c28a8b))
|
||||
|
||||
<a name="4.2.0"></a>
|
||||
# [4.2.0](https://github.com/videojs/m3u8-parser/compare/v4.1.0...v4.2.0) (2018-02-23)
|
||||
|
||||
### Features
|
||||
|
||||
* add program-date-time tag info to parsed segments ([#27](https://github.com/videojs/m3u8-parser/issues/27)) ([44fc6f8](https://github.com/videojs/m3u8-parser/commit/44fc6f8))
|
||||
|
||||
<a name="4.1.0"></a>
|
||||
# [4.1.0](https://github.com/videojs/m3u8-parser/compare/v4.0.0...v4.1.0) (2018-01-24)
|
||||
|
||||
<a name="4.0.0"></a>
|
||||
# [4.0.0](https://github.com/videojs/m3u8-parser/compare/v3.0.0...v4.0.0) (2017-11-21)
|
||||
|
||||
### Features
|
||||
|
||||
* added ability to parse EXT-X-START tags [#31](https://github.com/videojs/m3u8-parser/pull/31)
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* camel case module name in rollup config to work with latest rollup [#32](https://github.com/videojs/m3u8-parser/pull/32)
|
||||
|
||||
<a name="3.0.0"></a>
|
||||
# 3.0.0 (2017-06-09)
|
||||
|
||||
### Features
|
||||
|
||||
* Rollup ([#24](https://github.com/videojs/m3u8-parser/issues/24)) ([47ef11f](https://github.com/videojs/m3u8-parser/commit/47ef11f))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* drop bower support.
|
||||
|
||||
## 2.1.0 (2017-02-23)
|
||||
* parse FORCED attribute of media-groups [#15](https://github.com/videojs/m3u8-parser/pull/15)
|
||||
* Pass any CHARACTERISTICS value of a track with the track object [#14](https://github.com/videojs/m3u8-parser/pull/14)
|
||||
|
||||
## 2.0.1 (2017-01-20)
|
||||
* Fix: Include the babel ES3 tranform to support IE8 [#13](https://github.com/videojs/m3u8-parser/pull/13)
|
||||
|
||||
## 2.0.0 (2017-01-13)
|
||||
* Manifest object is now initialized with an empty segments arrays
|
||||
* moved to latest videojs-standard version, brought code into
|
||||
compliance with the latest eslint rules.
|
||||
|
||||
## 1.0.2 (2016-06-07)
|
||||
* fix the build pipeline
|
||||
* removed video.js css/js inclusion during tests
|
||||
|
||||
## 1.0.1 (2016-06-07)
|
||||
* remove dependence on video.js
|
||||
* added contributors to package.json
|
||||
|
||||
## 1.0.0 (2016-06-03)
|
||||
Initial Release
|
||||
|
||||
30
build/javascript/node_modules/m3u8-parser/CONTRIBUTING.md
generated
vendored
30
build/javascript/node_modules/m3u8-parser/CONTRIBUTING.md
generated
vendored
@@ -1,30 +0,0 @@
|
||||
# CONTRIBUTING
|
||||
|
||||
We welcome contributions from everyone!
|
||||
|
||||
## Getting Started
|
||||
|
||||
Make sure you have Node.js 4.8 or higher and npm installed.
|
||||
|
||||
1. Fork this repository and clone your fork
|
||||
1. Install dependencies: `npm install`
|
||||
1. Run a development server: `npm start`
|
||||
|
||||
### Making Changes
|
||||
|
||||
Refer to the [video.js plugin conventions][conventions] for more detail on best practices and tooling for video.js plugin authorship.
|
||||
|
||||
When you've made your changes, push your commit(s) to your fork and issue a pull request against the original repository.
|
||||
|
||||
### Running Tests
|
||||
|
||||
Testing is a crucial part of any software project. For all but the most trivial changes (typos, etc) test cases are expected. Tests are run in actual browsers using [Karma][karma].
|
||||
|
||||
- In all available and supported browsers: `npm test`
|
||||
- In a specific browser: `npm run test:chrome`, `npm run test:firefox`, etc.
|
||||
- While development server is running (`npm start`), navigate to [`http://localhost:9999/test/`][local]
|
||||
|
||||
|
||||
[karma]: http://karma-runner.github.io/
|
||||
[local]: http://localhost:9999/test/
|
||||
[conventions]: https://github.com/videojs/generator-videojs-plugin/blob/master/docs/conventions.md
|
||||
13
build/javascript/node_modules/m3u8-parser/LICENSE
generated
vendored
13
build/javascript/node_modules/m3u8-parser/LICENSE
generated
vendored
@@ -1,13 +0,0 @@
|
||||
Copyright Brightcove, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
388
build/javascript/node_modules/m3u8-parser/README.md
generated
vendored
388
build/javascript/node_modules/m3u8-parser/README.md
generated
vendored
@@ -1,388 +0,0 @@
|
||||
# m3u8-parser
|
||||
[](https://travis-ci.org/videojs/m3u8-parser)
|
||||
[](https://greenkeeper.io/)
|
||||
[](http://slack.videojs.com)
|
||||
|
||||
[](https://nodei.co/npm/m3u8-parser/)
|
||||
|
||||
m3u8 parser
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Usage](#usage)
|
||||
- [Parsed Output](#parsed-output)
|
||||
- [Supported Tags](#supported-tags)
|
||||
- [Basic Playlist Tags](#basic-playlist-tags)
|
||||
- [Media Segment Tags](#media-segment-tags)
|
||||
- [Media Playlist Tags](#media-playlist-tags)
|
||||
- [Master Playlist Tags](#master-playlist-tags)
|
||||
- [Experimental Tags](#experimental-tags)
|
||||
- [EXT-X-CUE-OUT](#ext-x-cue-out)
|
||||
- [EXT-X-CUE-OUT-CONT](#ext-x-cue-out-cont)
|
||||
- [EXT-X-CUE-IN](#ext-x-cue-in)
|
||||
- [Not Yet Supported](#not-yet-supported)
|
||||
- [Custom Parsers](#custom-parsers)
|
||||
- [Including the Parser](#including-the-parser)
|
||||
- [`<script>` Tag](#script-tag)
|
||||
- [Browserify](#browserify)
|
||||
- [RequireJS/AMD](#requirejsamd)
|
||||
- [License](#license)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install --save m3u8-parser
|
||||
```
|
||||
|
||||
The npm installation is preferred, but Bower works, too.
|
||||
|
||||
```sh
|
||||
bower install --save m3u8-parser
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var manifest = [
|
||||
'#EXTM3U',
|
||||
'#EXT-X-VERSION:3',
|
||||
'#EXT-X-TARGETDURATION:6',
|
||||
'#EXT-X-MEDIA-SEQUENCE:0',
|
||||
'#EXT-X-DISCONTINUITY-SEQUENCE:0',
|
||||
'#EXTINF:6,',
|
||||
'0.ts',
|
||||
'#EXTINF:6,',
|
||||
'1.ts',
|
||||
'#EXTINF:6,',
|
||||
'2.ts',
|
||||
'#EXT-X-ENDLIST'
|
||||
].join('\n');
|
||||
|
||||
var parser = new m3u8Parser.Parser();
|
||||
|
||||
parser.push(manifest);
|
||||
parser.end();
|
||||
|
||||
var parsedManifest = parser.manifest;
|
||||
```
|
||||
|
||||
### Parsed Output
|
||||
|
||||
The parser ouputs a plain javascript object with the following structure:
|
||||
|
||||
```js
|
||||
Manifest {
|
||||
allowCache: boolean,
|
||||
endList: boolean,
|
||||
mediaSequence: number,
|
||||
discontinuitySequence: number,
|
||||
playlistType: string,
|
||||
custom: {},
|
||||
playlists: [
|
||||
{
|
||||
attributes: {},
|
||||
Manifest
|
||||
}
|
||||
],
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
'GROUP-ID': {
|
||||
NAME: {
|
||||
default: boolean,
|
||||
autoselect: boolean,
|
||||
language: string,
|
||||
uri: string,
|
||||
instreamId: string,
|
||||
characteristics: string,
|
||||
forced: boolean
|
||||
}
|
||||
}
|
||||
},
|
||||
VIDEO: {},
|
||||
'CLOSED-CAPTIONS': {},
|
||||
SUBTITLES: {}
|
||||
},
|
||||
dateTimeString: string,
|
||||
dateTimeObject: Date,
|
||||
targetDuration: number,
|
||||
totalDuration: number,
|
||||
discontinuityStarts: [number],
|
||||
segments: [
|
||||
{
|
||||
byterange: {
|
||||
length: number,
|
||||
offset: number
|
||||
},
|
||||
duration: number,
|
||||
attributes: {},
|
||||
discontinuity: number,
|
||||
uri: string,
|
||||
timeline: number,
|
||||
key: {
|
||||
method: string,
|
||||
uri: string,
|
||||
iv: string
|
||||
},
|
||||
map: {
|
||||
uri: string,
|
||||
byterange: {
|
||||
length: number,
|
||||
offset: number
|
||||
}
|
||||
},
|
||||
'cue-out': string,
|
||||
'cue-out-cont': string,
|
||||
'cue-in': string,
|
||||
custom: {}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Supported Tags
|
||||
|
||||
### Basic Playlist Tags
|
||||
|
||||
* [EXTM3U](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.1.1)
|
||||
* [EXT-X-VERSION](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.1.2)
|
||||
|
||||
### Media Segment Tags
|
||||
|
||||
* [EXTINF](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.1)
|
||||
* [EXT-X-BYTERANGE](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.2)
|
||||
* [EXT-X-DISCONTINUITY](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.3)
|
||||
* [EXT-X-KEY](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.4)
|
||||
* [EXT-X-MAP](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.5)
|
||||
* [EXT-X-PROGRAM-DATE-TIME](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.6)
|
||||
|
||||
### Media Playlist Tags
|
||||
|
||||
* [EXT-X-TARGETDURATION](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.1)
|
||||
* [EXT-X-MEDIA-SEQUENCE](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.2)
|
||||
* [EXT-X-DISCONTINUITY-SEQUENCE](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.3)
|
||||
* [EXT-X-ENDLIST](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.4)
|
||||
* [EXT-X-PLAYLIST-TYPE](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.5)
|
||||
* [EXT-X-START](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.5.2)
|
||||
|
||||
### Master Playlist Tags
|
||||
|
||||
* [EXT-X-MEDIA](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.1)
|
||||
* [EXT-X-STREAM-INF](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.2)
|
||||
|
||||
### Experimental Tags
|
||||
|
||||
m3u8-parser supports 3 additional **Media Segment Tags** not present in the HLS specification.
|
||||
|
||||
#### EXT-X-CUE-OUT
|
||||
|
||||
The `EXT-X-CUE-OUT` indicates that the following media segment is a break in main content and the start of interstitial content. Its format is:
|
||||
|
||||
```
|
||||
#EXT-X-CUE-OUT:<duration>
|
||||
```
|
||||
|
||||
where `duration` is a decimal-floating-point or decimal-integer number that specifies the total duration of the interstitial in seconds.
|
||||
|
||||
#### EXT-X-CUE-OUT-CONT
|
||||
|
||||
The `EXT-X-CUE-OUT-CONT` indicates that the following media segment is a part of interstitial content and not the main content. Every media segment following a media segment with an `EXT-X-CUE-OUT` tag *SHOULD* have an `EXT-X-CUE-OUT-CONT` applied to it until there is an `EXT-X-CUE-IN` tag. A media segment between a `EXT-X-CUE-OUT` and `EXT-X-CUE-IN` segment without a `EXT-X-CUE-OUT-CONT` is assumed to be part of the interstitial. Its format is:
|
||||
|
||||
```
|
||||
#EXT-X-CUE-OUT-CONT:<n>/<duration>
|
||||
```
|
||||
|
||||
where `n` is a decimal-floating-point or decimal-integer number that specifies the time in seconds the first sample of the media segment lies within the interstitial content and `duration` is a decimal-floating-point or decimal-integer number that specifies the total duration of the interstitial in seconds. `n` *SHOULD* be the sum of `EXTINF` durations for all preceding media segments up to the `EXT-X-CUE-OUT` tag for the current interstitial. `duration` *SHOULD* match the `duration` specified in the `EXT-X-CUE-OUT` tag for the current interstitial.'
|
||||
|
||||
#### EXT-X-CUE-IN
|
||||
|
||||
The `EXT-X-CUE-IN` indicates the end of the interstitial and the return of the main content. Its format is:
|
||||
|
||||
```
|
||||
#EXT-X-CUE-IN
|
||||
```
|
||||
|
||||
There *SHOULD* be a closing `EXT-X-CUE-IN` tag for every `EXT-X-CUE-OUT` tag. If a second `EXT-X-CUE-OUT` tag is encountered before an `EXT-X-CUE-IN` tag, the client *MAY* choose to ignore the `EXT-X-CUE-OUT` and treat it as part of the interstitial, or reject the playlist.
|
||||
|
||||
Example media playlist using `EXT-X-CUE-` tags.
|
||||
|
||||
```
|
||||
#EXTM3U
|
||||
#EXT-X-VERSION:3
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
0.ts
|
||||
#EXTINF:10,
|
||||
1.ts
|
||||
#EXT-X-CUE-OUT:30
|
||||
#EXTINF:10,
|
||||
2.ts
|
||||
#EXT-X-CUE-OUT-CONT:10/30
|
||||
#EXTINF:10,
|
||||
3.ts
|
||||
#EXT-X-CUE-OUT-CONT:20/30
|
||||
#EXTINF:10,
|
||||
4.ts
|
||||
#EXT-X-CUE-IN
|
||||
#EXTINF:10,
|
||||
5.ts
|
||||
#EXTINF:10,
|
||||
6.ts
|
||||
#EXT-X-ENDLIST
|
||||
```
|
||||
|
||||
### Not Yet Supported
|
||||
|
||||
* [EXT-X-DATERANGE](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.7)
|
||||
* [EXT-X-I-FRAMES-ONLY](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.6)
|
||||
* [EXT-X-I-FRAME-STREAM-INF](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.3)
|
||||
* [EXT-X-SESSION-DATA](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.4)
|
||||
* [EXT-X-SESSION-KEY](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.5)
|
||||
* [EXT-X-INDEPENDENT-SEGMENTS](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.5.1)
|
||||
|
||||
### Custom Parsers
|
||||
|
||||
To add a parser for a non-standard tag the parser object allows for the specification of custom tags using regular expressions. If a custom parser is specified, a `custom` object is appended to the manifest object.
|
||||
|
||||
```js
|
||||
const manifest = [
|
||||
'#EXTM3U',
|
||||
'#EXT-X-VERSION:3',
|
||||
'#VOD-FRAMERATE:29.97',
|
||||
''
|
||||
].join('\n');
|
||||
|
||||
const parser = new m3u8Parser.Parser();
|
||||
parser.addParser({
|
||||
expression: /^#VOD-FRAMERATE/,
|
||||
customType: 'framerate'
|
||||
});
|
||||
|
||||
parser.push(manifest);
|
||||
parser.end();
|
||||
parser.manifest.custom.framerate // "#VOD-FRAMERATE:29.97"
|
||||
```
|
||||
|
||||
Custom parsers may additionally be provided a data parsing function that take a line and return a value.
|
||||
|
||||
```js
|
||||
const manifest = [
|
||||
'#EXTM3U',
|
||||
'#EXT-X-VERSION:3',
|
||||
'#VOD-FRAMERATE:29.97',
|
||||
''
|
||||
].join('\n');
|
||||
|
||||
const parser = new m3u8Parser.Parser();
|
||||
parser.addParser({
|
||||
expression: /^#VOD-FRAMERATE/,
|
||||
customType: 'framerate',
|
||||
dataParser: function(line) {
|
||||
return parseFloat(line.split(':')[1]);
|
||||
}
|
||||
});
|
||||
|
||||
parser.push(manifest);
|
||||
parser.end();
|
||||
parser.manifest.custom.framerate // 29.97
|
||||
```
|
||||
|
||||
Custom parsers may also extract data at a segment level by passing `segment: true` to the options object. Having a segment level custom parser will add a `custom` object to the segment data.
|
||||
|
||||
```js
|
||||
const manifest = [
|
||||
'#EXTM3U',
|
||||
'#VOD-TIMING:1511816599485',
|
||||
'#EXTINF:8.0,',
|
||||
'ex1.ts',
|
||||
''
|
||||
].join('\n');
|
||||
|
||||
const parser = new m3u8Parser.Parser();
|
||||
parser.addParser({
|
||||
expression: /#VOD-TIMING/,
|
||||
customType: 'vodTiming',
|
||||
segment: true
|
||||
});
|
||||
|
||||
parser.push(manifest);
|
||||
parser.end();
|
||||
parser.manifest.segments[0].custom.vodTiming // #VOD-TIMING:1511816599485
|
||||
```
|
||||
|
||||
Custom parsers may also map a tag to another tag. The old tag will not be replaced and all matching registered mappers and parsers will be executed.
|
||||
```js
|
||||
const manifest = [
|
||||
'#EXTM3U',
|
||||
'#EXAMPLE',
|
||||
'#EXTINF:8.0,',
|
||||
'ex1.ts',
|
||||
''
|
||||
].join('\n');
|
||||
|
||||
const parser = new m3u8Parser.Parser();
|
||||
parser.addTagMapper({
|
||||
expression: /#EXAMPLE/,
|
||||
map(line) {
|
||||
return `#NEW-TAG:123`;
|
||||
}
|
||||
});
|
||||
parser.addParser({
|
||||
expression: /#NEW-TAG/,
|
||||
customType: 'mappingExample',
|
||||
segment: true
|
||||
});
|
||||
|
||||
parser.push(manifest);
|
||||
parser.end();
|
||||
parser.manifest.segments[0].custom.mappingExample // #NEW-TAG:123
|
||||
```
|
||||
|
||||
## Including the Parser
|
||||
|
||||
To include m3u8-parser on your website or web application, use any of the following methods.
|
||||
|
||||
### `<script>` Tag
|
||||
|
||||
This is the simplest case. Get the script in whatever way you prefer and include it on your page.
|
||||
|
||||
```html
|
||||
<script src="//path/to/m3u8-parser.min.js"></script>
|
||||
<script>
|
||||
var parser = new m3u8Parser.Parser();
|
||||
</script>
|
||||
```
|
||||
|
||||
### Browserify
|
||||
|
||||
When using with Browserify, install m3u8-parser via npm and `require` the parser as you would any other module.
|
||||
|
||||
```js
|
||||
var m3u8Parser = require('m3u8-parser');
|
||||
|
||||
var parser = new m3u8Parser.Parser();
|
||||
```
|
||||
|
||||
With ES6:
|
||||
```js
|
||||
import { Parser } from 'm3u8-parser';
|
||||
|
||||
const parser = new Parser();
|
||||
```
|
||||
|
||||
### RequireJS/AMD
|
||||
|
||||
When using with RequireJS (or another AMD library), get the script in whatever way you prefer and `require` the parser as you normally would:
|
||||
|
||||
```js
|
||||
require(['m3u8-parser'], function(m3u8Parser) {
|
||||
var parser = new m3u8Parser.Parser();
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0. Copyright (c) Brightcove, Inc
|
||||
15
build/javascript/node_modules/m3u8-parser/index.html
generated
vendored
15
build/javascript/node_modules/m3u8-parser/index.html
generated
vendored
@@ -1,15 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>m3u8-parser Demo</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Open dev tools to try it out</p>
|
||||
<ul>
|
||||
<li><a href="test/debug.html">Run unit tests in browser.</a></li>
|
||||
<li><a href="docs/api/">Read generated docs.</a></li>
|
||||
</ul>
|
||||
<script src="dist/m3u8-parser.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
36
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/CHANGELOG.md
generated
vendored
36
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/CHANGELOG.md
generated
vendored
@@ -1,36 +0,0 @@
|
||||
<a name="1.3.0"></a>
|
||||
# [1.3.0](https://github.com/videojs/vhs-utils/compare/v1.2.1...v1.3.0) (2020-02-05)
|
||||
|
||||
### Features
|
||||
|
||||
* add forEachMediaGroup in media-groups module (#8) ([a1eacf4](https://github.com/videojs/vhs-utils/commit/a1eacf4)), closes [#8](https://github.com/videojs/vhs-utils/issues/8)
|
||||
|
||||
<a name="1.2.1"></a>
|
||||
## [1.2.1](https://github.com/videojs/vhs-utils/compare/v1.2.0...v1.2.1) (2020-01-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* include videojs in VHS JSON media type (#7) ([da072f0](https://github.com/videojs/vhs-utils/commit/da072f0)), closes [#7](https://github.com/videojs/vhs-utils/issues/7)
|
||||
|
||||
<a name="1.2.0"></a>
|
||||
# [1.2.0](https://github.com/videojs/vhs-utils/compare/v1.1.0...v1.2.0) (2019-12-06)
|
||||
|
||||
### Features
|
||||
|
||||
* add media-types module with simpleTypeFromSourceType function (#4) ([d3ebd3f](https://github.com/videojs/vhs-utils/commit/d3ebd3f)), closes [#4](https://github.com/videojs/vhs-utils/issues/4)
|
||||
* add VHS codec parsing and translation functions (#5) ([4fe0e22](https://github.com/videojs/vhs-utils/commit/4fe0e22)), closes [#5](https://github.com/videojs/vhs-utils/issues/5)
|
||||
|
||||
<a name="1.1.0"></a>
|
||||
# [1.1.0](https://github.com/videojs/stream/compare/v1.0.0...v1.1.0) (2019-08-30)
|
||||
|
||||
### Features
|
||||
|
||||
* node support and more stream tests ([315ab8d](https://github.com/videojs/stream/commit/315ab8d))
|
||||
|
||||
<a name="1.0.0"></a>
|
||||
# 1.0.0 (2019-08-21)
|
||||
|
||||
### Features
|
||||
|
||||
* clones from mpd-parser, m3u8-parser, mux.js, aes-decrypter, and vhs ([5e89042](https://github.com/videojs/stream/commit/5e89042))
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# CONTRIBUTING
|
||||
|
||||
We welcome contributions from everyone!
|
||||
|
||||
## Getting Started
|
||||
|
||||
Make sure you have Node.js 8 or higher and npm installed.
|
||||
|
||||
1. Fork this repository and clone your fork
|
||||
1. Install dependencies: `npm install`
|
||||
1. Run a development server: `npm start`
|
||||
|
||||
### Making Changes
|
||||
|
||||
Refer to the [video.js plugin conventions][conventions] for more detail on best practices and tooling for video.js plugin authorship.
|
||||
|
||||
When you've made your changes, push your commit(s) to your fork and issue a pull request against the original repository.
|
||||
|
||||
### Running Tests
|
||||
|
||||
Testing is a crucial part of any software project. For all but the most trivial changes (typos, etc) test cases are expected. Tests are run in actual browsers using [Karma][karma].
|
||||
|
||||
- In all available and supported browsers: `npm test`
|
||||
- In a specific browser: `npm run test:chrome`, `npm run test:firefox`, etc.
|
||||
- While development server is running (`npm start`), navigate to [`http://localhost:9999/test/`][local]
|
||||
|
||||
|
||||
[karma]: http://karma-runner.github.io/
|
||||
[local]: http://localhost:9999/test/
|
||||
[conventions]: https://github.com/videojs/generator-videojs-plugin/blob/master/docs/conventions.md
|
||||
19
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/LICENSE
generated
vendored
19
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/LICENSE
generated
vendored
@@ -1,19 +0,0 @@
|
||||
Copyright (c) brandonocasey <brandonocasey@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
29
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/README.md
generated
vendored
29
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/README.md
generated
vendored
@@ -1,29 +0,0 @@
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
|
||||
- [@videojs/vhs-utils](#videojsvhs-utils)
|
||||
- [Installation](#installation)
|
||||
- [Usage](#usage)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# @videojs/vhs-utils
|
||||
|
||||
vhs-utils serves two purposes:
|
||||
|
||||
1. It extracts objects and functions shared throughout @videojs/http-streaming code to save on package size. See [the original @videojs/http-streaming PR](https://github.com/videojs/http-streaming/pull/637) for details.
|
||||
2. It exports generic functions from VHS that may be useful to plugin authors.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install --save @videojs/vhs-utils
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
All utility functions are published under dist and can be required/imported like so:
|
||||
|
||||
`import resolveUrl from '@videojs/vhs-utils/dist/resolve-url';`
|
||||
`const resolveUrl = require('@videojs/vhs-utils/dist/resolve-url');`
|
||||
27
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/index.html
generated
vendored
27
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/index.html
generated
vendored
@@ -1,27 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>videojs-stream Demo</title>
|
||||
<link href="node_modules/video.js/dist/video-js.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<video id="videojs-stream-player" class="video-js vjs-default-skin" controls>
|
||||
<source src="//vjs.zencdn.net/v/oceans.mp4" type='video/mp4'>
|
||||
<source src="//vjs.zencdn.net/v/oceans.webm" type='video/webm'>
|
||||
</video>
|
||||
<ul>
|
||||
<li><a href="/test/debug.html">Run unit tests in browser.</a></li>
|
||||
|
||||
</ul>
|
||||
<script src="node_modules/video.js/dist/video.js"></script>
|
||||
<script src="dist/videojs-stream.js"></script>
|
||||
<script>
|
||||
(function(window, videojs) {
|
||||
var examplePlayer = window.examplePlayer = videojs('videojs-stream-player');
|
||||
var stream = window.stream = examplePlayer.stream();
|
||||
}(window, window.videojs));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
120
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/package.json
generated
vendored
120
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/package.json
generated
vendored
@@ -1,120 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@videojs/vhs-utils@1.3.0",
|
||||
"/home/runner/work/owncast/owncast/build/javascript"
|
||||
]
|
||||
],
|
||||
"_from": "@videojs/vhs-utils@1.3.0",
|
||||
"_id": "@videojs/vhs-utils@1.3.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-oiqXDtHQqDPun7JseWkirUHGrgdYdeF12goUut5z7vwAj4DmUufEPFJ4xK5hYGXGFDyDhk2rSFOR122Ze6qXyQ==",
|
||||
"_location": "/m3u8-parser/@videojs/vhs-utils",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@videojs/vhs-utils@1.3.0",
|
||||
"name": "@videojs/vhs-utils",
|
||||
"escapedName": "@videojs%2fvhs-utils",
|
||||
"scope": "@videojs",
|
||||
"rawSpec": "1.3.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.3.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/m3u8-parser"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-1.3.0.tgz",
|
||||
"_spec": "1.3.0",
|
||||
"_where": "/home/runner/work/owncast/owncast/build/javascript",
|
||||
"author": {
|
||||
"name": "brandonocasey",
|
||||
"email": "brandonocasey@gmail.com"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults",
|
||||
"ie 11"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"global": "^4.3.2",
|
||||
"url-toolkit": "^2.1.6"
|
||||
},
|
||||
"description": "Objects and functions shared throughtout @videojs/http-streaming code",
|
||||
"devDependencies": {
|
||||
"@videojs/generator-helpers": "~1.2.0",
|
||||
"karma": "^4.0.0",
|
||||
"rollup": "^1.12.0",
|
||||
"sinon": "^7.2.2",
|
||||
"videojs-generate-karma-config": "~5.3.0",
|
||||
"videojs-generate-rollup-config": "~5.0.0",
|
||||
"videojs-generator-verify": "~1.2.0",
|
||||
"videojs-standard": "^8.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8",
|
||||
"npm": ">=5"
|
||||
},
|
||||
"files": [
|
||||
"CONTRIBUTING.md",
|
||||
"dist/",
|
||||
"docs/",
|
||||
"index.html",
|
||||
"scripts/",
|
||||
"src/",
|
||||
"test/"
|
||||
],
|
||||
"generator-videojs-plugin": {
|
||||
"version": "7.7.1"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"videojs-plugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"vjsstandard --fix",
|
||||
"git add"
|
||||
],
|
||||
"README.md": [
|
||||
"doctoc --notitle",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"name": "@videojs/vhs-utils",
|
||||
"scripts": {
|
||||
"build": "npm-run-all -s clean -p build:*",
|
||||
"build-prod": "cross-env-shell NO_TEST_BUNDLE=1 'npm run build'",
|
||||
"build-test": "cross-env-shell TEST_BUNDLE_ONLY=1 'npm run build'",
|
||||
"build:js": "rollup -c scripts/rollup.config.js",
|
||||
"clean": "shx rm -rf ./dist ./test/dist && shx mkdir -p ./dist ./test/dist",
|
||||
"lint": "vjsstandard",
|
||||
"posttest": "shx cat test/dist/coverage/text.txt",
|
||||
"prepublishOnly": "npm-run-all build-prod && vjsverify --verbose --skip-es-check",
|
||||
"preversion": "npm test",
|
||||
"server": "karma start scripts/karma.conf.js --singleRun=false --auto-watch",
|
||||
"start": "npm-run-all -p server watch",
|
||||
"test": "npm-run-all lint build-test && npm-run-all test:*",
|
||||
"test:browser": "karma start scripts/karma.conf.js",
|
||||
"test:node": "qunit test/dist/bundle.js",
|
||||
"update-changelog": "conventional-changelog -p videojs -i CHANGELOG.md -s",
|
||||
"version": "is-prerelease || npm run update-changelog && git add CHANGELOG.md",
|
||||
"watch": "npm-run-all -p watch:*",
|
||||
"watch:js": "npm run build:js -- -w"
|
||||
},
|
||||
"version": "1.3.0",
|
||||
"vjsstandard": {
|
||||
"ignore": [
|
||||
"dist",
|
||||
"docs",
|
||||
"test/dist"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
const generate = require('videojs-generate-karma-config');
|
||||
|
||||
module.exports = function(config) {
|
||||
|
||||
// see https://github.com/videojs/videojs-generate-karma-config
|
||||
// for options
|
||||
const options = {};
|
||||
|
||||
config = generate(config, options);
|
||||
|
||||
// any other custom stuff not supported by options here!
|
||||
};
|
||||
@@ -1,42 +0,0 @@
|
||||
const generate = require('videojs-generate-rollup-config');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const BASE_DIR = path.join(__dirname, '..');
|
||||
const SRC_DIR = path.join(BASE_DIR, 'src');
|
||||
|
||||
const files = fs.readdirSync(SRC_DIR);
|
||||
|
||||
const shared = {
|
||||
externals(defaults) {
|
||||
defaults.module.push('url-toolkit');
|
||||
return defaults;
|
||||
}
|
||||
};
|
||||
const builds = [];
|
||||
|
||||
files.forEach(function(file, i) {
|
||||
const config = generate(Object.assign({}, shared, {
|
||||
input: path.relative(BASE_DIR, path.join(SRC_DIR, file)),
|
||||
distName: path.basename(file, path.extname(file))
|
||||
}));
|
||||
|
||||
// gaurd against test only builds
|
||||
if (config.builds.module) {
|
||||
const module = config.builds.module;
|
||||
|
||||
module.output = module.output.filter((o) => o.format === 'cjs');
|
||||
module.output[0].file = module.output[0].file.replace('.cjs.js', '.js');
|
||||
builds.push(module);
|
||||
}
|
||||
|
||||
// gaurd against production only builds
|
||||
// only add the last test bundle we generate as they are all the same
|
||||
if (i === (files.length - 1) && config.builds.test) {
|
||||
builds.push(config.builds.test);
|
||||
}
|
||||
});
|
||||
|
||||
// export the builds to rollup
|
||||
|
||||
export default builds;
|
||||
130
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/src/codecs.js
generated
vendored
130
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/src/codecs.js
generated
vendored
@@ -1,130 +0,0 @@
|
||||
/**
|
||||
* Replace the old apple-style `avc1.<dd>.<dd>` codec string with the standard
|
||||
* `avc1.<hhhhhh>`
|
||||
*
|
||||
* @param {string} codec
|
||||
* Codec string to translate
|
||||
* @return {string}
|
||||
* The translated codec string
|
||||
*/
|
||||
export const translateLegacyCodec = function(codec) {
|
||||
if (!codec) {
|
||||
return codec;
|
||||
}
|
||||
|
||||
return codec.replace(/avc1\.(\d+)\.(\d+)/i, function(orig, profile, avcLevel) {
|
||||
const profileHex = ('00' + Number(profile).toString(16)).slice(-2);
|
||||
const avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);
|
||||
|
||||
return 'avc1.' + profileHex + '00' + avcLevelHex;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace the old apple-style `avc1.<dd>.<dd>` codec strings with the standard
|
||||
* `avc1.<hhhhhh>`
|
||||
*
|
||||
* @param {string[]} codecs
|
||||
* An array of codec strings to translate
|
||||
* @return {string[]}
|
||||
* The translated array of codec strings
|
||||
*/
|
||||
export const translateLegacyCodecs = function(codecs) {
|
||||
return codecs.map(translateLegacyCodec);
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace codecs in the codec string with the old apple-style `avc1.<dd>.<dd>` to the
|
||||
* standard `avc1.<hhhhhh>`.
|
||||
*
|
||||
* @param {string} codecString
|
||||
* The codec string
|
||||
* @return {string}
|
||||
* The codec string with old apple-style codecs replaced
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export const mapLegacyAvcCodecs = function(codecString) {
|
||||
return codecString.replace(/avc1\.(\d+)\.(\d+)/i, (match) => {
|
||||
return translateLegacyCodecs([match])[0];
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {Object} ParsedCodecInfo
|
||||
* @property {number} codecCount
|
||||
* Number of codecs parsed
|
||||
* @property {string} [videoCodec]
|
||||
* Parsed video codec (if found)
|
||||
* @property {string} [videoObjectTypeIndicator]
|
||||
* Video object type indicator (if found)
|
||||
* @property {string|null} audioProfile
|
||||
* Audio profile
|
||||
*/
|
||||
|
||||
/**
|
||||
* Parses a codec string to retrieve the number of codecs specified, the video codec and
|
||||
* object type indicator, and the audio profile.
|
||||
*
|
||||
* @param {string} [codecs]
|
||||
* The codec string to parse
|
||||
* @return {ParsedCodecInfo}
|
||||
* Parsed codec info
|
||||
*/
|
||||
export const parseCodecs = function(codecs = '') {
|
||||
const result = {
|
||||
codecCount: 0
|
||||
};
|
||||
|
||||
result.codecCount = codecs.split(',').length;
|
||||
result.codecCount = result.codecCount || 2;
|
||||
|
||||
// parse the video codec
|
||||
const parsed = (/(^|\s|,)+(avc[13])([^ ,]*)/i).exec(codecs);
|
||||
|
||||
if (parsed) {
|
||||
result.videoCodec = parsed[2];
|
||||
result.videoObjectTypeIndicator = parsed[3];
|
||||
}
|
||||
|
||||
// parse the last field of the audio codec
|
||||
result.audioProfile =
|
||||
(/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i).exec(codecs);
|
||||
result.audioProfile = result.audioProfile && result.audioProfile[2];
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a ParsedCodecInfo object for the default alternate audio playlist if there is
|
||||
* a default alternate audio playlist for the provided audio group.
|
||||
*
|
||||
* @param {Object} master
|
||||
* The master playlist
|
||||
* @param {string} audioGroupId
|
||||
* ID of the audio group for which to find the default codec info
|
||||
* @return {ParsedCodecInfo}
|
||||
* Parsed codec info
|
||||
*/
|
||||
export const audioProfileFromDefault = (master, audioGroupId) => {
|
||||
if (!master.mediaGroups.AUDIO || !audioGroupId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const audioGroup = master.mediaGroups.AUDIO[audioGroupId];
|
||||
|
||||
if (!audioGroup) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (const name in audioGroup) {
|
||||
const audioType = audioGroup[name];
|
||||
|
||||
if (audioType.default && audioType.playlists) {
|
||||
// codec should be the same for all playlists within the audio type
|
||||
return parseCodecs(audioType.playlists[0].attributes.CODECS).audioProfile;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
import window from 'global/window';
|
||||
|
||||
const atob = (s) => window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');
|
||||
|
||||
export default function decodeB64ToUint8Array(b64Text) {
|
||||
const decodedString = atob(b64Text);
|
||||
const array = new Uint8Array(decodedString.length);
|
||||
|
||||
for (let i = 0; i < decodedString.length; i++) {
|
||||
array[i] = decodedString.charCodeAt(i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Loops through all supported media groups in master and calls the provided
|
||||
* callback for each group
|
||||
*
|
||||
* @param {Object} master
|
||||
* The parsed master manifest object
|
||||
* @param {string[]} groups
|
||||
* The media groups to call the callback for
|
||||
* @param {Function} callback
|
||||
* Callback to call for each media group
|
||||
*/
|
||||
export const forEachMediaGroup = (master, groups, callback) => {
|
||||
groups.forEach((mediaType) => {
|
||||
for (const groupKey in master.mediaGroups[mediaType]) {
|
||||
for (const labelKey in master.mediaGroups[mediaType][groupKey]) {
|
||||
const mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];
|
||||
|
||||
callback(mediaProperties, mediaType, groupKey, labelKey);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
const MPEGURL_REGEX = /^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;
|
||||
const DASH_REGEX = /^application\/dash\+xml/i;
|
||||
|
||||
/**
|
||||
* Returns a string that describes the type of source based on a video source object's
|
||||
* media type.
|
||||
*
|
||||
* @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}
|
||||
*
|
||||
* @param {string} type
|
||||
* Video source object media type
|
||||
* @return {('hls'|'dash'|'vhs-json'|null)}
|
||||
* VHS source type string
|
||||
*/
|
||||
export const simpleTypeFromSourceType = (type) => {
|
||||
if (MPEGURL_REGEX.test(type)) {
|
||||
return 'hls';
|
||||
}
|
||||
|
||||
if (DASH_REGEX.test(type)) {
|
||||
return 'dash';
|
||||
}
|
||||
|
||||
// Denotes the special case of a manifest object passed to http-streaming instead of a
|
||||
// source URL.
|
||||
//
|
||||
// See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.
|
||||
//
|
||||
// In this case, vnd stands for vendor, video.js for the organization, VHS for this
|
||||
// project, and the +json suffix identifies the structure of the media type.
|
||||
if (type === 'application/vnd.videojs.vhs+json') {
|
||||
return 'vhs-json';
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
import URLToolkit from 'url-toolkit';
|
||||
import window from 'global/window';
|
||||
|
||||
const resolveUrl = (baseUrl, relativeUrl) => {
|
||||
// return early if we don't need to resolve
|
||||
if ((/^[a-z]+:/i).test(relativeUrl)) {
|
||||
return relativeUrl;
|
||||
}
|
||||
|
||||
// if the base URL is relative then combine with the current location
|
||||
if (!(/\/\//i).test(baseUrl)) {
|
||||
baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);
|
||||
}
|
||||
|
||||
return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);
|
||||
};
|
||||
|
||||
export default resolveUrl;
|
||||
108
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/src/stream.js
generated
vendored
108
build/javascript/node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/src/stream.js
generated
vendored
@@ -1,108 +0,0 @@
|
||||
/**
|
||||
* @file stream.js
|
||||
*/
|
||||
/**
|
||||
* A lightweight readable stream implemention that handles event dispatching.
|
||||
*
|
||||
* @class Stream
|
||||
*/
|
||||
export default class Stream {
|
||||
constructor() {
|
||||
this.listeners = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a listener for a specified event type.
|
||||
*
|
||||
* @param {string} type the event name
|
||||
* @param {Function} listener the callback to be invoked when an event of
|
||||
* the specified type occurs
|
||||
*/
|
||||
on(type, listener) {
|
||||
if (!this.listeners[type]) {
|
||||
this.listeners[type] = [];
|
||||
}
|
||||
this.listeners[type].push(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a listener for a specified event type.
|
||||
*
|
||||
* @param {string} type the event name
|
||||
* @param {Function} listener a function previously registered for this
|
||||
* type of event through `on`
|
||||
* @return {boolean} if we could turn it off or not
|
||||
*/
|
||||
off(type, listener) {
|
||||
if (!this.listeners[type]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const index = this.listeners[type].indexOf(listener);
|
||||
|
||||
// TODO: which is better?
|
||||
// In Video.js we slice listener functions
|
||||
// on trigger so that it does not mess up the order
|
||||
// while we loop through.
|
||||
//
|
||||
// Here we slice on off so that the loop in trigger
|
||||
// can continue using it's old reference to loop without
|
||||
// messing up the order.
|
||||
this.listeners[type] = this.listeners[type].slice(0);
|
||||
this.listeners[type].splice(index, 1);
|
||||
return index > -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger an event of the specified type on this stream. Any additional
|
||||
* arguments to this function are passed as parameters to event listeners.
|
||||
*
|
||||
* @param {string} type the event name
|
||||
*/
|
||||
trigger(type) {
|
||||
const callbacks = this.listeners[type];
|
||||
|
||||
if (!callbacks) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Slicing the arguments on every invocation of this method
|
||||
// can add a significant amount of overhead. Avoid the
|
||||
// intermediate object creation for the common case of a
|
||||
// single callback argument
|
||||
if (arguments.length === 2) {
|
||||
const length = callbacks.length;
|
||||
|
||||
for (let i = 0; i < length; ++i) {
|
||||
callbacks[i].call(this, arguments[1]);
|
||||
}
|
||||
} else {
|
||||
const args = Array.prototype.slice.call(arguments, 1);
|
||||
const length = callbacks.length;
|
||||
|
||||
for (let i = 0; i < length; ++i) {
|
||||
callbacks[i].apply(this, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys the stream and cleans up.
|
||||
*/
|
||||
dispose() {
|
||||
this.listeners = {};
|
||||
}
|
||||
/**
|
||||
* Forwards all `data` events on this stream to the destination stream. The
|
||||
* destination stream should provide a method `push` to receive the data
|
||||
* events as they arrive.
|
||||
*
|
||||
* @param {Stream} destination the stream that will receive all `data` events
|
||||
* @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options
|
||||
*/
|
||||
pipe(destination) {
|
||||
this.on('data', function(data) {
|
||||
destination.push(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,242 +0,0 @@
|
||||
import QUnit from 'qunit';
|
||||
import {
|
||||
mapLegacyAvcCodecs,
|
||||
translateLegacyCodecs,
|
||||
parseCodecs,
|
||||
audioProfileFromDefault
|
||||
} from '../src/codecs';
|
||||
|
||||
QUnit.module('Legacy Codecs');
|
||||
|
||||
QUnit.test('maps legacy AVC codecs', function(assert) {
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('avc1.deadbeef'),
|
||||
'avc1.deadbeef',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('avc1.dead.beef, mp4a.something'),
|
||||
'avc1.dead.beef, mp4a.something',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('avc1.dead.beef,mp4a.something'),
|
||||
'avc1.dead.beef,mp4a.something',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('mp4a.something,avc1.dead.beef'),
|
||||
'mp4a.something,avc1.dead.beef',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('mp4a.something, avc1.dead.beef'),
|
||||
'mp4a.something, avc1.dead.beef',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('avc1.42001e'),
|
||||
'avc1.42001e',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('avc1.4d0020,mp4a.40.2'),
|
||||
'avc1.4d0020,mp4a.40.2',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('mp4a.40.2,avc1.4d0020'),
|
||||
'mp4a.40.2,avc1.4d0020',
|
||||
'does nothing for non legacy pattern'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('mp4a.40.40'),
|
||||
'mp4a.40.40',
|
||||
'does nothing for non video codecs'
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('avc1.66.30'),
|
||||
'avc1.42001e',
|
||||
'translates legacy video codec alone'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('avc1.66.30, mp4a.40.2'),
|
||||
'avc1.42001e, mp4a.40.2',
|
||||
'translates legacy video codec when paired with audio'
|
||||
);
|
||||
assert.equal(
|
||||
mapLegacyAvcCodecs('mp4a.40.2, avc1.66.30'),
|
||||
'mp4a.40.2, avc1.42001e',
|
||||
'translates video codec when specified second'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('translates legacy codecs', function(assert) {
|
||||
assert.deepEqual(
|
||||
translateLegacyCodecs(['avc1.66.30', 'avc1.66.30']),
|
||||
['avc1.42001e', 'avc1.42001e'],
|
||||
'translates legacy avc1.66.30 codec'
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
translateLegacyCodecs(['avc1.42C01E', 'avc1.42C01E']),
|
||||
['avc1.42C01E', 'avc1.42C01E'],
|
||||
'does not translate modern codecs'
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
translateLegacyCodecs(['avc1.42C01E', 'avc1.66.30']),
|
||||
['avc1.42C01E', 'avc1.42001e'],
|
||||
'only translates legacy codecs when mixed'
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
translateLegacyCodecs(['avc1.4d0020', 'avc1.100.41', 'avc1.77.41',
|
||||
'avc1.77.32', 'avc1.77.31', 'avc1.77.30',
|
||||
'avc1.66.30', 'avc1.66.21', 'avc1.42C01e']),
|
||||
['avc1.4d0020', 'avc1.640029', 'avc1.4d0029',
|
||||
'avc1.4d0020', 'avc1.4d001f', 'avc1.4d001e',
|
||||
'avc1.42001e', 'avc1.420015', 'avc1.42C01e'],
|
||||
'translates a whole bunch'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.module('parseCodecs');
|
||||
|
||||
QUnit.test('parses video only codec string', function(assert) {
|
||||
assert.deepEqual(
|
||||
parseCodecs('avc1.42001e'),
|
||||
{
|
||||
codecCount: 1,
|
||||
videoCodec: 'avc1',
|
||||
videoObjectTypeIndicator: '.42001e',
|
||||
audioProfile: null
|
||||
},
|
||||
'parsed video only codec string'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('parses audio only codec string', function(assert) {
|
||||
assert.deepEqual(
|
||||
parseCodecs('mp4a.40.2'),
|
||||
{
|
||||
codecCount: 1,
|
||||
audioProfile: '2'
|
||||
},
|
||||
'parsed audio only codec string'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('parses video and audio codec string', function(assert) {
|
||||
assert.deepEqual(
|
||||
parseCodecs('avc1.42001e, mp4a.40.2'),
|
||||
{
|
||||
codecCount: 2,
|
||||
videoCodec: 'avc1',
|
||||
videoObjectTypeIndicator: '.42001e',
|
||||
audioProfile: '2'
|
||||
},
|
||||
'parsed video and audio codec string'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.module('audioProfileFromDefault');
|
||||
|
||||
QUnit.test('returns falsey when no audio group ID', function(assert) {
|
||||
assert.notOk(
|
||||
audioProfileFromDefault(
|
||||
{ mediaGroups: { AUDIO: {} } },
|
||||
'',
|
||||
),
|
||||
'returns falsey when no audio group ID'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('returns falsey when no matching audio group', function(assert) {
|
||||
assert.notOk(
|
||||
audioProfileFromDefault(
|
||||
{
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
au1: {
|
||||
en: {
|
||||
default: false,
|
||||
playlists: [{
|
||||
attributes: { CODECS: 'mp4a.40.2' }
|
||||
}]
|
||||
},
|
||||
es: {
|
||||
default: true,
|
||||
playlists: [{
|
||||
attributes: { CODECS: 'mp4a.40.5' }
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'au2'
|
||||
),
|
||||
'returned falsey when no matching audio group'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('returns falsey when no default for audio group', function(assert) {
|
||||
assert.notOk(
|
||||
audioProfileFromDefault(
|
||||
{
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
au1: {
|
||||
en: {
|
||||
default: false,
|
||||
playlists: [{
|
||||
attributes: { CODECS: 'mp4a.40.2' }
|
||||
}]
|
||||
},
|
||||
es: {
|
||||
default: false,
|
||||
playlists: [{
|
||||
attributes: { CODECS: 'mp4a.40.5' }
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'au1'
|
||||
),
|
||||
'returned falsey when no default for audio group'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('returns audio profile for default in audio group', function(assert) {
|
||||
assert.deepEqual(
|
||||
audioProfileFromDefault(
|
||||
{
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
au1: {
|
||||
en: {
|
||||
default: false,
|
||||
playlists: [{
|
||||
attributes: { CODECS: 'mp4a.40.2' }
|
||||
}]
|
||||
},
|
||||
es: {
|
||||
default: true,
|
||||
playlists: [{
|
||||
attributes: { CODECS: 'mp4a.40.5' }
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'au1'
|
||||
),
|
||||
'5',
|
||||
'returned parsed codec audio profile'
|
||||
);
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
import QUnit from 'qunit';
|
||||
import decodeB64ToUint8Array from '../src/decode-b64-to-uint8-array.js';
|
||||
|
||||
QUnit.module('decodeB64ToUint8Array');
|
||||
|
||||
// slightly modified version of m3u8 test
|
||||
// 'parses Widevine #EXT-X-KEY attributes and attaches to manifest'
|
||||
QUnit.test('can decode', function(assert) {
|
||||
const b64 = 'AAAAPnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAB4iFnNoYWthX2NlYzJmNjRhYTc4OTBhMTFI49yVmwY';
|
||||
const result = decodeB64ToUint8Array(b64);
|
||||
|
||||
assert.deepEqual(result.byteLength, 62, 'decoded');
|
||||
});
|
||||
@@ -1,171 +0,0 @@
|
||||
import QUnit from 'qunit';
|
||||
import { forEachMediaGroup } from '../src/media-groups';
|
||||
|
||||
QUnit.module('forEachMediaGroup');
|
||||
|
||||
QUnit.test('runs callback for each audio media group', function(assert) {
|
||||
const master = {
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
au1: {
|
||||
en: { en: 'en' },
|
||||
es: { es: 'es' }
|
||||
},
|
||||
au2: {
|
||||
de: { de: 'de' },
|
||||
fr: { fr: 'fr' }
|
||||
}
|
||||
},
|
||||
OTHER: {
|
||||
other1: {
|
||||
other11: { other11: 'other11' },
|
||||
other12: { other12: 'other12' }
|
||||
},
|
||||
other2: {
|
||||
other21: { other21: 'other21' },
|
||||
other22: { other22: 'other22' }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const iteratedMediaGroups = [];
|
||||
|
||||
forEachMediaGroup(
|
||||
master,
|
||||
['AUDIO'],
|
||||
(mediaGroup) => iteratedMediaGroups.push(mediaGroup)
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
iteratedMediaGroups,
|
||||
[
|
||||
{ en: 'en' },
|
||||
{ es: 'es' },
|
||||
{ de: 'de' },
|
||||
{ fr: 'fr' }
|
||||
],
|
||||
'iterated audio media groups'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('runs callback for each subtitle media group', function(assert) {
|
||||
const master = {
|
||||
mediaGroups: {
|
||||
SUBTITLES: {
|
||||
sub1: {
|
||||
en: { en: 'en' },
|
||||
es: { es: 'es' }
|
||||
},
|
||||
sub2: {
|
||||
de: { de: 'de' },
|
||||
fr: { fr: 'fr' }
|
||||
}
|
||||
},
|
||||
OTHER: {
|
||||
other1: {
|
||||
other11: { other11: 'other11' },
|
||||
other12: { other12: 'other12' }
|
||||
},
|
||||
other2: {
|
||||
other21: { other21: 'other21' },
|
||||
other22: { other22: 'other22' }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const iteratedMediaGroups = [];
|
||||
|
||||
forEachMediaGroup(
|
||||
master,
|
||||
['SUBTITLES'],
|
||||
(mediaGroup) => iteratedMediaGroups.push(mediaGroup)
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
iteratedMediaGroups,
|
||||
[
|
||||
{ en: 'en' },
|
||||
{ es: 'es' },
|
||||
{ de: 'de' },
|
||||
{ fr: 'fr' }
|
||||
],
|
||||
'iterated subtitles media groups'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('runs callback for each audio and subtitles media group', function(assert) {
|
||||
const master = {
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
au1: {
|
||||
en: { en: 'en' },
|
||||
es: { es: 'es' }
|
||||
},
|
||||
au2: {
|
||||
de: { de: 'de' },
|
||||
fr: { fr: 'fr' }
|
||||
}
|
||||
},
|
||||
SUBTITLES: {
|
||||
sub1: {
|
||||
enS: { enS: 'enS' },
|
||||
esS: { esS: 'esS' }
|
||||
},
|
||||
sub2: {
|
||||
deS: { deS: 'deS' },
|
||||
frS: { frS: 'frS' }
|
||||
}
|
||||
},
|
||||
OTHER: {
|
||||
other1: {
|
||||
other11: { other11: 'other11' },
|
||||
other12: { other12: 'other12' }
|
||||
},
|
||||
other2: {
|
||||
other21: { other21: 'other21' },
|
||||
other22: { other22: 'other22' }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const iteratedMediaGroups = [];
|
||||
|
||||
forEachMediaGroup(
|
||||
master,
|
||||
['AUDIO', 'SUBTITLES'],
|
||||
(mediaGroup) => iteratedMediaGroups.push(mediaGroup)
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
iteratedMediaGroups,
|
||||
[
|
||||
{ en: 'en' },
|
||||
{ es: 'es' },
|
||||
{ de: 'de' },
|
||||
{ fr: 'fr' },
|
||||
{ enS: 'enS' },
|
||||
{ esS: 'esS' },
|
||||
{ deS: 'deS' },
|
||||
{ frS: 'frS' }
|
||||
],
|
||||
'iterated audio and subtitles media groups'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('does not run callback for non specified media groups', function(assert) {
|
||||
const master = {
|
||||
mediaGroups: {
|
||||
'VIDEO': { v1: { en: { en: 'en' } } },
|
||||
'CLOSED-CAPTIONS': { cc1: { en: { en: 'en' } } }
|
||||
}
|
||||
};
|
||||
const iteratedMediaGroups = [];
|
||||
|
||||
forEachMediaGroup(
|
||||
master,
|
||||
['AUDIO', 'SUBTITLES'],
|
||||
(mediaGroup) => iteratedMediaGroups.push(mediaGroup)
|
||||
);
|
||||
|
||||
assert.deepEqual(iteratedMediaGroups, [], 'did not iterate non specified media groups');
|
||||
});
|
||||
@@ -1,41 +0,0 @@
|
||||
import QUnit from 'qunit';
|
||||
import { simpleTypeFromSourceType } from '../src/media-types';
|
||||
|
||||
QUnit.module('simpleTypeFromSourceType');
|
||||
|
||||
QUnit.test('simpleTypeFromSourceType converts HLS mime types to hls', function(assert) {
|
||||
assert.equal(
|
||||
simpleTypeFromSourceType('aPplicatiOn/x-MPegUrl'),
|
||||
'hls',
|
||||
'supports application/x-mpegurl'
|
||||
);
|
||||
assert.equal(
|
||||
simpleTypeFromSourceType('aPplicatiOn/VnD.aPPle.MpEgUrL'),
|
||||
'hls',
|
||||
'supports application/vnd.apple.mpegurl'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test('simpleTypeFromSourceType converts DASH mime type to dash', function(assert) {
|
||||
assert.equal(
|
||||
simpleTypeFromSourceType('aPplication/dAsh+xMl'),
|
||||
'dash',
|
||||
'supports application/dash+xml'
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test(
|
||||
'simpleTypeFromSourceType does not convert non HLS/DASH mime types',
|
||||
function(assert) {
|
||||
assert.notOk(simpleTypeFromSourceType('video/mp4'), 'does not support video/mp4');
|
||||
assert.notOk(simpleTypeFromSourceType('video/x-flv'), 'does not support video/x-flv');
|
||||
}
|
||||
);
|
||||
|
||||
QUnit.test('simpleTypeFromSourceType converts VHS media type to vhs-json', function(assert) {
|
||||
assert.equal(
|
||||
simpleTypeFromSourceType('application/vnd.videojs.vhs+json'),
|
||||
'vhs-json',
|
||||
'supports application/vnd.videojs.vhs+json'
|
||||
);
|
||||
});
|
||||
@@ -1,28 +0,0 @@
|
||||
import QUnit from 'qunit';
|
||||
import window from 'global/window';
|
||||
import resolveUrl from '../src/resolve-url';
|
||||
|
||||
// A modified subset of tests from https://github.com/tjenkinson/url-toolkit
|
||||
|
||||
QUnit.module('URL resolver');
|
||||
|
||||
QUnit.test('works with a selection of valid urls', function(assert) {
|
||||
let currentLocation = '';
|
||||
|
||||
if (window.location && window.location.protocol) {
|
||||
currentLocation = window.location.protocol + '//' + window.location.host;
|
||||
}
|
||||
|
||||
assert.equal(
|
||||
resolveUrl('http://a.com/b/cd/e.m3u8', 'https://example.com/z.ts'),
|
||||
'https://example.com/z.ts'
|
||||
);
|
||||
assert.equal(resolveUrl('http://a.com/b/cd/e.m3u8', 'z.ts'), 'http://a.com/b/cd/z.ts');
|
||||
assert.equal(resolveUrl('//a.com/b/cd/e.m3u8', 'z.ts'), '//a.com/b/cd/z.ts');
|
||||
assert.equal(
|
||||
resolveUrl('/a/b/cd/e.m3u8', 'https://example.com:8080/z.ts'),
|
||||
'https://example.com:8080/z.ts'
|
||||
);
|
||||
assert.equal(resolveUrl('/a/b/cd/e.m3u8', 'z.ts'), currentLocation + '/a/b/cd/z.ts');
|
||||
assert.equal(resolveUrl('/a/b/cd/e.m3u8', '../../../z.ts'), currentLocation + '/z.ts');
|
||||
});
|
||||
@@ -1,51 +0,0 @@
|
||||
import QUnit from 'qunit';
|
||||
import Stream from '../src/stream';
|
||||
|
||||
QUnit.module('stream', {
|
||||
|
||||
beforeEach() {
|
||||
this.stream = new Stream();
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
this.stream.dispose();
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test('trigger calls listeners', function(assert) {
|
||||
const args = [];
|
||||
|
||||
this.stream.on('test', function(data) {
|
||||
args.push(data);
|
||||
});
|
||||
|
||||
this.stream.trigger('test', 1);
|
||||
this.stream.trigger('test', 2);
|
||||
|
||||
assert.deepEqual(args, [1, 2]);
|
||||
});
|
||||
|
||||
QUnit.test('callbacks can remove themselves', function(assert) {
|
||||
const args1 = [];
|
||||
const args2 = [];
|
||||
const args3 = [];
|
||||
const arg2Fn = (event) => {
|
||||
args2.push(event);
|
||||
this.stream.off('test', arg2Fn);
|
||||
};
|
||||
|
||||
this.stream.on('test', (event) => {
|
||||
args1.push(event);
|
||||
});
|
||||
this.stream.on('test', arg2Fn);
|
||||
this.stream.on('test', (event) => {
|
||||
args3.push(event);
|
||||
});
|
||||
|
||||
this.stream.trigger('test', 1);
|
||||
this.stream.trigger('test', 2);
|
||||
|
||||
assert.deepEqual(args1, [1, 2], 'first callback ran all times');
|
||||
assert.deepEqual(args2, [1], 'second callback removed after first run');
|
||||
assert.deepEqual(args3, [1, 2], 'third callback ran all times');
|
||||
});
|
||||
140
build/javascript/node_modules/m3u8-parser/package.json
generated
vendored
140
build/javascript/node_modules/m3u8-parser/package.json
generated
vendored
@@ -1,140 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"m3u8-parser@4.4.3",
|
||||
"/home/runner/work/owncast/owncast/build/javascript"
|
||||
]
|
||||
],
|
||||
"_from": "m3u8-parser@4.4.3",
|
||||
"_id": "m3u8-parser@4.4.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-o6Z2I0lVeL95gE3BHPB5mSACAA6PTubYCFKlbdQmGNH+Ij0A0oEW8N4V5kqTPgYVnuLcb5UdqNiP7V+xEORhYA==",
|
||||
"_location": "/m3u8-parser",
|
||||
"_phantomChildren": {
|
||||
"@babel/runtime": "7.11.2",
|
||||
"global": "4.4.0",
|
||||
"url-toolkit": "2.2.0"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "m3u8-parser@4.4.3",
|
||||
"name": "m3u8-parser",
|
||||
"escapedName": "m3u8-parser",
|
||||
"rawSpec": "4.4.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.4.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@videojs/http-streaming"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.4.3.tgz",
|
||||
"_spec": "4.4.3",
|
||||
"_where": "/home/runner/work/owncast/owncast/build/javascript",
|
||||
"author": {
|
||||
"name": "Brightcove, Inc"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults",
|
||||
"ie 11"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/videojs/m3u8-parser/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "gkatsev"
|
||||
},
|
||||
{
|
||||
"name": "imbcmdth"
|
||||
},
|
||||
{
|
||||
"name": "dmlap"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@videojs/vhs-utils": "^1.1.0",
|
||||
"global": "^4.3.2"
|
||||
},
|
||||
"description": "m3u8 parser",
|
||||
"devDependencies": {
|
||||
"@videojs/generator-helpers": "~1.2.0",
|
||||
"karma": "^4.0.0",
|
||||
"rollup": "^1.19.4",
|
||||
"sinon": "^7.2.2",
|
||||
"videojs-generate-karma-config": "~5.3.1",
|
||||
"videojs-generate-rollup-config": "~5.0.1",
|
||||
"videojs-generator-verify": "~2.0.0",
|
||||
"videojs-standard": "^8.0.3"
|
||||
},
|
||||
"files": [
|
||||
"CONTRIBUTING.md",
|
||||
"dist/",
|
||||
"docs/",
|
||||
"index.html",
|
||||
"scripts/",
|
||||
"src/",
|
||||
"test/"
|
||||
],
|
||||
"generator-videojs-plugin": {
|
||||
"version": "7.7.3"
|
||||
},
|
||||
"homepage": "https://github.com/videojs/m3u8-parser#readme",
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"videojs-plugin"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"vjsstandard --fix",
|
||||
"git add"
|
||||
],
|
||||
"README.md": [
|
||||
"doctoc --notitle",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"main": "dist/m3u8-parser.cjs.js",
|
||||
"module": "dist/m3u8-parser.es.js",
|
||||
"name": "m3u8-parser",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/videojs/m3u8-parser.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm-run-all -s clean build-test-data -p build:*",
|
||||
"build-prod": "cross-env-shell NO_TEST_BUNDLE=1 'npm run build'",
|
||||
"build-test": "cross-env-shell TEST_BUNDLE_ONLY=1 'npm run build'",
|
||||
"build-test-data": "node scripts/m3u8.js",
|
||||
"build:js": "rollup -c scripts/rollup.config.js",
|
||||
"clean": "shx rm -rf ./dist ./test/dist && shx mkdir -p ./dist ./test/dist",
|
||||
"lint": "vjsstandard",
|
||||
"posttest": "shx cat test/dist/coverage/text.txt",
|
||||
"prepublishOnly": "npm-run-all build-prod && vjsverify --verbose",
|
||||
"preversion": "npm test",
|
||||
"server": "karma start scripts/karma.conf.js --singleRun=false --auto-watch",
|
||||
"start": "npm-run-all -p server watch",
|
||||
"test": "npm-run-all lint build-test test:*",
|
||||
"test:browser": "karma start scripts/karma.conf.js",
|
||||
"test:node": "qunit test/dist/bundle.js",
|
||||
"update-changelog": "conventional-changelog -p videojs -i CHANGELOG.md -s",
|
||||
"version": "is-prerelease || npm run update-changelog && git add CHANGELOG.md",
|
||||
"watch": "npm-run-all -p watch:*",
|
||||
"watch:js": "npm run build:js -- -w"
|
||||
},
|
||||
"version": "4.4.3",
|
||||
"vjsstandard": {
|
||||
"ignore": [
|
||||
"dist",
|
||||
"docs",
|
||||
"test/dist"
|
||||
]
|
||||
}
|
||||
}
|
||||
83
build/javascript/node_modules/m3u8-parser/scripts/export-m3u8s.js
generated
vendored
83
build/javascript/node_modules/m3u8-parser/scripts/export-m3u8s.js
generated
vendored
@@ -1,83 +0,0 @@
|
||||
'use strict';
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const basePath = path.resolve(__dirname, '..');
|
||||
const testDataDir = path.join(basePath, 'test');
|
||||
const manifestDir = path.join(basePath, 'test', 'fixtures', 'm3u8');
|
||||
const manifestFilepath = path.join(testDataDir, 'dist', 'test-manifests.js');
|
||||
const expectedFilepath = path.join(testDataDir, 'dist', 'test-expected.js');
|
||||
|
||||
const build = function() {
|
||||
let manifests = 'export default {\n';
|
||||
let expected = 'export default {\n';
|
||||
|
||||
const files = fs.readdirSync(manifestDir);
|
||||
|
||||
while (files.length > 0) {
|
||||
const file = path.resolve(manifestDir, files.shift());
|
||||
const extname = path.extname(file);
|
||||
|
||||
if (extname === '.m3u8') {
|
||||
// translate this manifest
|
||||
manifests += ' \'' + path.basename(file, '.m3u8') + '\': ';
|
||||
manifests += fs.readFileSync(file, 'utf8')
|
||||
.split(/\r\n|\n/)
|
||||
// quote and concatenate
|
||||
.map(function(line) {
|
||||
return ' \'' + line + '\\n\' +\n';
|
||||
}).join('')
|
||||
// strip leading spaces and the trailing '+'
|
||||
.slice(4, -3);
|
||||
manifests += ',\n';
|
||||
} else if (extname === '.json') {
|
||||
// append the expected parse
|
||||
expected += ' "' + path.basename(file, '.json') + '": ';
|
||||
expected += fs.readFileSync(file, 'utf8');
|
||||
expected += ',\n';
|
||||
} else {
|
||||
console.log('Unknown file ' + file + ' found in manifest dir ' + manifestDir);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// clean up and close the objects
|
||||
manifests = manifests.slice(0, -2);
|
||||
manifests += '\n};\n';
|
||||
expected = expected.slice(0, -2);
|
||||
expected += '\n};\n';
|
||||
|
||||
fs.writeFileSync(manifestFilepath, manifests);
|
||||
fs.writeFileSync(expectedFilepath, expected);
|
||||
console.log('Wrote test data file ' + manifestFilepath);
|
||||
console.log('Wrote test data file ' + expectedFilepath);
|
||||
};
|
||||
|
||||
const watch = function() {
|
||||
build();
|
||||
fs.watch(manifestDir, function(event, filename) {
|
||||
console.log('files in manifest dir were changed rebuilding manifest data');
|
||||
build();
|
||||
});
|
||||
};
|
||||
|
||||
const clean = function() {
|
||||
try {
|
||||
fs.unlinkSync(manifestFilepath);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
try {
|
||||
fs.unlinkSync(expectedFilepath);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
build,
|
||||
watch,
|
||||
clean
|
||||
};
|
||||
12
build/javascript/node_modules/m3u8-parser/scripts/karma.conf.js
generated
vendored
12
build/javascript/node_modules/m3u8-parser/scripts/karma.conf.js
generated
vendored
@@ -1,12 +0,0 @@
|
||||
const generate = require('videojs-generate-karma-config');
|
||||
|
||||
module.exports = function(config) {
|
||||
|
||||
// see https://github.com/videojs/videojs-generate-karma-config
|
||||
// for options
|
||||
const options = {};
|
||||
|
||||
config = generate(config, options);
|
||||
|
||||
// any other custom stuff not supported by options here!
|
||||
};
|
||||
22
build/javascript/node_modules/m3u8-parser/scripts/m3u8.js
generated
vendored
22
build/javascript/node_modules/m3u8-parser/scripts/m3u8.js
generated
vendored
@@ -1,22 +0,0 @@
|
||||
'use strict';
|
||||
const m3u8 = require('./export-m3u8s.js');
|
||||
|
||||
const args = require('minimist')(process.argv.slice(2), {
|
||||
boolean: ['watch', 'clean', 'build'],
|
||||
default: {
|
||||
build: true
|
||||
},
|
||||
alias: {
|
||||
b: 'build',
|
||||
c: 'clean',
|
||||
w: 'watch'
|
||||
}
|
||||
});
|
||||
|
||||
if (args.w) {
|
||||
m3u8.watch();
|
||||
} else if (args.c) {
|
||||
m3u8.clean();
|
||||
} else if (args.b) {
|
||||
m3u8.build();
|
||||
}
|
||||
22
build/javascript/node_modules/m3u8-parser/scripts/rollup.config.js
generated
vendored
22
build/javascript/node_modules/m3u8-parser/scripts/rollup.config.js
generated
vendored
@@ -1,22 +0,0 @@
|
||||
const generate = require('videojs-generate-rollup-config');
|
||||
|
||||
// see https://github.com/videojs/videojs-generate-rollup-config
|
||||
// for options
|
||||
const options = {
|
||||
input: 'src/index.js',
|
||||
externals(defaults) {
|
||||
defaults.module.push('@videojs/vhs-utils');
|
||||
|
||||
return defaults;
|
||||
}
|
||||
};
|
||||
const config = generate(options);
|
||||
|
||||
if (config.builds.test) {
|
||||
config.builds.test.output[0].format = 'umd';
|
||||
}
|
||||
|
||||
// Add additonal builds/customization here!
|
||||
|
||||
// export the builds to rollup
|
||||
export default Object.values(config.builds);
|
||||
19
build/javascript/node_modules/m3u8-parser/src/index.js
generated
vendored
19
build/javascript/node_modules/m3u8-parser/src/index.js
generated
vendored
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* @file m3u8/index.js
|
||||
*
|
||||
* Utilities for parsing M3U8 files. If the entire manifest is available,
|
||||
* `Parser` will create an object representation with enough detail for managing
|
||||
* playback. `ParseStream` and `LineStream` are lower-level parsing primitives
|
||||
* that do not assume the entirety of the manifest is ready and expose a
|
||||
* ReadableStream-like interface.
|
||||
*/
|
||||
|
||||
import LineStream from './line-stream';
|
||||
import ParseStream from './parse-stream';
|
||||
import Parser from './parser';
|
||||
|
||||
export {
|
||||
LineStream,
|
||||
ParseStream,
|
||||
Parser
|
||||
};
|
||||
35
build/javascript/node_modules/m3u8-parser/src/line-stream.js
generated
vendored
35
build/javascript/node_modules/m3u8-parser/src/line-stream.js
generated
vendored
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* @file m3u8/line-stream.js
|
||||
*/
|
||||
import Stream from '@videojs/vhs-utils/dist/stream.js';
|
||||
|
||||
/**
|
||||
* A stream that buffers string input and generates a `data` event for each
|
||||
* line.
|
||||
*
|
||||
* @class LineStream
|
||||
* @extends Stream
|
||||
*/
|
||||
export default class LineStream extends Stream {
|
||||
constructor() {
|
||||
super();
|
||||
this.buffer = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new data to be parsed.
|
||||
*
|
||||
* @param {string} data the text to process
|
||||
*/
|
||||
push(data) {
|
||||
let nextNewline;
|
||||
|
||||
this.buffer += data;
|
||||
nextNewline = this.buffer.indexOf('\n');
|
||||
|
||||
for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\n')) {
|
||||
this.trigger('data', this.buffer.substring(0, nextNewline));
|
||||
this.buffer = this.buffer.substring(nextNewline + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
500
build/javascript/node_modules/m3u8-parser/src/parse-stream.js
generated
vendored
500
build/javascript/node_modules/m3u8-parser/src/parse-stream.js
generated
vendored
@@ -1,500 +0,0 @@
|
||||
/**
|
||||
* @file m3u8/parse-stream.js
|
||||
*/
|
||||
import Stream from '@videojs/vhs-utils/dist/stream.js';
|
||||
|
||||
/**
|
||||
* "forgiving" attribute list psuedo-grammar:
|
||||
* attributes -> keyvalue (',' keyvalue)*
|
||||
* keyvalue -> key '=' value
|
||||
* key -> [^=]*
|
||||
* value -> '"' [^"]* '"' | [^,]*
|
||||
*/
|
||||
const attributeSeparator = function() {
|
||||
const key = '[^=]*';
|
||||
const value = '"[^"]*"|[^,]*';
|
||||
const keyvalue = '(?:' + key + ')=(?:' + value + ')';
|
||||
|
||||
return new RegExp('(?:^|,)(' + keyvalue + ')');
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse attributes from a line given the separator
|
||||
*
|
||||
* @param {string} attributes the attribute line to parse
|
||||
*/
|
||||
const parseAttributes = function(attributes) {
|
||||
// split the string using attributes as the separator
|
||||
const attrs = attributes.split(attributeSeparator());
|
||||
const result = {};
|
||||
let i = attrs.length;
|
||||
let attr;
|
||||
|
||||
while (i--) {
|
||||
// filter out unmatched portions of the string
|
||||
if (attrs[i] === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// split the key and value
|
||||
attr = (/([^=]*)=(.*)/).exec(attrs[i]).slice(1);
|
||||
// trim whitespace and remove optional quotes around the value
|
||||
attr[0] = attr[0].replace(/^\s+|\s+$/g, '');
|
||||
attr[1] = attr[1].replace(/^\s+|\s+$/g, '');
|
||||
attr[1] = attr[1].replace(/^['"](.*)['"]$/g, '$1');
|
||||
result[attr[0]] = attr[1];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* A line-level M3U8 parser event stream. It expects to receive input one
|
||||
* line at a time and performs a context-free parse of its contents. A stream
|
||||
* interpretation of a manifest can be useful if the manifest is expected to
|
||||
* be too large to fit comfortably into memory or the entirety of the input
|
||||
* is not immediately available. Otherwise, it's probably much easier to work
|
||||
* with a regular `Parser` object.
|
||||
*
|
||||
* Produces `data` events with an object that captures the parser's
|
||||
* interpretation of the input. That object has a property `tag` that is one
|
||||
* of `uri`, `comment`, or `tag`. URIs only have a single additional
|
||||
* property, `line`, which captures the entirety of the input without
|
||||
* interpretation. Comments similarly have a single additional property
|
||||
* `text` which is the input without the leading `#`.
|
||||
*
|
||||
* Tags always have a property `tagType` which is the lower-cased version of
|
||||
* the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,
|
||||
* `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized
|
||||
* tags are given the tag type `unknown` and a single additional property
|
||||
* `data` with the remainder of the input.
|
||||
*
|
||||
* @class ParseStream
|
||||
* @extends Stream
|
||||
*/
|
||||
export default class ParseStream extends Stream {
|
||||
constructor() {
|
||||
super();
|
||||
this.customParsers = [];
|
||||
this.tagMappers = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses an additional line of input.
|
||||
*
|
||||
* @param {string} line a single line of an M3U8 file to parse
|
||||
*/
|
||||
push(line) {
|
||||
let match;
|
||||
let event;
|
||||
|
||||
// strip whitespace
|
||||
line = line.trim();
|
||||
|
||||
if (line.length === 0) {
|
||||
// ignore empty lines
|
||||
return;
|
||||
}
|
||||
|
||||
// URIs
|
||||
if (line[0] !== '#') {
|
||||
this.trigger('data', {
|
||||
type: 'uri',
|
||||
uri: line
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// map tags
|
||||
const newLines = this.tagMappers.reduce((acc, mapper) => {
|
||||
const mappedLine = mapper(line);
|
||||
|
||||
// skip if unchanged
|
||||
if (mappedLine === line) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
return acc.concat([mappedLine]);
|
||||
}, [line]);
|
||||
|
||||
newLines.forEach(newLine => {
|
||||
for (let i = 0; i < this.customParsers.length; i++) {
|
||||
if (this.customParsers[i].call(this, newLine)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Comments
|
||||
if (newLine.indexOf('#EXT') !== 0) {
|
||||
this.trigger('data', {
|
||||
type: 'comment',
|
||||
text: newLine.slice(1)
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// strip off any carriage returns here so the regex matching
|
||||
// doesn't have to account for them.
|
||||
newLine = newLine.replace('\r', '');
|
||||
|
||||
// Tags
|
||||
match = (/^#EXTM3U/).exec(newLine);
|
||||
if (match) {
|
||||
this.trigger('data', {
|
||||
type: 'tag',
|
||||
tagType: 'm3u'
|
||||
});
|
||||
return;
|
||||
}
|
||||
match = (/^#EXTINF:?([0-9\.]*)?,?(.*)?$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'inf'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.duration = parseFloat(match[1]);
|
||||
}
|
||||
if (match[2]) {
|
||||
event.title = match[2];
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-TARGETDURATION:?([0-9.]*)?/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'targetduration'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.duration = parseInt(match[1], 10);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'totalduration'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.duration = parseInt(match[1], 10);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-VERSION:?([0-9.]*)?/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'version'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.version = parseInt(match[1], 10);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'media-sequence'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.number = parseInt(match[1], 10);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'discontinuity-sequence'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.number = parseInt(match[1], 10);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'playlist-type'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.playlistType = match[1];
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'byterange'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.length = parseInt(match[1], 10);
|
||||
}
|
||||
if (match[2]) {
|
||||
event.offset = parseInt(match[2], 10);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'allow-cache'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.allowed = !(/NO/).test(match[1]);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-MAP:?(.*)$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'map'
|
||||
};
|
||||
|
||||
if (match[1]) {
|
||||
const attributes = parseAttributes(match[1]);
|
||||
|
||||
if (attributes.URI) {
|
||||
event.uri = attributes.URI;
|
||||
}
|
||||
if (attributes.BYTERANGE) {
|
||||
const [length, offset] = attributes.BYTERANGE.split('@');
|
||||
|
||||
event.byterange = {};
|
||||
if (length) {
|
||||
event.byterange.length = parseInt(length, 10);
|
||||
}
|
||||
if (offset) {
|
||||
event.byterange.offset = parseInt(offset, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-STREAM-INF:?(.*)$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'stream-inf'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.attributes = parseAttributes(match[1]);
|
||||
|
||||
if (event.attributes.RESOLUTION) {
|
||||
const split = event.attributes.RESOLUTION.split('x');
|
||||
const resolution = {};
|
||||
|
||||
if (split[0]) {
|
||||
resolution.width = parseInt(split[0], 10);
|
||||
}
|
||||
if (split[1]) {
|
||||
resolution.height = parseInt(split[1], 10);
|
||||
}
|
||||
event.attributes.RESOLUTION = resolution;
|
||||
}
|
||||
if (event.attributes.BANDWIDTH) {
|
||||
event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);
|
||||
}
|
||||
if (event.attributes['PROGRAM-ID']) {
|
||||
event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);
|
||||
}
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-MEDIA:?(.*)$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'media'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.attributes = parseAttributes(match[1]);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-ENDLIST/).exec(newLine);
|
||||
if (match) {
|
||||
this.trigger('data', {
|
||||
type: 'tag',
|
||||
tagType: 'endlist'
|
||||
});
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-DISCONTINUITY/).exec(newLine);
|
||||
if (match) {
|
||||
this.trigger('data', {
|
||||
type: 'tag',
|
||||
tagType: 'discontinuity'
|
||||
});
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'program-date-time'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.dateTimeString = match[1];
|
||||
event.dateTimeObject = new Date(match[1]);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-KEY:?(.*)$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'key'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.attributes = parseAttributes(match[1]);
|
||||
// parse the IV string into a Uint32Array
|
||||
if (event.attributes.IV) {
|
||||
if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {
|
||||
event.attributes.IV = event.attributes.IV.substring(2);
|
||||
}
|
||||
|
||||
event.attributes.IV = event.attributes.IV.match(/.{8}/g);
|
||||
event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);
|
||||
event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);
|
||||
event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);
|
||||
event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);
|
||||
event.attributes.IV = new Uint32Array(event.attributes.IV);
|
||||
}
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-START:?(.*)$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'start'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.attributes = parseAttributes(match[1]);
|
||||
|
||||
event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);
|
||||
event.attributes.PRECISE = (/YES/).test(event.attributes.PRECISE);
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-CUE-OUT-CONT:?(.*)?$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'cue-out-cont'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.data = match[1];
|
||||
} else {
|
||||
event.data = '';
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-CUE-OUT:?(.*)?$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'cue-out'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.data = match[1];
|
||||
} else {
|
||||
event.data = '';
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
match = (/^#EXT-X-CUE-IN:?(.*)?$/).exec(newLine);
|
||||
if (match) {
|
||||
event = {
|
||||
type: 'tag',
|
||||
tagType: 'cue-in'
|
||||
};
|
||||
if (match[1]) {
|
||||
event.data = match[1];
|
||||
} else {
|
||||
event.data = '';
|
||||
}
|
||||
this.trigger('data', event);
|
||||
return;
|
||||
}
|
||||
|
||||
// unknown tag type
|
||||
this.trigger('data', {
|
||||
type: 'tag',
|
||||
data: newLine.slice(4)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a parser for custom headers
|
||||
*
|
||||
* @param {Object} options a map of options for the added parser
|
||||
* @param {RegExp} options.expression a regular expression to match the custom header
|
||||
* @param {string} options.customType the custom type to register to the output
|
||||
* @param {Function} [options.dataParser] function to parse the line into an object
|
||||
* @param {boolean} [options.segment] should tag data be attached to the segment object
|
||||
*/
|
||||
addParser({expression, customType, dataParser, segment}) {
|
||||
if (typeof dataParser !== 'function') {
|
||||
dataParser = (line) => line;
|
||||
}
|
||||
this.customParsers.push(line => {
|
||||
const match = expression.exec(line);
|
||||
|
||||
if (match) {
|
||||
this.trigger('data', {
|
||||
type: 'custom',
|
||||
data: dataParser(line),
|
||||
customType,
|
||||
segment
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a custom header mapper
|
||||
*
|
||||
* @param {Object} options
|
||||
* @param {RegExp} options.expression a regular expression to match the custom header
|
||||
* @param {Function} options.map function to translate tag into a different tag
|
||||
*/
|
||||
addTagMapper({expression, map}) {
|
||||
const mapFn = line => {
|
||||
if (expression.test(line)) {
|
||||
return map(line);
|
||||
}
|
||||
|
||||
return line;
|
||||
};
|
||||
|
||||
this.tagMappers.push(mapFn);
|
||||
}
|
||||
}
|
||||
471
build/javascript/node_modules/m3u8-parser/src/parser.js
generated
vendored
471
build/javascript/node_modules/m3u8-parser/src/parser.js
generated
vendored
@@ -1,471 +0,0 @@
|
||||
/**
|
||||
* @file m3u8/parser.js
|
||||
*/
|
||||
import Stream from '@videojs/vhs-utils/dist/stream.js';
|
||||
import decodeB64ToUint8Array from '@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js';
|
||||
import LineStream from './line-stream';
|
||||
import ParseStream from './parse-stream';
|
||||
|
||||
/**
|
||||
* A parser for M3U8 files. The current interpretation of the input is
|
||||
* exposed as a property `manifest` on parser objects. It's just two lines to
|
||||
* create and parse a manifest once you have the contents available as a string:
|
||||
*
|
||||
* ```js
|
||||
* var parser = new m3u8.Parser();
|
||||
* parser.push(xhr.responseText);
|
||||
* ```
|
||||
*
|
||||
* New input can later be applied to update the manifest object by calling
|
||||
* `push` again.
|
||||
*
|
||||
* The parser attempts to create a usable manifest object even if the
|
||||
* underlying input is somewhat nonsensical. It emits `info` and `warning`
|
||||
* events during the parse if it encounters input that seems invalid or
|
||||
* requires some property of the manifest object to be defaulted.
|
||||
*
|
||||
* @class Parser
|
||||
* @extends Stream
|
||||
*/
|
||||
export default class Parser extends Stream {
|
||||
constructor() {
|
||||
super();
|
||||
this.lineStream = new LineStream();
|
||||
this.parseStream = new ParseStream();
|
||||
this.lineStream.pipe(this.parseStream);
|
||||
|
||||
/* eslint-disable consistent-this */
|
||||
const self = this;
|
||||
/* eslint-enable consistent-this */
|
||||
const uris = [];
|
||||
let currentUri = {};
|
||||
// if specified, the active EXT-X-MAP definition
|
||||
let currentMap;
|
||||
// if specified, the active decryption key
|
||||
let key;
|
||||
const noop = function() {};
|
||||
const defaultMediaGroups = {
|
||||
'AUDIO': {},
|
||||
'VIDEO': {},
|
||||
'CLOSED-CAPTIONS': {},
|
||||
'SUBTITLES': {}
|
||||
};
|
||||
// This is the Widevine UUID from DASH IF IOP. The same exact string is
|
||||
// used in MPDs with Widevine encrypted streams.
|
||||
const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed';
|
||||
// group segments into numbered timelines delineated by discontinuities
|
||||
let currentTimeline = 0;
|
||||
|
||||
// the manifest is empty until the parse stream begins delivering data
|
||||
this.manifest = {
|
||||
allowCache: true,
|
||||
discontinuityStarts: [],
|
||||
segments: []
|
||||
};
|
||||
// keep track of the last seen segment's byte range end, as segments are not required
|
||||
// to provide the offset, in which case it defaults to the next byte after the
|
||||
// previous segment
|
||||
let lastByterangeEnd = 0;
|
||||
|
||||
// update the manifest with the m3u8 entry from the parse stream
|
||||
this.parseStream.on('data', function(entry) {
|
||||
let mediaGroup;
|
||||
let rendition;
|
||||
|
||||
({
|
||||
tag() {
|
||||
// switch based on the tag type
|
||||
(({
|
||||
'allow-cache'() {
|
||||
this.manifest.allowCache = entry.allowed;
|
||||
if (!('allowed' in entry)) {
|
||||
this.trigger('info', {
|
||||
message: 'defaulting allowCache to YES'
|
||||
});
|
||||
this.manifest.allowCache = true;
|
||||
}
|
||||
},
|
||||
byterange() {
|
||||
const byterange = {};
|
||||
|
||||
if ('length' in entry) {
|
||||
currentUri.byterange = byterange;
|
||||
byterange.length = entry.length;
|
||||
|
||||
if (!('offset' in entry)) {
|
||||
/*
|
||||
* From the latest spec (as of this writing):
|
||||
* https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2
|
||||
*
|
||||
* Same text since EXT-X-BYTERANGE's introduction in draft 7:
|
||||
* https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)
|
||||
*
|
||||
* "If o [offset] is not present, the sub-range begins at the next byte
|
||||
* following the sub-range of the previous media segment."
|
||||
*/
|
||||
entry.offset = lastByterangeEnd;
|
||||
}
|
||||
}
|
||||
if ('offset' in entry) {
|
||||
currentUri.byterange = byterange;
|
||||
byterange.offset = entry.offset;
|
||||
}
|
||||
lastByterangeEnd = byterange.offset + byterange.length;
|
||||
},
|
||||
endlist() {
|
||||
this.manifest.endList = true;
|
||||
},
|
||||
inf() {
|
||||
if (!('mediaSequence' in this.manifest)) {
|
||||
this.manifest.mediaSequence = 0;
|
||||
this.trigger('info', {
|
||||
message: 'defaulting media sequence to zero'
|
||||
});
|
||||
}
|
||||
if (!('discontinuitySequence' in this.manifest)) {
|
||||
this.manifest.discontinuitySequence = 0;
|
||||
this.trigger('info', {
|
||||
message: 'defaulting discontinuity sequence to zero'
|
||||
});
|
||||
}
|
||||
if (entry.duration > 0) {
|
||||
currentUri.duration = entry.duration;
|
||||
}
|
||||
|
||||
if (entry.duration === 0) {
|
||||
currentUri.duration = 0.01;
|
||||
this.trigger('info', {
|
||||
message: 'updating zero segment duration to a small value'
|
||||
});
|
||||
}
|
||||
|
||||
this.manifest.segments = uris;
|
||||
},
|
||||
key() {
|
||||
if (!entry.attributes) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring key declaration without attribute list'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// clear the active encryption key
|
||||
if (entry.attributes.METHOD === 'NONE') {
|
||||
key = null;
|
||||
return;
|
||||
}
|
||||
if (!entry.attributes.URI) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring key declaration without URI'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// check if the content is encrypted for Widevine
|
||||
// Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf
|
||||
if (entry.attributes.KEYFORMAT === widevineUuid) {
|
||||
const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];
|
||||
|
||||
if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {
|
||||
this.trigger('warn', {
|
||||
message: 'invalid key method provided for Widevine'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {
|
||||
this.trigger('warn', {
|
||||
message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'
|
||||
});
|
||||
}
|
||||
|
||||
if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {
|
||||
this.trigger('warn', {
|
||||
message: 'invalid key URI provided for Widevine'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {
|
||||
this.trigger('warn', {
|
||||
message: 'invalid key ID provided for Widevine'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// if Widevine key attributes are valid, store them as `contentProtection`
|
||||
// on the manifest to emulate Widevine tag structure in a DASH mpd
|
||||
this.manifest.contentProtection = {
|
||||
'com.widevine.alpha': {
|
||||
attributes: {
|
||||
schemeIdUri: entry.attributes.KEYFORMAT,
|
||||
// remove '0x' from the key id string
|
||||
keyId: entry.attributes.KEYID.substring(2)
|
||||
},
|
||||
// decode the base64-encoded PSSH box
|
||||
pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])
|
||||
}
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
if (!entry.attributes.METHOD) {
|
||||
this.trigger('warn', {
|
||||
message: 'defaulting key method to AES-128'
|
||||
});
|
||||
}
|
||||
|
||||
// setup an encryption key for upcoming segments
|
||||
key = {
|
||||
method: entry.attributes.METHOD || 'AES-128',
|
||||
uri: entry.attributes.URI
|
||||
};
|
||||
|
||||
if (typeof entry.attributes.IV !== 'undefined') {
|
||||
key.iv = entry.attributes.IV;
|
||||
}
|
||||
},
|
||||
'media-sequence'() {
|
||||
if (!isFinite(entry.number)) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring invalid media sequence: ' + entry.number
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.manifest.mediaSequence = entry.number;
|
||||
},
|
||||
'discontinuity-sequence'() {
|
||||
if (!isFinite(entry.number)) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring invalid discontinuity sequence: ' + entry.number
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.manifest.discontinuitySequence = entry.number;
|
||||
currentTimeline = entry.number;
|
||||
},
|
||||
'playlist-type'() {
|
||||
if (!(/VOD|EVENT/).test(entry.playlistType)) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring unknown playlist type: ' + entry.playlist
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.manifest.playlistType = entry.playlistType;
|
||||
},
|
||||
map() {
|
||||
currentMap = {};
|
||||
if (entry.uri) {
|
||||
currentMap.uri = entry.uri;
|
||||
}
|
||||
if (entry.byterange) {
|
||||
currentMap.byterange = entry.byterange;
|
||||
}
|
||||
},
|
||||
'stream-inf'() {
|
||||
this.manifest.playlists = uris;
|
||||
this.manifest.mediaGroups =
|
||||
this.manifest.mediaGroups || defaultMediaGroups;
|
||||
|
||||
if (!entry.attributes) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring empty stream-inf attributes'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currentUri.attributes) {
|
||||
currentUri.attributes = {};
|
||||
}
|
||||
Object.assign(currentUri.attributes, entry.attributes);
|
||||
},
|
||||
media() {
|
||||
this.manifest.mediaGroups =
|
||||
this.manifest.mediaGroups || defaultMediaGroups;
|
||||
|
||||
if (!(entry.attributes &&
|
||||
entry.attributes.TYPE &&
|
||||
entry.attributes['GROUP-ID'] &&
|
||||
entry.attributes.NAME)) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring incomplete or missing media group'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// find the media group, creating defaults as necessary
|
||||
const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];
|
||||
|
||||
mediaGroupType[entry.attributes['GROUP-ID']] =
|
||||
mediaGroupType[entry.attributes['GROUP-ID']] || {};
|
||||
mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']];
|
||||
|
||||
// collect the rendition metadata
|
||||
rendition = {
|
||||
default: (/yes/i).test(entry.attributes.DEFAULT)
|
||||
};
|
||||
if (rendition.default) {
|
||||
rendition.autoselect = true;
|
||||
} else {
|
||||
rendition.autoselect = (/yes/i).test(entry.attributes.AUTOSELECT);
|
||||
}
|
||||
if (entry.attributes.LANGUAGE) {
|
||||
rendition.language = entry.attributes.LANGUAGE;
|
||||
}
|
||||
if (entry.attributes.URI) {
|
||||
rendition.uri = entry.attributes.URI;
|
||||
}
|
||||
if (entry.attributes['INSTREAM-ID']) {
|
||||
rendition.instreamId = entry.attributes['INSTREAM-ID'];
|
||||
}
|
||||
if (entry.attributes.CHARACTERISTICS) {
|
||||
rendition.characteristics = entry.attributes.CHARACTERISTICS;
|
||||
}
|
||||
if (entry.attributes.FORCED) {
|
||||
rendition.forced = (/yes/i).test(entry.attributes.FORCED);
|
||||
}
|
||||
|
||||
// insert the new rendition
|
||||
mediaGroup[entry.attributes.NAME] = rendition;
|
||||
},
|
||||
discontinuity() {
|
||||
currentTimeline += 1;
|
||||
currentUri.discontinuity = true;
|
||||
this.manifest.discontinuityStarts.push(uris.length);
|
||||
},
|
||||
'program-date-time'() {
|
||||
if (typeof this.manifest.dateTimeString === 'undefined') {
|
||||
// PROGRAM-DATE-TIME is a media-segment tag, but for backwards
|
||||
// compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag
|
||||
// to the manifest object
|
||||
// TODO: Consider removing this in future major version
|
||||
this.manifest.dateTimeString = entry.dateTimeString;
|
||||
this.manifest.dateTimeObject = entry.dateTimeObject;
|
||||
}
|
||||
|
||||
currentUri.dateTimeString = entry.dateTimeString;
|
||||
currentUri.dateTimeObject = entry.dateTimeObject;
|
||||
},
|
||||
targetduration() {
|
||||
if (!isFinite(entry.duration) || entry.duration < 0) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring invalid target duration: ' + entry.duration
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.manifest.targetDuration = entry.duration;
|
||||
},
|
||||
totalduration() {
|
||||
if (!isFinite(entry.duration) || entry.duration < 0) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring invalid total duration: ' + entry.duration
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.manifest.totalDuration = entry.duration;
|
||||
},
|
||||
start() {
|
||||
if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {
|
||||
this.trigger('warn', {
|
||||
message: 'ignoring start declaration without appropriate attribute list'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.manifest.start = {
|
||||
timeOffset: entry.attributes['TIME-OFFSET'],
|
||||
precise: entry.attributes.PRECISE
|
||||
};
|
||||
},
|
||||
'cue-out'() {
|
||||
currentUri.cueOut = entry.data;
|
||||
},
|
||||
'cue-out-cont'() {
|
||||
currentUri.cueOutCont = entry.data;
|
||||
},
|
||||
'cue-in'() {
|
||||
currentUri.cueIn = entry.data;
|
||||
}
|
||||
})[entry.tagType] || noop).call(self);
|
||||
},
|
||||
uri() {
|
||||
currentUri.uri = entry.uri;
|
||||
uris.push(currentUri);
|
||||
|
||||
// if no explicit duration was declared, use the target duration
|
||||
if (this.manifest.targetDuration && !('duration' in currentUri)) {
|
||||
this.trigger('warn', {
|
||||
message: 'defaulting segment duration to the target duration'
|
||||
});
|
||||
currentUri.duration = this.manifest.targetDuration;
|
||||
}
|
||||
// annotate with encryption information, if necessary
|
||||
if (key) {
|
||||
currentUri.key = key;
|
||||
}
|
||||
currentUri.timeline = currentTimeline;
|
||||
// annotate with initialization segment information, if necessary
|
||||
if (currentMap) {
|
||||
currentUri.map = currentMap;
|
||||
}
|
||||
|
||||
// prepare for the next URI
|
||||
currentUri = {};
|
||||
},
|
||||
comment() {
|
||||
// comments are not important for playback
|
||||
},
|
||||
custom() {
|
||||
// if this is segment-level data attach the output to the segment
|
||||
if (entry.segment) {
|
||||
currentUri.custom = currentUri.custom || {};
|
||||
currentUri.custom[entry.customType] = entry.data;
|
||||
// if this is manifest-level data attach to the top level manifest object
|
||||
} else {
|
||||
this.manifest.custom = this.manifest.custom || {};
|
||||
this.manifest.custom[entry.customType] = entry.data;
|
||||
}
|
||||
}
|
||||
})[entry.type].call(self);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the input string and update the manifest object.
|
||||
*
|
||||
* @param {string} chunk a potentially incomplete portion of the manifest
|
||||
*/
|
||||
push(chunk) {
|
||||
this.lineStream.push(chunk);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush any remaining input. This can be handy if the last line of an M3U8
|
||||
* manifest did not contain a trailing newline but the file has been
|
||||
* completely received.
|
||||
*/
|
||||
end() {
|
||||
// flush any buffered input
|
||||
this.lineStream.push('\n');
|
||||
}
|
||||
/**
|
||||
* Add an additional parser for non-standard tags
|
||||
*
|
||||
* @param {Object} options a map of options for the added parser
|
||||
* @param {RegExp} options.expression a regular expression to match the custom header
|
||||
* @param {string} options.type the type to register to the output
|
||||
* @param {Function} [options.dataParser] function to parse the line into an object
|
||||
* @param {boolean} [options.segment] should tag data be attached to the segment object
|
||||
*/
|
||||
addParser(options) {
|
||||
this.parseStream.addParser(options);
|
||||
}
|
||||
/**
|
||||
* Add a custom header mapper
|
||||
*
|
||||
* @param {Object} options
|
||||
* @param {RegExp} options.expression a regular expression to match the custom header
|
||||
* @param {Function} options.map function to translate tag into a different tag
|
||||
*/
|
||||
addTagMapper(options) {
|
||||
this.parseStream.addTagMapper(options);
|
||||
}
|
||||
}
|
||||
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/absoluteUris.json
generated
vendored
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/absoluteUris.json
generated
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "http://example.com/00001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "https://example.com/00002.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "//example.com/00003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "http://example.com/00004.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
13
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/absoluteUris.m3u8
generated
vendored
13
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/absoluteUris.m3u8
generated
vendored
@@ -1,13 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
http://example.com/00001.ts
|
||||
#EXTINF:10,
|
||||
https://example.com/00002.ts
|
||||
#EXTINF:10,
|
||||
//example.com/00003.ts
|
||||
#EXTINF:10,
|
||||
http://example.com/00004.ts
|
||||
#ZEN-TOTAL-DURATION:57.9911
|
||||
#EXT-X-ENDLIST
|
||||
164
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCache.json
generated
vendored
164
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCache.json
generated
vendored
@@ -1,164 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 522828,
|
||||
"offset": 0
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 587500,
|
||||
"offset": 522828
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 713084,
|
||||
"offset": 1110328
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 476580,
|
||||
"offset": 1823412
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 535612,
|
||||
"offset": 2299992
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 207176,
|
||||
"offset": 2835604
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 455900,
|
||||
"offset": 3042780
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 657248,
|
||||
"offset": 3498680
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 571708,
|
||||
"offset": 4155928
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 485040,
|
||||
"offset": 4727636
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 709136,
|
||||
"offset": 5212676
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 730004,
|
||||
"offset": 5921812
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 456276,
|
||||
"offset": 6651816
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 468684,
|
||||
"offset": 7108092
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 444996,
|
||||
"offset": 7576776
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 331444,
|
||||
"offset": 8021772
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 44556,
|
||||
"offset": 8353216
|
||||
},
|
||||
"duration": 1.4167,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
58
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCache.m3u8
generated
vendored
58
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCache.m3u8
generated
vendored
@@ -1,58 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:4
|
||||
#EXT-X-ALLOW-CACHE:YES
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:522828@0
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:587500@522828
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:713084@1110328
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:476580@1823412
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:535612@2299992
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:207176@2835604
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:455900@3042780
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:657248@3498680
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:571708@4155928
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:485040@4727636
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:709136@5212676
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:730004@5921812
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:456276@6651816
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:468684@7108092
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:444996@7576776
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:331444@8021772
|
||||
hls_450k_video.ts
|
||||
#EXTINF:1.4167,
|
||||
#EXT-X-BYTERANGE:44556@8353216
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCacheInvalid.json
generated
vendored
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCacheInvalid.json
generated
vendored
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 522828,
|
||||
"offset": 0
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCacheInvalid.m3u8
generated
vendored
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/allowCacheInvalid.m3u8
generated
vendored
@@ -1,10 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:4
|
||||
#EXT-X-ALLOW-CACHE:0
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:522828@0
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
56
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateAudio.json
generated
vendored
56
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateAudio.json
generated
vendored
@@ -1,56 +0,0 @@
|
||||
{
|
||||
allowCache: true,
|
||||
discontinuityStarts: [],
|
||||
mediaGroups: {
|
||||
// TYPE
|
||||
AUDIO: {
|
||||
// GROUP-ID
|
||||
"audio": {
|
||||
// NAME
|
||||
"English": {
|
||||
language: 'eng',
|
||||
autoselect: true,
|
||||
default: true,
|
||||
uri: "eng/prog_index.m3u8"
|
||||
},
|
||||
// NAME
|
||||
"Français": {
|
||||
language: "fre",
|
||||
autoselect: true,
|
||||
default: false,
|
||||
uri: "fre/prog_index.m3u8"
|
||||
},
|
||||
// NAME
|
||||
"Espanol": {
|
||||
language: "sp",
|
||||
autoselect: true,
|
||||
default: false,
|
||||
uri: "sp/prog_index.m3u8"
|
||||
}
|
||||
}
|
||||
},
|
||||
VIDEO: {},
|
||||
"CLOSED-CAPTIONS": {},
|
||||
SUBTITLES: {}
|
||||
},
|
||||
playlists: [{
|
||||
attributes: {
|
||||
"PROGRAM-ID": 1,
|
||||
BANDWIDTH: 195023,
|
||||
CODECS: "avc1.42e00a,mp4a.40.2",
|
||||
AUDIO: 'audio'
|
||||
},
|
||||
timeline: 0,
|
||||
uri: "lo/prog_index.m3u8"
|
||||
}, {
|
||||
attributes: {
|
||||
"PROGRAM-ID": 1,
|
||||
BANDWIDTH: 591680,
|
||||
CODECS: "avc1.42e01e,mp4a.40.2",
|
||||
AUDIO: 'audio'
|
||||
},
|
||||
timeline: 0,
|
||||
uri: "hi/prog_index.m3u8"
|
||||
}],
|
||||
segments: []
|
||||
}
|
||||
9
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateAudio.m3u8
generated
vendored
9
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateAudio.m3u8
generated
vendored
@@ -1,9 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="eng",NAME="English",AUTOSELECT=YES, DEFAULT=YES,URI="eng/prog_index.m3u8"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="fre",NAME="Français",AUTOSELECT=YES, DEFAULT=NO,URI="fre/prog_index.m3u8"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="sp",NAME="Espanol",AUTOSELECT=YES, DEFAULT=NO,URI="sp/prog_index.m3u8"
|
||||
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=195023,CODECS="avc1.42e00a,mp4a.40.2",AUDIO="audio"
|
||||
lo/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=591680,CODECS="avc1.42e01e,mp4a.40.2",AUDIO="audio"
|
||||
hi/prog_index.m3u8
|
||||
48
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateVideo.json
generated
vendored
48
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateVideo.json
generated
vendored
@@ -1,48 +0,0 @@
|
||||
{
|
||||
allowCache: true,
|
||||
discontinuityStarts: [],
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
aac: {
|
||||
English: {
|
||||
autoselect: true,
|
||||
default: true,
|
||||
language: "eng",
|
||||
uri: "eng/prog_index.m3u8"
|
||||
}
|
||||
}
|
||||
},
|
||||
VIDEO: {
|
||||
"500kbs": {
|
||||
Angle1: {
|
||||
autoselect: true,
|
||||
default: true
|
||||
},
|
||||
Angle2: {
|
||||
autoselect: true,
|
||||
default: false,
|
||||
uri: "Angle2/500kbs/prog_index.m3u8"
|
||||
},
|
||||
Angle3: {
|
||||
autoselect: true,
|
||||
default: false,
|
||||
uri: "Angle3/500kbs/prog_index.m3u8"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CLOSED-CAPTIONS": {},
|
||||
SUBTITLES: {}
|
||||
},
|
||||
playlists: [{
|
||||
attributes: {
|
||||
"PROGRAM-ID": 1,
|
||||
BANDWIDTH: 754857,
|
||||
CODECS: "mp4a.40.2,avc1.4d401e",
|
||||
AUDIO: "aac",
|
||||
VIDEO: "500kbs"
|
||||
},
|
||||
timeline: 0,
|
||||
uri: "Angle1/500kbs/prog_index.m3u8"
|
||||
}],
|
||||
segments: []
|
||||
}
|
||||
8
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateVideo.m3u8
generated
vendored
8
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/alternateVideo.m3u8
generated
vendored
@@ -1,8 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="500kbs",NAME="Angle1",AUTOSELECT=YES,DEFAULT=YES
|
||||
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="500kbs",NAME="Angle2",AUTOSELECT=YES,DEFAULT=NO,URI="Angle2/500kbs/prog_index.m3u8"
|
||||
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="500kbs",NAME="Angle3",AUTOSELECT=YES,DEFAULT=NO,URI="Angle3/500kbs/prog_index.m3u8"
|
||||
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="eng",NAME="English",AUTOSELECT=YES,DEFAULT=YES,URI="eng/prog_index.m3u8"
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=754857,CODECS="mp4a.40.2,avc1.4d401e",VIDEO="500kbs",AUDIO="aac"
|
||||
Angle1/500kbs/prog_index.m3u8
|
||||
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/brightcove.json
generated
vendored
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/brightcove.json
generated
vendored
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"playlists": [
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 240000,
|
||||
"RESOLUTION": {
|
||||
"width": 396,
|
||||
"height": 224
|
||||
}
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 40000
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 440000,
|
||||
"RESOLUTION": {
|
||||
"width": 396,
|
||||
"height": 224
|
||||
}
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 1928000,
|
||||
"RESOLUTION": {
|
||||
"width": 960,
|
||||
"height": 540
|
||||
}
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001"
|
||||
}
|
||||
],
|
||||
"discontinuityStarts": [],
|
||||
"mediaGroups": {
|
||||
"VIDEO": {},
|
||||
"AUDIO": {},
|
||||
"CLOSED-CAPTIONS": {},
|
||||
"SUBTITLES": {}
|
||||
},
|
||||
"segments": []
|
||||
}
|
||||
9
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/brightcove.m3u8
generated
vendored
9
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/brightcove.m3u8
generated
vendored
@@ -1,9 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=396x224
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000,RESOLUTION=396x224
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=960x540
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001
|
||||
160
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/byteRange.json
generated
vendored
160
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/byteRange.json
generated
vendored
@@ -1,160 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 587500,
|
||||
"offset": 522828
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 713084,
|
||||
"offset": 1110328
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video2.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 476580,
|
||||
"offset": 1823412
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 535612,
|
||||
"offset": 2299992
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 207176,
|
||||
"offset": 2835604
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 455900,
|
||||
"offset": 3042780
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 657248,
|
||||
"offset": 3498680
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 571708,
|
||||
"offset": 4155928
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 485040,
|
||||
"offset": 4727636
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 709136,
|
||||
"offset": 5212676
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 730004,
|
||||
"offset": 5921812
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 456276,
|
||||
"offset": 6651816
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 468684,
|
||||
"offset": 7108092
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 444996,
|
||||
"offset": 7576776
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 331444,
|
||||
"offset": 8021772
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 44556,
|
||||
"offset": 8353216
|
||||
},
|
||||
"duration": 1.4167,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
56
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/byteRange.m3u8
generated
vendored
56
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/byteRange.m3u8
generated
vendored
@@ -1,56 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:3
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10,
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:587500@522828
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:713084
|
||||
hls_450k_video2.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:476580@1823412
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:535612@2299992
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:207176@2835604
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:455900@3042780
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:657248@3498680
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:571708@4155928
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:485040@4727636
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:709136@5212676
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:730004@5921812
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:456276@6651816
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:468684@7108092
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:444996@7576776
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:331444@8021772
|
||||
hls_450k_video.ts
|
||||
#EXTINF:1.4167,
|
||||
#EXT-X-BYTERANGE:44556@8353216
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
27
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/dateTime.json
generated
vendored
27
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/dateTime.json
generated
vendored
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"allowCache": false,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"dateTimeString": "2016-06-22T09:20:16.166-04:00",
|
||||
"dateTimeObject": new Date("2016-06-22T09:20:16.166-04:00"),
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"dateTimeString": "2016-06-22T09:20:26.166-04:00",
|
||||
"dateTimeObject": new Date("2016-06-22T09:20:26.166-04:00"),
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"dateTimeString": "2016-06-22T09:20:16.166-04:00",
|
||||
"dateTimeObject": new Date("2016-06-22T09:20:16.166-04:00"),
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
12
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/dateTime.m3u8
generated
vendored
12
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/dateTime.m3u8
generated
vendored
@@ -1,12 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-ALLOW-CACHE:NO
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-PROGRAM-DATE-TIME:2016-06-22T09:20:16.166-04:00
|
||||
#EXTINF:10
|
||||
hls_450k_video.ts
|
||||
#EXT-X-PROGRAM-DATE-TIME:2016-06-22T09:20:26.166-04:00
|
||||
#EXTINF:10
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disallowCache.json
generated
vendored
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disallowCache.json
generated
vendored
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"allowCache": false,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 522828,
|
||||
"offset": 0
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disallowCache.m3u8
generated
vendored
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disallowCache.m3u8
generated
vendored
@@ -1,10 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:4
|
||||
#EXT-X-ALLOW-CACHE:NO
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:522828@0
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disc-sequence.json
generated
vendored
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disc-sequence.json
generated
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"discontinuitySequence": 3,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 3,
|
||||
"uri": "001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 19,
|
||||
"timeline": 3,
|
||||
"uri": "002.ts"
|
||||
},
|
||||
{
|
||||
"discontinuity": true,
|
||||
"duration": 10,
|
||||
"timeline": 4,
|
||||
"uri": "003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 11,
|
||||
"timeline": 4,
|
||||
"uri": "004.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 19,
|
||||
"endList": true,
|
||||
"discontinuityStarts": [2]
|
||||
}
|
||||
15
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disc-sequence.m3u8
generated
vendored
15
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/disc-sequence.m3u8
generated
vendored
@@ -1,15 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-VERSION:3
|
||||
#EXT-X-TARGETDURATION:19
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-DISCONTINUITY-SEQUENCE:3
|
||||
#EXTINF:10,0
|
||||
001.ts
|
||||
#EXTINF:19,0
|
||||
002.ts
|
||||
#EXT-X-DISCONTINUITY
|
||||
#EXTINF:10,0
|
||||
003.ts
|
||||
#EXTINF:11,0
|
||||
004.ts
|
||||
#EXT-X-ENDLIST
|
||||
58
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/discontinuity.json
generated
vendored
58
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/discontinuity.json
generated
vendored
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"discontinuitySequence": 0,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 19,
|
||||
"timeline": 0,
|
||||
"uri": "002.ts"
|
||||
},
|
||||
{
|
||||
"discontinuity": true,
|
||||
"duration": 10,
|
||||
"timeline": 1,
|
||||
"uri": "003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 11,
|
||||
"timeline": 1,
|
||||
"uri": "004.ts"
|
||||
},
|
||||
{
|
||||
"discontinuity": true,
|
||||
"duration": 10,
|
||||
"timeline": 2,
|
||||
"uri": "005.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 2,
|
||||
"uri": "006.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 2,
|
||||
"uri": "007.ts"
|
||||
},
|
||||
{
|
||||
"discontinuity": true,
|
||||
"duration": 10,
|
||||
"timeline": 3,
|
||||
"uri": "008.ts"
|
||||
},
|
||||
{
|
||||
"duration": 16,
|
||||
"timeline": 3,
|
||||
"uri": "009.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 19,
|
||||
"endList": true,
|
||||
"discontinuityStarts": [2, 4, 7]
|
||||
}
|
||||
26
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/discontinuity.m3u8
generated
vendored
26
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/discontinuity.m3u8
generated
vendored
@@ -1,26 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-VERSION:3
|
||||
#EXT-X-TARGETDURATION:19
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXTINF:10,0
|
||||
001.ts
|
||||
#EXTINF:19,0
|
||||
002.ts
|
||||
#EXT-X-DISCONTINUITY
|
||||
#EXTINF:10,0
|
||||
003.ts
|
||||
#EXTINF:11,0
|
||||
004.ts
|
||||
#EXT-X-DISCONTINUITY
|
||||
#EXTINF:10,0
|
||||
005.ts
|
||||
#EXTINF:10,0
|
||||
006.ts
|
||||
#EXTINF:10,0
|
||||
007.ts
|
||||
#EXT-X-DISCONTINUITY
|
||||
#EXTINF:10,0
|
||||
008.ts
|
||||
#EXTINF:16,0
|
||||
009.ts
|
||||
#EXT-X-ENDLIST
|
||||
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/domainUris.json
generated
vendored
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/domainUris.json
generated
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/00001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/subdir/00002.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/00003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/00004.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
13
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/domainUris.m3u8
generated
vendored
13
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/domainUris.m3u8
generated
vendored
@@ -1,13 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
/00001.ts
|
||||
#EXTINF:10,
|
||||
/subdir/00002.ts
|
||||
#EXTINF:10,
|
||||
/00003.ts
|
||||
#EXTINF:10,
|
||||
/00004.ts
|
||||
#ZEN-TOTAL-DURATION:57.9911
|
||||
#EXT-X-ENDLIST
|
||||
5
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/empty.json
generated
vendored
5
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/empty.json
generated
vendored
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"discontinuityStarts": [],
|
||||
"segments": []
|
||||
}
|
||||
0
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/empty.m3u8
generated
vendored
0
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/empty.m3u8
generated
vendored
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyAllowCache.json
generated
vendored
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyAllowCache.json
generated
vendored
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 522828,
|
||||
"offset": 0
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyAllowCache.m3u8
generated
vendored
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyAllowCache.m3u8
generated
vendored
@@ -1,10 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:4
|
||||
#EXT-X-ALLOW-CACHE:
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:522828@0
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyMediaSequence.json
generated
vendored
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyMediaSequence.json
generated
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"duration": 6.64,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 6.08,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 6.6,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 5,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 8,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
14
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyMediaSequence.m3u8
generated
vendored
14
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyMediaSequence.m3u8
generated
vendored
@@ -1,14 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXT-X-MEDIA-SEQUENCE:
|
||||
#EXT-X-ALLOW-CACHE:YES
|
||||
#EXT-X-TARGETDURATION:8
|
||||
#EXTINF:6.640,{}
|
||||
/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts
|
||||
#EXTINF:6.080,{}
|
||||
/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts
|
||||
#EXTINF:6.600,{}
|
||||
/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts
|
||||
#EXTINF:5.000,{}
|
||||
/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts
|
||||
#EXT-X-ENDLIST
|
||||
40
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyPlaylistType.json
generated
vendored
40
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyPlaylistType.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts"
|
||||
},
|
||||
{
|
||||
"duration": 8,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
17
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyPlaylistType.m3u8
generated
vendored
17
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyPlaylistType.m3u8
generated
vendored
@@ -1,17 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts
|
||||
#EXTINF:8,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts
|
||||
#ZEN-TOTAL-DURATION:57.9911
|
||||
#EXT-X-ENDLIST
|
||||
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyTargetDuration.json
generated
vendored
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyTargetDuration.json
generated
vendored
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"playlists": [
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 240000,
|
||||
"RESOLUTION": {
|
||||
"width": 396,
|
||||
"height": 224
|
||||
}
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 40000
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 440000,
|
||||
"RESOLUTION": {
|
||||
"width": 396,
|
||||
"height": 224
|
||||
}
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"PROGRAM-ID": 1,
|
||||
"BANDWIDTH": 1928000,
|
||||
"RESOLUTION": {
|
||||
"width": 960,
|
||||
"height": 540
|
||||
}
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001"
|
||||
}
|
||||
],
|
||||
"discontinuityStarts": [],
|
||||
"mediaGroups": {
|
||||
"VIDEO": {},
|
||||
"AUDIO": {},
|
||||
"CLOSED-CAPTIONS": {},
|
||||
"SUBTITLES": {}
|
||||
},
|
||||
"segments": []
|
||||
}
|
||||
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyTargetDuration.m3u8
generated
vendored
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/emptyTargetDuration.m3u8
generated
vendored
@@ -1,10 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=396x224
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000,RESOLUTION=396x224
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001
|
||||
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=960x540
|
||||
http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001
|
||||
60
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/encrypted.json
generated
vendored
60
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/encrypted.json
generated
vendored
@@ -1,60 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 7794,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": [],
|
||||
"segments": [
|
||||
{
|
||||
"duration": 2.833,
|
||||
"timeline": 0,
|
||||
"key": {
|
||||
"method": "AES-128",
|
||||
"uri": "https://priv.example.com/key.php?r=52"
|
||||
},
|
||||
"uri": "http://media.example.com/fileSequence52-A.ts"
|
||||
},
|
||||
{
|
||||
"duration": 15,
|
||||
"timeline": 0,
|
||||
"key": {
|
||||
"method": "AES-128",
|
||||
"uri": "https://priv.example.com/key.php?r=52"
|
||||
},
|
||||
"uri": "http://media.example.com/fileSequence52-B.ts"
|
||||
},
|
||||
{
|
||||
"duration": 13.333,
|
||||
"timeline": 0,
|
||||
"key": {
|
||||
"method": "AES-128",
|
||||
"uri": "https://priv.example.com/key.php?r=52"
|
||||
},
|
||||
"uri": "http://media.example.com/fileSequence52-C.ts"
|
||||
},
|
||||
{
|
||||
"duration": 15,
|
||||
"timeline": 0,
|
||||
"key": {
|
||||
"method": "AES-128",
|
||||
"uri": "https://priv.example.com/key.php?r=53"
|
||||
},
|
||||
"uri": "http://media.example.com/fileSequence53-A.ts"
|
||||
},
|
||||
{
|
||||
"duration": 14,
|
||||
"timeline": 0,
|
||||
"key": {
|
||||
"method": "AES-128",
|
||||
"uri": "https://priv.example.com/key.php?r=54",
|
||||
"iv": new Uint32Array([0, 0, 331, 3063767524])
|
||||
},
|
||||
"uri": "http://media.example.com/fileSequence53-B.ts"
|
||||
},
|
||||
{
|
||||
"duration": 15,
|
||||
"timeline": 0,
|
||||
"uri": "http://media.example.com/fileSequence53-B.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 15
|
||||
}
|
||||
28
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/encrypted.m3u8
generated
vendored
28
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/encrypted.m3u8
generated
vendored
@@ -1,28 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-VERSION:3
|
||||
#EXT-X-MEDIA-SEQUENCE:7794
|
||||
#EXT-X-TARGETDURATION:15
|
||||
|
||||
#EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=52"
|
||||
|
||||
#EXTINF:2.833,
|
||||
http://media.example.com/fileSequence52-A.ts
|
||||
#EXTINF:15.0,
|
||||
http://media.example.com/fileSequence52-B.ts
|
||||
#EXTINF:13.333,
|
||||
http://media.example.com/fileSequence52-C.ts
|
||||
|
||||
#EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=53"
|
||||
|
||||
#EXTINF:15.0,
|
||||
http://media.example.com/fileSequence53-A.ts
|
||||
|
||||
#EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=54",IV=0x00000000000000000000014BB69D61E4
|
||||
|
||||
#EXTINF:14.0,
|
||||
http://media.example.com/fileSequence53-B.ts
|
||||
|
||||
#EXT-X-KEY:METHOD=NONE
|
||||
|
||||
#EXTINF:15.0,
|
||||
http://media.example.com/fileSequence53-B.ts
|
||||
41
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/event.json
generated
vendored
41
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/event.json
generated
vendored
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "EVENT",
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts"
|
||||
},
|
||||
{
|
||||
"duration": 8,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
17
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/event.m3u8
generated
vendored
17
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/event.m3u8
generated
vendored
@@ -1,17 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:EVENT
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts
|
||||
#EXTINF:8,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts
|
||||
#ZEN-TOTAL-DURATION:57.9911
|
||||
#EXT-X-ENDLIST
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 1,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 6.64,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 8,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:STRING
|
||||
#EXT-X-MEDIA-SEQUENCE:1
|
||||
#EXT-X-ALLOW-CACHE:YES
|
||||
#EXT-X-TARGETDURATION:8
|
||||
#EXTINF:6.640,{}
|
||||
/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts
|
||||
#EXT-X-ENDLIST
|
||||
164
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/extinf.json
generated
vendored
164
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/extinf.json
generated
vendored
@@ -1,164 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 522828,
|
||||
"offset": 0
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 587500,
|
||||
"offset": 522828
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 713084,
|
||||
"offset": 1110328
|
||||
},
|
||||
"duration": 5,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 476580,
|
||||
"offset": 1823412
|
||||
},
|
||||
"duration": 9.7,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 535612,
|
||||
"offset": 2299992
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 207176,
|
||||
"offset": 2835604
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 455900,
|
||||
"offset": 3042780
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 657248,
|
||||
"offset": 3498680
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 571708,
|
||||
"offset": 4155928
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 485040,
|
||||
"offset": 4727636
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 709136,
|
||||
"offset": 5212676
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 730004,
|
||||
"offset": 5921812
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 456276,
|
||||
"offset": 6651816
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 468684,
|
||||
"offset": 7108092
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 444996,
|
||||
"offset": 7576776
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 331444,
|
||||
"offset": 8021772
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 44556,
|
||||
"offset": 8353216
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/extinf.m3u8
generated
vendored
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/extinf.m3u8
generated
vendored
@@ -1,57 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:3
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10
|
||||
#EXT-X-BYTERANGE:522828@0
|
||||
hls_450k_video.ts
|
||||
#EXTINF:;asljasdfii11)))00,
|
||||
#EXT-X-BYTERANGE:587500@522828
|
||||
hls_450k_video.ts
|
||||
#EXTINF:5,
|
||||
#EXT-X-BYTERANGE:713084@1110328
|
||||
hls_450k_video.ts
|
||||
#EXTINF:9.7,
|
||||
#EXT-X-BYTERANGE:476580@1823412
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:535612@2299992
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:207176@2835604
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:455900@3042780
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:657248@3498680
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:571708@4155928
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:485040@4727636
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:709136@5212676
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:730004@5921812
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:456276@6651816
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:468684@7108092
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:444996@7576776
|
||||
hls_450k_video.ts
|
||||
#EXTINF:22,
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:331444@8021772
|
||||
hls_450k_video.ts
|
||||
#EXT-X-BYTERANGE:44556@8353216
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
43
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/fmp4.json
generated
vendored
43
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/fmp4.json
generated
vendored
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 1,
|
||||
"playlistType": "VOD",
|
||||
"targetDuration": 6,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": [],
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 5666510,
|
||||
"offset": 720
|
||||
},
|
||||
"duration": 6.006,
|
||||
"timeline": 0,
|
||||
"uri": "main.mp4",
|
||||
"map": {
|
||||
"byterange": {
|
||||
"length": 720,
|
||||
"offset": 0
|
||||
},
|
||||
"uri": "main.mp4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 5861577,
|
||||
"offset": 5667230
|
||||
},
|
||||
"duration": 6.006,
|
||||
"timeline": 0,
|
||||
"uri": "main.mp4",
|
||||
"map": {
|
||||
"byterange": {
|
||||
"length": 720,
|
||||
"offset": 0
|
||||
},
|
||||
"uri": "main.mp4"
|
||||
}
|
||||
}
|
||||
],
|
||||
"endList": true
|
||||
}
|
||||
14
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/fmp4.m3u8
generated
vendored
14
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/fmp4.m3u8
generated
vendored
@@ -1,14 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:6
|
||||
#EXT-X-VERSION:7
|
||||
#EXT-X-MEDIA-SEQUENCE:1
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXT-X-INDEPENDENT-SEGMENTS
|
||||
#EXT-X-MAP:URI="main.mp4",BYTERANGE="720@0"
|
||||
#EXTINF:6.00600,
|
||||
#EXT-X-BYTERANGE:5666510@720
|
||||
main.mp4
|
||||
#EXTINF:6.00600,
|
||||
#EXT-X-BYTERANGE:5861577@5667230
|
||||
main.mp4
|
||||
#EXT-X-ENDLIST
|
||||
5
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/headerOnly.json
generated
vendored
5
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/headerOnly.json
generated
vendored
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"discontinuityStarts": [],
|
||||
"segments": []
|
||||
}
|
||||
1
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/headerOnly.m3u8
generated
vendored
1
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/headerOnly.m3u8
generated
vendored
@@ -1 +0,0 @@
|
||||
#EXTM3U
|
||||
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidAllowCache.json
generated
vendored
20
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidAllowCache.json
generated
vendored
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 522828,
|
||||
"offset": 0
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidAllowCache.m3u8
generated
vendored
10
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidAllowCache.m3u8
generated
vendored
@@ -1,10 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXT-X-VERSION:4
|
||||
#EXT-X-ALLOW-CACHE:MAYBE
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:522828@0
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidMediaSequence.json
generated
vendored
31
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidMediaSequence.json
generated
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"duration": 6.64,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 6.08,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 6.6,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 5,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 8,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
14
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidMediaSequence.m3u8
generated
vendored
14
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidMediaSequence.m3u8
generated
vendored
@@ -1,14 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXT-X-MEDIA-SEQUENCE:gobblegobble
|
||||
#EXT-X-ALLOW-CACHE:YES
|
||||
#EXT-X-TARGETDURATION:8
|
||||
#EXTINF:6.640,{}
|
||||
/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts
|
||||
#EXTINF:6.080,{}
|
||||
/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts
|
||||
#EXTINF:6.600,{}
|
||||
/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts
|
||||
#EXTINF:5.000,{}
|
||||
/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts
|
||||
#EXT-X-ENDLIST
|
||||
40
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidPlaylistType.json
generated
vendored
40
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidPlaylistType.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts"
|
||||
},
|
||||
{
|
||||
"duration": 8,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
17
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidPlaylistType.m3u8
generated
vendored
17
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidPlaylistType.m3u8
generated
vendored
@@ -1,17 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:asdRASDfasdR
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts
|
||||
#EXTINF:8,
|
||||
/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts
|
||||
#ZEN-TOTAL-DURATION:57.9911
|
||||
#EXT-X-ENDLIST
|
||||
163
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidTargetDuration.json
generated
vendored
163
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidTargetDuration.json
generated
vendored
@@ -1,163 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"byterange": {
|
||||
"length": 522828,
|
||||
"offset": 0
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 587500,
|
||||
"offset": 522828
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 713084,
|
||||
"offset": 1110328
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 476580,
|
||||
"offset": 1823412
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 535612,
|
||||
"offset": 2299992
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 207176,
|
||||
"offset": 2835604
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 455900,
|
||||
"offset": 3042780
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 657248,
|
||||
"offset": 3498680
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 571708,
|
||||
"offset": 4155928
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 485040,
|
||||
"offset": 4727636
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 709136,
|
||||
"offset": 5212676
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 730004,
|
||||
"offset": 5921812
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 456276,
|
||||
"offset": 6651816
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 468684,
|
||||
"offset": 7108092
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 444996,
|
||||
"offset": 7576776
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 331444,
|
||||
"offset": 8021772
|
||||
},
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
},
|
||||
{
|
||||
"byterange": {
|
||||
"length": 44556,
|
||||
"offset": 8353216
|
||||
},
|
||||
"duration": 1.4167,
|
||||
"timeline": 0,
|
||||
"uri": "hls_450k_video.ts"
|
||||
}
|
||||
],
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidTargetDuration.m3u8
generated
vendored
57
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/invalidTargetDuration.m3u8
generated
vendored
@@ -1,57 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-TARGETDURATION:NaN
|
||||
#EXT-X-VERSION:4
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:522828@0
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:587500@522828
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:713084@1110328
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:476580@1823412
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:535612@2299992
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:207176@2835604
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:455900@3042780
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:657248@3498680
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:571708@4155928
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:485040@4727636
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:709136@5212676
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:730004@5921812
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:456276@6651816
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:468684@7108092
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:444996@7576776
|
||||
hls_450k_video.ts
|
||||
#EXTINF:10,
|
||||
#EXT-X-BYTERANGE:331444@8021772
|
||||
hls_450k_video.ts
|
||||
#EXTINF:1.4167,
|
||||
#EXT-X-BYTERANGE:44556@8353216
|
||||
hls_450k_video.ts
|
||||
#EXT-X-ENDLIST
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"playlistType": "VOD",
|
||||
"segments": [
|
||||
{
|
||||
"duration": 6.64,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 8,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts"
|
||||
},
|
||||
{
|
||||
"duration": 8,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 8,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-PLAYLIST-TYPE:VOD
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-ALLOW-CACHE:YES
|
||||
#EXT-X-TARGETDURATION:8
|
||||
#EXTINF:6.640,{}
|
||||
/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts
|
||||
/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts
|
||||
/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts
|
||||
54
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/liveStart30sBefore.json
generated
vendored
54
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/liveStart30sBefore.json
generated
vendored
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 19,
|
||||
"timeline": 0,
|
||||
"uri": "002.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 11,
|
||||
"timeline": 0,
|
||||
"uri": "004.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "005.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "006.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "007.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "008.ts"
|
||||
},
|
||||
{
|
||||
"duration": 16,
|
||||
"timeline": 0,
|
||||
"uri": "009.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
22
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/liveStart30sBefore.m3u8
generated
vendored
22
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/liveStart30sBefore.m3u8
generated
vendored
@@ -1,22 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-MEDIA-SEQUENCE:0
|
||||
#EXT-X-ALLOW-CACHE:YES
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,0
|
||||
001.ts
|
||||
#EXTINF:19,0
|
||||
002.ts
|
||||
#EXTINF:10,0
|
||||
003.ts
|
||||
#EXTINF:11,0
|
||||
004.ts
|
||||
#EXTINF:10,0
|
||||
005.ts
|
||||
#EXTINF:10,0
|
||||
006.ts
|
||||
#EXTINF:10,0
|
||||
007.ts
|
||||
#EXTINF:10,0
|
||||
008.ts
|
||||
#EXTINF:16,0
|
||||
009.ts
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/gogo/00001.ts"
|
||||
}
|
||||
],
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#EXTM3U
|
||||
#ZEN-TOTAL-DURATION:50
|
||||
#EXT-X-TARGETDURATION:-10
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/gogo/00001.ts
|
||||
#EXT-X-ENDLIST
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/gogo/00001.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/gogo/00002.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/gogo/00003.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/gogo/00004.ts"
|
||||
},
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/gogo/00005.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#EXTM3U
|
||||
#ZEN-TOTAL-DURATION:50
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/gogo/00001.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/gogo/00002.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/gogo/00003.ts
|
||||
#EXT-X-ENDLIST
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/gogo/00004.ts
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/gogo/00005.ts
|
||||
|
||||
15
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/manifestNoExtM3u.json
generated
vendored
15
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/manifestNoExtM3u.json
generated
vendored
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"allowCache": true,
|
||||
"mediaSequence": 0,
|
||||
"segments": [
|
||||
{
|
||||
"duration": 10,
|
||||
"timeline": 0,
|
||||
"uri": "/test/ts-files/zencoder/gogo/00001.ts"
|
||||
}
|
||||
],
|
||||
"targetDuration": 10,
|
||||
"endList": true,
|
||||
"discontinuitySequence": 0,
|
||||
"discontinuityStarts": []
|
||||
}
|
||||
5
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/manifestNoExtM3u.m3u8
generated
vendored
5
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/manifestNoExtM3u.m3u8
generated
vendored
@@ -1,5 +0,0 @@
|
||||
#ZEN-TOTAL-DURATION:10
|
||||
#EXT-X-TARGETDURATION:10
|
||||
#EXTINF:10,
|
||||
/test/ts-files/zencoder/gogo/00001.ts
|
||||
#EXT-X-ENDLIST
|
||||
464
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/master-fmp4.json
generated
vendored
464
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/master-fmp4.json
generated
vendored
@@ -1,464 +0,0 @@
|
||||
{
|
||||
allowCache: true,
|
||||
discontinuityStarts: [],
|
||||
mediaGroups: {
|
||||
AUDIO: {
|
||||
aud1: {
|
||||
English: {
|
||||
autoselect: true,
|
||||
default: true,
|
||||
language: "eng",
|
||||
uri: "a1/prog_index.m3u8"
|
||||
}
|
||||
},
|
||||
aud2: {
|
||||
English: {
|
||||
autoselect: true,
|
||||
default: true,
|
||||
language: "eng",
|
||||
uri: "a2/prog_index.m3u8"
|
||||
}
|
||||
},
|
||||
aud3: {
|
||||
English: {
|
||||
autoselect: true,
|
||||
default: true,
|
||||
language: "eng",
|
||||
uri: "a3/prog_index.m3u8"
|
||||
}
|
||||
}
|
||||
},
|
||||
VIDEO: {},
|
||||
"CLOSED-CAPTIONS": {
|
||||
cc1: {
|
||||
English: {
|
||||
autoselect: true,
|
||||
default: true,
|
||||
language: "eng",
|
||||
instreamId: "CC1"
|
||||
}
|
||||
}
|
||||
},
|
||||
SUBTITLES: {
|
||||
sub1: {
|
||||
English: {
|
||||
autoselect: true,
|
||||
default: true,
|
||||
language: "eng",
|
||||
uri: 's1/eng/prog_index.m3u8',
|
||||
forced: false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
playlists: [{
|
||||
attributes: {
|
||||
"AVERAGE-BANDWIDTH": "2165224",
|
||||
BANDWIDTH: 2215219,
|
||||
CODECS: "avc1.640020,mp4a.40.2",
|
||||
RESOLUTION: {
|
||||
width: 960,
|
||||
height: 540
|
||||
},
|
||||
"FRAME-RATE": "59.940",
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
AUDIO: "aud1",
|
||||
SUBTITLES: "sub1"
|
||||
},
|
||||
timeline: 0,
|
||||
uri: "v4/prog_index.m3u8"
|
||||
},
|
||||
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud1",
|
||||
"AVERAGE-BANDWIDTH": "7962844",
|
||||
"BANDWIDTH": 7976430,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,mp4a.40.2",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v8/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud1",
|
||||
"AVERAGE-BANDWIDTH": "6165024",
|
||||
"BANDWIDTH": 6181885,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,mp4a.40.2",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v7/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud1",
|
||||
"AVERAGE-BANDWIDTH": "4664459",
|
||||
"BANDWIDTH": 4682666,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,mp4a.40.2",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v6/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud1",
|
||||
"AVERAGE-BANDWIDTH": "3164759",
|
||||
"BANDWIDTH": 3170746,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640020,mp4a.40.2",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v5/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud1",
|
||||
"AVERAGE-BANDWIDTH": "1262552",
|
||||
"BANDWIDTH": 1276223,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64001e,mp4a.40.2",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 432,
|
||||
"width": 768
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v3/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud1",
|
||||
"AVERAGE-BANDWIDTH": "893243",
|
||||
"BANDWIDTH": 904744,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64001e,mp4a.40.2",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 360,
|
||||
"width": 640
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v2/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud1",
|
||||
"AVERAGE-BANDWIDTH": "527673",
|
||||
"BANDWIDTH": 538201,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640015,mp4a.40.2",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 270,
|
||||
"width": 480
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v1/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "2390334",
|
||||
"BANDWIDTH": 2440329,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640020,ac-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 540,
|
||||
"width": 960
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v4/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "8187954",
|
||||
"BANDWIDTH": 8201540,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,ac-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v8/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "6390134",
|
||||
"BANDWIDTH": 6406995,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,ac-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v7/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "4889569",
|
||||
"BANDWIDTH": 4907776,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,ac-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v6/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "3389869",
|
||||
"BANDWIDTH": 3395856,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640020,ac-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v5/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "1487662",
|
||||
"BANDWIDTH": 1501333,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64001e,ac-3",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 432,
|
||||
"width": 768
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v3/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "1118353",
|
||||
"BANDWIDTH": 1129854,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64001e,ac-3",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 360,
|
||||
"width": 640
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v2/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud2",
|
||||
"AVERAGE-BANDWIDTH": "752783",
|
||||
"BANDWIDTH": 763311,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640015,ac-3",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 270,
|
||||
"width": 480
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v1/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "2198334",
|
||||
"BANDWIDTH": 2248329,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640020,ec-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 540,
|
||||
"width": 960
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v4/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "7995954",
|
||||
"BANDWIDTH": 8009540,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,ec-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v8/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "6198134",
|
||||
"BANDWIDTH": 6214995,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,ec-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v7/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "4697569",
|
||||
"BANDWIDTH": 4715776,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64002a,ec-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 1080,
|
||||
"width": 1920
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v6/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "3197869",
|
||||
"BANDWIDTH": 3203856,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640020,ec-3",
|
||||
"FRAME-RATE": "59.940",
|
||||
"RESOLUTION": {
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v5/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "1295662",
|
||||
"BANDWIDTH": 1309333,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64001e,ec-3",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 432,
|
||||
"width": 768
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v3/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "926353",
|
||||
"BANDWIDTH": 937854,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.64001e,ec-3",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 360,
|
||||
"width": 640
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v2/prog_index.m3u8"
|
||||
},
|
||||
{
|
||||
"attributes": {
|
||||
"AUDIO": "aud3",
|
||||
"AVERAGE-BANDWIDTH": "560783",
|
||||
"BANDWIDTH": 571311,
|
||||
"CLOSED-CAPTIONS": "cc1",
|
||||
"CODECS": "avc1.640015,ec-3",
|
||||
"FRAME-RATE": "29.970",
|
||||
"RESOLUTION": {
|
||||
"height": 270,
|
||||
"width": 480
|
||||
},
|
||||
"SUBTITLES": "sub1"
|
||||
},
|
||||
"timeline": 0,
|
||||
"uri": "v1/prog_index.m3u8"
|
||||
}],
|
||||
segments: []
|
||||
}
|
||||
76
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/master-fmp4.m3u8
generated
vendored
76
build/javascript/node_modules/m3u8-parser/test/fixtures/m3u8/master-fmp4.m3u8
generated
vendored
@@ -1,76 +0,0 @@
|
||||
#EXTM3U
|
||||
#EXT-X-VERSION:6
|
||||
#EXT-X-INDEPENDENT-SEGMENTS
|
||||
|
||||
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud1",LANGUAGE="eng",NAME="English",AUTOSELECT=YES,DEFAULT=YES,URI="a1/prog_index.m3u8"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud2",LANGUAGE="eng",NAME="English",AUTOSELECT=YES,DEFAULT=YES,URI="a2/prog_index.m3u8"
|
||||
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aud3",LANGUAGE="eng",NAME="English",AUTOSELECT=YES,DEFAULT=YES,URI="a3/prog_index.m3u8"
|
||||
|
||||
|
||||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="sub1",NAME="English",LANGUAGE="eng",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,URI="s1/eng/prog_index.m3u8"
|
||||
|
||||
|
||||
#EXT-X-MEDIA:TYPE=CLOSED-CAPTIONS,GROUP-ID="cc1",NAME="English",LANGUAGE="eng",DEFAULT=YES,AUTOSELECT=YES,INSTREAM-ID="CC1"
|
||||
|
||||
|
||||
#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=163198,BANDWIDTH=166942,CODECS="avc1.64002a",RESOLUTION=1920x1080,URI="v6/iframe_index.m3u8"
|
||||
#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=131314,BANDWIDTH=139041,CODECS="avc1.640020",RESOLUTION=1280x720,URI="v5/iframe_index.m3u8"
|
||||
#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=100233,BANDWIDTH=101724,CODECS="avc1.640020",RESOLUTION=960x540,URI="v4/iframe_index.m3u8"
|
||||
#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=81002,BANDWIDTH=84112,CODECS="avc1.64001e",RESOLUTION=768x432,URI="v3/iframe_index.m3u8"
|
||||
#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=64987,BANDWIDTH=65835,CODECS="avc1.64001e",RESOLUTION=640x360,URI="v2/iframe_index.m3u8"
|
||||
#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=41547,BANDWIDTH=42106,CODECS="avc1.640015",RESOLUTION=480x270,URI="v1/iframe_index.m3u8"
|
||||
|
||||
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=2165224,BANDWIDTH=2215219,CODECS="avc1.640020,mp4a.40.2",RESOLUTION=960x540,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v4/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=7962844,BANDWIDTH=7976430,CODECS="avc1.64002a,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v8/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=6165024,BANDWIDTH=6181885,CODECS="avc1.64002a,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v7/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=4664459,BANDWIDTH=4682666,CODECS="avc1.64002a,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v6/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=3164759,BANDWIDTH=3170746,CODECS="avc1.640020,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v5/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=1262552,BANDWIDTH=1276223,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=768x432,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v3/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=893243,BANDWIDTH=904744,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v2/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=527673,BANDWIDTH=538201,CODECS="avc1.640015,mp4a.40.2",RESOLUTION=480x270,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud1",SUBTITLES="sub1"
|
||||
v1/prog_index.m3u8
|
||||
|
||||
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=2390334,BANDWIDTH=2440329,CODECS="avc1.640020,ac-3",RESOLUTION=960x540,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v4/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=8187954,BANDWIDTH=8201540,CODECS="avc1.64002a,ac-3",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v8/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=6390134,BANDWIDTH=6406995,CODECS="avc1.64002a,ac-3",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v7/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=4889569,BANDWIDTH=4907776,CODECS="avc1.64002a,ac-3",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v6/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=3389869,BANDWIDTH=3395856,CODECS="avc1.640020,ac-3",RESOLUTION=1280x720,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v5/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=1487662,BANDWIDTH=1501333,CODECS="avc1.64001e,ac-3",RESOLUTION=768x432,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v3/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=1118353,BANDWIDTH=1129854,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v2/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=752783,BANDWIDTH=763311,CODECS="avc1.640015,ac-3",RESOLUTION=480x270,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud2",SUBTITLES="sub1"
|
||||
v1/prog_index.m3u8
|
||||
|
||||
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=2198334,BANDWIDTH=2248329,CODECS="avc1.640020,ec-3",RESOLUTION=960x540,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v4/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=7995954,BANDWIDTH=8009540,CODECS="avc1.64002a,ec-3",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v8/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=6198134,BANDWIDTH=6214995,CODECS="avc1.64002a,ec-3",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v7/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=4697569,BANDWIDTH=4715776,CODECS="avc1.64002a,ec-3",RESOLUTION=1920x1080,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v6/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=3197869,BANDWIDTH=3203856,CODECS="avc1.640020,ec-3",RESOLUTION=1280x720,FRAME-RATE=59.940,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v5/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=1295662,BANDWIDTH=1309333,CODECS="avc1.64001e,ec-3",RESOLUTION=768x432,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v3/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=926353,BANDWIDTH=937854,CODECS="avc1.64001e,ec-3",RESOLUTION=640x360,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v2/prog_index.m3u8
|
||||
#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=560783,BANDWIDTH=571311,CODECS="avc1.640015,ec-3",RESOLUTION=480x270,FRAME-RATE=29.970,CLOSED-CAPTIONS="cc1",AUDIO="aud3",SUBTITLES="sub1"
|
||||
v1/prog_index.m3u8
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user