@transmitlive/m3u8-parser 4.7.2-beta.6

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.
Files changed (134) hide show
  1. package/CONTRIBUTING.md +30 -0
  2. package/LICENSE +13 -0
  3. package/README.md +388 -0
  4. package/dist/m3u8-parser.cjs.js +1563 -0
  5. package/dist/m3u8-parser.es.js +1549 -0
  6. package/dist/m3u8-parser.js +1748 -0
  7. package/dist/m3u8-parser.min.js +2 -0
  8. package/index.html +15 -0
  9. package/package.json +100 -0
  10. package/scripts/karma.conf.js +12 -0
  11. package/scripts/rollup.config.js +47 -0
  12. package/src/index.js +19 -0
  13. package/src/line-stream.js +35 -0
  14. package/src/parse-stream.js +619 -0
  15. package/src/parser.js +748 -0
  16. package/test/fixtures/integration/absoluteUris.js +31 -0
  17. package/test/fixtures/integration/absoluteUris.m3u8 +12 -0
  18. package/test/fixtures/integration/allowCache.js +165 -0
  19. package/test/fixtures/integration/allowCache.m3u8 +58 -0
  20. package/test/fixtures/integration/allowCacheInvalid.js +21 -0
  21. package/test/fixtures/integration/allowCacheInvalid.m3u8 +10 -0
  22. package/test/fixtures/integration/alternateAudio.js +56 -0
  23. package/test/fixtures/integration/alternateAudio.m3u8 +9 -0
  24. package/test/fixtures/integration/alternateVideo.js +48 -0
  25. package/test/fixtures/integration/alternateVideo.m3u8 +8 -0
  26. package/test/fixtures/integration/brightcove.js +57 -0
  27. package/test/fixtures/integration/brightcove.m3u8 +9 -0
  28. package/test/fixtures/integration/byteRange.js +161 -0
  29. package/test/fixtures/integration/byteRange.m3u8 +56 -0
  30. package/test/fixtures/integration/dateTime.js +27 -0
  31. package/test/fixtures/integration/dateTime.m3u8 +12 -0
  32. package/test/fixtures/integration/diff-init-key.js +164 -0
  33. package/test/fixtures/integration/diff-init-key.m3u8 +57 -0
  34. package/test/fixtures/integration/disallowCache.js +21 -0
  35. package/test/fixtures/integration/disallowCache.m3u8 +10 -0
  36. package/test/fixtures/integration/disc-sequence.js +32 -0
  37. package/test/fixtures/integration/disc-sequence.m3u8 +15 -0
  38. package/test/fixtures/integration/discontinuity.js +59 -0
  39. package/test/fixtures/integration/discontinuity.m3u8 +26 -0
  40. package/test/fixtures/integration/domainUris.js +31 -0
  41. package/test/fixtures/integration/domainUris.m3u8 +12 -0
  42. package/test/fixtures/integration/empty.js +5 -0
  43. package/test/fixtures/integration/empty.m3u8 +0 -0
  44. package/test/fixtures/integration/emptyAllowCache.js +21 -0
  45. package/test/fixtures/integration/emptyAllowCache.m3u8 +10 -0
  46. package/test/fixtures/integration/emptyMediaSequence.js +31 -0
  47. package/test/fixtures/integration/emptyMediaSequence.m3u8 +14 -0
  48. package/test/fixtures/integration/emptyPlaylistType.js +40 -0
  49. package/test/fixtures/integration/emptyPlaylistType.m3u8 +16 -0
  50. package/test/fixtures/integration/emptyTargetDuration.js +57 -0
  51. package/test/fixtures/integration/emptyTargetDuration.m3u8 +10 -0
  52. package/test/fixtures/integration/encrypted.js +61 -0
  53. package/test/fixtures/integration/encrypted.m3u8 +28 -0
  54. package/test/fixtures/integration/event.js +41 -0
  55. package/test/fixtures/integration/event.m3u8 +16 -0
  56. package/test/fixtures/integration/extXPlaylistTypeInvalidPlaylist.js +15 -0
  57. package/test/fixtures/integration/extXPlaylistTypeInvalidPlaylist.m3u8 +8 -0
  58. package/test/fixtures/integration/extinf.js +165 -0
  59. package/test/fixtures/integration/extinf.m3u8 +57 -0
  60. package/test/fixtures/integration/fmp4.js +44 -0
  61. package/test/fixtures/integration/fmp4.m3u8 +14 -0
  62. package/test/fixtures/integration/headerOnly.js +5 -0
  63. package/test/fixtures/integration/headerOnly.m3u8 +1 -0
  64. package/test/fixtures/integration/invalidAllowCache.js +21 -0
  65. package/test/fixtures/integration/invalidAllowCache.m3u8 +10 -0
  66. package/test/fixtures/integration/invalidMediaSequence.js +31 -0
  67. package/test/fixtures/integration/invalidMediaSequence.m3u8 +14 -0
  68. package/test/fixtures/integration/invalidPlaylistType.js +40 -0
  69. package/test/fixtures/integration/invalidPlaylistType.m3u8 +16 -0
  70. package/test/fixtures/integration/invalidTargetDuration.js +164 -0
  71. package/test/fixtures/integration/invalidTargetDuration.m3u8 +57 -0
  72. package/test/fixtures/integration/liveMissingSegmentDuration.js +25 -0
  73. package/test/fixtures/integration/liveMissingSegmentDuration.m3u8 +9 -0
  74. package/test/fixtures/integration/liveStart30sBefore.js +54 -0
  75. package/test/fixtures/integration/liveStart30sBefore.m3u8 +22 -0
  76. package/test/fixtures/integration/llhls-byte-range.js +253 -0
  77. package/test/fixtures/integration/llhls-byte-range.m3u8 +66 -0
  78. package/test/fixtures/integration/llhls-delta-byte-range.js +149 -0
  79. package/test/fixtures/integration/llhls-delta-byte-range.m3u8 +30 -0
  80. package/test/fixtures/integration/llhls.js +214 -0
  81. package/test/fixtures/integration/llhls.m3u8 +56 -0
  82. package/test/fixtures/integration/llhlsDelta.js +186 -0
  83. package/test/fixtures/integration/llhlsDelta.m3u8 +50 -0
  84. package/test/fixtures/integration/manifestExtTTargetdurationNegative.js +14 -0
  85. package/test/fixtures/integration/manifestExtTTargetdurationNegative.m3u8 +5 -0
  86. package/test/fixtures/integration/manifestExtXEndlistEarly.js +35 -0
  87. package/test/fixtures/integration/manifestExtXEndlistEarly.m3u8 +14 -0
  88. package/test/fixtures/integration/manifestNoExtM3u.js +15 -0
  89. package/test/fixtures/integration/manifestNoExtM3u.m3u8 +4 -0
  90. package/test/fixtures/integration/master-fmp4.js +465 -0
  91. package/test/fixtures/integration/master-fmp4.m3u8 +76 -0
  92. package/test/fixtures/integration/master.js +57 -0
  93. package/test/fixtures/integration/master.m3u8 +10 -0
  94. package/test/fixtures/integration/media.js +31 -0
  95. package/test/fixtures/integration/media.m3u8 +12 -0
  96. package/test/fixtures/integration/mediaSequence.js +31 -0
  97. package/test/fixtures/integration/mediaSequence.m3u8 +14 -0
  98. package/test/fixtures/integration/missingEndlist.js +19 -0
  99. package/test/fixtures/integration/missingEndlist.m3u8 +6 -0
  100. package/test/fixtures/integration/missingExtinf.js +27 -0
  101. package/test/fixtures/integration/missingExtinf.m3u8 +11 -0
  102. package/test/fixtures/integration/missingMediaSequence.js +31 -0
  103. package/test/fixtures/integration/missingMediaSequence.m3u8 +13 -0
  104. package/test/fixtures/integration/missingSegmentDuration.js +31 -0
  105. package/test/fixtures/integration/missingSegmentDuration.m3u8 +11 -0
  106. package/test/fixtures/integration/multipleAudioGroups.js +89 -0
  107. package/test/fixtures/integration/multipleAudioGroups.m3u8 +17 -0
  108. package/test/fixtures/integration/multipleAudioGroupsCombinedMain.js +88 -0
  109. package/test/fixtures/integration/multipleAudioGroupsCombinedMain.m3u8 +17 -0
  110. package/test/fixtures/integration/multipleTargetDurations.js +28 -0
  111. package/test/fixtures/integration/multipleTargetDurations.m3u8 +8 -0
  112. package/test/fixtures/integration/multipleVideo.js +74 -0
  113. package/test/fixtures/integration/multipleVideo.m3u8 +16 -0
  114. package/test/fixtures/integration/negativeMediaSequence.js +31 -0
  115. package/test/fixtures/integration/negativeMediaSequence.m3u8 +14 -0
  116. package/test/fixtures/integration/playlist.js +165 -0
  117. package/test/fixtures/integration/playlist.m3u8 +57 -0
  118. package/test/fixtures/integration/playlistMediaSequenceHigher.js +16 -0
  119. package/test/fixtures/integration/playlistMediaSequenceHigher.m3u8 +8 -0
  120. package/test/fixtures/integration/start.js +36 -0
  121. package/test/fixtures/integration/start.m3u8 +13 -0
  122. package/test/fixtures/integration/streamInfInvalid.js +24 -0
  123. package/test/fixtures/integration/streamInfInvalid.m3u8 +6 -0
  124. package/test/fixtures/integration/twoMediaSequences.js +31 -0
  125. package/test/fixtures/integration/twoMediaSequences.m3u8 +15 -0
  126. package/test/fixtures/integration/versionInvalid.js +16 -0
  127. package/test/fixtures/integration/versionInvalid.m3u8 +8 -0
  128. package/test/fixtures/integration/whiteSpace.js +31 -0
  129. package/test/fixtures/integration/whiteSpace.m3u8 +13 -0
  130. package/test/fixtures/integration/zeroDuration.js +16 -0
  131. package/test/fixtures/integration/zeroDuration.m3u8 +7 -0
  132. package/test/line-stream.test.js +80 -0
  133. package/test/parse-stream.test.js +903 -0
  134. package/test/parser.test.js +884 -0
