shaka-player 4.4.3 → 4.6.0
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/.github/workflows/release-please.yaml +2 -27
- package/AUTHORS +2 -0
- package/CHANGELOG.md +156 -39
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTORS +2 -0
- package/README.md +54 -42
- package/demo/asset_card.js +18 -21
- package/demo/cast_receiver/index.html +0 -1
- package/demo/close_button.js +0 -3
- package/demo/common/asset.js +33 -22
- package/demo/common/assets.js +249 -60
- package/demo/config.js +219 -253
- package/demo/custom.js +88 -133
- package/demo/front.js +7 -10
- package/demo/index.html +19 -22
- package/demo/input.js +6 -11
- package/demo/input_container.js +8 -9
- package/demo/main.js +62 -126
- package/demo/search.js +29 -34
- package/demo/service_worker.js +0 -3
- package/demo/tooltip.js +3 -5
- package/demo/visualizer.js +3 -5
- package/demo/visualizer_button.js +1 -20
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +211 -228
- package/dist/demo.compiled.debug.map +4 -4
- package/dist/demo.compiled.js +211 -228
- package/dist/demo.compiled.map +4 -4
- package/dist/deps.js +42 -37
- package/dist/locales.js +34 -30
- package/dist/receiver.compiled.debug.js +64 -77
- package/dist/receiver.compiled.debug.map +4 -4
- package/dist/receiver.compiled.js +64 -77
- package/dist/receiver.compiled.map +4 -4
- package/dist/shaka-player.compiled.d.ts +343 -151
- package/dist/shaka-player.compiled.debug.d.ts +343 -151
- package/dist/shaka-player.compiled.debug.externs.js +356 -117
- package/dist/shaka-player.compiled.debug.js +952 -811
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +356 -117
- package/dist/shaka-player.compiled.js +1165 -1078
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +359 -153
- package/dist/shaka-player.ui.debug.d.ts +359 -153
- package/dist/shaka-player.ui.debug.externs.js +382 -117
- package/dist/shaka-player.ui.debug.js +1084 -918
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +382 -117
- package/dist/shaka-player.ui.js +1377 -1274
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/lcevc-integration.md +14 -14
- 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/faq.md +27 -55
- package/docs/tutorials/index.json +2 -1
- package/docs/tutorials/lcevc.md +118 -0
- package/docs/tutorials/offline.md +10 -8
- package/docs/tutorials/plugins.md +5 -0
- package/docs/tutorials/ui-customization.md +17 -0
- package/docs/tutorials/ui.md +2 -1
- package/docs/tutorials/upgrade.md +3 -0
- package/externs/css_style_declaration.js +19 -0
- package/externs/lcevc.js +37 -13
- package/externs/managedmediasource.js +24 -0
- package/externs/media_remote.js +68 -0
- package/externs/mediatailor.js +193 -0
- package/externs/pictureinpicture.js +11 -0
- package/externs/shaka/abr_manager.js +6 -2
- package/externs/shaka/ads.js +27 -0
- package/externs/shaka/cea.js +7 -0
- package/externs/shaka/codecs.js +5 -3
- package/externs/shaka/manifest.js +31 -10
- package/externs/shaka/manifest_parser.js +24 -1
- package/externs/shaka/net.js +2 -2
- package/externs/shaka/offline.js +13 -2
- package/externs/shaka/player.js +65 -8
- package/externs/shaka/text.js +3 -1
- package/externs/shaka/transmuxer.js +1 -1
- package/karma.conf.js +7 -3
- package/lib/abr/simple_abr_manager.js +66 -9
- package/lib/ads/ad_manager.js +104 -50
- package/lib/ads/media_tailor_ad.js +297 -0
- package/lib/ads/media_tailor_ad_manager.js +839 -0
- 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/cea/ts_cea_parser.js +15 -2
- package/lib/config/codec_switching_strategy.js +24 -0
- package/lib/dash/content_protection.js +120 -2
- package/lib/dash/dash_parser.js +322 -93
- package/lib/dash/mpd_utils.js +62 -37
- package/lib/dash/segment_base.js +17 -10
- package/lib/dash/segment_list.js +18 -9
- package/lib/dash/segment_template.js +122 -107
- package/lib/dependencies/all.js +8 -7
- package/lib/hls/hls_classes.js +28 -43
- package/lib/hls/hls_parser.js +798 -658
- package/lib/hls/hls_utils.js +64 -5
- package/lib/hls/manifest_text_parser.js +7 -11
- package/lib/lcevc/lcevc_dec.js +220 -0
- package/lib/media/adaptation_set.js +32 -14
- package/lib/media/adaptation_set_criteria.js +86 -16
- 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 +286 -44
- 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 +6 -6
- package/lib/media/segment_prefetch.js +92 -24
- package/lib/media/segment_reference.js +73 -7
- package/lib/media/segment_utils.js +343 -0
- package/lib/media/stall_detector.js +0 -3
- package/lib/media/streaming_engine.js +73 -38
- package/lib/mss/mss_parser.js +19 -2
- package/lib/net/networking_engine.js +67 -12
- package/lib/net/networking_utils.js +95 -0
- package/lib/offline/indexeddb/v1_storage_cell.js +3 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +3 -0
- package/lib/offline/manifest_converter.js +3 -0
- package/lib/offline/offline_manifest_parser.js +10 -0
- package/lib/offline/storage.js +14 -7
- package/lib/player.js +1098 -1537
- package/lib/polyfill/mediasource.js +22 -1
- package/lib/text/cue.js +15 -0
- 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 +45 -5
- package/lib/text/ui_text_displayer.js +8 -0
- package/lib/text/vtt_text_parser.js +40 -22
- 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 +863 -0
- package/lib/transmuxer/mp3_transmuxer.js +1 -1
- package/lib/transmuxer/mpeg_ts_transmuxer.js +4 -3
- package/lib/transmuxer/mss_transmuxer.js +1 -1
- package/lib/transmuxer/ts_transmuxer.js +187 -22
- package/lib/util/buffer_utils.js +26 -4
- package/lib/util/content_steering_manager.js +358 -0
- package/lib/util/error.js +30 -15
- package/lib/util/exp_golomb.js +30 -2
- package/lib/util/fairplay_utils.js +1 -1
- package/lib/util/fake_event.js +8 -1
- package/lib/util/id3_utils.js +50 -1
- package/lib/util/manifest_parser_utils.js +12 -8
- package/lib/util/mp4_generator.js +6 -8
- package/lib/util/mutex.js +59 -0
- package/lib/util/object_utils.js +1 -1
- package/lib/util/periods.js +156 -179
- package/lib/util/platform.js +44 -3
- package/lib/util/player_configuration.js +43 -6
- package/lib/util/state_history.js +6 -2
- package/lib/util/stream_utils.js +206 -283
- package/lib/util/ts_parser.js +335 -98
- package/lib/util/uint8array_utils.js +5 -1
- package/lib/util/xml_utils.js +5 -0
- package/maintained-branches.md +3 -2
- package/package.json +4 -6
- package/roadmap.md +25 -5
- package/shaka-player.uncompiled.js +2 -2
- package/support.html +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 +50 -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 +182 -0
- package/test/dash/dash_parser_content_protection_unit.js +2 -0
- package/test/dash/dash_parser_integration.js +74 -0
- package/test/dash/dash_parser_live_unit.js +2 -19
- package/test/dash/dash_parser_manifest_unit.js +536 -2
- package/test/dash/dash_parser_segment_base_unit.js +2 -0
- package/test/dash/dash_parser_segment_list_unit.js +2 -0
- package/test/dash/dash_parser_segment_template_unit.js +2 -0
- package/test/dash/mpd_utils_unit.js +61 -30
- package/test/demo/demo_unit.js +0 -16
- package/test/hls/hls_live_unit.js +14 -3
- package/test/hls/hls_parser_unit.js +385 -33
- package/test/hls/manifest_text_parser_unit.js +32 -99
- package/test/media/adaptation_set_criteria_unit.js +284 -15
- package/test/media/adaptation_set_unit.js +2 -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 +166 -2
- package/test/media/play_rate_controller_unit.js +0 -48
- package/test/media/segment_index_unit.js +5 -4
- package/test/media/segment_prefetch_unit.js +1 -1
- package/test/media/streaming_engine_unit.js +17 -17
- package/test/mss/mss_parser_unit.js +2 -0
- 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 +14 -0
- package/test/offline/offline_integration.js +2 -1
- package/test/offline/storage_integration.js +22 -13
- 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 +182 -158
- package/test/test/assets/dash-aes-128/Fragments(video=0,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=20000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=40000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=60000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=i,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/dash.mpd +18 -0
- package/test/test/assets/dash-aes-128/license +1 -0
- package/test/test/assets/dash-multi-codec/audio_en_2c_128k_aac.mp4 +0 -0
- package/test/test/assets/dash-multi-codec/audio_es_2c_64k_opus.webm +0 -0
- package/test/test/assets/dash-multi-codec/dash.mpd +32 -0
- package/test/test/assets/dash-multi-codec/video_144p_108k_h264.mp4 +0 -0
- package/test/test/assets/hls-ts-h265/0.ts +0 -0
- package/test/test/assets/hls-ts-h265/hevc.m3u8 +6 -0
- package/test/test/assets/hls-ts-h265/index.m3u8 +7 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/media.m3u8 +9 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/media.m3u8 +24 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00000.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00001.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00002.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00003.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00004.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00005.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/prog_index.m3u8 +14 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/index.m3u8 +23 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-1-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-2-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-3-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-4-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-5-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-6-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-7-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-8-v1-a1.ts +0 -0
- package/test/test/util/dash_parser_util.js +4 -0
- package/test/test/util/fake_ad_manager.js +20 -0
- package/test/test/util/fake_media_source_engine.js +13 -2
- 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 +11 -3
- package/test/test/util/manifest_parser_util.js +14 -2
- package/test/test/util/mss_parser_util.js +4 -0
- package/test/test/util/offline_utils.js +2 -0
- package/test/test/util/simple_fakes.js +2 -2
- package/test/test/util/streaming_engine_util.js +10 -4
- 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 +85 -2
- package/test/text/vtt_text_parser_unit.js +103 -31
- package/test/transmuxer/transmuxer_engine_integration.js +9 -0
- package/test/transmuxer/transmuxer_integration.js +150 -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 +28 -29
- 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 +207 -169
- 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/controls.js +125 -0
- package/ui/externs/ui.js +24 -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/pip_button.js +22 -120
- package/ui/remote_button.js +203 -0
- 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 +11 -4
- package/demo/common/message_ids.js +0 -309
- package/demo/locales/en.json +0 -288
- package/demo/locales/source.json +0 -1146
- package/externs/mux.js +0 -69
- package/lib/lcevc/lcevc_dil.js +0 -152
- package/lib/routing/node.js +0 -23
- package/lib/routing/payload.js +0 -43
- package/lib/routing/walker.js +0 -587
- package/lib/transmuxer/muxjs_transmuxer.js +0 -242
- package/test/routing/walker_unit.js +0 -504
- package/test/transmuxer/muxjs_transmuxer_integration.js +0 -177
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<MPD mediaPresentationDuration="PT0M8.000S" minBufferTime="PT1S" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:sea="urn:mpeg:dash:schema:sea:2012" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
3
|
+
<Period>
|
|
4
|
+
<AdaptationSet bitstreamSwitching="false" codecs="avc1.64000D" contentType="video" group="1" id="1" maxHeight="136" maxWidth="320" mimeType="video/mp4" profiles="ccff" segmentAlignment="true" startWithSAP="1">
|
|
5
|
+
<ContentProtection schemeIdUri="urn:mpeg:dash:sea:2012">
|
|
6
|
+
<sea:SegmentEncryption schemeIdUri="urn:mpeg:dash:sea:aes128-cbc:2013"/>
|
|
7
|
+
<sea:KeySystem keySystemUri="urn:mpeg:dash:sea:keysys:http:2013"/>
|
|
8
|
+
<sea:CryptoPeriod IV="0x3782A2D74219AE78CFADF642ABC5E68D" keyUriTemplate="license"/>
|
|
9
|
+
</ContentProtection>
|
|
10
|
+
<SegmentTemplate initialization="Fragments(video=i,format=mpd-time-csf)" media="Fragments(video=$Time$,format=mpd-time-csf)" timescale="10000000">
|
|
11
|
+
<SegmentTimeline>
|
|
12
|
+
<S d="20000000" r="4"/>
|
|
13
|
+
</SegmentTimeline>
|
|
14
|
+
</SegmentTemplate>
|
|
15
|
+
<Representation bandwidth="395367" codecs="avc1.64000D" height="136" id="1_V_video_8" width="320"/>
|
|
16
|
+
</AdaptationSet>
|
|
17
|
+
</Period>
|
|
18
|
+
</MPD>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
�W祽Vv՛���:$�
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--Generated with https://github.com/google/shaka-packager version v2.4.1-c731217-release-->
|
|
3
|
+
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT60S">
|
|
4
|
+
<Period id="0">
|
|
5
|
+
<AdaptationSet id="6" contentType="video" maxWidth="180" maxHeight="144" frameRate="12800/512" par="5:4">
|
|
6
|
+
<Representation id="12" bandwidth="162364" codecs="avc1.4d400c" mimeType="video/mp4" sar="1:1" width="180" height="144">
|
|
7
|
+
<BaseURL>video_144p_108k_h264.mp4</BaseURL>
|
|
8
|
+
<SegmentBase indexRange="860-1071" timescale="12800">
|
|
9
|
+
<Initialization range="0-859"/>
|
|
10
|
+
</SegmentBase>
|
|
11
|
+
</Representation>
|
|
12
|
+
</AdaptationSet>
|
|
13
|
+
<AdaptationSet id="8" contentType="audio" lang="en" subsegmentAlignment="true">
|
|
14
|
+
<Representation id="13" bandwidth="130803" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
|
|
15
|
+
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
|
16
|
+
<BaseURL>audio_en_2c_128k_aac.mp4</BaseURL>
|
|
17
|
+
<SegmentBase indexRange="786-1009" timescale="48000">
|
|
18
|
+
<Initialization range="0-785"/>
|
|
19
|
+
</SegmentBase>
|
|
20
|
+
</Representation>
|
|
21
|
+
</AdaptationSet>
|
|
22
|
+
<AdaptationSet id="10" contentType="audio" lang="es" subsegmentAlignment="true">
|
|
23
|
+
<Representation id="17" bandwidth="75654" codecs="opus" mimeType="audio/webm" audioSamplingRate="48000">
|
|
24
|
+
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
|
|
25
|
+
<BaseURL>audio_es_2c_64k_opus.webm</BaseURL>
|
|
26
|
+
<SegmentBase indexRange="326-584" timescale="48000">
|
|
27
|
+
<Initialization range="0-325"/>
|
|
28
|
+
</SegmentBase>
|
|
29
|
+
</Representation>
|
|
30
|
+
</AdaptationSet>
|
|
31
|
+
</Period>
|
|
32
|
+
</MPD>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#EXTM3U
|
|
2
|
+
#EXT-X-VERSION:3
|
|
3
|
+
#EXT-X-INDEPENDENT-SEGMENTS
|
|
4
|
+
#EXT-X-TARGETDURATION:4
|
|
5
|
+
#EXT-X-MEDIA-SEQUENCE:0
|
|
6
|
+
#EXTINF:3.000000,
|
|
7
|
+
s_00000.ts
|
|
8
|
+
|
|
9
|
+
#EXTINF:3.000000,
|
|
10
|
+
s_00001.ts
|
|
11
|
+
|
|
12
|
+
#EXTINF:3.000000,
|
|
13
|
+
s_00002.ts
|
|
14
|
+
|
|
15
|
+
#EXTINF:3.000000,
|
|
16
|
+
s_00003.ts
|
|
17
|
+
|
|
18
|
+
#EXTINF:3.000000,
|
|
19
|
+
s_00004.ts
|
|
20
|
+
|
|
21
|
+
#EXTINF:3.000000,
|
|
22
|
+
s_00005.ts
|
|
23
|
+
|
|
24
|
+
#EXT-X-ENDLIST
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#EXTM3U
|
|
2
|
+
#EXT-X-VERSION:3
|
|
3
|
+
#EXT-X-TARGETDURATION:6
|
|
4
|
+
#EXT-X-PLAYLIST-TYPE:VOD
|
|
5
|
+
#EXT-X-INDEPENDENT-SEGMENTS
|
|
6
|
+
#EXTINF:6.000,
|
|
7
|
+
ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0000.ts
|
|
8
|
+
#EXTINF:6.000,
|
|
9
|
+
ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0001.ts
|
|
10
|
+
#EXTINF:6.000,
|
|
11
|
+
ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0002.ts
|
|
12
|
+
#EXTINF:6.000,
|
|
13
|
+
ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0003.ts
|
|
14
|
+
#EXT-X-ENDLIST
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#EXTM3U
|
|
2
|
+
#EXT-X-TARGETDURATION:6
|
|
3
|
+
#EXT-X-ALLOW-CACHE:YES
|
|
4
|
+
#EXT-X-PLAYLIST-TYPE:VOD
|
|
5
|
+
#EXT-X-VERSION:3
|
|
6
|
+
#EXT-X-MEDIA-SEQUENCE:1
|
|
7
|
+
#EXTINF:2.436,
|
|
8
|
+
seg-1-v1-a1.ts
|
|
9
|
+
#EXTINF:3.337,
|
|
10
|
+
seg-2-v1-a1.ts
|
|
11
|
+
#EXTINF:3.337,
|
|
12
|
+
seg-3-v1-a1.ts
|
|
13
|
+
#EXTINF:5.005,
|
|
14
|
+
seg-4-v1-a1.ts
|
|
15
|
+
#EXTINF:5.005,
|
|
16
|
+
seg-5-v1-a1.ts
|
|
17
|
+
#EXTINF:5.005,
|
|
18
|
+
seg-6-v1-a1.ts
|
|
19
|
+
#EXTINF:5.606,
|
|
20
|
+
seg-7-v1-a1.ts
|
|
21
|
+
#EXTINF:5.005,
|
|
22
|
+
seg-8-v1-a1.ts
|
|
23
|
+
#EXT-X-ENDLIST
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -45,6 +45,8 @@ shaka.test.Dash = class {
|
|
|
45
45
|
enableLowLatencyMode: () => {},
|
|
46
46
|
updateDuration: () => {},
|
|
47
47
|
newDrmInfo: (stream) => {},
|
|
48
|
+
onManifestUpdated: () => {},
|
|
49
|
+
getBandwidthEstimate: () => 1e6,
|
|
48
50
|
};
|
|
49
51
|
try {
|
|
50
52
|
const manifest = await dashParser.start('dummy://foo', playerInterface);
|
|
@@ -85,6 +87,8 @@ shaka.test.Dash = class {
|
|
|
85
87
|
enableLowLatencyMode: () => {},
|
|
86
88
|
updateDuration: () => {},
|
|
87
89
|
newDrmInfo: (stream) => {},
|
|
90
|
+
onManifestUpdated: () => {},
|
|
91
|
+
getBandwidthEstimate: () => 1e6,
|
|
88
92
|
};
|
|
89
93
|
|
|
90
94
|
try {
|
|
@@ -39,6 +39,14 @@ shaka.test.FakeAdManager = class extends shaka.util.FakeEventTarget {
|
|
|
39
39
|
/** @override */
|
|
40
40
|
updateClientSideAdsRenderingSettings(adsRenderingSettings) {}
|
|
41
41
|
|
|
42
|
+
/** @override */
|
|
43
|
+
initMediaTailor(networkingEngine, video) {}
|
|
44
|
+
|
|
45
|
+
/** @override */
|
|
46
|
+
requestMediaTailorStream(url, adsParams, backupUrl) {
|
|
47
|
+
return Promise.resolve('fake:url');
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
/** @override */
|
|
43
51
|
initServerSide(adContainer, video) {}
|
|
44
52
|
|
|
@@ -57,11 +65,23 @@ shaka.test.FakeAdManager = class extends shaka.util.FakeEventTarget {
|
|
|
57
65
|
return [];
|
|
58
66
|
}
|
|
59
67
|
|
|
68
|
+
/**
|
|
69
|
+
* @override
|
|
70
|
+
*/
|
|
71
|
+
getCuePoints() {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
|
|
60
75
|
/** @override */
|
|
61
76
|
getStats() {
|
|
62
77
|
return this.stats_;
|
|
63
78
|
}
|
|
64
79
|
|
|
80
|
+
/**
|
|
81
|
+
* @override
|
|
82
|
+
*/
|
|
83
|
+
onManifestUpdated(isLive) {}
|
|
84
|
+
|
|
65
85
|
/**
|
|
66
86
|
* @override
|
|
67
87
|
*/
|
|
@@ -134,8 +134,8 @@ shaka.test.FakeMediaSourceEngine = class {
|
|
|
134
134
|
jasmine.createSpy('setSegmentRelativeVttTiming').and.stub();
|
|
135
135
|
|
|
136
136
|
/** @type {!jasmine.Spy} */
|
|
137
|
-
this.
|
|
138
|
-
jasmine.createSpy('
|
|
137
|
+
this.updateLcevcDec =
|
|
138
|
+
jasmine.createSpy('updateLcevcDec').and.stub();
|
|
139
139
|
|
|
140
140
|
/** @type {!jasmine.Spy} */
|
|
141
141
|
this.resync=
|
|
@@ -147,6 +147,11 @@ shaka.test.FakeMediaSourceEngine = class {
|
|
|
147
147
|
return Promise.resolve();
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/** @override */
|
|
151
|
+
isStreamingAllowed() {
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
|
|
150
155
|
/**
|
|
151
156
|
* @param {string} type
|
|
152
157
|
* @return {?number}
|
|
@@ -341,6 +346,12 @@ shaka.test.FakeMediaSourceEngine = class {
|
|
|
341
346
|
return Promise.resolve();
|
|
342
347
|
}
|
|
343
348
|
|
|
349
|
+
|
|
350
|
+
/** @override */
|
|
351
|
+
isResetMediaSourceNecessary() {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
|
|
344
355
|
/**
|
|
345
356
|
* @param {string} type
|
|
346
357
|
* @return {!Promise}
|
|
@@ -49,6 +49,9 @@ shaka.test.FakeNetworkingEngine = class {
|
|
|
49
49
|
/** @type {!jasmine.Spy} */
|
|
50
50
|
this.setForceHTTPS = jasmine.createSpy('setForceHTTPS').and.stub();
|
|
51
51
|
|
|
52
|
+
/** @private {number} */
|
|
53
|
+
this.maxUris_ = 1;
|
|
54
|
+
|
|
52
55
|
// The prototype has already been applied; create spies for the
|
|
53
56
|
// methods but still call it by default.
|
|
54
57
|
spyOn(this, 'destroy').and.callThrough();
|
|
@@ -67,7 +70,7 @@ shaka.test.FakeNetworkingEngine = class {
|
|
|
67
70
|
*/
|
|
68
71
|
requestImpl_(type, request) {
|
|
69
72
|
expect(request).toBeTruthy();
|
|
70
|
-
expect(request.uris.length).
|
|
73
|
+
expect(request.uris.length).toBeLessThanOrEqual(this.maxUris_);
|
|
71
74
|
|
|
72
75
|
const requestedUri = request.uris[0];
|
|
73
76
|
|
|
@@ -288,6 +291,11 @@ shaka.test.FakeNetworkingEngine = class {
|
|
|
288
291
|
return this;
|
|
289
292
|
}
|
|
290
293
|
|
|
294
|
+
setMaxUris(maxUris) {
|
|
295
|
+
this.maxUris_ = maxUris;
|
|
296
|
+
return this;
|
|
297
|
+
}
|
|
298
|
+
|
|
291
299
|
/**
|
|
292
300
|
* Expects that a request for the given segment has occurred.
|
|
293
301
|
*
|
|
@@ -459,9 +459,11 @@ shaka.test.ManifestGenerator.Stream = class {
|
|
|
459
459
|
* @param {string=} label
|
|
460
460
|
*/
|
|
461
461
|
constructor(manifest, isPartial, id, type, lang, label) {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
462
|
+
// variants can be made up of different combinations of video
|
|
463
|
+
// and audio streams
|
|
464
|
+
// goog.asserts.assert(
|
|
465
|
+
// !manifest || !manifest.isIdUsed_(id),
|
|
466
|
+
// 'Streams should have unique ids!');
|
|
465
467
|
const ContentType = shaka.util.ManifestParserUtils.ContentType;
|
|
466
468
|
|
|
467
469
|
/** @const {shaka.test.ManifestGenerator.Manifest} */
|
|
@@ -499,6 +501,8 @@ shaka.test.ManifestGenerator.Stream = class {
|
|
|
499
501
|
|
|
500
502
|
/** @type {?string} */
|
|
501
503
|
this.originalId = null;
|
|
504
|
+
/** @type {?string} */
|
|
505
|
+
this.groupId = null;
|
|
502
506
|
/** @type {shaka.extern.CreateSegmentIndexFunction} */
|
|
503
507
|
this.createSegmentIndex = shaka.test.Util.spyFunc(create);
|
|
504
508
|
/** @type {shaka.media.SegmentIndex} */
|
|
@@ -552,11 +556,15 @@ shaka.test.ManifestGenerator.Stream = class {
|
|
|
552
556
|
/** @type {(string|undefined)} */
|
|
553
557
|
this.hdr = undefined;
|
|
554
558
|
/** @type {(string|undefined)} */
|
|
559
|
+
this.videoLayout = undefined;
|
|
560
|
+
/** @type {(string|undefined)} */
|
|
555
561
|
this.tilesLayout = undefined;
|
|
556
562
|
/** @type {?shaka.media.ManifestParser.AccessibilityPurpose} */
|
|
557
563
|
this.accessibilityPurpose;
|
|
558
564
|
/** @type {boolean} */
|
|
559
565
|
this.external = false;
|
|
566
|
+
/** @type {boolean} */
|
|
567
|
+
this.fastSwitching = false;
|
|
560
568
|
}
|
|
561
569
|
|
|
562
570
|
/** @type {shaka.extern.Stream} */
|
|
@@ -42,7 +42,7 @@ shaka.test.ManifestParser = class {
|
|
|
42
42
|
/**
|
|
43
43
|
* Creates a segment reference using a relative URI.
|
|
44
44
|
*
|
|
45
|
-
* @param {string} uri A relative URI to http://example.com
|
|
45
|
+
* @param {string|Array.<string>} uri A relative URI to http://example.com
|
|
46
46
|
* @param {number} start
|
|
47
47
|
* @param {number} end
|
|
48
48
|
* @param {string=} baseUri
|
|
@@ -57,7 +57,19 @@ shaka.test.ManifestParser = class {
|
|
|
57
57
|
static makeReference(uri, start, end, baseUri = '',
|
|
58
58
|
startByte = 0, endByte = null, timestampOffset = 0,
|
|
59
59
|
partialReferences = [], tilesLayout = '', syncTime = null) {
|
|
60
|
-
const getUris = () =>
|
|
60
|
+
const getUris = () => {
|
|
61
|
+
const uris = [];
|
|
62
|
+
if (uri instanceof Array) {
|
|
63
|
+
for (const url of uri) {
|
|
64
|
+
if (url.length) {
|
|
65
|
+
uris.push(baseUri + url);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
} else if (uri.length) {
|
|
69
|
+
uris.push(baseUri + uri);
|
|
70
|
+
}
|
|
71
|
+
return uris;
|
|
72
|
+
};
|
|
61
73
|
|
|
62
74
|
// If a test wants to verify these, they can be set explicitly after
|
|
63
75
|
// makeReference is called.
|
|
@@ -45,6 +45,8 @@ shaka.test.Mss = class {
|
|
|
45
45
|
enableLowLatencyMode: () => {},
|
|
46
46
|
updateDuration: () => {},
|
|
47
47
|
newDrmInfo: (stream) => {},
|
|
48
|
+
onManifestUpdated: () => {},
|
|
49
|
+
getBandwidthEstimate: () => 1e6,
|
|
48
50
|
};
|
|
49
51
|
const manifest = await mssParser.start('dummy://foo', playerInterface);
|
|
50
52
|
const stream = manifest.variants[0].audio;
|
|
@@ -81,6 +83,8 @@ shaka.test.Mss = class {
|
|
|
81
83
|
enableLowLatencyMode: () => {},
|
|
82
84
|
updateDuration: () => {},
|
|
83
85
|
newDrmInfo: (stream) => {},
|
|
86
|
+
onManifestUpdated: () => {},
|
|
87
|
+
getBandwidthEstimate: () => 1e6,
|
|
84
88
|
};
|
|
85
89
|
const p = mssParser.start('dummy://foo', playerInterface);
|
|
86
90
|
await expectAsync(p).toBeRejectedWith(
|
|
@@ -33,6 +33,7 @@ shaka.test.OfflineUtils = class {
|
|
|
33
33
|
return {
|
|
34
34
|
id,
|
|
35
35
|
originalId: id.toString(),
|
|
36
|
+
groupId: null,
|
|
36
37
|
primary: false,
|
|
37
38
|
presentationTimeOffset: 0,
|
|
38
39
|
type,
|
|
@@ -58,6 +59,7 @@ shaka.test.OfflineUtils = class {
|
|
|
58
59
|
spatialAudio: false,
|
|
59
60
|
closedCaptions: null,
|
|
60
61
|
external: false,
|
|
62
|
+
fastSwitching: false,
|
|
61
63
|
};
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -529,7 +529,7 @@ shaka.test.FakeTransmuxer = class {
|
|
|
529
529
|
jasmine.createSpy('transmux').and.returnValue(Promise.resolve(output));
|
|
530
530
|
|
|
531
531
|
/** @type {!jasmine.Spy} */
|
|
532
|
-
this.
|
|
533
|
-
jasmine.createSpy('
|
|
532
|
+
this.getOriginalMimeType =
|
|
533
|
+
jasmine.createSpy('getOriginalMimeType').and.returnValue('mimeType');
|
|
534
534
|
}
|
|
535
535
|
};
|
|
@@ -149,13 +149,13 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
149
149
|
* ranges for each type of init segment.
|
|
150
150
|
* @param {!Object.<string,number>=} timestampOffsets The timestamp offset
|
|
151
151
|
* for each type of segment
|
|
152
|
-
* @param {shaka.extern.
|
|
152
|
+
* @param {shaka.extern.aes128Key=} aes128Key The AES-128 key to provide
|
|
153
153
|
* to streams, if desired.
|
|
154
154
|
* @return {shaka.extern.Manifest}
|
|
155
155
|
*/
|
|
156
156
|
static createManifest(
|
|
157
157
|
presentationTimeline, periodStartTimes, presentationDuration,
|
|
158
|
-
segmentDurations, initSegmentRanges, timestampOffsets,
|
|
158
|
+
segmentDurations, initSegmentRanges, timestampOffsets, aes128Key) {
|
|
159
159
|
const Util = shaka.test.Util;
|
|
160
160
|
|
|
161
161
|
/**
|
|
@@ -268,9 +268,9 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
268
268
|
appendWindowStart,
|
|
269
269
|
appendWindowEnd);
|
|
270
270
|
const ContentType = shaka.util.ManifestParserUtils.ContentType;
|
|
271
|
-
if (
|
|
271
|
+
if (aes128Key &&
|
|
272
272
|
(type == ContentType.AUDIO || type == ContentType.VIDEO)) {
|
|
273
|
-
ref.
|
|
273
|
+
ref.aes128Key = aes128Key;
|
|
274
274
|
}
|
|
275
275
|
return ref;
|
|
276
276
|
};
|
|
@@ -394,6 +394,7 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
394
394
|
return {
|
|
395
395
|
id: id,
|
|
396
396
|
originalId: id.toString(),
|
|
397
|
+
groupId: null,
|
|
397
398
|
createSegmentIndex: Util.spyFunc(jasmine.createSpy('createSegmentIndex')),
|
|
398
399
|
segmentIndex: null,
|
|
399
400
|
mimeType: 'audio/mp4',
|
|
@@ -416,6 +417,7 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
416
417
|
spatialAudio: false,
|
|
417
418
|
accessibilityPurpose: null,
|
|
418
419
|
external: false,
|
|
420
|
+
fastSwitching: false,
|
|
419
421
|
};
|
|
420
422
|
}
|
|
421
423
|
|
|
@@ -433,6 +435,7 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
433
435
|
return {
|
|
434
436
|
id: id,
|
|
435
437
|
originalId: id.toString(),
|
|
438
|
+
groupId: null,
|
|
436
439
|
createSegmentIndex: Util.spyFunc(jasmine.createSpy('createSegmentIndex')),
|
|
437
440
|
segmentIndex: null,
|
|
438
441
|
mimeType: mimeType,
|
|
@@ -457,6 +460,7 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
457
460
|
spatialAudio: false,
|
|
458
461
|
accessibilityPurpose: null,
|
|
459
462
|
external: false,
|
|
463
|
+
fastSwitching: false,
|
|
460
464
|
};
|
|
461
465
|
}
|
|
462
466
|
|
|
@@ -473,6 +477,7 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
473
477
|
return {
|
|
474
478
|
id: id,
|
|
475
479
|
originalId: id.toString(),
|
|
480
|
+
groupId: null,
|
|
476
481
|
createSegmentIndex: Util.spyFunc(jasmine.createSpy('createSegmentIndex')),
|
|
477
482
|
segmentIndex: null,
|
|
478
483
|
mimeType: 'text/vtt',
|
|
@@ -495,6 +500,7 @@ shaka.test.StreamingEngineUtil = class {
|
|
|
495
500
|
spatialAudio: false,
|
|
496
501
|
accessibilityPurpose: null,
|
|
497
502
|
external: false,
|
|
503
|
+
fastSwitching: false,
|
|
498
504
|
};
|
|
499
505
|
}
|
|
500
506
|
};
|
|
@@ -9,10 +9,11 @@ shaka.test.UiUtils = class {
|
|
|
9
9
|
* @param {!HTMLElement} videoContainer
|
|
10
10
|
* @param {!HTMLMediaElement} video
|
|
11
11
|
* @param {!Object=} config
|
|
12
|
-
* @return {!shaka.ui.Overlay}
|
|
12
|
+
* @return {!Promise.<!shaka.ui.Overlay>}
|
|
13
13
|
*/
|
|
14
|
-
static createUIThroughAPI(videoContainer, video, config) {
|
|
15
|
-
const player = new shaka.Player(
|
|
14
|
+
static async createUIThroughAPI(videoContainer, video, config) {
|
|
15
|
+
const player = new shaka.Player();
|
|
16
|
+
await player.attach(video);
|
|
16
17
|
// Create UI
|
|
17
18
|
config = config || {};
|
|
18
19
|
const ui = new shaka.ui.Overlay(player, videoContainer, video);
|
|
@@ -43,7 +43,7 @@ describe('Mp4TtmlParser', () => {
|
|
|
43
43
|
parser.parseInit(ttmlInitSegment);
|
|
44
44
|
const time =
|
|
45
45
|
{periodStart: 0, segmentStart: 0, segmentEnd: 60, vttOffset: 0};
|
|
46
|
-
const ret = parser.parseMedia(ttmlSegmentMultipleMDAT, time);
|
|
46
|
+
const ret = parser.parseMedia(ttmlSegmentMultipleMDAT, time, null);
|
|
47
47
|
// Bodies.
|
|
48
48
|
expect(ret.length).toBe(2);
|
|
49
49
|
// Divs.
|
|
@@ -63,10 +63,10 @@ describe('Mp4TtmlParser', () => {
|
|
|
63
63
|
const parser = new shaka.text.Mp4TtmlParser();
|
|
64
64
|
parser.parseInit(ttmlInitSegment);
|
|
65
65
|
|
|
66
|
-
const ret1 = parser.parseMedia(ttmlSegment, time1);
|
|
66
|
+
const ret1 = parser.parseMedia(ttmlSegment, time1, null);
|
|
67
67
|
expect(ret1.length).toBeGreaterThan(0);
|
|
68
68
|
|
|
69
|
-
const ret2 = parser.parseMedia(ttmlSegment, time2);
|
|
69
|
+
const ret2 = parser.parseMedia(ttmlSegment, time2, null);
|
|
70
70
|
expect(ret2.length).toBeGreaterThan(0);
|
|
71
71
|
|
|
72
72
|
expect(ret2[0].startTime).toBe(ret1[0].startTime + 7);
|
|
@@ -164,7 +164,7 @@ describe('Mp4TtmlParser', () => {
|
|
|
164
164
|
parser.parseInit(ttmlInitSegment);
|
|
165
165
|
const time =
|
|
166
166
|
{periodStart: 0, segmentStart: 0, segmentEnd: 60, vttOffset: 0};
|
|
167
|
-
const result = parser.parseMedia(ttmlSegment, time);
|
|
167
|
+
const result = parser.parseMedia(ttmlSegment, time, null);
|
|
168
168
|
shaka.test.TtmlUtils.verifyHelper(
|
|
169
169
|
cues, result, {startTime: 23, endTime: 53.5});
|
|
170
170
|
});
|
|
@@ -149,7 +149,7 @@ describe('SrtTextParser', () => {
|
|
|
149
149
|
const data = BufferUtils.toUint8(StringUtils.toUTF8(text));
|
|
150
150
|
|
|
151
151
|
const parser = new shaka.text.SrtTextParser();
|
|
152
|
-
const result = parser.parseMedia(data, time);
|
|
152
|
+
const result = parser.parseMedia(data, time, null);
|
|
153
153
|
|
|
154
154
|
const expected = cues.map((cue) => {
|
|
155
155
|
if (cue.nestedCues) {
|
|
@@ -37,7 +37,7 @@ filterDescribe('Cue layout', shaka.test.TextLayoutTests.supported, () => {
|
|
|
37
37
|
// Set up UI controls. The video element is in a paused state by
|
|
38
38
|
// default, so the controls should be shown. The video is not in the
|
|
39
39
|
// DOM and is purely temporary.
|
|
40
|
-
const player = new shaka.Player(
|
|
40
|
+
const player = new shaka.Player();
|
|
41
41
|
ui = new shaka.ui.Overlay(
|
|
42
42
|
player, /** @type {!HTMLElement} */(helper.videoContainer),
|
|
43
43
|
shaka.test.UiUtils.createVideoElement());
|