shaka-player 4.3.11 → 4.4.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/AUTHORS +9 -0
- package/CHANGELOG.md +303 -202
- package/CONTRIBUTORS +8 -0
- package/LICENSE +32 -0
- package/README.md +63 -10
- package/demo/autoTemplate.txt +40 -5
- package/demo/close_button.js +11 -0
- package/demo/common/asset.js +13 -1
- package/demo/common/assets.js +53 -3
- package/demo/common/message_ids.js +25 -1
- package/demo/config.js +69 -10
- package/demo/customWarning.txt +2 -2
- package/demo/index.html +3 -1
- package/demo/locales/en.json +26 -2
- package/demo/locales/source.json +105 -9
- package/demo/main.js +52 -9
- package/demo/search.js +3 -1
- package/demo/service_worker.js +3 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +124 -112
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +124 -112
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +46 -28
- package/dist/locales.js +33 -33
- package/dist/receiver.compiled.debug.js +52 -46
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +52 -46
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +676 -391
- package/dist/shaka-player.compiled.debug.d.ts +676 -391
- package/dist/shaka-player.compiled.debug.externs.js +1188 -616
- package/dist/shaka-player.compiled.debug.js +1043 -699
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +1188 -616
- package/dist/shaka-player.compiled.js +1091 -929
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +677 -392
- package/dist/shaka-player.ui.debug.d.ts +677 -392
- package/dist/shaka-player.ui.debug.externs.js +1023 -451
- package/dist/shaka-player.ui.debug.js +1098 -737
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +1023 -451
- package/dist/shaka-player.ui.js +1246 -1071
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ad_monetization.md +15 -1
- package/docs/tutorials/application-level-redirects.md +1 -1
- package/docs/tutorials/config.md +9 -5
- package/docs/tutorials/drm-config.md +61 -0
- package/docs/tutorials/fairplay.md +19 -4
- package/docs/tutorials/license-server-auth.md +4 -4
- package/docs/tutorials/license-wrapping.md +2 -2
- package/docs/tutorials/ui-customization.md +7 -3
- package/docs/tutorials/ui.md +7 -7
- package/docs/tutorials/upgrade.md +3 -0
- package/externs/ima.js +123 -2
- package/externs/isoboxer.js +217 -0
- package/externs/mediakeys.js +18 -0
- package/externs/mux.js +1 -105
- package/externs/pictureinpicture.js +48 -0
- package/externs/shaka/ads.js +61 -1
- package/externs/shaka/cea.js +110 -0
- package/externs/shaka/codecs.js +32 -0
- package/externs/shaka/manifest.js +101 -1
- package/externs/shaka/manifest_parser.js +0 -10
- package/externs/shaka/net.js +36 -7
- package/externs/shaka/offline.js +8 -1
- package/externs/shaka/player.js +220 -21
- package/externs/shaka/text.js +1 -382
- package/externs/shaka/transmuxer.js +60 -0
- package/karma.conf.js +13 -0
- package/lib/abr/simple_abr_manager.js +6 -3
- package/lib/ads/ad_manager.js +60 -2
- package/lib/ads/client_side_ad.js +86 -0
- package/lib/ads/client_side_ad_manager.js +79 -3
- package/lib/ads/server_side_ad.js +86 -0
- package/lib/ads/server_side_ad_manager.js +13 -0
- package/lib/cast/cast_utils.js +1 -0
- package/lib/cea/cea608_data_channel.js +24 -14
- package/lib/cea/cea608_memory.js +5 -2
- package/lib/cea/cea708_service.js +8 -9
- package/lib/cea/cea708_window.js +1 -2
- package/lib/cea/cea_decoder.js +23 -6
- package/lib/cea/cea_utils.js +25 -2
- package/lib/cea/dummy_caption_decoder.js +21 -0
- package/lib/cea/dummy_cea_parser.js +1 -3
- package/lib/cea/mp4_cea_parser.js +15 -10
- package/lib/cea/ts_cea_parser.js +69 -0
- package/lib/dash/content_protection.js +32 -2
- package/lib/dash/dash_parser.js +93 -31
- package/lib/dash/mpd_utils.js +6 -25
- package/lib/dash/segment_base.js +12 -14
- package/lib/dash/segment_list.js +10 -6
- package/lib/dash/segment_template.js +349 -32
- package/lib/dependencies/all.js +8 -0
- package/lib/hls/hls_classes.js +33 -8
- package/lib/hls/hls_parser.js +805 -191
- package/lib/hls/manifest_text_parser.js +4 -14
- package/lib/media/adaptation_set_criteria.js +43 -3
- package/lib/media/closed_caption_parser.js +74 -12
- package/lib/media/drm_engine.js +189 -49
- package/lib/media/gap_jumping_controller.js +1 -1
- package/lib/media/manifest_parser.js +34 -0
- package/lib/media/media_source_capabilities.js +10 -0
- package/lib/media/media_source_engine.js +495 -231
- package/lib/media/playhead.js +1 -1
- package/lib/media/presentation_timeline.js +62 -0
- package/lib/media/segment_index.js +50 -14
- package/lib/media/segment_prefetch.js +277 -0
- package/lib/media/segment_reference.js +70 -4
- package/lib/media/streaming_engine.js +258 -81
- package/lib/media/video_wrapper.js +15 -7
- package/lib/mss/content_protection.js +353 -0
- package/lib/mss/mss_parser.js +1082 -0
- package/lib/net/networking_engine.js +60 -10
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +6 -0
- package/lib/offline/storage.js +2 -4
- package/lib/player.js +309 -105
- package/lib/polyfill/media_capabilities.js +43 -3
- package/lib/polyfill/patchedmediakeys_apple.js +5 -0
- package/lib/polyfill/patchedmediakeys_nop.js +5 -0
- package/lib/polyfill/patchedmediakeys_webkit.js +5 -0
- package/lib/text/cue.js +208 -130
- package/lib/text/lrc_text_parser.js +2 -2
- package/lib/text/mp4_vtt_parser.js +2 -2
- package/lib/text/sbv_text_parser.js +1 -1
- package/lib/text/simple_text_displayer.js +1 -1
- package/lib/text/srt_text_parser.js +9 -1
- package/lib/text/ssa_text_parser.js +2 -2
- package/lib/text/text_engine.js +3 -21
- package/lib/text/text_utils.js +71 -20
- package/lib/text/ui_text_displayer.js +14 -14
- package/lib/text/vtt_text_parser.js +22 -14
- package/lib/transmuxer/aac_transmuxer.js +224 -0
- package/lib/transmuxer/ac3.js +142 -0
- package/lib/transmuxer/ac3_transmuxer.js +213 -0
- package/lib/transmuxer/adts.js +232 -0
- package/lib/transmuxer/ec3.js +103 -0
- package/lib/transmuxer/ec3_transmuxer.js +213 -0
- package/lib/transmuxer/h264.js +324 -0
- package/lib/transmuxer/mp3_transmuxer.js +205 -0
- package/lib/transmuxer/mpeg_audio.js +196 -0
- package/lib/transmuxer/mpeg_ts_transmuxer.js +182 -0
- package/lib/transmuxer/mss_transmuxer.js +389 -0
- package/lib/{media/transmuxer.js → transmuxer/muxjs_transmuxer.js} +34 -80
- package/lib/transmuxer/transmuxer_engine.js +161 -0
- package/lib/transmuxer/ts_transmuxer.js +721 -0
- package/lib/util/cmcd_manager.js +131 -71
- package/lib/util/error.js +62 -26
- package/lib/util/exp_golomb.js +220 -0
- package/lib/util/fairplay_utils.js +64 -13
- package/lib/util/id3_utils.js +56 -3
- package/lib/util/language_utils.js +11 -8
- package/lib/util/manifest_parser_utils.js +3 -0
- package/lib/util/mime_utils.js +44 -7
- package/lib/util/mp4_box_parsers.js +233 -5
- package/lib/util/mp4_generator.js +1388 -0
- package/lib/util/periods.js +40 -34
- package/lib/util/platform.js +17 -3
- package/lib/util/player_configuration.js +38 -1
- package/lib/util/stream_utils.js +138 -27
- package/lib/util/text_parser.js +1 -1
- package/lib/util/ts_parser.js +460 -74
- package/lib/util/xml_utils.js +16 -3
- package/maintained-branches.md +2 -2
- package/package.json +3 -1
- package/roadmap.md +21 -6
- package/shaka-player.uncompiled.js +18 -0
- package/test/abr/simple_abr_manager_unit.js +32 -4
- package/test/ads/ad_manager_unit.js +18 -2
- package/test/cast/cast_utils_unit.js +7 -2
- package/test/cea/cea608_memory_unit.js +24 -0
- package/test/cea/cea_decoder_unit.js +33 -0
- package/test/dash/dash_parser_content_protection_unit.js +93 -3
- package/test/dash/dash_parser_live_unit.js +56 -13
- package/test/dash/dash_parser_manifest_unit.js +70 -2
- package/test/dash/dash_parser_segment_base_unit.js +14 -9
- package/test/dash/dash_parser_segment_template_unit.js +286 -6
- package/test/demo/demo_unit.js +5 -1
- package/test/hls/hls_live_unit.js +188 -28
- package/test/hls/hls_parser_unit.js +250 -109
- package/test/hls/manifest_text_parser_unit.js +18 -13
- package/test/media/adaptation_set_criteria_unit.js +46 -14
- package/test/media/adaptation_set_unit.js +2 -0
- package/test/media/drm_engine_integration.js +11 -8
- package/test/media/drm_engine_unit.js +220 -7
- package/test/media/media_source_engine_integration.js +124 -40
- package/test/media/media_source_engine_unit.js +133 -153
- package/test/media/playhead_unit.js +3 -0
- package/test/media/presentation_timeline_unit.js +51 -0
- package/test/media/segment_index_unit.js +52 -0
- package/test/media/segment_prefetch_unit.js +243 -0
- package/test/media/streaming_engine_integration.js +9 -3
- package/test/media/streaming_engine_unit.js +440 -59
- package/test/mss/mss_parser_content_protection_unit.js +49 -0
- package/test/mss/mss_parser_unit.js +472 -0
- package/test/mss/mss_player_integration.js +123 -0
- package/test/offline/manifest_convert_unit.js +9 -0
- package/test/offline/storage_integration.js +6 -1
- package/test/player_unit.js +386 -133
- package/test/polyfill/media_capabilities_unit.js +18 -0
- package/test/test/assets/hls-raw-aac/fileSequence0.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence1.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence2.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence3.aac +0 -0
- package/test/test/assets/hls-raw-aac/manifest.m3u8 +4 -0
- package/test/test/assets/hls-raw-aac/stream.m4a.m3u8 +14 -0
- package/test/test/assets/hls-raw-ac3/fileSequence0.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence1.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence2.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence3.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence4.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence5.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence6.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence7.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/prog_index.m3u8 +31 -0
- package/test/test/assets/hls-raw-ec3/fileSequence0.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence1.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence2.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence3.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence4.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence5.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence6.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence7.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/prog_index.m3u8 +31 -0
- package/test/test/assets/hls-raw-mp3/chunklist_w905519204.m3u8 +13 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_0.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_1.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_2.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_3.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/playlist.m3u8 +4 -0
- package/test/test/assets/hls-ts-aac/playlist.m3u8 +23 -0
- package/test/test/assets/hls-ts-aac/segment_0.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_1.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_2.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_3.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_4.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_5.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_6.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_7.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0004.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0005.ts +0 -0
- package/test/test/assets/hls-ts-ac3/prog_index.m3u8 +19 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0004.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0005.ts +0 -0
- package/test/test/assets/hls-ts-ec3/prog_index.m3u8 +19 -0
- package/test/test/assets/hls-ts-h264/fileSequence0.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence1.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence2.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence3.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence4.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence5.ts +0 -0
- package/test/test/assets/hls-ts-h264/prog_index.m3u8 +25 -0
- package/test/test/assets/hls-ts-mp3/manifest.m3u8 +13 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_0.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_1.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_2.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_3.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/chunk.m3u8 +17 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_0_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_1_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_2_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_3_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_4_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_5_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/playlist.m3u8 +4 -0
- package/test/test/boot.js +7 -2
- package/test/test/util/fake_ad.js +99 -0
- package/test/test/util/fake_ad_manager.js +7 -1
- package/test/test/util/fake_networking_engine.js +41 -14
- package/test/test/util/fake_segment_prefetch.js +81 -0
- package/test/test/util/manifest_generator.js +19 -5
- package/test/test/util/mss_parser_util.js +115 -0
- package/test/test/util/offline_utils.js +1 -0
- package/test/test/util/simple_fakes.js +12 -3
- package/test/test/util/streaming_engine_util.js +14 -4
- package/test/test/util/ttml_utils.js +2 -2
- package/test/text/cue_integration.js +1 -1
- package/test/text/srt_text_parser_unit.js +78 -0
- package/test/text/text_engine_unit.js +17 -8
- package/test/text/ui_text_displayer_unit.js +4 -4
- package/test/text/vtt_text_parser_unit.js +59 -40
- package/test/text/web_vtt_generator_unit.js +9 -3
- package/test/{media/transmuxer_integration.js → transmuxer/muxjs_transmuxer_integration.js} +30 -33
- package/test/transmuxer/transmuxer_engine_integration.js +60 -0
- package/test/transmuxer/transmuxer_integration.js +296 -0
- package/test/util/cmcd_manager_unit.js +162 -13
- package/test/util/language_utils_unit.js +9 -2
- package/test/util/mp4_box_parsers_unit.js +39 -4
- package/test/util/periods_unit.js +34 -26
- package/test/util/stream_utils_unit.js +60 -107
- package/ui/controls.js +19 -1
- package/ui/controls.less +1 -0
- package/ui/externs/ui.js +11 -1
- package/ui/language_utils.js +15 -0
- package/ui/less/thumbnails.less +26 -0
- package/ui/locales/oc.json +42 -0
- package/ui/pip_button.js +83 -2
- package/ui/range_element.js +15 -0
- package/ui/resolution_selection.js +9 -2
- package/ui/seek_bar.js +223 -0
- package/ui/ui.js +5 -0
- package/lib/cea/i_caption_decoder.js +0 -51
- package/lib/cea/i_cea_parser.js +0 -68
|
@@ -20,6 +20,8 @@ shaka.ads = {};
|
|
|
20
20
|
/** @const */
|
|
21
21
|
shaka.cast = {};
|
|
22
22
|
/** @const */
|
|
23
|
+
shaka.cea = {};
|
|
24
|
+
/** @const */
|
|
23
25
|
shaka.config = {};
|
|
24
26
|
/** @const */
|
|
25
27
|
shaka.dash = {};
|
|
@@ -30,12 +32,18 @@ shaka.lcevc = {};
|
|
|
30
32
|
/** @const */
|
|
31
33
|
shaka.media = {};
|
|
32
34
|
/** @const */
|
|
35
|
+
shaka.media.SegmentPrefetch = {};
|
|
36
|
+
/** @const */
|
|
37
|
+
shaka.mss = {};
|
|
38
|
+
/** @const */
|
|
33
39
|
shaka.net = {};
|
|
34
40
|
/** @const */
|
|
35
41
|
shaka.offline = {};
|
|
36
42
|
/** @const */
|
|
37
43
|
shaka.text = {};
|
|
38
44
|
/** @const */
|
|
45
|
+
shaka.transmuxer = {};
|
|
46
|
+
/** @const */
|
|
39
47
|
shaka.ui = {};
|
|
40
48
|
/** @const */
|
|
41
49
|
shaka.util = {};
|
|
@@ -239,6 +247,9 @@ shaka.util.Error.Code = {
|
|
|
239
247
|
'QUOTA_EXCEEDED_ERROR': 3017,
|
|
240
248
|
'TRANSMUXING_FAILED': 3018,
|
|
241
249
|
'CONTENT_TRANSFORMATION_FAILED': 3019,
|
|
250
|
+
'MSS_MISSING_DATA_FOR_TRANSMUXING': 3020,
|
|
251
|
+
'MSS_TRANSMUXING_CODEC_UNKNOWN': 3021,
|
|
252
|
+
'MSS_TRANSMUXING_FAILED': 3022,
|
|
242
253
|
'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
|
|
243
254
|
'DASH_INVALID_XML': 4001,
|
|
244
255
|
'DASH_NO_SEGMENT_INFO': 4002,
|
|
@@ -274,6 +285,8 @@ shaka.util.Error.Code = {
|
|
|
274
285
|
'HLS_AES_128_INVALID_IV_LENGTH': 4043,
|
|
275
286
|
'HLS_AES_128_INVALID_KEY_LENGTH': 4044,
|
|
276
287
|
'CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM': 4045,
|
|
288
|
+
'MSS_INVALID_XML': 4046,
|
|
289
|
+
'MSS_LIVE_CONTENT_NOT_SUPPORTED': 4047,
|
|
277
290
|
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
278
291
|
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
279
292
|
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
@@ -291,6 +304,8 @@ shaka.util.Error.Code = {
|
|
|
291
304
|
'SERVER_CERTIFICATE_REQUIRED': 6015,
|
|
292
305
|
'INIT_DATA_TRANSFORM_ERROR': 6016,
|
|
293
306
|
'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
|
|
307
|
+
'MIN_HDCP_VERSION_NOT_MATCH': 6018,
|
|
308
|
+
'ERROR_CHECKING_HDCP_VERSION': 6019,
|
|
294
309
|
'LOAD_INTERRUPTED': 7000,
|
|
295
310
|
'OPERATION_ABORTED': 7001,
|
|
296
311
|
'NO_VIDEO_ELEMENT': 7002,
|
|
@@ -573,7 +588,95 @@ shaka.ui.Localization.LOCALE_CHANGED;
|
|
|
573
588
|
*/
|
|
574
589
|
shaka.ui.Localization.LOCALE_UPDATED;
|
|
575
590
|
/**
|
|
576
|
-
* @
|
|
591
|
+
* @summary A set of BufferSource utility functions.
|
|
592
|
+
*/
|
|
593
|
+
shaka.util.BufferUtils = class {
|
|
594
|
+
/**
|
|
595
|
+
* Compare two buffers for equality. For buffers of different types, this
|
|
596
|
+
* compares the underlying buffers as binary data.
|
|
597
|
+
* @param {?BufferSource} arr1
|
|
598
|
+
* @param {?BufferSource} arr2
|
|
599
|
+
* @return {boolean}
|
|
600
|
+
* @suppress {strictMissingProperties}
|
|
601
|
+
*/
|
|
602
|
+
static equal(arr1, arr2) {}
|
|
603
|
+
/**
|
|
604
|
+
* Gets an ArrayBuffer that contains the data from the given TypedArray. Note
|
|
605
|
+
* this will allocate a new ArrayBuffer if the object is a partial view of
|
|
606
|
+
* the data.
|
|
607
|
+
* @param {!BufferSource} view
|
|
608
|
+
* @return {!ArrayBuffer}
|
|
609
|
+
*/
|
|
610
|
+
static toArrayBuffer(view) {}
|
|
611
|
+
/**
|
|
612
|
+
* Creates a new Uint8Array view on the same buffer. This clamps the values
|
|
613
|
+
* to be within the same view (i.e. you can't use this to move past the end
|
|
614
|
+
* of the view, even if the underlying buffer is larger). However, you can
|
|
615
|
+
* pass a negative offset to access the data before the view.
|
|
616
|
+
* @param {BufferSource} data
|
|
617
|
+
* @param {number=} offset The offset from the beginning of this data's view
|
|
618
|
+
* to start the new view at.
|
|
619
|
+
* @param {number=} length The byte length of the new view.
|
|
620
|
+
* @return {!Uint8Array}
|
|
621
|
+
*/
|
|
622
|
+
static toUint8(data, offset, length) {}
|
|
623
|
+
/**
|
|
624
|
+
* Creates a DataView over the given buffer.
|
|
625
|
+
* @see toUint8
|
|
626
|
+
* @param {BufferSource} buffer
|
|
627
|
+
* @param {number=} offset
|
|
628
|
+
* @param {number=} length
|
|
629
|
+
* @return {!DataView}
|
|
630
|
+
*/
|
|
631
|
+
static toDataView(buffer, offset, length) {}
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* The IClosedCaptionParser defines the interface to provide all operations for
|
|
635
|
+
* parsing the closed captions embedded in Dash videos streams.
|
|
636
|
+
* TODO: Remove this interface and move method definitions
|
|
637
|
+
* directly to ClosedCaptonParser.
|
|
638
|
+
* @interface
|
|
639
|
+
*/
|
|
640
|
+
shaka.media.IClosedCaptionParser = class {
|
|
641
|
+
};
|
|
642
|
+
/**
|
|
643
|
+
* Closed Caption Parser provides all operations for parsing the closed captions
|
|
644
|
+
* embedded in Dash videos streams.
|
|
645
|
+
* @implements {shaka.media.IClosedCaptionParser}
|
|
646
|
+
* @final
|
|
647
|
+
*/
|
|
648
|
+
shaka.media.ClosedCaptionParser = class {
|
|
649
|
+
/**
|
|
650
|
+
* @param {string} mimeType
|
|
651
|
+
*/
|
|
652
|
+
constructor(mimeType) {}
|
|
653
|
+
/**
|
|
654
|
+
* @param {string} mimeType
|
|
655
|
+
* @param {!shaka.extern.CeaParserPlugin} plugin
|
|
656
|
+
*/
|
|
657
|
+
static registerParser(mimeType, plugin) {}
|
|
658
|
+
/**
|
|
659
|
+
* @param {string} mimeType
|
|
660
|
+
*/
|
|
661
|
+
static unregisterParser(mimeType) {}
|
|
662
|
+
/**
|
|
663
|
+
* @param {string} mimeType
|
|
664
|
+
* @return {?shaka.extern.CeaParserPlugin}
|
|
665
|
+
*/
|
|
666
|
+
static findParser(mimeType) {}
|
|
667
|
+
/**
|
|
668
|
+
* @param {!shaka.extern.CaptionDecoderPlugin} plugin
|
|
669
|
+
*/
|
|
670
|
+
static registerDecoder(plugin) {}
|
|
671
|
+
/**
|
|
672
|
+
*/
|
|
673
|
+
static unregisterDecoder() {}
|
|
674
|
+
/**
|
|
675
|
+
* @return {?shaka.extern.CaptionDecoderPlugin}
|
|
676
|
+
*/
|
|
677
|
+
static findDecoder() {}
|
|
678
|
+
};
|
|
679
|
+
/**
|
|
577
680
|
*/
|
|
578
681
|
shaka.text.Cue = class {
|
|
579
682
|
/**
|
|
@@ -582,153 +685,21 @@ shaka.text.Cue = class {
|
|
|
582
685
|
* @param {string} payload
|
|
583
686
|
*/
|
|
584
687
|
constructor(startTime, endTime, payload) {}
|
|
688
|
+
/**
|
|
689
|
+
* Create a copy of the cue with the same properties.
|
|
690
|
+
* @return {!shaka.text.Cue}
|
|
691
|
+
* @suppress {checkTypes} since we must use [] and "in" with a struct type.
|
|
692
|
+
*/
|
|
693
|
+
clone() {}
|
|
694
|
+
/**
|
|
695
|
+
* Check if two Cues have all the same values in all properties.
|
|
696
|
+
* @param {!shaka.text.Cue} cue1
|
|
697
|
+
* @param {!shaka.text.Cue} cue2
|
|
698
|
+
* @return {boolean}
|
|
699
|
+
* @suppress {checkTypes} since we must use [] and "in" with a struct type.
|
|
700
|
+
*/
|
|
701
|
+
static equal(cue1, cue2) {}
|
|
585
702
|
};
|
|
586
|
-
/**
|
|
587
|
-
* @override
|
|
588
|
-
*/
|
|
589
|
-
shaka.text.Cue.prototype.startTime;
|
|
590
|
-
/**
|
|
591
|
-
* @override
|
|
592
|
-
*/
|
|
593
|
-
shaka.text.Cue.prototype.direction;
|
|
594
|
-
/**
|
|
595
|
-
* @override
|
|
596
|
-
*/
|
|
597
|
-
shaka.text.Cue.prototype.endTime;
|
|
598
|
-
/**
|
|
599
|
-
* @override
|
|
600
|
-
*/
|
|
601
|
-
shaka.text.Cue.prototype.payload;
|
|
602
|
-
/**
|
|
603
|
-
* @override
|
|
604
|
-
*/
|
|
605
|
-
shaka.text.Cue.prototype.region;
|
|
606
|
-
/**
|
|
607
|
-
* @override
|
|
608
|
-
*/
|
|
609
|
-
shaka.text.Cue.prototype.position;
|
|
610
|
-
/**
|
|
611
|
-
* @override
|
|
612
|
-
*/
|
|
613
|
-
shaka.text.Cue.prototype.positionAlign;
|
|
614
|
-
/**
|
|
615
|
-
* @override
|
|
616
|
-
*/
|
|
617
|
-
shaka.text.Cue.prototype.size;
|
|
618
|
-
/**
|
|
619
|
-
* @override
|
|
620
|
-
*/
|
|
621
|
-
shaka.text.Cue.prototype.textAlign;
|
|
622
|
-
/**
|
|
623
|
-
* @override
|
|
624
|
-
*/
|
|
625
|
-
shaka.text.Cue.prototype.writingMode;
|
|
626
|
-
/**
|
|
627
|
-
* @override
|
|
628
|
-
*/
|
|
629
|
-
shaka.text.Cue.prototype.lineInterpretation;
|
|
630
|
-
/**
|
|
631
|
-
* @override
|
|
632
|
-
*/
|
|
633
|
-
shaka.text.Cue.prototype.line;
|
|
634
|
-
/**
|
|
635
|
-
* @override
|
|
636
|
-
*/
|
|
637
|
-
shaka.text.Cue.prototype.lineHeight;
|
|
638
|
-
/**
|
|
639
|
-
* Line Alignment is set to start by default.
|
|
640
|
-
* @override
|
|
641
|
-
*/
|
|
642
|
-
shaka.text.Cue.prototype.lineAlign;
|
|
643
|
-
/**
|
|
644
|
-
* Set the captions at the bottom of the text container by default.
|
|
645
|
-
* @override
|
|
646
|
-
*/
|
|
647
|
-
shaka.text.Cue.prototype.displayAlign;
|
|
648
|
-
/**
|
|
649
|
-
* @override
|
|
650
|
-
*/
|
|
651
|
-
shaka.text.Cue.prototype.color;
|
|
652
|
-
/**
|
|
653
|
-
* @override
|
|
654
|
-
*/
|
|
655
|
-
shaka.text.Cue.prototype.backgroundColor;
|
|
656
|
-
/**
|
|
657
|
-
* @override
|
|
658
|
-
*/
|
|
659
|
-
shaka.text.Cue.prototype.backgroundImage;
|
|
660
|
-
/**
|
|
661
|
-
* @override
|
|
662
|
-
*/
|
|
663
|
-
shaka.text.Cue.prototype.border;
|
|
664
|
-
/**
|
|
665
|
-
* @override
|
|
666
|
-
*/
|
|
667
|
-
shaka.text.Cue.prototype.textShadow;
|
|
668
|
-
/**
|
|
669
|
-
* @override
|
|
670
|
-
*/
|
|
671
|
-
shaka.text.Cue.prototype.textStrokeColor;
|
|
672
|
-
/**
|
|
673
|
-
* @override
|
|
674
|
-
*/
|
|
675
|
-
shaka.text.Cue.prototype.textStrokeWidth;
|
|
676
|
-
/**
|
|
677
|
-
* @override
|
|
678
|
-
*/
|
|
679
|
-
shaka.text.Cue.prototype.fontSize;
|
|
680
|
-
/**
|
|
681
|
-
* @override
|
|
682
|
-
*/
|
|
683
|
-
shaka.text.Cue.prototype.fontWeight;
|
|
684
|
-
/**
|
|
685
|
-
* @override
|
|
686
|
-
*/
|
|
687
|
-
shaka.text.Cue.prototype.fontStyle;
|
|
688
|
-
/**
|
|
689
|
-
* @override
|
|
690
|
-
*/
|
|
691
|
-
shaka.text.Cue.prototype.fontFamily;
|
|
692
|
-
/**
|
|
693
|
-
* @override
|
|
694
|
-
*/
|
|
695
|
-
shaka.text.Cue.prototype.letterSpacing;
|
|
696
|
-
/**
|
|
697
|
-
* @override
|
|
698
|
-
*/
|
|
699
|
-
shaka.text.Cue.prototype.linePadding;
|
|
700
|
-
/**
|
|
701
|
-
* @override
|
|
702
|
-
*/
|
|
703
|
-
shaka.text.Cue.prototype.opacity;
|
|
704
|
-
/**
|
|
705
|
-
* @override
|
|
706
|
-
*/
|
|
707
|
-
shaka.text.Cue.prototype.textDecoration;
|
|
708
|
-
/**
|
|
709
|
-
* @override
|
|
710
|
-
*/
|
|
711
|
-
shaka.text.Cue.prototype.wrapLine;
|
|
712
|
-
/**
|
|
713
|
-
* @override
|
|
714
|
-
*/
|
|
715
|
-
shaka.text.Cue.prototype.id;
|
|
716
|
-
/**
|
|
717
|
-
* @override
|
|
718
|
-
*/
|
|
719
|
-
shaka.text.Cue.prototype.nestedCues;
|
|
720
|
-
/**
|
|
721
|
-
* @override
|
|
722
|
-
*/
|
|
723
|
-
shaka.text.Cue.prototype.isContainer;
|
|
724
|
-
/**
|
|
725
|
-
* @override
|
|
726
|
-
*/
|
|
727
|
-
shaka.text.Cue.prototype.lineBreak;
|
|
728
|
-
/**
|
|
729
|
-
* @override
|
|
730
|
-
*/
|
|
731
|
-
shaka.text.Cue.prototype.cellResolution;
|
|
732
703
|
/**
|
|
733
704
|
* @enum {string}
|
|
734
705
|
*/
|
|
@@ -795,14 +766,14 @@ shaka.text.Cue.lineAlign = {
|
|
|
795
766
|
* @enum {string}
|
|
796
767
|
*/
|
|
797
768
|
shaka.text.Cue.defaultTextColor = {
|
|
798
|
-
'white': '
|
|
799
|
-
'lime': '
|
|
800
|
-
'cyan': '
|
|
801
|
-
'red': '
|
|
802
|
-
'yellow': '
|
|
803
|
-
'magenta': '
|
|
804
|
-
'blue': '
|
|
805
|
-
'black': '
|
|
769
|
+
'white': 'white',
|
|
770
|
+
'lime': 'lime',
|
|
771
|
+
'cyan': 'cyan',
|
|
772
|
+
'red': 'red',
|
|
773
|
+
'yellow': 'yellow',
|
|
774
|
+
'magenta': 'magenta',
|
|
775
|
+
'blue': 'blue',
|
|
776
|
+
'black': 'black'
|
|
806
777
|
};
|
|
807
778
|
/**
|
|
808
779
|
* Default text background color according to
|
|
@@ -810,14 +781,14 @@ shaka.text.Cue.defaultTextColor = {
|
|
|
810
781
|
* @enum {string}
|
|
811
782
|
*/
|
|
812
783
|
shaka.text.Cue.defaultTextBackgroundColor = {
|
|
813
|
-
'bg_white': '
|
|
814
|
-
'bg_lime': '
|
|
815
|
-
'bg_cyan': '
|
|
816
|
-
'bg_red': '
|
|
817
|
-
'bg_yellow': '
|
|
818
|
-
'bg_magenta': '
|
|
819
|
-
'bg_blue': '
|
|
820
|
-
'bg_black': '
|
|
784
|
+
'bg_white': 'white',
|
|
785
|
+
'bg_lime': 'lime',
|
|
786
|
+
'bg_cyan': 'cyan',
|
|
787
|
+
'bg_red': 'red',
|
|
788
|
+
'bg_yellow': 'yellow',
|
|
789
|
+
'bg_magenta': 'magenta',
|
|
790
|
+
'bg_blue': 'blue',
|
|
791
|
+
'bg_black': 'black'
|
|
821
792
|
};
|
|
822
793
|
/**
|
|
823
794
|
* In CSS font weight can be a number, where 400 is normal and 700 is bold.
|
|
@@ -845,57 +816,11 @@ shaka.text.Cue.textDecoration = {
|
|
|
845
816
|
'OVERLINE': 'overline'
|
|
846
817
|
};
|
|
847
818
|
/**
|
|
848
|
-
* @implements {shaka.extern.CueRegion}
|
|
849
|
-
* @struct
|
|
850
819
|
*/
|
|
851
820
|
shaka.text.CueRegion = class {
|
|
852
821
|
/** */
|
|
853
822
|
constructor() {}
|
|
854
823
|
};
|
|
855
|
-
/**
|
|
856
|
-
* @override
|
|
857
|
-
*/
|
|
858
|
-
shaka.text.CueRegion.prototype.id;
|
|
859
|
-
/**
|
|
860
|
-
* @override
|
|
861
|
-
*/
|
|
862
|
-
shaka.text.CueRegion.prototype.viewportAnchorX;
|
|
863
|
-
/**
|
|
864
|
-
* @override
|
|
865
|
-
*/
|
|
866
|
-
shaka.text.CueRegion.prototype.viewportAnchorY;
|
|
867
|
-
/**
|
|
868
|
-
* @override
|
|
869
|
-
*/
|
|
870
|
-
shaka.text.CueRegion.prototype.regionAnchorX;
|
|
871
|
-
/**
|
|
872
|
-
* @override
|
|
873
|
-
*/
|
|
874
|
-
shaka.text.CueRegion.prototype.regionAnchorY;
|
|
875
|
-
/**
|
|
876
|
-
* @override
|
|
877
|
-
*/
|
|
878
|
-
shaka.text.CueRegion.prototype.width;
|
|
879
|
-
/**
|
|
880
|
-
* @override
|
|
881
|
-
*/
|
|
882
|
-
shaka.text.CueRegion.prototype.height;
|
|
883
|
-
/**
|
|
884
|
-
* @override
|
|
885
|
-
*/
|
|
886
|
-
shaka.text.CueRegion.prototype.heightUnits;
|
|
887
|
-
/**
|
|
888
|
-
* @override
|
|
889
|
-
*/
|
|
890
|
-
shaka.text.CueRegion.prototype.widthUnits;
|
|
891
|
-
/**
|
|
892
|
-
* @override
|
|
893
|
-
*/
|
|
894
|
-
shaka.text.CueRegion.prototype.viewportAnchorUnits;
|
|
895
|
-
/**
|
|
896
|
-
* @override
|
|
897
|
-
*/
|
|
898
|
-
shaka.text.CueRegion.prototype.scroll;
|
|
899
824
|
/**
|
|
900
825
|
* @enum {number}
|
|
901
826
|
*/
|
|
@@ -912,58 +837,100 @@ shaka.text.CueRegion.scrollMode = {
|
|
|
912
837
|
'UP': 'up'
|
|
913
838
|
};
|
|
914
839
|
/**
|
|
915
|
-
*
|
|
840
|
+
* An interface to standardize how objects are destroyed.
|
|
841
|
+
* @interface
|
|
916
842
|
*/
|
|
917
|
-
shaka.util.
|
|
843
|
+
shaka.util.IDestroyable = class {
|
|
918
844
|
/**
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
* @
|
|
923
|
-
* @return {boolean}
|
|
924
|
-
* @suppress {strictMissingProperties}
|
|
845
|
+
* Request that this object be destroyed, releasing all resources and shutting
|
|
846
|
+
* down all operations. Returns a Promise which is resolved when destruction
|
|
847
|
+
* is complete. This Promise should never be rejected.
|
|
848
|
+
* @return {!Promise}
|
|
925
849
|
*/
|
|
926
|
-
|
|
850
|
+
destroy() {}
|
|
851
|
+
};
|
|
852
|
+
/**
|
|
853
|
+
* @summary Manages transmuxer plugins.
|
|
854
|
+
* @implements {shaka.util.IDestroyable}
|
|
855
|
+
*/
|
|
856
|
+
shaka.transmuxer.TransmuxerEngine = class {
|
|
927
857
|
/**
|
|
928
|
-
*
|
|
929
|
-
* this will allocate a new ArrayBuffer if the object is a partial view of
|
|
930
|
-
* the data.
|
|
931
|
-
* @param {!BufferSource} view
|
|
932
|
-
* @return {!ArrayBuffer}
|
|
858
|
+
* @override
|
|
933
859
|
*/
|
|
934
|
-
|
|
860
|
+
destroy() {}
|
|
935
861
|
/**
|
|
936
|
-
*
|
|
937
|
-
*
|
|
938
|
-
*
|
|
939
|
-
* pass a negative offset to access the data before the view.
|
|
940
|
-
* @param {BufferSource} data
|
|
941
|
-
* @param {number=} offset The offset from the beginning of this data's view
|
|
942
|
-
* to start the new view at.
|
|
943
|
-
* @param {number=} length The byte length of the new view.
|
|
944
|
-
* @return {!Uint8Array}
|
|
862
|
+
* @param {string} mimeType
|
|
863
|
+
* @param {!shaka.extern.TransmuxerPlugin} plugin
|
|
864
|
+
* @param {number} priority
|
|
945
865
|
*/
|
|
946
|
-
static
|
|
866
|
+
static registerTransmuxer(mimeType, plugin, priority) {}
|
|
947
867
|
/**
|
|
948
|
-
*
|
|
949
|
-
* @
|
|
950
|
-
* @param {BufferSource} buffer
|
|
951
|
-
* @param {number=} offset
|
|
952
|
-
* @param {number=} length
|
|
953
|
-
* @return {!DataView}
|
|
868
|
+
* @param {string} mimeType
|
|
869
|
+
* @param {number} priority
|
|
954
870
|
*/
|
|
955
|
-
static
|
|
871
|
+
static unregisterTransmuxer(mimeType, priority) {}
|
|
872
|
+
/**
|
|
873
|
+
* @param {string} mimeType
|
|
874
|
+
* @param {string=} contentType
|
|
875
|
+
* @return {?shaka.extern.TransmuxerPlugin}
|
|
876
|
+
*/
|
|
877
|
+
static findTransmuxer(mimeType, contentType) {}
|
|
956
878
|
};
|
|
957
879
|
/**
|
|
958
|
-
*
|
|
959
|
-
*
|
|
880
|
+
* Priority level for transmuxer plugins.
|
|
881
|
+
* If multiple plugins are provided for the same mime type, only the
|
|
882
|
+
* highest-priority one is used.
|
|
883
|
+
* @enum {number}
|
|
960
884
|
*/
|
|
961
|
-
shaka.
|
|
885
|
+
shaka.transmuxer.TransmuxerEngine.PluginPriority = {
|
|
886
|
+
'FALLBACK': 1,
|
|
887
|
+
'PREFERRED_SECONDARY': 2,
|
|
888
|
+
'PREFERRED': 3,
|
|
889
|
+
'APPLICATION': 4
|
|
890
|
+
};
|
|
891
|
+
/**
|
|
892
|
+
* @summary A set of utility functions for dealing with MIME types.
|
|
893
|
+
*/
|
|
894
|
+
shaka.util.MimeUtils = class {
|
|
962
895
|
/**
|
|
963
|
-
*
|
|
964
|
-
*
|
|
965
|
-
*
|
|
966
|
-
* @
|
|
896
|
+
* Takes a MIME type and optional codecs string and produces the full MIME
|
|
897
|
+
* type. Also remove the codecs for raw formats.
|
|
898
|
+
* @param {string} mimeType
|
|
899
|
+
* @param {string=} codecs
|
|
900
|
+
* @return {string}
|
|
901
|
+
*/
|
|
902
|
+
static getFullType(mimeType, codecs) {}
|
|
903
|
+
/**
|
|
904
|
+
* Takes a MIME type and optional codecs string and produces the full MIME
|
|
905
|
+
* type.
|
|
906
|
+
* @param {string} mimeType
|
|
907
|
+
* @param {string=} codecs
|
|
908
|
+
* @return {string}
|
|
909
|
+
*/
|
|
910
|
+
static getFullTypeWithAllCodecs(mimeType, codecs) {}
|
|
911
|
+
};
|
|
912
|
+
/**
|
|
913
|
+
* @summary Manages text parsers and cues.
|
|
914
|
+
* @implements {shaka.util.IDestroyable}
|
|
915
|
+
*/
|
|
916
|
+
shaka.text.TextEngine = class {
|
|
917
|
+
/** @param {shaka.extern.TextDisplayer} displayer */
|
|
918
|
+
constructor(displayer) {}
|
|
919
|
+
/**
|
|
920
|
+
* @param {string} mimeType
|
|
921
|
+
* @param {!shaka.extern.TextParserPlugin} plugin
|
|
922
|
+
*/
|
|
923
|
+
static registerParser(mimeType, plugin) {}
|
|
924
|
+
/**
|
|
925
|
+
* @param {string} mimeType
|
|
926
|
+
*/
|
|
927
|
+
static unregisterParser(mimeType) {}
|
|
928
|
+
/**
|
|
929
|
+
* @return {?shaka.extern.TextParserPlugin}
|
|
930
|
+
*/
|
|
931
|
+
static findParser(mimeType) {}
|
|
932
|
+
/**
|
|
933
|
+
* @override
|
|
967
934
|
*/
|
|
968
935
|
destroy() {}
|
|
969
936
|
};
|
|
@@ -1005,159 +972,20 @@ shaka.util.Timer = class {
|
|
|
1005
972
|
stop() {}
|
|
1006
973
|
};
|
|
1007
974
|
/**
|
|
1008
|
-
* @
|
|
1009
|
-
* @summary A set of string utility functions.
|
|
1010
|
-
*/
|
|
1011
|
-
shaka.util.StringUtils = class {
|
|
1012
|
-
/**
|
|
1013
|
-
* Creates a string from the given buffer as UTF-8 encoding.
|
|
1014
|
-
* @param {?BufferSource} data
|
|
1015
|
-
* @return {string}
|
|
1016
|
-
*/
|
|
1017
|
-
static fromUTF8(data) {}
|
|
1018
|
-
/**
|
|
1019
|
-
* Creates a string from the given buffer as UTF-16 encoding.
|
|
1020
|
-
* @param {?BufferSource} data
|
|
1021
|
-
* @param {boolean} littleEndian
|
|
1022
|
-
true to read little endian, false to read big.
|
|
1023
|
-
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
1024
|
-
* expect invalid input. If noThrow is true and the data has an odd
|
|
1025
|
-
* length,it will be truncated.
|
|
1026
|
-
* @return {string}
|
|
1027
|
-
*/
|
|
1028
|
-
static fromUTF16(data, littleEndian, noThrow) {}
|
|
1029
|
-
/**
|
|
1030
|
-
* Creates a string from the given buffer, auto-detecting the encoding that is
|
|
1031
|
-
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
1032
|
-
* @param {?BufferSource} data
|
|
1033
|
-
* @return {string}
|
|
1034
|
-
*/
|
|
1035
|
-
static fromBytesAutoDetect(data) {}
|
|
1036
|
-
/**
|
|
1037
|
-
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
|
|
1038
|
-
* @param {string} str
|
|
1039
|
-
* @return {!ArrayBuffer}
|
|
1040
|
-
*/
|
|
1041
|
-
static toUTF8(str) {}
|
|
1042
|
-
/**
|
|
1043
|
-
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
1044
|
-
* @param {string} str
|
|
1045
|
-
* @param {boolean} littleEndian
|
|
1046
|
-
* @return {!ArrayBuffer}
|
|
1047
|
-
*/
|
|
1048
|
-
static toUTF16(str, littleEndian) {}
|
|
1049
|
-
/**
|
|
1050
|
-
* Resets the fromCharCode method's implementation.
|
|
1051
|
-
* For debug use.
|
|
1052
|
-
*/
|
|
1053
|
-
static resetFromCharCode() {}
|
|
1054
|
-
};
|
|
1055
|
-
/**
|
|
1056
|
-
* @summary A set of Uint8Array utility functions.
|
|
1057
|
-
*/
|
|
1058
|
-
shaka.util.Uint8ArrayUtils = class {
|
|
1059
|
-
/**
|
|
1060
|
-
* Convert a buffer to a base64 string. The output will be standard
|
|
1061
|
-
* alphabet as opposed to base64url safe alphabet.
|
|
1062
|
-
* @param {BufferSource} data
|
|
1063
|
-
* @return {string}
|
|
1064
|
-
*/
|
|
1065
|
-
static toStandardBase64(data) {}
|
|
1066
|
-
/**
|
|
1067
|
-
* Convert a buffer to a base64 string. The output will always use the
|
|
1068
|
-
* alternate encoding/alphabet also known as "base64url".
|
|
1069
|
-
* @param {BufferSource} data
|
|
1070
|
-
* @param {boolean=} padding If true, pad the output with equals signs.
|
|
1071
|
-
* Defaults to true.
|
|
1072
|
-
* @return {string}
|
|
1073
|
-
*/
|
|
1074
|
-
static toBase64(data, padding) {}
|
|
1075
|
-
/**
|
|
1076
|
-
* Convert a base64 string to a Uint8Array. Accepts either the standard
|
|
1077
|
-
* alphabet or the alternate "base64url" alphabet.
|
|
1078
|
-
* @param {string} str
|
|
1079
|
-
* @return {!Uint8Array}
|
|
1080
|
-
*/
|
|
1081
|
-
static fromBase64(str) {}
|
|
1082
|
-
/**
|
|
1083
|
-
* Convert a hex string to a Uint8Array.
|
|
1084
|
-
* @param {string} str
|
|
1085
|
-
* @return {!Uint8Array}
|
|
1086
|
-
*/
|
|
1087
|
-
static fromHex(str) {}
|
|
1088
|
-
/**
|
|
1089
|
-
* Convert a buffer to a hex string.
|
|
1090
|
-
* @param {BufferSource} data
|
|
1091
|
-
* @return {string}
|
|
1092
|
-
*/
|
|
1093
|
-
static toHex(data) {}
|
|
1094
|
-
/**
|
|
1095
|
-
* Concatenate buffers.
|
|
1096
|
-
* @param {...BufferSource} varArgs
|
|
1097
|
-
* @return {!Uint8Array}
|
|
1098
|
-
*/
|
|
1099
|
-
static concat(...varArgs) {}
|
|
1100
|
-
};
|
|
1101
|
-
/**
|
|
975
|
+
* @summary A set of utility functions for dealing with Streams and Manifests.
|
|
1102
976
|
*/
|
|
1103
|
-
shaka.
|
|
1104
|
-
/**
|
|
1105
|
-
* Registers a new dependency.
|
|
1106
|
-
* @param {shaka.dependencies.Allowed} key which is used for retrieving a
|
|
1107
|
-
* dependency
|
|
1108
|
-
* @param {?} dep a dependency
|
|
1109
|
-
*/
|
|
1110
|
-
static add(key, dep) {}
|
|
977
|
+
shaka.util.StreamUtils = class {
|
|
1111
978
|
/**
|
|
1112
|
-
*
|
|
1113
|
-
* @param {shaka.
|
|
979
|
+
* @param {shaka.extern.Variant} variant
|
|
980
|
+
* @param {shaka.extern.Restrictions} restrictions
|
|
981
|
+
* Configured restrictions from the user.
|
|
982
|
+
* @param {{width: number, height: number}} maxHwRes
|
|
983
|
+
* The maximum resolution the hardware can handle.
|
|
984
|
+
* This is applied separately from user restrictions because the setting
|
|
985
|
+
* should not be easily replaced by the user's configuration.
|
|
1114
986
|
* @return {boolean}
|
|
1115
987
|
*/
|
|
1116
|
-
static
|
|
1117
|
-
};
|
|
1118
|
-
/**
|
|
1119
|
-
* @enum {string}
|
|
1120
|
-
*/
|
|
1121
|
-
shaka.dependencies.Allowed = {
|
|
1122
|
-
muxjs: 'muxjs'
|
|
1123
|
-
};
|
|
1124
|
-
/**
|
|
1125
|
-
* @summary A set of utility functions for dealing with MIME types.
|
|
1126
|
-
*/
|
|
1127
|
-
shaka.util.MimeUtils = class {
|
|
1128
|
-
/**
|
|
1129
|
-
* Takes a MIME type and optional codecs string and produces the full MIME
|
|
1130
|
-
* type.
|
|
1131
|
-
* @param {string} mimeType
|
|
1132
|
-
* @param {string=} codecs
|
|
1133
|
-
* @return {string}
|
|
1134
|
-
*/
|
|
1135
|
-
static getFullType(mimeType, codecs) {}
|
|
1136
|
-
};
|
|
1137
|
-
/**
|
|
1138
|
-
* @summary Manages text parsers and cues.
|
|
1139
|
-
* @implements {shaka.util.IDestroyable}
|
|
1140
|
-
*/
|
|
1141
|
-
shaka.text.TextEngine = class {
|
|
1142
|
-
/** @param {shaka.extern.TextDisplayer} displayer */
|
|
1143
|
-
constructor(displayer) {}
|
|
1144
|
-
/**
|
|
1145
|
-
* @param {string} mimeType
|
|
1146
|
-
* @param {!shaka.extern.TextParserPlugin} plugin
|
|
1147
|
-
*/
|
|
1148
|
-
static registerParser(mimeType, plugin) {}
|
|
1149
|
-
/**
|
|
1150
|
-
* @param {string} mimeType
|
|
1151
|
-
*/
|
|
1152
|
-
static unregisterParser(mimeType) {}
|
|
1153
|
-
/**
|
|
1154
|
-
* @return {?shaka.extern.TextParserPlugin}
|
|
1155
|
-
*/
|
|
1156
|
-
static findParser(mimeType) {}
|
|
1157
|
-
/**
|
|
1158
|
-
* @override
|
|
1159
|
-
*/
|
|
1160
|
-
destroy() {}
|
|
988
|
+
static meetsRestrictions(variant, restrictions, maxHwRes) {}
|
|
1161
989
|
};
|
|
1162
990
|
/**
|
|
1163
991
|
* @summary
|
|
@@ -1341,8 +1169,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
|
|
|
1341
1169
|
* Called when the headers are received for a download.
|
|
1342
1170
|
* @param {shaka.net.NetworkingEngine.OnDownloadFailed=} onDownloadFailed
|
|
1343
1171
|
* Called when a download fails, for any reason.
|
|
1172
|
+
* @param {shaka.net.NetworkingEngine.OnRequest=} onRequest
|
|
1173
|
+
* Called when a request is made
|
|
1344
1174
|
*/
|
|
1345
|
-
constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed) {}
|
|
1175
|
+
constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest) {}
|
|
1346
1176
|
/**
|
|
1347
1177
|
* @param {boolean} forceHTTPS
|
|
1348
1178
|
*/
|
|
@@ -1417,9 +1247,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
|
|
|
1417
1247
|
* Makes a network request and returns the resulting data.
|
|
1418
1248
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
1419
1249
|
* @param {shaka.extern.Request} request
|
|
1250
|
+
* @param {shaka.extern.RequestContext=} context
|
|
1420
1251
|
* @return {!shaka.net.NetworkingEngine.PendingRequest}
|
|
1421
1252
|
*/
|
|
1422
|
-
request(type, request) {}
|
|
1253
|
+
request(type, request, context) {}
|
|
1423
1254
|
};
|
|
1424
1255
|
/**
|
|
1425
1256
|
* A wrapper class for the number of bytes remaining to be downloaded for the
|
|
@@ -1471,6 +1302,22 @@ shaka.net.NetworkingEngine.RequestType = {
|
|
|
1471
1302
|
'SERVER_CERTIFICATE': 5,
|
|
1472
1303
|
'KEY': 6
|
|
1473
1304
|
};
|
|
1305
|
+
/**
|
|
1306
|
+
* A more advanced form of the RequestType structure, meant to describe
|
|
1307
|
+
* sub-types of basic request types.
|
|
1308
|
+
* For example, an INIT_SEGMENT is a sub-type of SEGMENT.
|
|
1309
|
+
* This is meant to allow for more specificity to be added to the request type
|
|
1310
|
+
* data, without breaking backwards compatibility.
|
|
1311
|
+
* @enum {number}
|
|
1312
|
+
*/
|
|
1313
|
+
shaka.net.NetworkingEngine.AdvancedRequestType = {
|
|
1314
|
+
'INIT_SEGMENT': 0,
|
|
1315
|
+
'MEDIA_SEGMENT': 1,
|
|
1316
|
+
'MEDIA_PLAYLIST': 2,
|
|
1317
|
+
'MASTER_PLAYLIST': 3,
|
|
1318
|
+
'MPD': 4,
|
|
1319
|
+
'MSS': 5
|
|
1320
|
+
};
|
|
1474
1321
|
/**
|
|
1475
1322
|
* Priority level for network scheme plugins.
|
|
1476
1323
|
* If multiple plugins are provided for the same scheme, only the
|
|
@@ -1503,6 +1350,15 @@ shaka.net.NetworkingEngine.OnHeadersReceived;
|
|
|
1503
1350
|
* reason (e.g. even if the download was aborted).
|
|
1504
1351
|
*/
|
|
1505
1352
|
shaka.net.NetworkingEngine.OnDownloadFailed;
|
|
1353
|
+
/**
|
|
1354
|
+
* @typedef {function(
|
|
1355
|
+
* !shaka.net.NetworkingEngine.RequestType,
|
|
1356
|
+
* !shaka.extern.Request,
|
|
1357
|
+
* (shaka.extern.RequestContext|undefined))}
|
|
1358
|
+
* @description
|
|
1359
|
+
* A callback function called on every request
|
|
1360
|
+
*/
|
|
1361
|
+
shaka.net.NetworkingEngine.OnRequest;
|
|
1506
1362
|
/**
|
|
1507
1363
|
* @summary
|
|
1508
1364
|
* An EventManager maintains a collection of "event
|
|
@@ -1556,6 +1412,54 @@ shaka.util.EventManager = class {
|
|
|
1556
1412
|
* @typedef {function(!Event)}
|
|
1557
1413
|
*/
|
|
1558
1414
|
shaka.util.EventManager.ListenerType;
|
|
1415
|
+
/**
|
|
1416
|
+
* @namespace shaka.util.StringUtils
|
|
1417
|
+
* @summary A set of string utility functions.
|
|
1418
|
+
*/
|
|
1419
|
+
shaka.util.StringUtils = class {
|
|
1420
|
+
/**
|
|
1421
|
+
* Creates a string from the given buffer as UTF-8 encoding.
|
|
1422
|
+
* @param {?BufferSource} data
|
|
1423
|
+
* @return {string}
|
|
1424
|
+
*/
|
|
1425
|
+
static fromUTF8(data) {}
|
|
1426
|
+
/**
|
|
1427
|
+
* Creates a string from the given buffer as UTF-16 encoding.
|
|
1428
|
+
* @param {?BufferSource} data
|
|
1429
|
+
* @param {boolean} littleEndian
|
|
1430
|
+
true to read little endian, false to read big.
|
|
1431
|
+
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
1432
|
+
* expect invalid input. If noThrow is true and the data has an odd
|
|
1433
|
+
* length,it will be truncated.
|
|
1434
|
+
* @return {string}
|
|
1435
|
+
*/
|
|
1436
|
+
static fromUTF16(data, littleEndian, noThrow) {}
|
|
1437
|
+
/**
|
|
1438
|
+
* Creates a string from the given buffer, auto-detecting the encoding that is
|
|
1439
|
+
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
1440
|
+
* @param {?BufferSource} data
|
|
1441
|
+
* @return {string}
|
|
1442
|
+
*/
|
|
1443
|
+
static fromBytesAutoDetect(data) {}
|
|
1444
|
+
/**
|
|
1445
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
|
|
1446
|
+
* @param {string} str
|
|
1447
|
+
* @return {!ArrayBuffer}
|
|
1448
|
+
*/
|
|
1449
|
+
static toUTF8(str) {}
|
|
1450
|
+
/**
|
|
1451
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
1452
|
+
* @param {string} str
|
|
1453
|
+
* @param {boolean} littleEndian
|
|
1454
|
+
* @return {!ArrayBuffer}
|
|
1455
|
+
*/
|
|
1456
|
+
static toUTF16(str, littleEndian) {}
|
|
1457
|
+
/**
|
|
1458
|
+
* Resets the fromCharCode method's implementation.
|
|
1459
|
+
* For debug use.
|
|
1460
|
+
*/
|
|
1461
|
+
static resetFromCharCode() {}
|
|
1462
|
+
};
|
|
1559
1463
|
/**
|
|
1560
1464
|
* @summary DataViewReader abstracts a DataView object.
|
|
1561
1465
|
*/
|
|
@@ -1734,6 +1638,52 @@ shaka.util.Mp4Parser = class {
|
|
|
1734
1638
|
* @typedef {function(!shaka.extern.ParsedBox)}
|
|
1735
1639
|
*/
|
|
1736
1640
|
shaka.util.Mp4Parser.CallbackType;
|
|
1641
|
+
/**
|
|
1642
|
+
* @summary A set of Uint8Array utility functions.
|
|
1643
|
+
*/
|
|
1644
|
+
shaka.util.Uint8ArrayUtils = class {
|
|
1645
|
+
/**
|
|
1646
|
+
* Convert a buffer to a base64 string. The output will be standard
|
|
1647
|
+
* alphabet as opposed to base64url safe alphabet.
|
|
1648
|
+
* @param {BufferSource} data
|
|
1649
|
+
* @return {string}
|
|
1650
|
+
*/
|
|
1651
|
+
static toStandardBase64(data) {}
|
|
1652
|
+
/**
|
|
1653
|
+
* Convert a buffer to a base64 string. The output will always use the
|
|
1654
|
+
* alternate encoding/alphabet also known as "base64url".
|
|
1655
|
+
* @param {BufferSource} data
|
|
1656
|
+
* @param {boolean=} padding If true, pad the output with equals signs.
|
|
1657
|
+
* Defaults to true.
|
|
1658
|
+
* @return {string}
|
|
1659
|
+
*/
|
|
1660
|
+
static toBase64(data, padding) {}
|
|
1661
|
+
/**
|
|
1662
|
+
* Convert a base64 string to a Uint8Array. Accepts either the standard
|
|
1663
|
+
* alphabet or the alternate "base64url" alphabet.
|
|
1664
|
+
* @param {string} str
|
|
1665
|
+
* @return {!Uint8Array}
|
|
1666
|
+
*/
|
|
1667
|
+
static fromBase64(str) {}
|
|
1668
|
+
/**
|
|
1669
|
+
* Convert a hex string to a Uint8Array.
|
|
1670
|
+
* @param {string} str
|
|
1671
|
+
* @return {!Uint8Array}
|
|
1672
|
+
*/
|
|
1673
|
+
static fromHex(str) {}
|
|
1674
|
+
/**
|
|
1675
|
+
* Convert a buffer to a hex string.
|
|
1676
|
+
* @param {BufferSource} data
|
|
1677
|
+
* @return {string}
|
|
1678
|
+
*/
|
|
1679
|
+
static toHex(data) {}
|
|
1680
|
+
/**
|
|
1681
|
+
* Concatenate buffers.
|
|
1682
|
+
* @param {...BufferSource} varArgs
|
|
1683
|
+
* @return {!Uint8Array}
|
|
1684
|
+
*/
|
|
1685
|
+
static concat(...varArgs) {}
|
|
1686
|
+
};
|
|
1737
1687
|
/**
|
|
1738
1688
|
* @summary An interface to register manifest parsers.
|
|
1739
1689
|
*/
|
|
@@ -1758,6 +1708,13 @@ shaka.media.ManifestParser = class {
|
|
|
1758
1708
|
*/
|
|
1759
1709
|
static unregisterParserByMime(mimeType) {}
|
|
1760
1710
|
};
|
|
1711
|
+
/**
|
|
1712
|
+
* @enum {string}
|
|
1713
|
+
*/
|
|
1714
|
+
shaka.media.ManifestParser.AccessibilityPurpose = {
|
|
1715
|
+
VISUALLY_IMPAIRED: 'visually impaired',
|
|
1716
|
+
HARD_OF_HEARING: 'hard of hearing'
|
|
1717
|
+
};
|
|
1761
1718
|
/**
|
|
1762
1719
|
* Creates an InitSegmentReference, which provides the location to an
|
|
1763
1720
|
* initialization segment.
|
|
@@ -1773,9 +1730,10 @@ shaka.media.InitSegmentReference = class {
|
|
|
1773
1730
|
* segment extends to the end of the resource.
|
|
1774
1731
|
* @param {null|shaka.extern.MediaQualityInfo=} mediaQuality Information about
|
|
1775
1732
|
* the quality of the media associated with this init segment.
|
|
1776
|
-
* @param {number=} timescale
|
|
1733
|
+
* @param {(null|number)=} timescale
|
|
1734
|
+
* @param {(null|BufferSource)=} segmentData
|
|
1777
1735
|
*/
|
|
1778
|
-
constructor(uris, startByte, endByte, mediaQuality, timescale) {}
|
|
1736
|
+
constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData) {}
|
|
1779
1737
|
/**
|
|
1780
1738
|
* Returns the offset from the start of the resource to the
|
|
1781
1739
|
* start of the segment.
|
|
@@ -1909,6 +1867,26 @@ shaka.media.SegmentReference = class {
|
|
|
1909
1867
|
* @return {boolean}
|
|
1910
1868
|
*/
|
|
1911
1869
|
isPreload() {}
|
|
1870
|
+
/**
|
|
1871
|
+
* Mark the reference as non-independent.
|
|
1872
|
+
*/
|
|
1873
|
+
markAsNonIndependent() {}
|
|
1874
|
+
/**
|
|
1875
|
+
* Returns true if the segment is independent.
|
|
1876
|
+
* @return {boolean}
|
|
1877
|
+
*/
|
|
1878
|
+
isIndependent() {}
|
|
1879
|
+
/**
|
|
1880
|
+
* Mark the reference as byterange optimization.
|
|
1881
|
+
* The "byterange optimization" means that it is playable using MP4 low
|
|
1882
|
+
* latency streaming with chunked data.
|
|
1883
|
+
*/
|
|
1884
|
+
markAsByterangeOptimization() {}
|
|
1885
|
+
/**
|
|
1886
|
+
* Returns true if the segment has a byterange optimization.
|
|
1887
|
+
* @return {boolean}
|
|
1888
|
+
*/
|
|
1889
|
+
hasByterangeOptimization() {}
|
|
1912
1890
|
/**
|
|
1913
1891
|
* Set the segment's thumbnail sprite.
|
|
1914
1892
|
* @param {shaka.media.SegmentReference.ThumbnailSprite} thumbnailSprite
|
|
@@ -1969,6 +1947,26 @@ shaka.util.Id3Utils = class {
|
|
|
1969
1947
|
* @return {!Array.<shaka.extern.MetadataFrame>}
|
|
1970
1948
|
*/
|
|
1971
1949
|
static getID3Frames(id3Data) {}
|
|
1950
|
+
/**
|
|
1951
|
+
* Returns any adjacent ID3 tags found in data starting at offset, as one
|
|
1952
|
+
* block of data
|
|
1953
|
+
* @param {Uint8Array} id3Data - The ID3 data containing one or more ID3 tags
|
|
1954
|
+
* @param {number=} offset - The offset at which to start searching
|
|
1955
|
+
* @return {!Uint8Array}
|
|
1956
|
+
*/
|
|
1957
|
+
static getID3Data(id3Data, offset) {}
|
|
1958
|
+
};
|
|
1959
|
+
/**
|
|
1960
|
+
* @summary
|
|
1961
|
+
* Parser for exponential Golomb codes, a variable-bitwidth number encoding
|
|
1962
|
+
* scheme used by h264.
|
|
1963
|
+
* Based on https://github.com/videojs/mux.js/blob/main/lib/utils/exp-golomb.js
|
|
1964
|
+
*/
|
|
1965
|
+
shaka.util.ExpGolomb = class {
|
|
1966
|
+
/**
|
|
1967
|
+
* @param {!Uint8Array} data
|
|
1968
|
+
*/
|
|
1969
|
+
constructor(data) {}
|
|
1972
1970
|
};
|
|
1973
1971
|
/**
|
|
1974
1972
|
* @see https://en.wikipedia.org/wiki/MPEG_transport_stream
|
|
@@ -1976,7 +1974,77 @@ shaka.util.Id3Utils = class {
|
|
|
1976
1974
|
shaka.util.TsParser = class {
|
|
1977
1975
|
/** */
|
|
1978
1976
|
constructor() {}
|
|
1977
|
+
/**
|
|
1978
|
+
* Clear previous data
|
|
1979
|
+
*/
|
|
1980
|
+
clearData() {}
|
|
1981
|
+
/**
|
|
1982
|
+
* Parse the given data
|
|
1983
|
+
* @param {Uint8Array} data
|
|
1984
|
+
* @return {!shaka.util.TsParser}
|
|
1985
|
+
*/
|
|
1986
|
+
parse(data) {}
|
|
1987
|
+
/**
|
|
1988
|
+
* Parse AVC Nalus
|
|
1989
|
+
* The code is based on hls.js
|
|
1990
|
+
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
1991
|
+
* @param {shaka.extern.MPEG_PES} pes
|
|
1992
|
+
* @param {?shaka.extern.MPEG_PES=} nextPes
|
|
1993
|
+
* @return {!Array.<shaka.extern.VideoNalu>}
|
|
1994
|
+
*/
|
|
1995
|
+
parseAvcNalus(pes, nextPes) {}
|
|
1996
|
+
/**
|
|
1997
|
+
* Return the ID3 metadata
|
|
1998
|
+
* @return {!Array.<shaka.extern.ID3Metadata>}
|
|
1999
|
+
*/
|
|
2000
|
+
getMetadata() {}
|
|
2001
|
+
/**
|
|
2002
|
+
* Return the audio data
|
|
2003
|
+
* @return {!Array.<shaka.extern.MPEG_PES>}
|
|
2004
|
+
*/
|
|
2005
|
+
getAudioData() {}
|
|
2006
|
+
/**
|
|
2007
|
+
* Return the audio data
|
|
2008
|
+
* @return {!Array.<shaka.extern.MPEG_PES>}
|
|
2009
|
+
*/
|
|
2010
|
+
getVideoData() {}
|
|
2011
|
+
/**
|
|
2012
|
+
* Return the start time for the audio and video
|
|
2013
|
+
* @return {{audio: ?number, video: ?number}}
|
|
2014
|
+
*/
|
|
2015
|
+
getStartTime() {}
|
|
2016
|
+
/**
|
|
2017
|
+
* Return the audio and video codecs
|
|
2018
|
+
* @return {{audio: ?string, video: ?string}}
|
|
2019
|
+
*/
|
|
2020
|
+
getCodecs() {}
|
|
2021
|
+
/**
|
|
2022
|
+
* Return the video data
|
|
2023
|
+
* @return {!Array.<shaka.extern.VideoNalu>}
|
|
2024
|
+
*/
|
|
2025
|
+
getVideoNalus() {}
|
|
2026
|
+
/**
|
|
2027
|
+
* Return the video resolution
|
|
2028
|
+
* @return {{height: ?string, width: ?string}}
|
|
2029
|
+
*/
|
|
2030
|
+
getVideoResolution() {}
|
|
2031
|
+
/**
|
|
2032
|
+
* Check if the passed data corresponds to an MPEG2-TS
|
|
2033
|
+
* @param {Uint8Array} data
|
|
2034
|
+
* @return {boolean}
|
|
2035
|
+
*/
|
|
2036
|
+
static probe(data) {}
|
|
2037
|
+
/**
|
|
2038
|
+
* Returns the synchronization offset
|
|
2039
|
+
* @param {Uint8Array} data
|
|
2040
|
+
* @return {number}
|
|
2041
|
+
*/
|
|
2042
|
+
static syncOffset(data) {}
|
|
1979
2043
|
};
|
|
2044
|
+
/**
|
|
2045
|
+
* @const {number}
|
|
2046
|
+
*/
|
|
2047
|
+
shaka.util.TsParser.Timescale;
|
|
1980
2048
|
/**
|
|
1981
2049
|
* @summary
|
|
1982
2050
|
* lcevcDil - (MPEG-5 Part 2 LCEVC - Decoder Integration Layer) provides
|
|
@@ -2070,6 +2138,14 @@ shaka.media.PresentationTimeline = class {
|
|
|
2070
2138
|
* @return {number}
|
|
2071
2139
|
*/
|
|
2072
2140
|
getDelay() {}
|
|
2141
|
+
/**
|
|
2142
|
+
* Gives PresentationTimeline a Stream's timeline so it can size and position
|
|
2143
|
+
* the segment availability window, and account for missing segment
|
|
2144
|
+
* information.
|
|
2145
|
+
* @param {!Array.<shaka.media.PresentationTimeline.TimeRange>} timeline
|
|
2146
|
+
* @param {number} startOffset
|
|
2147
|
+
*/
|
|
2148
|
+
notifyTimeRange(timeline, startOffset) {}
|
|
2073
2149
|
/**
|
|
2074
2150
|
* Gives PresentationTimeline an array of segments so it can size and position
|
|
2075
2151
|
* the segment availability window, and account for missing segment
|
|
@@ -2179,6 +2255,22 @@ shaka.media.PresentationTimeline = class {
|
|
|
2179
2255
|
*/
|
|
2180
2256
|
setAvailabilityTimeOffset(offset) {}
|
|
2181
2257
|
};
|
|
2258
|
+
/**
|
|
2259
|
+
* @typedef {{
|
|
2260
|
+
* start: number,
|
|
2261
|
+
* unscaledStart: number,
|
|
2262
|
+
* end: number
|
|
2263
|
+
* }}
|
|
2264
|
+
* @description
|
|
2265
|
+
* Defines a time range of a media segment. Times are in seconds.
|
|
2266
|
+
* @property {number} start
|
|
2267
|
+
* The start time of the range.
|
|
2268
|
+
* @property {number} unscaledStart
|
|
2269
|
+
* The start time of the range in representation timescale units.
|
|
2270
|
+
* @property {number} end
|
|
2271
|
+
* The end time (exclusive) of the range.
|
|
2272
|
+
*/
|
|
2273
|
+
shaka.media.PresentationTimeline.TimeRange;
|
|
2182
2274
|
/**
|
|
2183
2275
|
* SegmentIndex.
|
|
2184
2276
|
* @implements {shaka.util.IReleasable}
|
|
@@ -2265,9 +2357,14 @@ shaka.media.SegmentIndex = class {
|
|
|
2265
2357
|
updateEvery(interval, updateCallback) {}
|
|
2266
2358
|
/**
|
|
2267
2359
|
* Returns a new iterator that initially points to the segment that contains
|
|
2268
|
-
* the given time
|
|
2269
|
-
*
|
|
2360
|
+
* the given time, or the nearest independent segment before it.
|
|
2361
|
+
* Like the normal iterator, next() must be called first to get to the first
|
|
2362
|
+
* element. Returns null if we do not find a segment at the
|
|
2270
2363
|
* requested time.
|
|
2364
|
+
* The first segment returned by the iterator _MUST_ be an independent
|
|
2365
|
+
* segment. Assumes that only partial references can be dependent, based on
|
|
2366
|
+
* RFC 8216 rev 13, section 8.1: "Each (non-Partial) Media Segment in a Media
|
|
2367
|
+
* Playlist will contain at least one independent frame."
|
|
2271
2368
|
* @param {number} time
|
|
2272
2369
|
* @return {?shaka.media.SegmentIterator}
|
|
2273
2370
|
*/
|
|
@@ -2353,6 +2450,16 @@ shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
|
|
|
2353
2450
|
*/
|
|
2354
2451
|
updateEvery(interval, updateCallback) {}
|
|
2355
2452
|
};
|
|
2453
|
+
/**
|
|
2454
|
+
* @typedef {function(
|
|
2455
|
+
* !(shaka.media.InitSegmentReference|shaka.media.SegmentReference),
|
|
2456
|
+
* shaka.extern.Stream,
|
|
2457
|
+
* ?function(BufferSource):!Promise=
|
|
2458
|
+
* ):!shaka.net.NetworkingEngine.PendingRequest}
|
|
2459
|
+
* @description
|
|
2460
|
+
* A callback function that fetches a segment.
|
|
2461
|
+
*/
|
|
2462
|
+
shaka.media.SegmentPrefetch.FetchDispatcher;
|
|
2356
2463
|
/**
|
|
2357
2464
|
* A text displayer plugin using the browser's native VTTCue interface.
|
|
2358
2465
|
* @implements {shaka.extern.TextDisplayer}
|
|
@@ -2428,37 +2535,6 @@ shaka.text.UITextDisplayer = class {
|
|
|
2428
2535
|
*/
|
|
2429
2536
|
shaka.text.WebVttGenerator = class {
|
|
2430
2537
|
};
|
|
2431
|
-
/**
|
|
2432
|
-
* @typedef {{
|
|
2433
|
-
* type: string,
|
|
2434
|
-
* init: boolean,
|
|
2435
|
-
* duration: number,
|
|
2436
|
-
* mimeType: string,
|
|
2437
|
-
* codecs: string,
|
|
2438
|
-
* bandwidth: (number|undefined)
|
|
2439
|
-
* }}
|
|
2440
|
-
* @property {string} type
|
|
2441
|
-
* The media type
|
|
2442
|
-
* @property {boolean} init
|
|
2443
|
-
* Flag indicating whether the segment is an init segment
|
|
2444
|
-
* @property {number} duration
|
|
2445
|
-
* The duration of the segment in seconds
|
|
2446
|
-
* @property {string} mimeType
|
|
2447
|
-
* The segment's mime type
|
|
2448
|
-
* @property {string} codecs
|
|
2449
|
-
* The segment's codecs
|
|
2450
|
-
* @property {(number|undefined)} bandwidth
|
|
2451
|
-
* The segment's variation bandwidth
|
|
2452
|
-
*/
|
|
2453
|
-
shaka.util.CmcdManager.SegmentInfo;
|
|
2454
|
-
/**
|
|
2455
|
-
* @typedef {{
|
|
2456
|
-
* format: shaka.util.CmcdManager.StreamingFormat
|
|
2457
|
-
* }}
|
|
2458
|
-
* @property {shaka.util.CmcdManager.StreamingFormat} format
|
|
2459
|
-
* The manifest's stream format
|
|
2460
|
-
*/
|
|
2461
|
-
shaka.util.CmcdManager.ManifestInfo;
|
|
2462
2538
|
/**
|
|
2463
2539
|
* @enum {string}
|
|
2464
2540
|
*/
|
|
@@ -2546,30 +2622,48 @@ shaka.util.FairPlayUtils = class {
|
|
|
2546
2622
|
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2547
2623
|
*/
|
|
2548
2624
|
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2625
|
+
/**
|
|
2626
|
+
* ExpressPlay initDataTransform configuration.
|
|
2627
|
+
* @param {!Uint8Array} initData
|
|
2628
|
+
* @param {string} initDataType
|
|
2629
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2630
|
+
*/
|
|
2631
|
+
static expressplayInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2549
2632
|
/**
|
|
2550
2633
|
* Verimatrix FairPlay request.
|
|
2551
2634
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2552
2635
|
* @param {shaka.extern.Request} request
|
|
2636
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2553
2637
|
*/
|
|
2554
|
-
static verimatrixFairPlayRequest(type, request) {}
|
|
2638
|
+
static verimatrixFairPlayRequest(type, request, context) {}
|
|
2555
2639
|
/**
|
|
2556
2640
|
* EZDRM FairPlay request.
|
|
2557
2641
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2558
2642
|
* @param {shaka.extern.Request} request
|
|
2643
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2559
2644
|
*/
|
|
2560
|
-
static ezdrmFairPlayRequest(type, request) {}
|
|
2645
|
+
static ezdrmFairPlayRequest(type, request, context) {}
|
|
2561
2646
|
/**
|
|
2562
2647
|
* Conax FairPlay request.
|
|
2563
2648
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2564
2649
|
* @param {shaka.extern.Request} request
|
|
2650
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2565
2651
|
*/
|
|
2566
|
-
static conaxFairPlayRequest(type, request) {}
|
|
2652
|
+
static conaxFairPlayRequest(type, request, context) {}
|
|
2653
|
+
/**
|
|
2654
|
+
* ExpressPlay FairPlay request.
|
|
2655
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2656
|
+
* @param {shaka.extern.Request} request
|
|
2657
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2658
|
+
*/
|
|
2659
|
+
static expressplayFairPlayRequest(type, request, context) {}
|
|
2567
2660
|
/**
|
|
2568
2661
|
* Common FairPlay response transform for some DRMs providers.
|
|
2569
2662
|
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2570
2663
|
* @param {shaka.extern.Response} response
|
|
2664
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2571
2665
|
*/
|
|
2572
|
-
static commonFairPlayResponse(type, response) {}
|
|
2666
|
+
static commonFairPlayResponse(type, response, context) {}
|
|
2573
2667
|
};
|
|
2574
2668
|
/**
|
|
2575
2669
|
* @final
|
|
@@ -2765,6 +2859,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2765
2859
|
* @return {shaka.Player.LoadMode}
|
|
2766
2860
|
*/
|
|
2767
2861
|
getLoadMode() {}
|
|
2862
|
+
/**
|
|
2863
|
+
* Get the current manifest type.
|
|
2864
|
+
* @return {?string}
|
|
2865
|
+
*/
|
|
2866
|
+
getManifestType() {}
|
|
2768
2867
|
/**
|
|
2769
2868
|
* Get the media element that the player is currently using to play loaded
|
|
2770
2869
|
* content. If the player has not loaded content, this will return
|
|
@@ -2844,6 +2943,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2844
2943
|
* @return {number}
|
|
2845
2944
|
*/
|
|
2846
2945
|
getExpiration() {}
|
|
2946
|
+
/**
|
|
2947
|
+
* Returns the active sessions metadata
|
|
2948
|
+
* @return {!Array.<shaka.extern.DrmSessionMetadata>}
|
|
2949
|
+
*/
|
|
2950
|
+
getActiveSessionsMetadata() {}
|
|
2847
2951
|
/**
|
|
2848
2952
|
* Gets a map of EME key ID to the current key status.
|
|
2849
2953
|
* @return {!Object<string, string>}
|
|
@@ -2981,8 +3085,9 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2981
3085
|
* @param {string} language
|
|
2982
3086
|
* @param {string=} role
|
|
2983
3087
|
* @param {number=} channelsCount
|
|
3088
|
+
* @param {number=} safeMargin
|
|
2984
3089
|
*/
|
|
2985
|
-
selectAudioLanguage(language, role, channelsCount) {}
|
|
3090
|
+
selectAudioLanguage(language, role, channelsCount, safeMargin) {}
|
|
2986
3091
|
/**
|
|
2987
3092
|
* Sets the current text language and current text role to the selected
|
|
2988
3093
|
* language and role, and chooses a new variant if need be. If the player has
|
|
@@ -2997,8 +3102,14 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2997
3102
|
* label uniquely identifies an audio stream, so all the variants
|
|
2998
3103
|
* are expected to have the same variant.audio.
|
|
2999
3104
|
* @param {string} label
|
|
3105
|
+
* @param {boolean=} clearBuffer Optional clear buffer or not when
|
|
3106
|
+
* switch to new variant
|
|
3107
|
+
* Defaults to true if not provided
|
|
3108
|
+
* @param {number=} safeMargin Optional amount of buffer (in seconds) to
|
|
3109
|
+
* retain when clearing the buffer.
|
|
3110
|
+
* Defaults to 0 if not provided. Ignored if clearBuffer is false.
|
|
3000
3111
|
*/
|
|
3001
|
-
selectVariantsByLabel(label) {}
|
|
3112
|
+
selectVariantsByLabel(label, clearBuffer, safeMargin) {}
|
|
3002
3113
|
/**
|
|
3003
3114
|
* Check if the text displayer is enabled.
|
|
3004
3115
|
* @return {boolean}
|
|
@@ -3240,6 +3351,42 @@ shaka.ads.ClientSideAd = class {
|
|
|
3240
3351
|
* @override
|
|
3241
3352
|
*/
|
|
3242
3353
|
getDescription() {}
|
|
3354
|
+
/**
|
|
3355
|
+
* @override
|
|
3356
|
+
*/
|
|
3357
|
+
getVastMediaBitrate() {}
|
|
3358
|
+
/**
|
|
3359
|
+
* @override
|
|
3360
|
+
*/
|
|
3361
|
+
getVastMediaHeight() {}
|
|
3362
|
+
/**
|
|
3363
|
+
* @override
|
|
3364
|
+
*/
|
|
3365
|
+
getVastMediaWidth() {}
|
|
3366
|
+
/**
|
|
3367
|
+
* @override
|
|
3368
|
+
*/
|
|
3369
|
+
getAdId() {}
|
|
3370
|
+
/**
|
|
3371
|
+
* @override
|
|
3372
|
+
*/
|
|
3373
|
+
getCreativeAdId() {}
|
|
3374
|
+
/**
|
|
3375
|
+
* @override
|
|
3376
|
+
*/
|
|
3377
|
+
getAdvertiserName() {}
|
|
3378
|
+
/**
|
|
3379
|
+
* @override
|
|
3380
|
+
*/
|
|
3381
|
+
getMediaUrl() {}
|
|
3382
|
+
/**
|
|
3383
|
+
* @override
|
|
3384
|
+
*/
|
|
3385
|
+
getTimeOffset() {}
|
|
3386
|
+
/**
|
|
3387
|
+
* @override
|
|
3388
|
+
*/
|
|
3389
|
+
getPodIndex() {}
|
|
3243
3390
|
/**
|
|
3244
3391
|
* @override
|
|
3245
3392
|
*/
|
|
@@ -3334,6 +3481,42 @@ shaka.ads.ServerSideAd = class {
|
|
|
3334
3481
|
* @override
|
|
3335
3482
|
*/
|
|
3336
3483
|
getDescription() {}
|
|
3484
|
+
/**
|
|
3485
|
+
* @override
|
|
3486
|
+
*/
|
|
3487
|
+
getVastMediaBitrate() {}
|
|
3488
|
+
/**
|
|
3489
|
+
* @override
|
|
3490
|
+
*/
|
|
3491
|
+
getVastMediaHeight() {}
|
|
3492
|
+
/**
|
|
3493
|
+
* @override
|
|
3494
|
+
*/
|
|
3495
|
+
getVastMediaWidth() {}
|
|
3496
|
+
/**
|
|
3497
|
+
* @override
|
|
3498
|
+
*/
|
|
3499
|
+
getAdId() {}
|
|
3500
|
+
/**
|
|
3501
|
+
* @override
|
|
3502
|
+
*/
|
|
3503
|
+
getCreativeAdId() {}
|
|
3504
|
+
/**
|
|
3505
|
+
* @override
|
|
3506
|
+
*/
|
|
3507
|
+
getAdvertiserName() {}
|
|
3508
|
+
/**
|
|
3509
|
+
* @override
|
|
3510
|
+
*/
|
|
3511
|
+
getMediaUrl() {}
|
|
3512
|
+
/**
|
|
3513
|
+
* @override
|
|
3514
|
+
*/
|
|
3515
|
+
getTimeOffset() {}
|
|
3516
|
+
/**
|
|
3517
|
+
* @override
|
|
3518
|
+
*/
|
|
3519
|
+
getPodIndex() {}
|
|
3337
3520
|
/**
|
|
3338
3521
|
* @override
|
|
3339
3522
|
*/
|
|
@@ -3354,7 +3537,11 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
3354
3537
|
/**
|
|
3355
3538
|
* @override
|
|
3356
3539
|
*/
|
|
3357
|
-
|
|
3540
|
+
configure(config) {}
|
|
3541
|
+
/**
|
|
3542
|
+
* @override
|
|
3543
|
+
*/
|
|
3544
|
+
initClientSide(adContainer, video, adsRenderingSettings) {}
|
|
3358
3545
|
/**
|
|
3359
3546
|
* @override
|
|
3360
3547
|
*/
|
|
@@ -3367,6 +3554,10 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
3367
3554
|
* @override
|
|
3368
3555
|
*/
|
|
3369
3556
|
requestClientSideAds(imaRequest) {}
|
|
3557
|
+
/**
|
|
3558
|
+
* @override
|
|
3559
|
+
*/
|
|
3560
|
+
updateClientSideAdsRenderingSettings(adsRenderingSettings) {}
|
|
3370
3561
|
/**
|
|
3371
3562
|
* @override
|
|
3372
3563
|
*/
|
|
@@ -3547,6 +3738,11 @@ shaka.ads.AdManager.AD_METADATA;
|
|
|
3547
3738
|
* @const {string}
|
|
3548
3739
|
*/
|
|
3549
3740
|
shaka.ads.AdManager.AD_RECOVERABLE_ERROR;
|
|
3741
|
+
/**
|
|
3742
|
+
* The event name for when the ad manager dispatch errors.
|
|
3743
|
+
* @const {string}
|
|
3744
|
+
*/
|
|
3745
|
+
shaka.ads.AdManager.AD_ERROR;
|
|
3550
3746
|
/**
|
|
3551
3747
|
* The event name for when the client side SDK signalled its readiness
|
|
3552
3748
|
* to play a VPAID ad or an ad rule.
|
|
@@ -3694,19 +3890,70 @@ shaka.cast.CastReceiver = class extends shaka.util.FakeEventTarget {
|
|
|
3694
3890
|
* Should be called from an appDataCallback.
|
|
3695
3891
|
* @param {string} imageUrl
|
|
3696
3892
|
*/
|
|
3697
|
-
setContentImage(imageUrl) {}
|
|
3893
|
+
setContentImage(imageUrl) {}
|
|
3894
|
+
/**
|
|
3895
|
+
* Set the Cast content's artist.
|
|
3896
|
+
* Also sets the metadata type to music.
|
|
3897
|
+
* Should be called from an appDataCallback.
|
|
3898
|
+
* @param {string} artist
|
|
3899
|
+
*/
|
|
3900
|
+
setContentArtist(artist) {}
|
|
3901
|
+
/**
|
|
3902
|
+
* Destroys the underlying Player, then terminates the cast receiver app.
|
|
3903
|
+
* @override
|
|
3904
|
+
*/
|
|
3905
|
+
destroy() {}
|
|
3906
|
+
};
|
|
3907
|
+
/**
|
|
3908
|
+
* CEA-X08 captions decoder.
|
|
3909
|
+
* @implements {shaka.extern.ICaptionDecoder}
|
|
3910
|
+
*/
|
|
3911
|
+
shaka.cea.CeaDecoder = class {
|
|
3912
|
+
/** */
|
|
3913
|
+
constructor() {}
|
|
3914
|
+
};
|
|
3915
|
+
/**
|
|
3916
|
+
* MPEG4 stream parser used for extracting 708 closed captions data.
|
|
3917
|
+
* @implements {shaka.extern.ICeaParser}
|
|
3918
|
+
*/
|
|
3919
|
+
shaka.cea.Mp4CeaParser = class {
|
|
3920
|
+
/** */
|
|
3921
|
+
constructor() {}
|
|
3922
|
+
};
|
|
3923
|
+
/**
|
|
3924
|
+
* MPEG TS CEA parser.
|
|
3925
|
+
* @implements {shaka.extern.ICeaParser}
|
|
3926
|
+
*/
|
|
3927
|
+
shaka.cea.TsCeaParser = class {
|
|
3928
|
+
/** */
|
|
3929
|
+
constructor() {}
|
|
3930
|
+
};
|
|
3931
|
+
/**
|
|
3932
|
+
* A utility to combine streams across periods.
|
|
3933
|
+
* @implements {shaka.util.IReleasable}
|
|
3934
|
+
* @final
|
|
3935
|
+
*/
|
|
3936
|
+
shaka.util.PeriodCombiner = class {
|
|
3937
|
+
/** */
|
|
3938
|
+
constructor() {}
|
|
3939
|
+
/**
|
|
3940
|
+
* @return {!Array.<shaka.extern.Variant>}
|
|
3941
|
+
*/
|
|
3942
|
+
getVariants() {}
|
|
3698
3943
|
/**
|
|
3699
|
-
*
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3944
|
+
* @return {!Array.<shaka.extern.Stream>}
|
|
3945
|
+
*/
|
|
3946
|
+
getTextStreams() {}
|
|
3947
|
+
/**
|
|
3948
|
+
* @return {!Array.<shaka.extern.Stream>}
|
|
3703
3949
|
*/
|
|
3704
|
-
|
|
3950
|
+
getImageStreams() {}
|
|
3705
3951
|
/**
|
|
3706
|
-
*
|
|
3707
|
-
* @
|
|
3952
|
+
* @param {!Array.<shaka.extern.Period>} periods
|
|
3953
|
+
* @param {boolean} isDynamic
|
|
3954
|
+
* @return {!Promise}
|
|
3708
3955
|
*/
|
|
3709
|
-
|
|
3956
|
+
combinePeriods(periods, isDynamic) {}
|
|
3710
3957
|
};
|
|
3711
3958
|
/**
|
|
3712
3959
|
* Creates a new DASH parser.
|
|
@@ -3736,6 +3983,30 @@ shaka.dash.DashParser = class {
|
|
|
3736
3983
|
*/
|
|
3737
3984
|
onExpirationUpdated(sessionId, expiration) {}
|
|
3738
3985
|
};
|
|
3986
|
+
/**
|
|
3987
|
+
*/
|
|
3988
|
+
shaka.dependencies = class {
|
|
3989
|
+
/**
|
|
3990
|
+
* Registers a new dependency.
|
|
3991
|
+
* @param {shaka.dependencies.Allowed} key which is used for retrieving a
|
|
3992
|
+
* dependency
|
|
3993
|
+
* @param {?} dep a dependency
|
|
3994
|
+
*/
|
|
3995
|
+
static add(key, dep) {}
|
|
3996
|
+
/**
|
|
3997
|
+
* Check if we have a dependency for the key.
|
|
3998
|
+
* @param {shaka.dependencies.Allowed} key key
|
|
3999
|
+
* @return {boolean}
|
|
4000
|
+
*/
|
|
4001
|
+
static has(key) {}
|
|
4002
|
+
};
|
|
4003
|
+
/**
|
|
4004
|
+
* @enum {string}
|
|
4005
|
+
*/
|
|
4006
|
+
shaka.dependencies.Allowed = {
|
|
4007
|
+
muxjs: 'muxjs',
|
|
4008
|
+
ISOBoxer: 'ISOBoxer'
|
|
4009
|
+
};
|
|
3739
4010
|
/**
|
|
3740
4011
|
* @summary A networking plugin to handle data URIs.
|
|
3741
4012
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs
|
|
@@ -3781,6 +4052,34 @@ shaka.hls.HlsParser = class {
|
|
|
3781
4052
|
*/
|
|
3782
4053
|
onExpirationUpdated(sessionId, expiration) {}
|
|
3783
4054
|
};
|
|
4055
|
+
/**
|
|
4056
|
+
* Creates a new MSS parser.
|
|
4057
|
+
* @implements {shaka.extern.ManifestParser}
|
|
4058
|
+
*/
|
|
4059
|
+
shaka.mss.MssParser = class {
|
|
4060
|
+
/** Creates a new MSS parser. */
|
|
4061
|
+
constructor() {}
|
|
4062
|
+
/**
|
|
4063
|
+
* @override
|
|
4064
|
+
*/
|
|
4065
|
+
configure(config) {}
|
|
4066
|
+
/**
|
|
4067
|
+
* @override
|
|
4068
|
+
*/
|
|
4069
|
+
start(uri, playerInterface) {}
|
|
4070
|
+
/**
|
|
4071
|
+
* @override
|
|
4072
|
+
*/
|
|
4073
|
+
stop() {}
|
|
4074
|
+
/**
|
|
4075
|
+
* @override
|
|
4076
|
+
*/
|
|
4077
|
+
update() {}
|
|
4078
|
+
/**
|
|
4079
|
+
* @override
|
|
4080
|
+
*/
|
|
4081
|
+
onExpirationUpdated(sessionId, expiration) {}
|
|
4082
|
+
};
|
|
3784
4083
|
/**
|
|
3785
4084
|
* @summary A networking plugin to handle http and https URIs via the Fetch API.
|
|
3786
4085
|
*/
|
|
@@ -4070,11 +4369,20 @@ shaka.polyfill.MediaCapabilities = class {
|
|
|
4070
4369
|
};
|
|
4071
4370
|
/**
|
|
4072
4371
|
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
4073
|
-
* garbage-collecting the polyfilled method on it.
|
|
4372
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
4074
4373
|
* it to ensure that it is not stripped out by the compiler.
|
|
4075
4374
|
* @type {MediaCapabilities}
|
|
4076
4375
|
*/
|
|
4077
4376
|
shaka.polyfill.MediaCapabilities.originalMcap;
|
|
4377
|
+
/**
|
|
4378
|
+
* A cache that stores the MediaKeySystemAccess result of calling
|
|
4379
|
+
* `navigator.requestMediaKeySystemAccess` by a key combination of
|
|
4380
|
+
* video/audio codec and key system string.
|
|
4381
|
+
* @type {(Object<(!string), (!MediaKeySystemAccess)>)}
|
|
4382
|
+
*/
|
|
4383
|
+
shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_ = {
|
|
4384
|
+
|
|
4385
|
+
};
|
|
4078
4386
|
/**
|
|
4079
4387
|
* @summary A polyfill to patch MSE bugs.
|
|
4080
4388
|
*/
|
|
@@ -4355,6 +4663,270 @@ shaka.text.SsaTextParser = class {
|
|
|
4355
4663
|
*/
|
|
4356
4664
|
parseMedia(data, time) {}
|
|
4357
4665
|
};
|
|
4666
|
+
/**
|
|
4667
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4668
|
+
*/
|
|
4669
|
+
shaka.transmuxer.AacTransmuxer = class {
|
|
4670
|
+
/**
|
|
4671
|
+
* @param {string} mimeType
|
|
4672
|
+
*/
|
|
4673
|
+
constructor(mimeType) {}
|
|
4674
|
+
/**
|
|
4675
|
+
* @override
|
|
4676
|
+
*/
|
|
4677
|
+
destroy() {}
|
|
4678
|
+
/**
|
|
4679
|
+
* Check if the mime type and the content type is supported.
|
|
4680
|
+
* @param {string} mimeType
|
|
4681
|
+
* @param {string=} contentType
|
|
4682
|
+
* @return {boolean}
|
|
4683
|
+
* @override
|
|
4684
|
+
*/
|
|
4685
|
+
isSupported(mimeType, contentType) {}
|
|
4686
|
+
/**
|
|
4687
|
+
* @override
|
|
4688
|
+
*/
|
|
4689
|
+
convertCodecs(contentType, mimeType) {}
|
|
4690
|
+
/**
|
|
4691
|
+
* @override
|
|
4692
|
+
*/
|
|
4693
|
+
getOrginalMimeType() {}
|
|
4694
|
+
/**
|
|
4695
|
+
* @override
|
|
4696
|
+
*/
|
|
4697
|
+
transmux(data, stream, reference, duration) {}
|
|
4698
|
+
};
|
|
4699
|
+
/**
|
|
4700
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4701
|
+
*/
|
|
4702
|
+
shaka.transmuxer.Ac3Transmuxer = class {
|
|
4703
|
+
/**
|
|
4704
|
+
* @param {string} mimeType
|
|
4705
|
+
*/
|
|
4706
|
+
constructor(mimeType) {}
|
|
4707
|
+
/**
|
|
4708
|
+
* @override
|
|
4709
|
+
*/
|
|
4710
|
+
destroy() {}
|
|
4711
|
+
/**
|
|
4712
|
+
* Check if the mime type and the content type is supported.
|
|
4713
|
+
* @param {string} mimeType
|
|
4714
|
+
* @param {string=} contentType
|
|
4715
|
+
* @return {boolean}
|
|
4716
|
+
* @override
|
|
4717
|
+
*/
|
|
4718
|
+
isSupported(mimeType, contentType) {}
|
|
4719
|
+
/**
|
|
4720
|
+
* @override
|
|
4721
|
+
*/
|
|
4722
|
+
convertCodecs(contentType, mimeType) {}
|
|
4723
|
+
/**
|
|
4724
|
+
* @override
|
|
4725
|
+
*/
|
|
4726
|
+
getOrginalMimeType() {}
|
|
4727
|
+
/**
|
|
4728
|
+
* @override
|
|
4729
|
+
*/
|
|
4730
|
+
transmux(data, stream, reference, duration) {}
|
|
4731
|
+
};
|
|
4732
|
+
/**
|
|
4733
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4734
|
+
*/
|
|
4735
|
+
shaka.transmuxer.Ec3Transmuxer = class {
|
|
4736
|
+
/**
|
|
4737
|
+
* @param {string} mimeType
|
|
4738
|
+
*/
|
|
4739
|
+
constructor(mimeType) {}
|
|
4740
|
+
/**
|
|
4741
|
+
* @override
|
|
4742
|
+
*/
|
|
4743
|
+
destroy() {}
|
|
4744
|
+
/**
|
|
4745
|
+
* Check if the mime type and the content type is supported.
|
|
4746
|
+
* @param {string} mimeType
|
|
4747
|
+
* @param {string=} contentType
|
|
4748
|
+
* @return {boolean}
|
|
4749
|
+
* @override
|
|
4750
|
+
*/
|
|
4751
|
+
isSupported(mimeType, contentType) {}
|
|
4752
|
+
/**
|
|
4753
|
+
* @override
|
|
4754
|
+
*/
|
|
4755
|
+
convertCodecs(contentType, mimeType) {}
|
|
4756
|
+
/**
|
|
4757
|
+
* @override
|
|
4758
|
+
*/
|
|
4759
|
+
getOrginalMimeType() {}
|
|
4760
|
+
/**
|
|
4761
|
+
* @override
|
|
4762
|
+
*/
|
|
4763
|
+
transmux(data, stream, reference, duration) {}
|
|
4764
|
+
};
|
|
4765
|
+
/**
|
|
4766
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4767
|
+
*/
|
|
4768
|
+
shaka.transmuxer.Mp3Transmuxer = class {
|
|
4769
|
+
/**
|
|
4770
|
+
* @param {string} mimeType
|
|
4771
|
+
*/
|
|
4772
|
+
constructor(mimeType) {}
|
|
4773
|
+
/**
|
|
4774
|
+
* @override
|
|
4775
|
+
*/
|
|
4776
|
+
destroy() {}
|
|
4777
|
+
/**
|
|
4778
|
+
* Check if the mime type and the content type is supported.
|
|
4779
|
+
* @param {string} mimeType
|
|
4780
|
+
* @param {string=} contentType
|
|
4781
|
+
* @return {boolean}
|
|
4782
|
+
* @override
|
|
4783
|
+
*/
|
|
4784
|
+
isSupported(mimeType, contentType) {}
|
|
4785
|
+
/**
|
|
4786
|
+
* @override
|
|
4787
|
+
*/
|
|
4788
|
+
convertCodecs(contentType, mimeType) {}
|
|
4789
|
+
/**
|
|
4790
|
+
* @override
|
|
4791
|
+
*/
|
|
4792
|
+
getOrginalMimeType() {}
|
|
4793
|
+
/**
|
|
4794
|
+
* @override
|
|
4795
|
+
*/
|
|
4796
|
+
transmux(data, stream, reference, duration) {}
|
|
4797
|
+
};
|
|
4798
|
+
/**
|
|
4799
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4800
|
+
*/
|
|
4801
|
+
shaka.transmuxer.MpegTsTransmuxer = class {
|
|
4802
|
+
/**
|
|
4803
|
+
* @param {string} mimeType
|
|
4804
|
+
*/
|
|
4805
|
+
constructor(mimeType) {}
|
|
4806
|
+
/**
|
|
4807
|
+
* @override
|
|
4808
|
+
*/
|
|
4809
|
+
destroy() {}
|
|
4810
|
+
/**
|
|
4811
|
+
* Check if the mime type and the content type is supported.
|
|
4812
|
+
* @param {string} mimeType
|
|
4813
|
+
* @param {string=} contentType
|
|
4814
|
+
* @return {boolean}
|
|
4815
|
+
* @override
|
|
4816
|
+
*/
|
|
4817
|
+
isSupported(mimeType, contentType) {}
|
|
4818
|
+
/**
|
|
4819
|
+
* @override
|
|
4820
|
+
*/
|
|
4821
|
+
convertCodecs(contentType, mimeType) {}
|
|
4822
|
+
/**
|
|
4823
|
+
* @override
|
|
4824
|
+
*/
|
|
4825
|
+
getOrginalMimeType() {}
|
|
4826
|
+
/**
|
|
4827
|
+
* @override
|
|
4828
|
+
*/
|
|
4829
|
+
transmux(data) {}
|
|
4830
|
+
};
|
|
4831
|
+
/**
|
|
4832
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4833
|
+
*/
|
|
4834
|
+
shaka.transmuxer.MssTransmuxer = class {
|
|
4835
|
+
/**
|
|
4836
|
+
* @param {string} mimeType
|
|
4837
|
+
*/
|
|
4838
|
+
constructor(mimeType) {}
|
|
4839
|
+
/**
|
|
4840
|
+
* @override
|
|
4841
|
+
*/
|
|
4842
|
+
destroy() {}
|
|
4843
|
+
/**
|
|
4844
|
+
* Check if the mime type and the content type is supported.
|
|
4845
|
+
* @param {string} mimeType
|
|
4846
|
+
* @param {string=} contentType
|
|
4847
|
+
* @return {boolean}
|
|
4848
|
+
* @override
|
|
4849
|
+
*/
|
|
4850
|
+
isSupported(mimeType, contentType) {}
|
|
4851
|
+
/**
|
|
4852
|
+
* @override
|
|
4853
|
+
*/
|
|
4854
|
+
convertCodecs(contentType, mimeType) {}
|
|
4855
|
+
/**
|
|
4856
|
+
* @override
|
|
4857
|
+
*/
|
|
4858
|
+
getOrginalMimeType() {}
|
|
4859
|
+
/**
|
|
4860
|
+
* @override
|
|
4861
|
+
*/
|
|
4862
|
+
transmux(data, stream, reference) {}
|
|
4863
|
+
};
|
|
4864
|
+
/**
|
|
4865
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4866
|
+
*/
|
|
4867
|
+
shaka.transmuxer.MuxjsTransmuxer = class {
|
|
4868
|
+
/**
|
|
4869
|
+
* @param {string} mimeType
|
|
4870
|
+
*/
|
|
4871
|
+
constructor(mimeType) {}
|
|
4872
|
+
/**
|
|
4873
|
+
* @override
|
|
4874
|
+
*/
|
|
4875
|
+
destroy() {}
|
|
4876
|
+
/**
|
|
4877
|
+
* Check if the mime type and the content type is supported.
|
|
4878
|
+
* @param {string} mimeType
|
|
4879
|
+
* @param {string=} contentType
|
|
4880
|
+
* @return {boolean}
|
|
4881
|
+
* @override
|
|
4882
|
+
*/
|
|
4883
|
+
isSupported(mimeType, contentType) {}
|
|
4884
|
+
/**
|
|
4885
|
+
* @override
|
|
4886
|
+
*/
|
|
4887
|
+
convertCodecs(contentType, mimeType) {}
|
|
4888
|
+
/**
|
|
4889
|
+
* @override
|
|
4890
|
+
*/
|
|
4891
|
+
getOrginalMimeType() {}
|
|
4892
|
+
/**
|
|
4893
|
+
* @override
|
|
4894
|
+
*/
|
|
4895
|
+
transmux(data) {}
|
|
4896
|
+
};
|
|
4897
|
+
/**
|
|
4898
|
+
* @implements {shaka.extern.Transmuxer}
|
|
4899
|
+
*/
|
|
4900
|
+
shaka.transmuxer.TsTransmuxer = class {
|
|
4901
|
+
/**
|
|
4902
|
+
* @param {string} mimeType
|
|
4903
|
+
*/
|
|
4904
|
+
constructor(mimeType) {}
|
|
4905
|
+
/**
|
|
4906
|
+
* @override
|
|
4907
|
+
*/
|
|
4908
|
+
destroy() {}
|
|
4909
|
+
/**
|
|
4910
|
+
* Check if the mime type and the content type is supported.
|
|
4911
|
+
* @param {string} mimeType
|
|
4912
|
+
* @param {string=} contentType
|
|
4913
|
+
* @return {boolean}
|
|
4914
|
+
* @override
|
|
4915
|
+
*/
|
|
4916
|
+
isSupported(mimeType, contentType) {}
|
|
4917
|
+
/**
|
|
4918
|
+
* @override
|
|
4919
|
+
*/
|
|
4920
|
+
convertCodecs(contentType, mimeType) {}
|
|
4921
|
+
/**
|
|
4922
|
+
* @override
|
|
4923
|
+
*/
|
|
4924
|
+
getOrginalMimeType() {}
|
|
4925
|
+
/**
|
|
4926
|
+
* @override
|
|
4927
|
+
*/
|
|
4928
|
+
transmux(data, stream, reference, duration, contentType) {}
|
|
4929
|
+
};
|
|
4358
4930
|
/**
|
|
4359
4931
|
* @implements {shaka.extern.IUIElement}
|
|
4360
4932
|
* @abstract
|