@@ -0,0 +1,27 @@
1
+ module.exports = {
2
+ allowCache: false,
3
+ mediaSequence: 0,
4
+ playlistType: 'VOD',
5
+ segments: [
6
+ {
7
+ dateTimeString: '2016-06-22T09:20:16.166-04:00',
8
+ dateTimeObject: new Date('2016-06-22T09:20:16.166-04:00'),
9
+ duration: 10,
10
+ timeline: 0,
11
+ uri: 'hls_450k_video.ts'
12
+ },
13
+ {
14
+ dateTimeString: '2016-06-22T09:20:26.166-04:00',
15
+ dateTimeObject: new Date('2016-06-22T09:20:26.166-04:00'),
16
+ duration: 10,
17
+ timeline: 0,
18
+ uri: 'hls_450k_video.ts'
19
+ }
20
+ ],
21
+ targetDuration: 10,
22
+ endList: true,
23
+ dateTimeString: '2016-06-22T09:20:16.166-04:00',
24
+ dateTimeObject: new Date('2016-06-22T09:20:16.166-04:00'),
25
+ discontinuitySequence: 0,
26
+ discontinuityStarts: []
27
+ };
@@ -0,0 +1,12 @@
1
+ #EXTM3U
2
+ #EXT-X-PLAYLIST-TYPE:VOD
3
+ #EXT-X-MEDIA-SEQUENCE:0
4
+ #EXT-X-ALLOW-CACHE:NO
5
+ #EXT-X-TARGETDURATION:10
6
+ #EXT-X-PROGRAM-DATE-TIME:2016-06-22T09:20:16.166-04:00
7
+ #EXTINF:10
8
+ hls_450k_video.ts
9
+ #EXT-X-PROGRAM-DATE-TIME:2016-06-22T09:20:26.166-04:00
10
+ #EXTINF:10
11
+ hls_450k_video.ts
12
+ #EXT-X-ENDLIST
@@ -0,0 +1,164 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ discontinuitySequence: 0,
4
+ discontinuityStarts: [],
5
+ mediaSequence: 7794,
6
+ segments: [
7
+ {
8
+ duration: 2.833,
9
+ key: {
10
+ method: 'AES-128',
11
+ uri: 'https://priv.example.com/key.php?r=52'
12
+ },
13
+ map: {
14
+ key: {
15
+ method: 'AES-128',
16
+ uri: 'https://priv.example.com/key.php?r=52'
17
+ },
18
+ uri: 'http://media.example.com/init52.mp4'
19
+ },
20
+ timeline: 0,
21
+ uri: 'http://media.example.com/fileSequence52-A.m4s'
22
+ },
23
+ {
24
+ duration: 15,
25
+ key: {
26
+ method: 'AES-128',
27
+ uri: 'https://priv.example.com/key.php?r=52'
28
+ },
29
+ map: {
30
+ key: {
31
+ method: 'AES-128',
32
+ uri: 'https://priv.example.com/key.php?r=52'
33
+ },
34
+ uri: 'http://media.example.com/init52.mp4'
35
+ },
36
+ timeline: 0,
37
+ uri: 'http://media.example.com/fileSequence52-B.m4s'
38
+ },
39
+ {
40
+ duration: 13.333,
41
+ key: {
42
+ method: 'AES-128',
43
+ uri: 'https://priv.example.com/key.php?r=52'
44
+ },
45
+ map: {
46
+ key: {
47
+ method: 'AES-128',
48
+ uri: 'https://priv.example.com/key.php?r=52'
49
+ },
50
+ uri: 'http://media.example.com/init52.mp4'
51
+ },
52
+ timeline: 0,
53
+ uri: 'http://media.example.com/fileSequence52-C.m4s'
54
+ },
55
+ {
56
+ duration: 15,
57
+ key: {
58
+ method: 'AES-128',
59
+ uri: 'https://priv.example.com/key.php?r=53'
60
+ },
61
+ map: {
62
+ key: {
63
+ method: 'AES-128',
64
+ uri: 'https://priv.example.com/key.php?r=53'
65
+ },
66
+ uri: 'http://media.example.com/init53-A.mp4'
67
+ },
68
+ timeline: 0,
69
+ uri: 'http://media.example.com/fileSequence53-A.m4s'
70
+ },
71
+ {
72
+ duration: 14,
73
+ key: {
74
+ iv: new Uint32Array([0, 0, 331, 3063767524]),
75
+ method: 'AES-128',
76
+ uri: 'https://priv.example.com/key.php?r=53'
77
+ },
78
+ map: {
79
+ key: {
80
+ iv: new Uint32Array([0, 0, 331, 3063767524]),
81
+ method: 'AES-128',
82
+ uri: 'https://priv.example.com/key.php?r=53'
83
+ },
84
+ uri: 'http://media.example.com/init53-B.mp4'
85
+ },
86
+ timeline: 0,
87
+ uri: 'http://media.example.com/fileSequence53-B.m4s'
88
+ },
89
+ {
90
+ duration: 12,
91
+ key: {
92
+ method: 'AES-128',
93
+ uri: 'https://priv.example.com/key.php?r=54'
94
+ },
95
+ map: {
96
+ uri: 'http://media.example.com/init54-A.mp4'
97
+ },
98
+ timeline: 0,
99
+ uri: 'http://media.example.com/fileSequence54-A.m4s'
100
+ },
101
+ {
102
+ duration: 13,
103
+ key: {
104
+ method: 'AES-128',
105
+ uri: 'https://priv.example.com/key.php?r=54'
106
+ },
107
+ map: {
108
+ uri: 'http://media.example.com/init54-A.mp4'
109
+ },
110
+ timeline: 0,
111
+ uri: 'http://media.example.com/fileSequence54-B.m4s'
112
+ },
113
+ {
114
+ duration: 10,
115
+ map: {
116
+ key: {
117
+ method: 'AES-128',
118
+ uri: 'https://priv.example.com/key.php?r=54'
119
+ },
120
+ uri: 'http://media.example.com/init54-B.mp4'
121
+ },
122
+ timeline: 0,
123
+ uri: 'http://media.example.com/fileSequence54-A.m4s'
124
+ },
125
+ {
126
+ duration: 11,
127
+ map: {
128
+ key: {
129
+ method: 'AES-128',
130
+ uri: 'https://priv.example.com/key.php?r=54'
131
+ },
132
+ uri: 'http://media.example.com/init54-B.mp4'
133
+ },
134
+ timeline: 0,
135
+ uri: 'http://media.example.com/fileSequence54-B.m4s'
136
+ },
137
+ {
138
+ duration: 4,
139
+ key: {
140
+ method: 'AES-128',
141
+ uri: 'https://priv.example.com/key.php?r=54-b'
142
+ },
143
+ map: {
144
+ key: {
145
+ method: 'AES-128',
146
+ uri: 'https://priv.example.com/key.php?r=54-a'
147
+ },
148
+ uri: 'http://media.example.com/init54-D.mp4'
149
+ },
150
+ timeline: 0,
151
+ uri: 'http://media.example.com/fileSequence54-A.m4s'
152
+ },
153
+ {
154
+ duration: 12,
155
+ map: {
156
+ uri: 'http://media.example.com/init54-E.mp4'
157
+ },
158
+ timeline: 0,
159
+ uri: 'http://media.example.com/fileSequence54-A.m4s'
160
+ }
161
+ ],
162
+ targetDuration: 15,
163
+ version: 7
164
+ };
@@ -0,0 +1,57 @@
1
+ #EXTM3U
2
+ #EXT-X-VERSION:7
3
+ #EXT-X-MEDIA-SEQUENCE:7794
4
+ #EXT-X-TARGETDURATION:15
5
+
6
+ #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=52"
7
+ #EXT-X-MAP:URI="http://media.example.com/init52.mp4"
8
+
9
+ #EXTINF:2.833,
10
+ http://media.example.com/fileSequence52-A.m4s
11
+ #EXTINF:15.0,
12
+ http://media.example.com/fileSequence52-B.m4s
13
+ #EXTINF:13.333,
14
+ http://media.example.com/fileSequence52-C.m4s
15
+
16
+ #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=53"
17
+ #EXT-X-MAP:URI="http://media.example.com/init53-A.mp4"
18
+
19
+ #EXTINF:15.0,
20
+ http://media.example.com/fileSequence53-A.m4s
21
+
22
+ #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=53",IV=0x00000000000000000000014BB69D61E4
23
+ #EXT-X-MAP:URI="http://media.example.com/init53-B.mp4"
24
+
25
+ #EXTINF:14.0,
26
+ http://media.example.com/fileSequence53-B.m4s
27
+
28
+ #EXT-X-KEY:METHOD=NONE
29
+ #EXT-X-MAP:URI="http://media.example.com/init54-A.mp4"
30
+ #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=54"
31
+
32
+ #EXTINF:12.0,
33
+ http://media.example.com/fileSequence54-A.m4s
34
+ #EXTINF:13.0,
35
+ http://media.example.com/fileSequence54-B.m4s
36
+
37
+ #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=54"
38
+ #EXT-X-MAP:URI="http://media.example.com/init54-B.mp4"
39
+ #EXT-X-KEY:METHOD=NONE
40
+
41
+ #EXTINF:10.0,
42
+ http://media.example.com/fileSequence54-A.m4s
43
+ #EXTINF:11.0,
44
+ http://media.example.com/fileSequence54-B.m4s
45
+
46
+ #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=54-a"
47
+ #EXT-X-MAP:URI="http://media.example.com/init54-D.mp4"
48
+ #EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=54-b"
49
+
50
+ #EXTINF:4.0,
51
+ http://media.example.com/fileSequence54-A.m4s
52
+
53
+ #EXT-X-KEY:METHOD=NONE
54
+ #EXT-X-MAP:URI="http://media.example.com/init54-E.mp4"
55
+
56
+ #EXTINF:12.0,
57
+ http://media.example.com/fileSequence54-A.m4s
@@ -0,0 +1,21 @@
1
+ module.exports = {
2
+ allowCache: false,
3
+ mediaSequence: 0,
4
+ playlistType: 'VOD',
5
+ segments: [
6
+ {
7
+ byterange: {
8
+ length: 522828,
9
+ offset: 0
10
+ },
11
+ duration: 10,
12
+ timeline: 0,
13
+ uri: 'hls_450k_video.ts'
14
+ }
15
+ ],
16
+ targetDuration: 10,
17
+ endList: true,
18
+ discontinuitySequence: 0,
19
+ discontinuityStarts: [],
20
+ version: 4
21
+ };
@@ -0,0 +1,10 @@
1
+ #EXTM3U
2
+ #EXT-X-TARGETDURATION:10
3
+ #EXT-X-VERSION:4
4
+ #EXT-X-ALLOW-CACHE:NO
5
+ #EXT-X-MEDIA-SEQUENCE:0
6
+ #EXT-X-PLAYLIST-TYPE:VOD
7
+ #EXTINF:10,
8
+ #EXT-X-BYTERANGE:522828@0
9
+ hls_450k_video.ts
10
+ #EXT-X-ENDLIST
@@ -0,0 +1,32 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ mediaSequence: 0,
4
+ discontinuitySequence: 3,
5
+ segments: [
6
+ {
7
+ duration: 10,
8
+ timeline: 3,
9
+ uri: '001.ts'
10
+ },
11
+ {
12
+ duration: 19,
13
+ timeline: 3,
14
+ uri: '002.ts'
15
+ },
16
+ {
17
+ discontinuity: true,
18
+ duration: 10,
19
+ timeline: 4,
20
+ uri: '003.ts'
21
+ },
22
+ {
23
+ duration: 11,
24
+ timeline: 4,
25
+ uri: '004.ts'
26
+ }
27
+ ],
28
+ targetDuration: 19,
29
+ endList: true,
30
+ discontinuityStarts: [2],
31
+ version: 3
32
+ };
@@ -0,0 +1,15 @@
1
+ #EXTM3U
2
+ #EXT-X-VERSION:3
3
+ #EXT-X-TARGETDURATION:19
4
+ #EXT-X-MEDIA-SEQUENCE:0
5
+ #EXT-X-DISCONTINUITY-SEQUENCE:3
6
+ #EXTINF:10,0
7
+ 001.ts
8
+ #EXTINF:19,0
9
+ 002.ts
10
+ #EXT-X-DISCONTINUITY
11
+ #EXTINF:10,0
12
+ 003.ts
13
+ #EXTINF:11,0
14
+ 004.ts
15
+ #EXT-X-ENDLIST
@@ -0,0 +1,59 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ mediaSequence: 0,
4
+ discontinuitySequence: 0,
5
+ segments: [
6
+ {
7
+ duration: 10,
8
+ timeline: 0,
9
+ uri: '001.ts'
10
+ },
11
+ {
12
+ duration: 19,
13
+ timeline: 0,
14
+ uri: '002.ts'
15
+ },
16
+ {
17
+ discontinuity: true,
18
+ duration: 10,
19
+ timeline: 1,
20
+ uri: '003.ts'
21
+ },
22
+ {
23
+ duration: 11,
24
+ timeline: 1,
25
+ uri: '004.ts'
26
+ },
27
+ {
28
+ discontinuity: true,
29
+ duration: 10,
30
+ timeline: 2,
31
+ uri: '005.ts'
32
+ },
33
+ {
34
+ duration: 10,
35
+ timeline: 2,
36
+ uri: '006.ts'
37
+ },
38
+ {
39
+ duration: 10,
40
+ timeline: 2,
41
+ uri: '007.ts'
42
+ },
43
+ {
44
+ discontinuity: true,
45
+ duration: 10,
46
+ timeline: 3,
47
+ uri: '008.ts'
48
+ },
49
+ {
50
+ duration: 16,
51
+ timeline: 3,
52
+ uri: '009.ts'
53
+ }
54
+ ],
55
+ targetDuration: 19,
56
+ endList: true,
57
+ discontinuityStarts: [2, 4, 7],
58
+ version: 3
59
+ };
@@ -0,0 +1,26 @@
1
+ #EXTM3U
2
+ #EXT-X-VERSION:3
3
+ #EXT-X-TARGETDURATION:19
4
+ #EXT-X-MEDIA-SEQUENCE:0
5
+ #EXTINF:10,0
6
+ 001.ts
7
+ #EXTINF:19,0
8
+ 002.ts
9
+ #EXT-X-DISCONTINUITY
10
+ #EXTINF:10,0
11
+ 003.ts
12
+ #EXTINF:11,0
13
+ 004.ts
14
+ #EXT-X-DISCONTINUITY
15
+ #EXTINF:10,0
16
+ 005.ts
17
+ #EXTINF:10,0
18
+ 006.ts
19
+ #EXTINF:10,0
20
+ 007.ts
21
+ #EXT-X-DISCONTINUITY
22
+ #EXTINF:10,0
23
+ 008.ts
24
+ #EXTINF:16,0
25
+ 009.ts
26
+ #EXT-X-ENDLIST
@@ -0,0 +1,31 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ mediaSequence: 0,
4
+ playlistType: 'VOD',
5
+ segments: [
6
+ {
7
+ duration: 10,
8
+ timeline: 0,
9
+ uri: '/00001.ts'
10
+ },
11
+ {
12
+ duration: 10,
13
+ timeline: 0,
14
+ uri: '/subdir/00002.ts'
15
+ },
16
+ {
17
+ duration: 10,
18
+ timeline: 0,
19
+ uri: '/00003.ts'
20
+ },
21
+ {
22
+ duration: 10,
23
+ timeline: 0,
24
+ uri: '/00004.ts'
25
+ }
26
+ ],
27
+ targetDuration: 10,
28
+ endList: true,
29
+ discontinuitySequence: 0,
30
+ discontinuityStarts: []
31
+ };
@@ -0,0 +1,12 @@
1
+ #EXTM3U
2
+ #EXT-X-PLAYLIST-TYPE:VOD
3
+ #EXT-X-TARGETDURATION:10
4
+ #EXTINF:10,
5
+ /00001.ts
6
+ #EXTINF:10,
7
+ /subdir/00002.ts
8
+ #EXTINF:10,
9
+ /00003.ts
10
+ #EXTINF:10,
11
+ /00004.ts
12
+ #EXT-X-ENDLIST
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ discontinuityStarts: [],
4
+ segments: []
5
+ };
File without changes
@@ -0,0 +1,21 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ mediaSequence: 0,
4
+ playlistType: 'VOD',
5
+ segments: [
6
+ {
7
+ byterange: {
8
+ length: 522828,
9
+ offset: 0
10
+ },
11
+ duration: 10,
12
+ timeline: 0,
13
+ uri: 'hls_450k_video.ts'
14
+ }
15
+ ],
16
+ targetDuration: 10,
17
+ endList: true,
18
+ discontinuitySequence: 0,
19
+ discontinuityStarts: [],
20
+ version: 4
21
+ };
@@ -0,0 +1,10 @@
1
+ #EXTM3U
2
+ #EXT-X-TARGETDURATION:10
3
+ #EXT-X-VERSION:4
4
+ #EXT-X-ALLOW-CACHE:
5
+ #EXT-X-MEDIA-SEQUENCE:0
6
+ #EXT-X-PLAYLIST-TYPE:VOD
7
+ #EXTINF:10,
8
+ #EXT-X-BYTERANGE:522828@0
9
+ hls_450k_video.ts
10
+ #EXT-X-ENDLIST
@@ -0,0 +1,31 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ mediaSequence: 0,
4
+ playlistType: 'VOD',
5
+ segments: [
6
+ {
7
+ duration: 6.64,
8
+ timeline: 0,
9
+ uri: '/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts'
10
+ },
11
+ {
12
+ duration: 6.08,
13
+ timeline: 0,
14
+ uri: '/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts'
15
+ },
16
+ {
17
+ duration: 6.6,
18
+ timeline: 0,
19
+ uri: '/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts'
20
+ },
21
+ {
22
+ duration: 5,
23
+ timeline: 0,
24
+ uri: '/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts'
25
+ }
26
+ ],
27
+ targetDuration: 8,
28
+ endList: true,
29
+ discontinuitySequence: 0,
30
+ discontinuityStarts: []
31
+ };
@@ -0,0 +1,14 @@
1
+ #EXTM3U
2
+ #EXT-X-PLAYLIST-TYPE:VOD
3
+ #EXT-X-MEDIA-SEQUENCE:
4
+ #EXT-X-ALLOW-CACHE:YES
5
+ #EXT-X-TARGETDURATION:8
6
+ #EXTINF:6.640,{}
7
+ /test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts
8
+ #EXTINF:6.080,{}
9
+ /test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts
10
+ #EXTINF:6.600,{}
11
+ /test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts
12
+ #EXTINF:5.000,{}
13
+ /test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts
14
+ #EXT-X-ENDLIST
@@ -0,0 +1,40 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ mediaSequence: 0,
4
+ segments: [
5
+ {
6
+ duration: 10,
7
+ timeline: 0,
8
+ uri: '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts'
9
+ },
10
+ {
11
+ duration: 10,
12
+ timeline: 0,
13
+ uri: '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts'
14
+ },
15
+ {
16
+ duration: 10,
17
+ timeline: 0,
18
+ uri: '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts'
19
+ },
20
+ {
21
+ duration: 10,
22
+ timeline: 0,
23
+ uri: '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts'
24
+ },
25
+ {
26
+ duration: 10,
27
+ timeline: 0,
28
+ uri: '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts'
29
+ },
30
+ {
31
+ duration: 8,
32
+ timeline: 0,
33
+ uri: '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts'
34
+ }
35
+ ],
36
+ targetDuration: 10,
37
+ endList: true,
38
+ discontinuitySequence: 0,
39
+ discontinuityStarts: []
40
+ };
@@ -0,0 +1,16 @@
1
+ #EXTM3U
2
+ #EXT-X-PLAYLIST-TYPE:
3
+ #EXT-X-TARGETDURATION:10
4
+ #EXTINF:10,
5
+ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts
6
+ #EXTINF:10,
7
+ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts
8
+ #EXTINF:10,
9
+ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts
10
+ #EXTINF:10,
11
+ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts
12
+ #EXTINF:10,
13
+ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts
14
+ #EXTINF:8,
15
+ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts
16
+ #EXT-X-ENDLIST
@@ -0,0 +1,57 @@
1
+ module.exports = {
2
+ allowCache: true,
3
+ playlists: [
4
+ {
5
+ attributes: {
6
+ 'PROGRAM-ID': 1,
7
+ 'BANDWIDTH': 240000,
8
+ 'RESOLUTION': {
9
+ width: 396,
10
+ height: 224
11
+ }
12
+ },
13
+ timeline: 0,
14
+ uri: 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686811001&videoId=1824650741001'
15
+ },
16
+ {
17
+ attributes: {
18
+ 'PROGRAM-ID': 1,
19
+ 'BANDWIDTH': 40000
20
+ },
21
+ timeline: 0,
22
+ uri: 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824683759001&videoId=1824650741001'
23
+ },
24
+ {
25
+ attributes: {
26
+ 'PROGRAM-ID': 1,
27
+ 'BANDWIDTH': 440000,
28
+ 'RESOLUTION': {
29
+ width: 396,
30
+ height: 224
31
+ }
32
+ },
33
+ timeline: 0,
34
+ uri: 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824686593001&videoId=1824650741001'
35
+ },
36
+ {
37
+ attributes: {
38
+ 'PROGRAM-ID': 1,
39
+ 'BANDWIDTH': 1928000,
40
+ 'RESOLUTION': {
41
+ width: 960,
42
+ height: 540
43
+ }
44
+ },
45
+ timeline: 0,
46
+ uri: 'http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=1824687660001&videoId=1824650741001'
47
+ }
48
+ ],
49
+ discontinuityStarts: [],
50
+ mediaGroups: {
51
+ 'VIDEO': {},
52
+ 'AUDIO': {},
53
+ 'CLOSED-CAPTIONS': {},
54
+ 'SUBTITLES': {}
55
+ },
56
+ segments: []
57
+ };