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
package/externs/shaka/text.js
CHANGED
|
@@ -10,387 +10,6 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* @interface
|
|
15
|
-
* @exportDoc
|
|
16
|
-
*/
|
|
17
|
-
shaka.extern.CueRegion = class {
|
|
18
|
-
constructor() {
|
|
19
|
-
/**
|
|
20
|
-
* Region identifier.
|
|
21
|
-
* @type {string}
|
|
22
|
-
* @exportDoc
|
|
23
|
-
*/
|
|
24
|
-
this.id;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The X offset to start the rendering area in viewportAnchorUnits of the
|
|
28
|
-
* video width.
|
|
29
|
-
* @type {number}
|
|
30
|
-
* @exportDoc
|
|
31
|
-
*/
|
|
32
|
-
this.viewportAnchorX;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The X offset to start the rendering area in viewportAnchorUnits of the
|
|
36
|
-
* video height.
|
|
37
|
-
* @type {number}
|
|
38
|
-
* @exportDoc
|
|
39
|
-
*/
|
|
40
|
-
this.viewportAnchorY;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The X offset to start the rendering area in percentage (0-100) of this
|
|
44
|
-
* region width.
|
|
45
|
-
* @type {number}
|
|
46
|
-
* @exportDoc
|
|
47
|
-
*/
|
|
48
|
-
this.regionAnchorX;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The Y offset to start the rendering area in percentage (0-100) of the
|
|
52
|
-
* region height.
|
|
53
|
-
* @type {number}
|
|
54
|
-
* @exportDoc
|
|
55
|
-
*/
|
|
56
|
-
this.regionAnchorY;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The width of the rendering area in widthUnits.
|
|
60
|
-
* @type {number}
|
|
61
|
-
* @exportDoc
|
|
62
|
-
*/
|
|
63
|
-
this.width;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* The width of the rendering area in heightUnits.
|
|
67
|
-
* @type {number}
|
|
68
|
-
* @exportDoc
|
|
69
|
-
*/
|
|
70
|
-
this.height;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The units (percentage, pixels or lines) the region height is in.
|
|
74
|
-
* @type {shaka.text.CueRegion.units}
|
|
75
|
-
* @exportDoc
|
|
76
|
-
*/
|
|
77
|
-
this.heightUnits;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* The units (percentage or pixels) the region width is in.
|
|
81
|
-
* @type {shaka.text.CueRegion.units}
|
|
82
|
-
* @exportDoc
|
|
83
|
-
*/
|
|
84
|
-
this.widthUnits;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* The units (percentage or pixels) the region viewportAnchors are in.
|
|
88
|
-
* @type {shaka.text.CueRegion.units}
|
|
89
|
-
* @exportDoc
|
|
90
|
-
*/
|
|
91
|
-
this.viewportAnchorUnits;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* If scroll=UP, it means that cues in the region will be added to the
|
|
95
|
-
* bottom of the region and will push any already displayed cues in the
|
|
96
|
-
* region up. Otherwise (scroll=NONE) cues will stay fixed at the location
|
|
97
|
-
* they were first painted in.
|
|
98
|
-
* @type {shaka.text.CueRegion.scrollMode}
|
|
99
|
-
* @exportDoc
|
|
100
|
-
*/
|
|
101
|
-
this.scroll;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @interface
|
|
108
|
-
* @exportDoc
|
|
109
|
-
*/
|
|
110
|
-
shaka.extern.Cue = class {
|
|
111
|
-
constructor() {
|
|
112
|
-
/**
|
|
113
|
-
* The start time of the cue in seconds, relative to the start of the
|
|
114
|
-
* presentation.
|
|
115
|
-
* @type {number}
|
|
116
|
-
* @exportDoc
|
|
117
|
-
*/
|
|
118
|
-
this.startTime;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The end time of the cue in seconds, relative to the start of the
|
|
122
|
-
* presentation.
|
|
123
|
-
* @type {number}
|
|
124
|
-
* @exportDoc
|
|
125
|
-
*/
|
|
126
|
-
this.endTime;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The text payload of the cue. If nestedCues is non-empty, this should be
|
|
130
|
-
* empty. Top-level block containers should have no payload of their own.
|
|
131
|
-
* @type {string}
|
|
132
|
-
* @exportDoc
|
|
133
|
-
*/
|
|
134
|
-
this.payload;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* The region to render the cue into. Only supported on top-level cues,
|
|
138
|
-
* because nested cues are inline elements.
|
|
139
|
-
* @type {shaka.extern.CueRegion}
|
|
140
|
-
* @exportDoc
|
|
141
|
-
*/
|
|
142
|
-
this.region;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* The indent (in percent) of the cue box in the direction defined by the
|
|
146
|
-
* writing direction.
|
|
147
|
-
* @type {?number}
|
|
148
|
-
* @exportDoc
|
|
149
|
-
*/
|
|
150
|
-
this.position;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Position alignment of the cue.
|
|
154
|
-
* @type {shaka.text.Cue.positionAlign}
|
|
155
|
-
* @exportDoc
|
|
156
|
-
*/
|
|
157
|
-
this.positionAlign;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Size of the cue box (in percents), where 0 means "auto".
|
|
161
|
-
* @type {number}
|
|
162
|
-
* @exportDoc
|
|
163
|
-
*/
|
|
164
|
-
this.size;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Alignment of the text inside the cue box.
|
|
168
|
-
* @type {shaka.text.Cue.textAlign}
|
|
169
|
-
* @exportDoc
|
|
170
|
-
*/
|
|
171
|
-
this.textAlign;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Text direction of the cue.
|
|
175
|
-
* @type {shaka.text.Cue.direction}
|
|
176
|
-
* @exportDoc
|
|
177
|
-
*/
|
|
178
|
-
this.direction;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Text writing mode of the cue.
|
|
182
|
-
* @type {shaka.text.Cue.writingMode}
|
|
183
|
-
* @exportDoc
|
|
184
|
-
*/
|
|
185
|
-
this.writingMode;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* The way to interpret line field. (Either as an integer line number or
|
|
189
|
-
* percentage from the display box).
|
|
190
|
-
* @type {shaka.text.Cue.lineInterpretation}
|
|
191
|
-
* @exportDoc
|
|
192
|
-
*/
|
|
193
|
-
this.lineInterpretation;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* The offset from the display box in either number of lines or
|
|
197
|
-
* percentage depending on the value of lineInterpretation.
|
|
198
|
-
* @type {?number}
|
|
199
|
-
* @exportDoc
|
|
200
|
-
*/
|
|
201
|
-
this.line;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Separation between line areas inside the cue box in px or em
|
|
205
|
-
* (e.g. '100px'/'100em'). If not specified, this should be no less than
|
|
206
|
-
* the largest font size applied to the text in the cue.
|
|
207
|
-
* @type {string}.
|
|
208
|
-
* @exportDoc
|
|
209
|
-
*/
|
|
210
|
-
this.lineHeight;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Line alignment of the cue box.
|
|
214
|
-
* Start alignment means the cue box’s top side (for horizontal cues), left
|
|
215
|
-
* side (for vertical growing right), or right side (for vertical growing
|
|
216
|
-
* left) is aligned at the line.
|
|
217
|
-
* Center alignment means the cue box is centered at the line.
|
|
218
|
-
* End alignment The cue box’s bottom side (for horizontal cues), right side
|
|
219
|
-
* (for vertical growing right), or left side (for vertical growing left) is
|
|
220
|
-
* aligned at the line.
|
|
221
|
-
* @type {shaka.text.Cue.lineAlign}
|
|
222
|
-
* @exportDoc
|
|
223
|
-
*/
|
|
224
|
-
this.lineAlign;
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Vertical alignments of the cues within their extents.
|
|
228
|
-
* 'BEFORE' means displaying the captions at the top of the text display
|
|
229
|
-
* container box, 'CENTER' means in the middle, 'AFTER' means at the bottom.
|
|
230
|
-
* @type {shaka.text.Cue.displayAlign}
|
|
231
|
-
* @exportDoc
|
|
232
|
-
*/
|
|
233
|
-
this.displayAlign;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Text color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
237
|
-
* @type {string}
|
|
238
|
-
* @exportDoc
|
|
239
|
-
*/
|
|
240
|
-
this.color;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Text background color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
244
|
-
* @type {string}
|
|
245
|
-
* @exportDoc
|
|
246
|
-
*/
|
|
247
|
-
this.backgroundColor;
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* The number of horizontal and vertical cells into which the Root Container
|
|
251
|
-
* Region area is divided.
|
|
252
|
-
*
|
|
253
|
-
* @type {{ columns: number, rows: number }}
|
|
254
|
-
* @exportDoc
|
|
255
|
-
*/
|
|
256
|
-
this.cellResolution;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* The URL of the background image, e.g. "data:[mime type];base64,[data]".
|
|
260
|
-
* @type {string}
|
|
261
|
-
* @exportDoc
|
|
262
|
-
*/
|
|
263
|
-
this.backgroundImage;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* The border around this cue as a CSS border.
|
|
267
|
-
* @type {string}
|
|
268
|
-
* @exportDoc
|
|
269
|
-
*/
|
|
270
|
-
this.border;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Text font size in px or em (e.g. '100px'/'100em').
|
|
274
|
-
* @type {string}
|
|
275
|
-
* @exportDoc
|
|
276
|
-
*/
|
|
277
|
-
this.fontSize;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Text font weight. Either normal or bold.
|
|
281
|
-
* @type {shaka.text.Cue.fontWeight}
|
|
282
|
-
* @exportDoc
|
|
283
|
-
*/
|
|
284
|
-
this.fontWeight;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Text font style. Normal, italic or oblique.
|
|
288
|
-
* @type {shaka.text.Cue.fontStyle}
|
|
289
|
-
* @exportDoc
|
|
290
|
-
*/
|
|
291
|
-
this.fontStyle;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Text font family.
|
|
295
|
-
* @type {string}
|
|
296
|
-
* @exportDoc
|
|
297
|
-
*/
|
|
298
|
-
this.fontFamily;
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Text shadow color as a CSS text-shadow value.
|
|
302
|
-
* @type {string}
|
|
303
|
-
* @exportDoc
|
|
304
|
-
*/
|
|
305
|
-
this.textShadow = '';
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Text stroke color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
309
|
-
* @type {string}
|
|
310
|
-
* @exportDoc
|
|
311
|
-
*/
|
|
312
|
-
this.textStrokeColor;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Text stroke width as a CSS stroke-width value.
|
|
316
|
-
* @type {string}
|
|
317
|
-
* @exportDoc
|
|
318
|
-
*/
|
|
319
|
-
this.textStrokeWidth;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Text letter spacing as a CSS letter-spacing value.
|
|
323
|
-
* @type {string}
|
|
324
|
-
* @exportDoc
|
|
325
|
-
*/
|
|
326
|
-
this.letterSpacing;
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Text line padding as a CSS line-padding value.
|
|
330
|
-
* @type {string}
|
|
331
|
-
* @exportDoc
|
|
332
|
-
*/
|
|
333
|
-
this.linePadding;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Opacity of the cue element, from 0-1.
|
|
337
|
-
* @type {number}
|
|
338
|
-
* @exportDoc
|
|
339
|
-
*/
|
|
340
|
-
this.opacity;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Text decoration. A combination of underline, overline
|
|
344
|
-
* and line through. Empty array means no decoration.
|
|
345
|
-
* @type {!Array.<!shaka.text.Cue.textDecoration>}
|
|
346
|
-
* @exportDoc
|
|
347
|
-
*/
|
|
348
|
-
this.textDecoration;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Whether or not line wrapping should be applied to the cue.
|
|
352
|
-
* @type {boolean}
|
|
353
|
-
* @exportDoc
|
|
354
|
-
*/
|
|
355
|
-
this.wrapLine;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Id of the cue.
|
|
359
|
-
* @type {string}
|
|
360
|
-
* @exportDoc
|
|
361
|
-
*/
|
|
362
|
-
this.id;
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* Nested cues, which should be laid out horizontally in one block.
|
|
366
|
-
* Top-level cues are blocks, and nested cues are inline elements.
|
|
367
|
-
* Cues can be nested arbitrarily deeply.
|
|
368
|
-
* @type {!Array.<!shaka.extern.Cue>}
|
|
369
|
-
* @exportDoc
|
|
370
|
-
*/
|
|
371
|
-
this.nestedCues;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* If true, this represents a container element that is "above" the main
|
|
375
|
-
* cues. For example, the <body> and <div> tags that contain the <p> tags
|
|
376
|
-
* in a TTML file. This controls the flow of the final cues; any nested cues
|
|
377
|
-
* within an "isContainer" cue will be laid out as separate lines.
|
|
378
|
-
* @type {boolean}
|
|
379
|
-
* @exportDoc
|
|
380
|
-
*/
|
|
381
|
-
this.isContainer;
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* Whether or not the cue only acts as a line break between two nested cues.
|
|
385
|
-
* Should only appear in nested cues.
|
|
386
|
-
* @type {boolean}
|
|
387
|
-
* @exportDoc
|
|
388
|
-
*/
|
|
389
|
-
this.lineBreak;
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
|
|
394
13
|
/**
|
|
395
14
|
* An interface for plugins that parse text tracks.
|
|
396
15
|
*
|
|
@@ -417,7 +36,7 @@ shaka.extern.TextParser = class {
|
|
|
417
36
|
* @param {shaka.extern.TextParser.TimeContext} timeContext
|
|
418
37
|
* The time information that should be used to adjust the times values
|
|
419
38
|
* for each cue.
|
|
420
|
-
* @return {!Array.<!shaka.
|
|
39
|
+
* @return {!Array.<!shaka.text.Cue>}
|
|
421
40
|
*
|
|
422
41
|
* @exportDoc
|
|
423
42
|
*/
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Externs for Transmuxer.
|
|
3
|
+
*
|
|
4
|
+
* @externs
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* An interface for transmuxer plugins.
|
|
10
|
+
*
|
|
11
|
+
* @interface
|
|
12
|
+
* @exportDoc
|
|
13
|
+
*/
|
|
14
|
+
shaka.extern.Transmuxer = class {
|
|
15
|
+
/**
|
|
16
|
+
* Destroy
|
|
17
|
+
*/
|
|
18
|
+
destroy() {}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Check if the mime type and the content type is supported.
|
|
22
|
+
* @param {string} mimeType
|
|
23
|
+
* @param {string=} contentType
|
|
24
|
+
* @return {boolean}
|
|
25
|
+
*/
|
|
26
|
+
isSupported(mimeType, contentType) {}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* For any stream, convert its codecs to MP4 codecs.
|
|
30
|
+
* @param {string} contentType
|
|
31
|
+
* @param {string} mimeType
|
|
32
|
+
* @return {string}
|
|
33
|
+
*/
|
|
34
|
+
convertCodecs(contentType, mimeType) {}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Returns the original mimetype of the transmuxer.
|
|
38
|
+
* @return {string}
|
|
39
|
+
*/
|
|
40
|
+
getOrginalMimeType() {}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Transmux a input data to MP4.
|
|
44
|
+
* @param {BufferSource} data
|
|
45
|
+
* @param {shaka.extern.Stream} stream
|
|
46
|
+
* @param {?shaka.media.SegmentReference} reference The segment reference, or
|
|
47
|
+
* null for init segments
|
|
48
|
+
* @param {number} duration
|
|
49
|
+
* @param {string} contentType
|
|
50
|
+
* @return {!Promise.<!Uint8Array>}
|
|
51
|
+
*/
|
|
52
|
+
transmux(data, stream, reference, duration, contentType) {}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @typedef {function():!shaka.extern.Transmuxer}
|
|
58
|
+
* @exportDoc
|
|
59
|
+
*/
|
|
60
|
+
shaka.extern.TransmuxerPlugin;
|
package/karma.conf.js
CHANGED
|
@@ -194,6 +194,9 @@ module.exports = (config) => {
|
|
|
194
194
|
// muxjs module next
|
|
195
195
|
'node_modules/mux.js/dist/mux.min.js',
|
|
196
196
|
|
|
197
|
+
// codem-isoboxer module next
|
|
198
|
+
'node_modules/codem-isoboxer/dist/iso_boxer.min.js',
|
|
199
|
+
|
|
197
200
|
// EME encryption scheme polyfill, compiled into Shaka Player, but outside
|
|
198
201
|
// of the Closure deps system, so not in shaka-player.uncompiled.js. This
|
|
199
202
|
// is specifically the compiled, minified, cross-browser build of it.
|
|
@@ -234,6 +237,16 @@ module.exports = (config) => {
|
|
|
234
237
|
{pattern: 'test/**/*.js', included: false},
|
|
235
238
|
{pattern: 'test/test/assets/*', included: false},
|
|
236
239
|
{pattern: 'test/test/assets/3675/*', included: false},
|
|
240
|
+
{pattern: 'test/test/assets/hls-raw-aac/*', included: false},
|
|
241
|
+
{pattern: 'test/test/assets/hls-raw-ac3/*', included: false},
|
|
242
|
+
{pattern: 'test/test/assets/hls-raw-ec3/*', included: false},
|
|
243
|
+
{pattern: 'test/test/assets/hls-raw-mp3/*', included: false},
|
|
244
|
+
{pattern: 'test/test/assets/hls-ts-aac/*', included: false},
|
|
245
|
+
{pattern: 'test/test/assets/hls-ts-ac3/*', included: false},
|
|
246
|
+
{pattern: 'test/test/assets/hls-ts-ec3/*', included: false},
|
|
247
|
+
{pattern: 'test/test/assets/hls-ts-h264/*', included: false},
|
|
248
|
+
{pattern: 'test/test/assets/hls-ts-mp3/*', included: false},
|
|
249
|
+
{pattern: 'test/test/assets/hls-ts-muxed-aac-h264/*', included: false},
|
|
237
250
|
{pattern: 'dist/shaka-player.ui.js', included: false},
|
|
238
251
|
{pattern: 'dist/locales.js', included: false},
|
|
239
252
|
{pattern: 'demo/**/*.js', included: false},
|
|
@@ -64,7 +64,8 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
64
64
|
}
|
|
65
65
|
const chosenVariant = this.chooseVariant();
|
|
66
66
|
if (chosenVariant) {
|
|
67
|
-
this.switch_(chosenVariant
|
|
67
|
+
this.switch_(chosenVariant, this.config_.clearBufferSwitch,
|
|
68
|
+
this.config_.safeMarginSwitch);
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
};
|
|
@@ -106,7 +107,8 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
106
107
|
if (this.config_.restrictToElementSize) {
|
|
107
108
|
const chosenVariant = this.chooseVariant();
|
|
108
109
|
if (chosenVariant) {
|
|
109
|
-
this.switch_(chosenVariant
|
|
110
|
+
this.switch_(chosenVariant, this.config_.clearBufferSwitch,
|
|
111
|
+
this.config_.safeMarginSwitch);
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
});
|
|
@@ -382,7 +384,8 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
382
384
|
'Calling switch_(), bandwidth=' + currentBandwidthKbps + ' kbps');
|
|
383
385
|
// If any of these chosen streams are already chosen, Player will filter
|
|
384
386
|
// them out before passing the choices on to StreamingEngine.
|
|
385
|
-
this.switch_(chosenVariant
|
|
387
|
+
this.switch_(chosenVariant, this.config_.clearBufferSwitch,
|
|
388
|
+
this.config_.safeMarginSwitch);
|
|
386
389
|
}
|
|
387
390
|
}
|
|
388
391
|
|
package/lib/ads/ad_manager.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
goog.provide('shaka.ads.AdManager');
|
|
9
9
|
|
|
10
|
+
goog.require('goog.asserts');
|
|
10
11
|
goog.require('shaka.Player');
|
|
11
12
|
goog.require('shaka.ads.AdsStats');
|
|
12
13
|
goog.require('shaka.ads.ClientSideAdManager');
|
|
@@ -314,6 +315,17 @@ goog.require('shaka.util.IReleasable');
|
|
|
314
315
|
*/
|
|
315
316
|
|
|
316
317
|
|
|
318
|
+
/**
|
|
319
|
+
* @event shaka.ads.AdManager.AD_ERROR
|
|
320
|
+
* @description Fired when a fatal error is encountered.
|
|
321
|
+
* @property {string} type
|
|
322
|
+
* 'ad-error'
|
|
323
|
+
* @property {Object} originalEvent
|
|
324
|
+
* The native SDK event, if available.
|
|
325
|
+
* @exportDoc
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
|
|
317
329
|
/**
|
|
318
330
|
* @event shaka.ads.AdManager.AdInteractionEvent
|
|
319
331
|
* @description Fired when an ad triggers the interaction callback.
|
|
@@ -374,6 +386,8 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
374
386
|
this.stats_ = new shaka.ads.AdsStats();
|
|
375
387
|
/** @private {string} locale */
|
|
376
388
|
this.locale_ = navigator.language;
|
|
389
|
+
/** @private {?shaka.extern.AdsConfiguration} */
|
|
390
|
+
this.config_ = null;
|
|
377
391
|
}
|
|
378
392
|
|
|
379
393
|
|
|
@@ -390,7 +404,22 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
390
404
|
* @override
|
|
391
405
|
* @export
|
|
392
406
|
*/
|
|
393
|
-
|
|
407
|
+
configure(config) {
|
|
408
|
+
this.config_ = config;
|
|
409
|
+
if (this.csAdManager_) {
|
|
410
|
+
this.csAdManager_.configure(this.config_);
|
|
411
|
+
}
|
|
412
|
+
if (this.ssAdManager_) {
|
|
413
|
+
this.ssAdManager_.configure(this.config_);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* @override
|
|
420
|
+
* @export
|
|
421
|
+
*/
|
|
422
|
+
initClientSide(adContainer, video, adsRenderingSettings) {
|
|
394
423
|
// Check that Client Side IMA SDK has been included
|
|
395
424
|
// NOTE: (window['google'] && google.ima) check for any
|
|
396
425
|
// IMA SDK, including SDK for Server Side ads.
|
|
@@ -409,7 +438,7 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
409
438
|
}
|
|
410
439
|
|
|
411
440
|
this.csAdManager_ = new shaka.ads.ClientSideAdManager(
|
|
412
|
-
adContainer, video, this.locale_,
|
|
441
|
+
adContainer, video, this.locale_, adsRenderingSettings,
|
|
413
442
|
(e) => {
|
|
414
443
|
const event = /** @type {!shaka.util.FakeEvent} */ (e);
|
|
415
444
|
if (event && event.type) {
|
|
@@ -432,6 +461,9 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
432
461
|
}
|
|
433
462
|
this.dispatchEvent(event);
|
|
434
463
|
});
|
|
464
|
+
|
|
465
|
+
goog.asserts.assert(this.config_, 'Config must not be null!');
|
|
466
|
+
this.csAdManager_.configure(this.config_);
|
|
435
467
|
}
|
|
436
468
|
|
|
437
469
|
|
|
@@ -487,6 +519,22 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
487
519
|
}
|
|
488
520
|
|
|
489
521
|
|
|
522
|
+
/**
|
|
523
|
+
* @override
|
|
524
|
+
* @export
|
|
525
|
+
*/
|
|
526
|
+
updateClientSideAdsRenderingSettings(adsRenderingSettings) {
|
|
527
|
+
if (!this.csAdManager_) {
|
|
528
|
+
throw new shaka.util.Error(
|
|
529
|
+
shaka.util.Error.Severity.RECOVERABLE,
|
|
530
|
+
shaka.util.Error.Category.ADS,
|
|
531
|
+
shaka.util.Error.Code.CS_AD_MANAGER_NOT_INITIALIZED);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
this.csAdManager_.updateAdsRenderingSettings(adsRenderingSettings);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
|
|
490
538
|
/**
|
|
491
539
|
* @override
|
|
492
540
|
* @export
|
|
@@ -533,6 +581,9 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
533
581
|
}
|
|
534
582
|
this.dispatchEvent(event);
|
|
535
583
|
});
|
|
584
|
+
|
|
585
|
+
goog.asserts.assert(this.config_, 'Config must not be null!');
|
|
586
|
+
this.ssAdManager_.configure(this.config_);
|
|
536
587
|
}
|
|
537
588
|
|
|
538
589
|
|
|
@@ -902,6 +953,13 @@ shaka.ads.AdManager.AD_METADATA = 'ad-metadata';
|
|
|
902
953
|
*/
|
|
903
954
|
shaka.ads.AdManager.AD_RECOVERABLE_ERROR = 'ad-recoverable-error';
|
|
904
955
|
|
|
956
|
+
/**
|
|
957
|
+
* The event name for when the ad manager dispatch errors.
|
|
958
|
+
*
|
|
959
|
+
* @const {string}
|
|
960
|
+
* @export
|
|
961
|
+
*/
|
|
962
|
+
shaka.ads.AdManager.AD_ERROR = 'ad-error';
|
|
905
963
|
|
|
906
964
|
/**
|
|
907
965
|
* The event name for when the client side SDK signalled its readiness
|