shaka-player 4.5.0 → 4.6.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/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/AUTHORS +2 -0
- package/CHANGELOG.md +109 -0
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTORS +2 -0
- package/README.md +38 -32
- package/demo/common/asset.js +11 -17
- package/demo/common/assets.js +117 -11
- package/demo/config.js +28 -1
- package/demo/custom.js +52 -38
- package/demo/main.js +11 -3
- package/demo/search.js +7 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +133 -124
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +133 -124
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +20 -18
- package/dist/locales.js +34 -30
- package/dist/receiver.compiled.debug.js +58 -50
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +58 -50
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +440 -390
- package/dist/shaka-player.compiled.debug.d.ts +440 -390
- package/dist/shaka-player.compiled.debug.externs.js +162 -77
- package/dist/shaka-player.compiled.debug.js +789 -738
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +162 -77
- package/dist/shaka-player.compiled.js +1147 -1113
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +491 -437
- package/dist/shaka-player.ui.debug.d.ts +491 -437
- package/dist/shaka-player.ui.debug.externs.js +167 -77
- package/dist/shaka-player.ui.debug.js +857 -791
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +167 -77
- package/dist/shaka-player.ui.js +1359 -1314
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ad_monetization.md +54 -0
- package/docs/tutorials/basic-usage.md +2 -1
- package/docs/tutorials/errors.md +2 -1
- package/docs/tutorials/offline.md +10 -8
- package/docs/tutorials/plugins.md +5 -0
- package/docs/tutorials/ui-customization.md +13 -0
- package/docs/tutorials/ui.md +2 -1
- package/docs/tutorials/upgrade.md +3 -0
- package/externs/managedmediasource.js +24 -0
- package/externs/shaka/abr_manager.js +6 -2
- package/externs/shaka/cea.js +7 -0
- package/externs/shaka/codecs.js +5 -3
- package/externs/shaka/manifest.js +21 -5
- package/externs/shaka/manifest_parser.js +17 -0
- package/externs/shaka/net.js +2 -2
- package/externs/shaka/offline.js +9 -2
- package/externs/shaka/player.js +53 -7
- package/externs/shaka/text.js +3 -1
- package/externs/shaka/transmuxer.js +1 -1
- package/lib/abr/simple_abr_manager.js +25 -8
- package/lib/ads/media_tailor_ad_manager.js +14 -3
- package/lib/cast/cast_receiver.js +1 -1
- package/lib/cea/cea_decoder.js +28 -0
- package/lib/cea/dummy_caption_decoder.js +5 -0
- package/lib/dash/dash_parser.js +251 -84
- package/lib/dash/mpd_utils.js +52 -31
- package/lib/dash/segment_base.js +4 -5
- package/lib/dash/segment_list.js +5 -4
- package/lib/dash/segment_template.js +92 -29
- package/lib/hls/hls_classes.js +28 -43
- package/lib/hls/hls_parser.js +770 -652
- package/lib/hls/hls_utils.js +64 -5
- package/lib/hls/manifest_text_parser.js +7 -11
- package/lib/media/adaptation_set.js +20 -13
- package/lib/media/adaptation_set_criteria.js +70 -18
- package/lib/media/closed_caption_parser.js +13 -0
- package/lib/media/content_workarounds.js +6 -0
- package/lib/media/drm_engine.js +8 -13
- package/lib/media/manifest_parser.js +8 -113
- package/lib/media/media_source_capabilities.js +10 -3
- package/lib/media/media_source_engine.js +75 -21
- package/lib/media/play_rate_controller.js +8 -38
- package/lib/media/presentation_timeline.js +7 -1
- package/lib/media/quality_observer.js +1 -1
- package/lib/media/segment_index.js +5 -5
- package/lib/media/segment_prefetch.js +92 -24
- package/lib/media/segment_reference.js +67 -1
- package/lib/media/segment_utils.js +343 -0
- package/lib/media/stall_detector.js +0 -3
- package/lib/media/streaming_engine.js +72 -44
- package/lib/mss/mss_parser.js +18 -2
- package/lib/net/networking_engine.js +66 -12
- package/lib/net/networking_utils.js +95 -0
- package/lib/offline/indexeddb/v1_storage_cell.js +2 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +2 -0
- package/lib/offline/manifest_converter.js +2 -0
- package/lib/offline/offline_manifest_parser.js +10 -0
- package/lib/offline/storage.js +11 -7
- package/lib/player.js +998 -1503
- package/lib/polyfill/mediasource.js +22 -1
- package/lib/text/mp4_ttml_parser.js +2 -2
- package/lib/text/srt_text_parser.js +2 -2
- package/lib/text/stub_text_displayer.js +51 -0
- package/lib/text/text_engine.js +3 -2
- package/lib/text/ttml_text_parser.js +28 -5
- package/lib/text/ui_text_displayer.js +4 -0
- package/lib/text/vtt_text_parser.js +7 -2
- package/lib/transmuxer/aac_transmuxer.js +1 -1
- package/lib/transmuxer/ac3_transmuxer.js +1 -1
- package/lib/transmuxer/ec3_transmuxer.js +1 -1
- package/lib/transmuxer/h264.js +5 -4
- package/lib/transmuxer/h265.js +5 -4
- package/lib/transmuxer/mp3_transmuxer.js +1 -1
- package/lib/transmuxer/mpeg_ts_transmuxer.js +1 -1
- package/lib/transmuxer/mss_transmuxer.js +1 -1
- package/lib/transmuxer/ts_transmuxer.js +33 -13
- package/lib/util/buffer_utils.js +26 -4
- package/lib/util/content_steering_manager.js +358 -0
- package/lib/util/error.js +2 -6
- package/lib/util/fairplay_utils.js +1 -1
- package/lib/util/fake_event.js +5 -1
- package/lib/util/id3_utils.js +50 -1
- package/lib/util/manifest_parser_utils.js +12 -8
- package/lib/util/mp4_generator.js +2 -4
- package/lib/util/mutex.js +59 -0
- package/lib/util/object_utils.js +1 -1
- package/lib/util/periods.js +154 -179
- package/lib/util/platform.js +4 -3
- package/lib/util/player_configuration.js +35 -6
- package/lib/util/stream_utils.js +105 -98
- package/lib/util/ts_parser.js +124 -73
- package/lib/util/uint8array_utils.js +5 -1
- package/lib/util/xml_utils.js +5 -0
- package/maintained-branches.md +2 -2
- package/package.json +1 -1
- package/roadmap.md +15 -5
- package/shaka-player.uncompiled.js +0 -1
- package/test/abr/simple_abr_manager_unit.js +33 -33
- package/test/ads/ad_manager_unit.js +3 -2
- package/test/cast/cast_receiver_integration.js +3 -4
- package/test/cast/cast_utils_unit.js +2 -0
- package/test/cea/cea_decoder_unit.js +7 -0
- package/test/codec_switching/codec_switching_integration.js +2 -1
- package/test/dash/dash_parser_integration.js +2 -1
- package/test/dash/dash_parser_live_unit.js +0 -19
- package/test/dash/dash_parser_manifest_unit.js +494 -2
- package/test/dash/mpd_utils_unit.js +61 -30
- package/test/hls/hls_live_unit.js +12 -3
- package/test/hls/hls_parser_unit.js +417 -27
- package/test/hls/manifest_text_parser_unit.js +32 -99
- package/test/media/adaptation_set_criteria_unit.js +172 -21
- package/test/media/adaptation_set_unit.js +1 -0
- package/test/media/content_workarounds_unit.js +1 -1
- package/test/media/drm_engine_unit.js +3 -3
- package/test/media/media_source_engine_unit.js +1 -1
- package/test/media/play_rate_controller_unit.js +0 -48
- package/test/media/segment_index_unit.js +2 -1
- package/test/mss/mss_player_integration.js +3 -2
- package/test/net/networking_engine_unit.js +3 -3
- package/test/{media/manifest_parser_unit.js → net/networking_utils_unit.js} +2 -2
- package/test/offline/manifest_convert_unit.js +9 -0
- package/test/offline/offline_integration.js +2 -1
- package/test/offline/storage_integration.js +21 -9
- package/test/player_external.js +4 -2
- package/test/player_integration.js +15 -4
- package/test/player_load_graph_integration.js +47 -151
- package/test/player_src_equals_external.js +1 -0
- package/test/player_src_equals_integration.js +71 -4
- package/test/player_unit.js +80 -27
- package/test/test/util/fake_media_source_engine.js +5 -0
- package/test/test/util/fake_networking_engine.js +9 -1
- package/test/test/util/fake_segment_prefetch.js +3 -0
- package/test/test/util/manifest_generator.js +4 -0
- package/test/test/util/manifest_parser_util.js +14 -2
- package/test/test/util/offline_utils.js +1 -0
- package/test/test/util/simple_fakes.js +2 -2
- package/test/test/util/streaming_engine_util.js +3 -0
- package/test/test/util/test_scheme.js +6 -0
- package/test/test/util/ui_utils.js +4 -3
- package/test/text/mp4_ttml_parser_unit.js +4 -4
- package/test/text/srt_text_parser_unit.js +1 -1
- package/test/text/text_displayer_layout_unit.js +1 -1
- package/test/text/text_engine_unit.js +6 -0
- package/test/text/ttml_text_parser_unit.js +33 -2
- package/test/transmuxer/transmuxer_engine_integration.js +9 -0
- package/test/transmuxer/transmuxer_integration.js +33 -3
- package/test/ui/ad_ui_unit.js +2 -2
- package/test/ui/ui_customization_unit.js +17 -16
- package/test/ui/ui_integration.js +30 -20
- package/test/ui/ui_unit.js +25 -19
- package/test/util/buffer_utils_unit.js +1 -1
- package/test/util/content_steering_manager_unit.js +427 -0
- package/test/util/id3_utils_unit.js +52 -0
- package/test/util/stream_utils_unit.js +17 -113
- package/test/util/ts_parser_unit.js +3 -3
- package/third_party/closure-uri/uri.js +13 -1
- package/ui/audio_language_selection.js +9 -2
- package/ui/externs/ui.js +17 -2
- package/ui/language_utils.js +43 -8
- package/ui/less/range_elements.less +33 -0
- package/ui/locales/en.json +1 -0
- package/ui/locales/es-419.json +1 -0
- package/ui/locales/es.json +1 -0
- package/ui/locales/source.json +4 -0
- package/ui/localization.js +10 -0
- package/ui/remote_button.js +3 -1
- package/ui/resolution_selection.js +47 -10
- package/ui/seek_bar.js +296 -3
- package/ui/text_selection.js +2 -1
- package/ui/ui.js +6 -2
- package/lib/routing/node.js +0 -23
- package/lib/routing/payload.js +0 -47
- package/lib/routing/walker.js +0 -587
- package/test/routing/walker_unit.js +0 -505
|
@@ -12,18 +12,20 @@ describe('MpdUtils', () => {
|
|
|
12
12
|
expect(
|
|
13
13
|
MpdUtils.fillUriTemplate(
|
|
14
14
|
'/example/$RepresentationID$.mp4',
|
|
15
|
-
'100', null, null, null).toString())
|
|
15
|
+
'100', null, null, null, null).toString())
|
|
16
|
+
.toBe('/example/100.mp4');
|
|
16
17
|
|
|
17
18
|
// RepresentationID cannot use a width specifier.
|
|
18
19
|
expect(
|
|
19
20
|
MpdUtils.fillUriTemplate(
|
|
20
21
|
'/example/$RepresentationID%01d$.mp4',
|
|
21
|
-
'100', null, null, null).toString())
|
|
22
|
+
'100', null, null, null, null).toString())
|
|
23
|
+
.toBe('/example/100.mp4');
|
|
22
24
|
|
|
23
25
|
expect(
|
|
24
26
|
MpdUtils.fillUriTemplate(
|
|
25
27
|
'/example/$RepresentationID$.mp4',
|
|
26
|
-
null, null, null, null).toString())
|
|
28
|
+
null, null, null, null, null).toString())
|
|
27
29
|
.toBe('/example/$RepresentationID$.mp4');
|
|
28
30
|
});
|
|
29
31
|
|
|
@@ -31,35 +33,59 @@ describe('MpdUtils', () => {
|
|
|
31
33
|
expect(
|
|
32
34
|
MpdUtils.fillUriTemplate(
|
|
33
35
|
'/example/$Number$.mp4',
|
|
34
|
-
null, 100, null, null).toString())
|
|
36
|
+
null, 100, null, null, null).toString())
|
|
37
|
+
.toBe('/example/100.mp4');
|
|
35
38
|
|
|
36
39
|
expect(
|
|
37
40
|
MpdUtils.fillUriTemplate(
|
|
38
41
|
'/example/$Number%05d$.mp4',
|
|
39
|
-
null, 100, null, null).toString())
|
|
42
|
+
null, 100, null, null, null).toString())
|
|
43
|
+
.toBe('/example/00100.mp4');
|
|
40
44
|
|
|
41
45
|
expect(
|
|
42
46
|
MpdUtils.fillUriTemplate(
|
|
43
47
|
'/example/$Number$.mp4',
|
|
44
|
-
null, null, null, null).toString())
|
|
48
|
+
null, null, null, null, null).toString())
|
|
45
49
|
.toBe('/example/$Number$.mp4');
|
|
46
50
|
});
|
|
47
51
|
|
|
52
|
+
it('handles a single SubNumber identifier', () => {
|
|
53
|
+
expect(
|
|
54
|
+
MpdUtils.fillUriTemplate(
|
|
55
|
+
'/example/$SubNumber$.mp4',
|
|
56
|
+
null, null, 100, null, null).toString())
|
|
57
|
+
.toBe('/example/100.mp4');
|
|
58
|
+
|
|
59
|
+
expect(
|
|
60
|
+
MpdUtils.fillUriTemplate(
|
|
61
|
+
'/example/$SubNumber%05d$.mp4',
|
|
62
|
+
null, null, 100, null, null).toString())
|
|
63
|
+
.toBe('/example/00100.mp4');
|
|
64
|
+
|
|
65
|
+
expect(
|
|
66
|
+
MpdUtils.fillUriTemplate(
|
|
67
|
+
'/example/$SubNumber$.mp4',
|
|
68
|
+
null, null, null, null, null).toString())
|
|
69
|
+
.toBe('/example/$SubNumber$.mp4');
|
|
70
|
+
});
|
|
71
|
+
|
|
48
72
|
it('handles a single Bandwidth identifier', () => {
|
|
49
73
|
expect(
|
|
50
74
|
MpdUtils.fillUriTemplate(
|
|
51
75
|
'/example/$Bandwidth$.mp4',
|
|
52
|
-
null, null, 100, null).toString())
|
|
76
|
+
null, null, null, 100, null).toString())
|
|
77
|
+
.toBe('/example/100.mp4');
|
|
53
78
|
|
|
54
79
|
expect(
|
|
55
80
|
MpdUtils.fillUriTemplate(
|
|
56
81
|
'/example/$Bandwidth%05d$.mp4',
|
|
57
|
-
null, null, 100, null).toString())
|
|
82
|
+
null, null, null, 100, null).toString())
|
|
83
|
+
.toBe('/example/00100.mp4');
|
|
58
84
|
|
|
59
85
|
expect(
|
|
60
86
|
MpdUtils.fillUriTemplate(
|
|
61
87
|
'/example/$Bandwidth$.mp4',
|
|
62
|
-
null, null, null, null).toString())
|
|
88
|
+
null, null, null, null, null).toString())
|
|
63
89
|
.toBe('/example/$Bandwidth$.mp4');
|
|
64
90
|
});
|
|
65
91
|
|
|
@@ -67,17 +93,19 @@ describe('MpdUtils', () => {
|
|
|
67
93
|
expect(
|
|
68
94
|
MpdUtils.fillUriTemplate(
|
|
69
95
|
'/example/$Time$.mp4',
|
|
70
|
-
null, null, null, 100).toString())
|
|
96
|
+
null, null, null, null, 100).toString())
|
|
97
|
+
.toBe('/example/100.mp4');
|
|
71
98
|
|
|
72
99
|
expect(
|
|
73
100
|
MpdUtils.fillUriTemplate(
|
|
74
101
|
'/example/$Time%05d$.mp4',
|
|
75
|
-
null, null, null, 100).toString())
|
|
102
|
+
null, null, null, null, 100).toString())
|
|
103
|
+
.toBe('/example/00100.mp4');
|
|
76
104
|
|
|
77
105
|
expect(
|
|
78
106
|
MpdUtils.fillUriTemplate(
|
|
79
107
|
'/example/$Time$.mp4',
|
|
80
|
-
null, null, null, null).toString())
|
|
108
|
+
null, null, null, null, null).toString())
|
|
81
109
|
.toBe('/example/$Time$.mp4');
|
|
82
110
|
});
|
|
83
111
|
|
|
@@ -85,68 +113,70 @@ describe('MpdUtils', () => {
|
|
|
85
113
|
expect(
|
|
86
114
|
MpdUtils.fillUriTemplate(
|
|
87
115
|
'/example/$Time$.mp4',
|
|
88
|
-
null, null, null, 100.0001).toString())
|
|
116
|
+
null, null, null, null, 100.0001).toString())
|
|
117
|
+
.toBe('/example/100.mp4');
|
|
89
118
|
|
|
90
119
|
expect(
|
|
91
120
|
MpdUtils.fillUriTemplate(
|
|
92
121
|
'/example/$Time%05d$.mp4',
|
|
93
|
-
null, null, null, 99.9999).toString())
|
|
122
|
+
null, null, null, null, 99.9999).toString())
|
|
123
|
+
.toBe('/example/00100.mp4');
|
|
94
124
|
});
|
|
95
125
|
|
|
96
126
|
it('handles multiple identifiers', () => {
|
|
97
127
|
expect(
|
|
98
128
|
MpdUtils.fillUriTemplate(
|
|
99
|
-
'/example/$RepresentationID$_$Number$_$Bandwidth$_$Time$.mp4',
|
|
100
|
-
'1', 2, 3, 4).toString()).toBe('/example/
|
|
129
|
+
'/example/$RepresentationID$_$Number$_$SubNumber$_$Bandwidth$_$Time$.mp4', // eslint-disable-line max-len
|
|
130
|
+
'1', 2, 3, 4, 5).toString()).toBe('/example/1_2_3_4_5.mp4');
|
|
101
131
|
|
|
102
132
|
// No spaces.
|
|
103
133
|
expect(
|
|
104
134
|
MpdUtils.fillUriTemplate(
|
|
105
|
-
'/example/$RepresentationID$$Number$$Bandwidth$$Time$.mp4',
|
|
106
|
-
'1', 2, 3, 4).toString()).toBe('/example/
|
|
135
|
+
'/example/$RepresentationID$$Number$$SubNumber$$Bandwidth$$Time$.mp4', // eslint-disable-line max-len
|
|
136
|
+
'1', 2, 3, 4, 5).toString()).toBe('/example/12345.mp4');
|
|
107
137
|
|
|
108
138
|
// Different order.
|
|
109
139
|
expect(
|
|
110
140
|
MpdUtils.fillUriTemplate(
|
|
111
|
-
'/example/$Bandwidth$_$Time$_$RepresentationID$_$Number$.mp4',
|
|
112
|
-
'1', 2, 3, 4).toString()).toBe('/example/
|
|
141
|
+
'/example/$SubNumber$_$Bandwidth$_$Time$_$RepresentationID$_$Number$.mp4', // eslint-disable-line max-len
|
|
142
|
+
'1', 2, 3, 4, 5).toString()).toBe('/example/3_4_5_1_2.mp4');
|
|
113
143
|
|
|
114
144
|
// Single width.
|
|
115
145
|
expect(
|
|
116
146
|
MpdUtils.fillUriTemplate(
|
|
117
|
-
'$RepresentationID$_$Number%01d$_$Bandwidth%01d$_$Time%01d$',
|
|
118
|
-
'1', 2, 3,
|
|
147
|
+
'$RepresentationID$_$Number%01d$_$SubNumber%01d$_$Bandwidth%01d$_$Time%01d$', // eslint-disable-line max-len
|
|
148
|
+
'1', 2, 3, 4, 500).toString()).toBe('1_2_3_4_500');
|
|
119
149
|
|
|
120
150
|
// Different widths.
|
|
121
151
|
expect(
|
|
122
152
|
MpdUtils.fillUriTemplate(
|
|
123
|
-
'$RepresentationID$_$Number%02d$_$Bandwidth%02d$_$Time%02d$',
|
|
124
|
-
'1', 2, 3, 4).toString()).toBe('
|
|
153
|
+
'$RepresentationID$_$Number%02d$_$SubNumber%02d$_$Bandwidth%02d$_$Time%02d$', // eslint-disable-line max-len
|
|
154
|
+
'1', 2, 3, 4, 5).toString()).toBe('1_02_03_04_05');
|
|
125
155
|
|
|
126
156
|
// Double $$.
|
|
127
157
|
expect(
|
|
128
158
|
MpdUtils.fillUriTemplate(
|
|
129
|
-
'$$/$RepresentationID$$$$Number$$$$Bandwidth$$$$Time$$$.$$',
|
|
130
|
-
'1', 2, 3, 4).toString()).toBe('$/1$2$3$4$.$');
|
|
159
|
+
'$$/$RepresentationID$$$$Number$$$$SubNumber$$$$Bandwidth$$$$Time$$$.$$', // eslint-disable-line max-len
|
|
160
|
+
'1', 2, 3, 4, 5).toString()).toBe('$/1$2$3$4$5$.$');
|
|
131
161
|
});
|
|
132
162
|
|
|
133
163
|
it('handles invalid identifiers', () => {
|
|
134
164
|
expect(
|
|
135
165
|
MpdUtils.fillUriTemplate(
|
|
136
166
|
'/example/$Garbage$.mp4',
|
|
137
|
-
'1', 2, 3, 4).toString()).toBe('/example/$Garbage$.mp4');
|
|
167
|
+
'1', 2, 3, 4, 5).toString()).toBe('/example/$Garbage$.mp4');
|
|
138
168
|
|
|
139
169
|
expect(
|
|
140
170
|
MpdUtils.fillUriTemplate(
|
|
141
171
|
'/example/$Time.mp4',
|
|
142
|
-
'1', 2, 3, 4).toString()).toBe('/example/$Time.mp4');
|
|
172
|
+
'1', 2, 3, 4, 5).toString()).toBe('/example/$Time.mp4');
|
|
143
173
|
});
|
|
144
174
|
|
|
145
175
|
it('handles non-decimal format specifiers', () => {
|
|
146
176
|
expect(
|
|
147
177
|
MpdUtils.fillUriTemplate(
|
|
148
178
|
'/$Number%05x$_$Number%01X$_$Number%01u$_$Number%01o$.mp4',
|
|
149
|
-
'', 180, 0, 0).toString()).toBe('/000b4_B4_180_264.mp4');
|
|
179
|
+
'', 180, 0, 0, 0).toString()).toBe('/000b4_B4_180_264.mp4');
|
|
150
180
|
});
|
|
151
181
|
});
|
|
152
182
|
|
|
@@ -429,7 +459,8 @@ describe('MpdUtils', () => {
|
|
|
429
459
|
console.assert(segmentTimeline);
|
|
430
460
|
|
|
431
461
|
const timeline = MpdUtils.createTimeline(
|
|
432
|
-
segmentTimeline, timescale, presentationTimeOffset,
|
|
462
|
+
segmentTimeline, timescale, presentationTimeOffset,
|
|
463
|
+
periodDuration, 0);
|
|
433
464
|
expect(timeline).toEqual(
|
|
434
465
|
expected.map((c) => jasmine.objectContaining(c)));
|
|
435
466
|
}
|
|
@@ -688,23 +688,29 @@ describe('HlsParser live', () => {
|
|
|
688
688
|
const partialRef = makeReference(
|
|
689
689
|
'test:/partial.mp4', 0, 2, /* syncTime= */ null,
|
|
690
690
|
/* baseUri= */ '', /* startByte= */ 0, /* endByte= */ null);
|
|
691
|
+
partialRef.partial = true;
|
|
691
692
|
|
|
692
693
|
const partialRef2 = makeReference(
|
|
693
694
|
'test:/partial2.mp4', 2, 4, /* syncTime= */ null,
|
|
694
695
|
/* baseUri= */ '', /* startByte= */ 0, /* endByte= */ null);
|
|
696
|
+
partialRef2.partial = true;
|
|
697
|
+
partialRef2.lastPartial = true;
|
|
695
698
|
|
|
696
699
|
const ref = makeReference(
|
|
697
700
|
'test:/main.mp4', 0, 4, /* syncTime= */ null,
|
|
698
701
|
/* baseUri= */ '', /* startByte= */ 0, /* endByte= */ null,
|
|
699
702
|
/* timestampOffset= */ 0, [partialRef, partialRef2]);
|
|
703
|
+
ref.allPartialSegments = true;
|
|
700
704
|
|
|
701
705
|
const partialRef3 = makeReference(
|
|
702
706
|
'test:/partial.mp4', 4, 6, /* syncTime= */ null,
|
|
703
707
|
/* baseUri= */ '', /* startByte= */ 0, /* endByte= */ null);
|
|
708
|
+
partialRef3.partial = true;
|
|
704
709
|
|
|
705
710
|
const preloadRef = makeReference(
|
|
706
711
|
'test:/partial.mp4', 6, 7.5, /* syncTime= */ null,
|
|
707
712
|
/* baseUri= */ '', /* startByte= */ 0, /* endByte= */ null);
|
|
713
|
+
preloadRef.partial = true;
|
|
708
714
|
preloadRef.markAsPreload();
|
|
709
715
|
preloadRef.markAsNonIndependent();
|
|
710
716
|
|
|
@@ -774,6 +780,7 @@ describe('HlsParser live', () => {
|
|
|
774
780
|
'test:/ref1.mp4', 0, 4, /* syncTime= */ null,
|
|
775
781
|
/* baseUri= */ '', /* startByte= */ 0, /* endByte= */ 429,
|
|
776
782
|
/* timestampOffset= */ 0, [partialRef, partialRef2]);
|
|
783
|
+
ref.allPartialSegments = true;
|
|
777
784
|
|
|
778
785
|
const partialRef3 = makeReference(
|
|
779
786
|
'test:/ref2.mp4', 4, 6, /* syncTime= */ null,
|
|
@@ -967,9 +974,11 @@ describe('HlsParser live', () => {
|
|
|
967
974
|
'test:/main.mp4', 0, 2, /* syncTime= */ null);
|
|
968
975
|
|
|
969
976
|
const newRef1 = makeReference(
|
|
970
|
-
'test:/redirected/main.mp4',
|
|
977
|
+
['test:/redirected/main.mp4', 'test:/main.mp4'],
|
|
978
|
+
0, 2, /* syncTime= */ null);
|
|
971
979
|
const newRef2 = makeReference(
|
|
972
|
-
'test:/redirected/main2.mp4',
|
|
980
|
+
['test:/redirected/main2.mp4', 'test:/main2.mp4'],
|
|
981
|
+
2, 4, /* syncTime= */ null);
|
|
973
982
|
|
|
974
983
|
let playlistFetchCount = 0;
|
|
975
984
|
|
|
@@ -1301,7 +1310,7 @@ describe('HlsParser live', () => {
|
|
|
1301
1310
|
}); // describe('playlist type LIVE')
|
|
1302
1311
|
|
|
1303
1312
|
/**
|
|
1304
|
-
* @param {string} uri A relative URI to http://example.com
|
|
1313
|
+
* @param {string|Array.<string>} uri A relative URI to http://example.com
|
|
1305
1314
|
* @param {number} start
|
|
1306
1315
|
* @param {number} end
|
|
1307
1316
|
* @param {?number} syncTime
|