@transmitlive/m3u8-parser 4.7.2-beta.6 → 7.1.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/m3u8-parser.cjs.js +446 -302
- package/dist/m3u8-parser.es.js +443 -297
- package/dist/m3u8-parser.js +462 -351
- package/dist/m3u8-parser.min.js +2 -2
- package/package.json +6 -11
- package/src/parse-stream.js +93 -18
- package/src/parser.js +120 -9
- package/test/fixtures/integration/absoluteUris.js +1 -0
- package/test/fixtures/integration/allowCache.js +1 -0
- package/test/fixtures/integration/allowCacheInvalid.js +1 -0
- package/test/fixtures/integration/alternateAudio.js +1 -0
- package/test/fixtures/integration/alternateVideo.js +1 -0
- package/test/fixtures/integration/brightcove.js +1 -0
- package/test/fixtures/integration/byteRange.js +1 -0
- package/test/fixtures/integration/dateTime.js +3 -0
- package/test/fixtures/integration/diff-init-key.js +1 -0
- package/test/fixtures/integration/disallowCache.js +1 -0
- package/test/fixtures/integration/disc-sequence.js +9 -4
- package/test/fixtures/integration/discontinuity.js +19 -9
- package/test/fixtures/integration/domainUris.js +1 -0
- package/test/fixtures/integration/empty.js +1 -0
- package/test/fixtures/integration/emptyAllowCache.js +1 -0
- package/test/fixtures/integration/emptyMediaSequence.js +9 -4
- package/test/fixtures/integration/emptyPlaylistType.js +1 -0
- package/test/fixtures/integration/emptyTargetDuration.js +1 -0
- package/test/fixtures/integration/encrypted.js +1 -0
- package/test/fixtures/integration/event.js +1 -0
- package/test/fixtures/integration/extXPlaylistTypeInvalidPlaylist.js +3 -1
- package/test/fixtures/integration/extinf.js +3 -1
- package/test/fixtures/integration/fmp4.js +3 -1
- package/test/fixtures/integration/headerOnly.js +1 -0
- package/test/fixtures/integration/invalidAllowCache.js +1 -0
- package/test/fixtures/integration/invalidMediaSequence.js +9 -4
- package/test/fixtures/integration/invalidPlaylistType.js +1 -0
- package/test/fixtures/integration/invalidTargetDuration.js +1 -0
- package/test/fixtures/integration/liveMissingSegmentDuration.js +3 -1
- package/test/fixtures/integration/liveStart30sBefore.js +19 -9
- package/test/fixtures/integration/llhls-byte-range.js +1 -0
- package/test/fixtures/integration/llhls-delta-byte-range.js +1 -0
- package/test/fixtures/integration/llhls.js +8 -0
- package/test/fixtures/integration/llhlsDelta.js +5 -0
- package/test/fixtures/integration/manifestExtTTargetdurationNegative.js +1 -0
- package/test/fixtures/integration/manifestExtXEndlistEarly.js +1 -0
- package/test/fixtures/integration/manifestNoExtM3u.js +1 -0
- package/test/fixtures/integration/master-fmp4.js +27 -25
- package/test/fixtures/integration/master.js +1 -0
- package/test/fixtures/integration/media.js +1 -0
- package/test/fixtures/integration/mediaSequence.js +9 -4
- package/test/fixtures/integration/missingEndlist.js +1 -0
- package/test/fixtures/integration/missingExtinf.js +1 -0
- package/test/fixtures/integration/missingMediaSequence.js +9 -4
- package/test/fixtures/integration/missingSegmentDuration.js +3 -1
- package/test/fixtures/integration/multipleAudioGroups.js +1 -0
- package/test/fixtures/integration/multipleAudioGroupsCombinedMain.js +1 -0
- package/test/fixtures/integration/multipleTargetDurations.js +1 -0
- package/test/fixtures/integration/multipleVideo.js +1 -0
- package/test/fixtures/integration/negativeMediaSequence.js +9 -4
- package/test/fixtures/integration/playlist.js +1 -0
- package/test/fixtures/integration/playlistMediaSequenceHigher.js +3 -1
- package/test/fixtures/integration/start.js +1 -0
- package/test/fixtures/integration/streamInfInvalid.js +1 -0
- package/test/fixtures/integration/twoMediaSequences.js +9 -4
- package/test/fixtures/integration/versionInvalid.js +1 -0
- package/test/fixtures/integration/whiteSpace.js +1 -0
- package/test/fixtures/integration/zeroDuration.js +1 -0
- package/test/parse-stream.test.js +112 -16
- package/test/parser.test.js +392 -17
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ var manifest = [
|
|
|
57
57
|
'0.ts',
|
|
58
58
|
'#EXTINF:6,',
|
|
59
59
|
'1.ts',
|
|
60
|
+
'#EXT-X-PROGRAM-DATE-TIME:2019-02-14T02:14:00.106Z'
|
|
60
61
|
'#EXTINF:6,',
|
|
61
62
|
'2.ts',
|
|
62
63
|
'#EXT-X-ENDLIST'
|
|
@@ -79,6 +80,7 @@ Manifest {
|
|
|
79
80
|
allowCache: boolean,
|
|
80
81
|
endList: boolean,
|
|
81
82
|
mediaSequence: number,
|
|
83
|
+
dateRanges: [],
|
|
82
84
|
discontinuitySequence: number,
|
|
83
85
|
playlistType: string,
|
|
84
86
|
custom: {},
|
|
@@ -113,11 +115,13 @@ Manifest {
|
|
|
113
115
|
discontinuityStarts: [number],
|
|
114
116
|
segments: [
|
|
115
117
|
{
|
|
118
|
+
title: string,
|
|
116
119
|
byterange: {
|
|
117
120
|
length: number,
|
|
118
121
|
offset: number
|
|
119
122
|
},
|
|
120
123
|
duration: number,
|
|
124
|
+
programDateTime: number,
|
|
121
125
|
attributes: {},
|
|
122
126
|
discontinuity: number,
|
|
123
127
|
uri: string,
|
|
@@ -158,6 +162,7 @@ Manifest {
|
|
|
158
162
|
* [EXT-X-KEY](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.4)
|
|
159
163
|
* [EXT-X-MAP](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.5)
|
|
160
164
|
* [EXT-X-PROGRAM-DATE-TIME](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.6)
|
|
165
|
+
* [EXT-X-DATERANGE](https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.2.7)
|
|
161
166
|
|
|
162
167
|
### Media Playlist Tags
|
|
163
168
|
|
|
@@ -167,11 +172,13 @@ Manifest {
|
|
|
167
172
|
* [EXT-X-ENDLIST](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.4)
|
|
168
173
|
* [EXT-X-PLAYLIST-TYPE](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.5)
|
|
169
174
|
* [EXT-X-START](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.5.2)
|
|
175
|
+
* [EXT-X-INDEPENDENT-SEGMENTS](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.5.1)
|
|
170
176
|
|
|
171
177
|
### Master Playlist Tags
|
|
172
178
|
|
|
173
179
|
* [EXT-X-MEDIA](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.1)
|
|
174
180
|
* [EXT-X-STREAM-INF](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.2)
|
|
181
|
+
* [EXT-X-CONTENT-STEERING](https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-4.4.6.6)
|
|
175
182
|
|
|
176
183
|
### Experimental Tags
|
|
177
184
|
|
|
@@ -236,12 +243,10 @@ Example media playlist using `EXT-X-CUE-` tags.
|
|
|
236
243
|
|
|
237
244
|
### Not Yet Supported
|
|
238
245
|
|
|
239
|
-
* [EXT-X-DATERANGE](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.2.7)
|
|
240
246
|
* [EXT-X-I-FRAMES-ONLY](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.3.6)
|
|
241
247
|
* [EXT-X-I-FRAME-STREAM-INF](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.3)
|
|
242
248
|
* [EXT-X-SESSION-DATA](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.4)
|
|
243
249
|
* [EXT-X-SESSION-KEY](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.4.5)
|
|
244
|
-
* [EXT-X-INDEPENDENT-SEGMENTS](http://tools.ietf.org/html/draft-pantos-http-live-streaming#section-4.3.5.1)
|
|
245
250
|
|
|
246
251
|
### Custom Parsers
|
|
247
252
|
|