shaka-player 4.3.9 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-and-test.yaml +11 -18
- package/.github/workflows/compute-incremental-coverage.py +3 -0
- package/.github/workflows/release-please.yaml +7 -0
- package/.github/workflows/selenium-lab-tests.yaml +45 -10
- package/AUTHORS +9 -0
- package/CHANGELOG.md +295 -190
- 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 +112 -28
- 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 +57 -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 +132 -118
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +132 -118
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +46 -28
- package/dist/locales.js +31 -31
- package/dist/receiver.compiled.debug.js +60 -52
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +60 -52
- 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 +1046 -700
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +1188 -616
- package/dist/shaka-player.compiled.js +1094 -933
- 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 +1101 -738
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +1023 -451
- package/dist/shaka-player.ui.js +1244 -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 +59 -0
- package/karma.conf.js +15 -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 +93 -5
- 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 +475 -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 +1081 -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 +2 -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 +212 -0
- package/lib/transmuxer/adts.js +232 -0
- package/lib/transmuxer/ec3.js +103 -0
- package/lib/transmuxer/ec3_transmuxer.js +212 -0
- package/lib/transmuxer/h264.js +324 -0
- package/lib/transmuxer/mp3_transmuxer.js +204 -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 +738 -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 +1381 -0
- package/lib/util/periods.js +40 -34
- package/lib/util/platform.js +25 -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 +470 -47
- package/lib/util/xml_utils.js +16 -3
- package/maintained-branches.md +2 -2
- package/package.json +4 -2
- 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 +122 -38
- 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_integration.js +4 -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/test/util/ui_utils.js +5 -1
- 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 +13 -3
- 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 +230 -1
- package/ui/ui.js +5 -0
- package/lib/cea/i_caption_decoder.js +0 -51
- package/lib/cea/i_cea_parser.js +0 -68
|
@@ -81,6 +81,20 @@ See: [google.ima.AdsRequest][] for details on the request object.
|
|
|
81
81
|
|
|
82
82
|
[google.ima.AdsRequest]: https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/reference/js/ima.AdsRequest
|
|
83
83
|
|
|
84
|
+
Control the rendering of ads:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
const adsRenderingSettings = new google.ima.AdsRenderingSettings();
|
|
88
|
+
adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;
|
|
89
|
+
adManager.initClientSide(container, video, adsRenderingSettings);
|
|
90
|
+
// Updates the ads rendering settings.
|
|
91
|
+
adManager.updateClientSideAdsRenderingSettings(adsRenderingSettings);
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
See: [google.ima.AdsRenderingSettings][] for details on the request object.
|
|
95
|
+
|
|
96
|
+
[google.ima.AdsRenderingSettings]: https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRenderingSettings
|
|
97
|
+
|
|
84
98
|
#### Streaming with Server Side Ads Insertion
|
|
85
99
|
|
|
86
100
|
To integrate Server Side ads into a presentation, you need to have a Google Ad
|
|
@@ -203,7 +217,7 @@ default, so you should only need to set this if you've enabled it in other parts
|
|
|
203
217
|
your code.
|
|
204
218
|
|
|
205
219
|
```js
|
|
206
|
-
player.getNetworkingEngine().registerRequestFilter(function(type, request) {
|
|
220
|
+
player.getNetworkingEngine().registerRequestFilter(function(type, request, context) {
|
|
207
221
|
if (type == shaka.net.NetworkingEngine.RequestType.MANIFEST ||
|
|
208
222
|
type == shaka.net.NetworkingEngine.RequestType.SEGMENT) {
|
|
209
223
|
request.withCredentials = false;
|
|
@@ -36,7 +36,7 @@ const HTTP_IN_HEX = 0x68747470;
|
|
|
36
36
|
|
|
37
37
|
const RequestType = shaka.net.NetworkingEngine.RequestType;
|
|
38
38
|
|
|
39
|
-
player.getNetworkingEngine().registerResponseFilter(async (type, response) => {
|
|
39
|
+
player.getNetworkingEngine().registerResponseFilter(async (type, response, context) => {
|
|
40
40
|
// NOTE: If the system requires an ALR for both manifests and segments,
|
|
41
41
|
// remove this RequestType check.
|
|
42
42
|
if (type != RequestType.MANIFEST) {
|
package/docs/tutorials/config.md
CHANGED
|
@@ -64,6 +64,7 @@ player.getConfiguration();
|
|
|
64
64
|
playRangeEnd: Infinity
|
|
65
65
|
playRangeStart: 0
|
|
66
66
|
preferredAudioLanguage: ""
|
|
67
|
+
preferredAudioLabel: ""
|
|
67
68
|
preferredTextLanguage: ""
|
|
68
69
|
restrictions: Object
|
|
69
70
|
streaming: Object
|
|
@@ -77,6 +78,7 @@ player.getConfiguration();
|
|
|
77
78
|
retryParameters: Object
|
|
78
79
|
startAtSegmentBoundary: false
|
|
79
80
|
safeSeekOffset: 5
|
|
81
|
+
segmentPrefetchLimit: 0
|
|
80
82
|
textDisplayFactory: Function
|
|
81
83
|
|
|
82
84
|
|
|
@@ -120,18 +122,20 @@ buffering settings) while some will not have any effect until the next call to
|
|
|
120
122
|
#### Low latency streaming
|
|
121
123
|
|
|
122
124
|
With `.streaming.lowLatencyMode` set to true,
|
|
123
|
-
`.streaming.inaccurateManifestTolerance` is set to 0 by default,
|
|
124
|
-
`.streaming.rebufferingGoal` is set to 0.01 by default
|
|
125
|
+
`.streaming.inaccurateManifestTolerance` is set to 0 by default,
|
|
126
|
+
`.streaming.rebufferingGoal` is set to 0.01 by default, and
|
|
127
|
+
`.streaming.segmentPrefetchLimit` is set to 2 by default.
|
|
125
128
|
|
|
126
|
-
To customize the values of inaccurateManifestTolerance and
|
|
127
|
-
with low latency mode, you can set the fields in the same
|
|
128
|
-
call to configure().
|
|
129
|
+
To customize the values of inaccurateManifestTolerance, rebufferingGoal and
|
|
130
|
+
segmentPrefetchLimit with low latency mode, you can set the fields in the same
|
|
131
|
+
or subsequent call to configure().
|
|
129
132
|
```js
|
|
130
133
|
player.configure({
|
|
131
134
|
streaming: {
|
|
132
135
|
lowLatencyMode: true,
|
|
133
136
|
inaccurateManifestTolerance: 0,
|
|
134
137
|
rebufferingGoal: 0.01,
|
|
138
|
+
segmentPrefetchLimit: 2,
|
|
135
139
|
}
|
|
136
140
|
});
|
|
137
141
|
|
|
@@ -211,3 +211,64 @@ you should provide an empty string as robustness
|
|
|
211
211
|
##### Other key-systems
|
|
212
212
|
|
|
213
213
|
Values for other key systems are not known to us at this time.
|
|
214
|
+
|
|
215
|
+
#### Re-use persistent license DRM for online playback
|
|
216
|
+
|
|
217
|
+
If your DRM provider configuration allows you to deliver persistent license,
|
|
218
|
+
you could re-use the created MediaKeys session for the next online playback.
|
|
219
|
+
|
|
220
|
+
Configure Shaka to start DRM sessions with the `persistent-license` type
|
|
221
|
+
instead of the `temporary` one:
|
|
222
|
+
|
|
223
|
+
```js
|
|
224
|
+
player.configure({
|
|
225
|
+
drm: {
|
|
226
|
+
advanced: {
|
|
227
|
+
'com.widevine.alpha': {
|
|
228
|
+
'sessionType': 'persistent-license'
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Using `persistent-license` might not work on every devices, use this feature
|
|
236
|
+
carefully.**
|
|
237
|
+
|
|
238
|
+
When the playback starts, you can retrieve the sessions metadata:
|
|
239
|
+
|
|
240
|
+
```js
|
|
241
|
+
const activeDrmSessions = this.player.getActiveSessionsMetadata();
|
|
242
|
+
const persistentDrmSessions = activeDrmSessions.filter(
|
|
243
|
+
({ sessionType }) => sessionType === 'persistent-license');
|
|
244
|
+
|
|
245
|
+
// Add your own storage mechanism here, give it an unique known identifier for
|
|
246
|
+
// the playing video
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
When starting the same video again, retrieve the metadata from the storage, and
|
|
250
|
+
set it back to Shaka's configuration.
|
|
251
|
+
|
|
252
|
+
Shaka will load the given DRM persistent sessions and will only request a
|
|
253
|
+
license if some keys are missing for the content.
|
|
254
|
+
|
|
255
|
+
```js
|
|
256
|
+
player.configure({
|
|
257
|
+
drm: {
|
|
258
|
+
persistentSessionOnlinePlayback: true,
|
|
259
|
+
persistentSessionsMetadata: [{
|
|
260
|
+
sessionId: 'deadbeefdeadbeefdeadbeefdeadbeef',
|
|
261
|
+
initData: new InitData(0),
|
|
262
|
+
initDataType: 'cenc'
|
|
263
|
+
}]
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
NB: Shaka doesn't provide a out-of-the-box storage mechanism for the sessions
|
|
269
|
+
metadata.
|
|
270
|
+
|
|
271
|
+
#### Continue the Tutorials
|
|
272
|
+
|
|
273
|
+
Next, check out {@tutorial license-server-auth}.
|
|
274
|
+
Or check out {@tutorial fairplay}.
|
|
@@ -90,7 +90,7 @@ or give the response in a different format. For more info, see the general
|
|
|
90
90
|
{@tutorial license-wrapping} tutorial:
|
|
91
91
|
|
|
92
92
|
```js
|
|
93
|
-
player.getNetworkingEngine().registerRequestFilter((type, request) => {
|
|
93
|
+
player.getNetworkingEngine().registerRequestFilter((type, request, context) => {
|
|
94
94
|
if (type != shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
@@ -103,7 +103,7 @@ player.getNetworkingEngine().registerRequestFilter((type, request) => {
|
|
|
103
103
|
request.body = shaka.util.StringUtils.toUTF8(encodeURIComponent(params));
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
-
player.getNetworkingEngine().registerResponseFilter((type, response) => {
|
|
106
|
+
player.getNetworkingEngine().registerResponseFilter((type, response, context) => {
|
|
107
107
|
if (type != shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
@@ -143,7 +143,7 @@ Note: If the url of the license server has to undergo any transformation
|
|
|
143
143
|
(eg: add the contentId), you would have to create your filter manually.
|
|
144
144
|
|
|
145
145
|
```js
|
|
146
|
-
player.getNetworkingEngine().registerRequestFilter((type, request) => {
|
|
146
|
+
player.getNetworkingEngine().registerRequestFilter((type, request, context) => {
|
|
147
147
|
if (type != shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
@@ -175,7 +175,7 @@ Note: If the url of the license server has to undergo any transformation
|
|
|
175
175
|
(eg: add the contentId), you would have to create your filter manually.
|
|
176
176
|
|
|
177
177
|
```js
|
|
178
|
-
player.getNetworkingEngine().registerRequestFilter((type, request) => {
|
|
178
|
+
player.getNetworkingEngine().registerRequestFilter((type, request, context) => {
|
|
179
179
|
if (type != shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
@@ -217,3 +217,18 @@ player.getNetworkingEngine()
|
|
|
217
217
|
player.configure('drm.initDataTransform',
|
|
218
218
|
FairPlayUtils.conaxInitDataTransform);
|
|
219
219
|
```
|
|
220
|
+
|
|
221
|
+
#### ExpressPlay (legacy Apple Media Keys)
|
|
222
|
+
|
|
223
|
+
For integration with ExpressPlay the following can be used:
|
|
224
|
+
|
|
225
|
+
```js
|
|
226
|
+
shaka.polyfill.PatchedMediaKeysApple.install();
|
|
227
|
+
const FairPlayUtils = shaka.util.FairPlayUtils;
|
|
228
|
+
player.getNetworkingEngine()
|
|
229
|
+
.registerRequestFilter(FairPlayUtils.expressplayFairPlayRequest);
|
|
230
|
+
player.getNetworkingEngine()
|
|
231
|
+
.registerResponseFilter(FairPlayUtils.commonFairPlayResponse);
|
|
232
|
+
player.configure('drm.initDataTransform',
|
|
233
|
+
FairPlayUtils.expressplayInitDataTransform);
|
|
234
|
+
```
|
|
@@ -62,7 +62,7 @@ arbitrary headers to Shaka's requests through a request filter callback.
|
|
|
62
62
|
Register the filter before calling `player.load()`:
|
|
63
63
|
|
|
64
64
|
```js
|
|
65
|
-
player.getNetworkingEngine().registerRequestFilter(function(type, request) {
|
|
65
|
+
player.getNetworkingEngine().registerRequestFilter(function(type, request, context) {
|
|
66
66
|
// Only add headers to license requests:
|
|
67
67
|
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
68
68
|
// This is the specific header name and value the server wants:
|
|
@@ -92,7 +92,7 @@ try to use it without setting the parameter, you will see `Error code 6007`
|
|
|
92
92
|
We can use a request filter to modify the URL and add the required parameter:
|
|
93
93
|
|
|
94
94
|
```js
|
|
95
|
-
player.getNetworkingEngine().registerRequestFilter(function(type, request) {
|
|
95
|
+
player.getNetworkingEngine().registerRequestFilter(function(type, request, context) {
|
|
96
96
|
// Only add headers to license requests:
|
|
97
97
|
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
98
98
|
// This is the specific parameter name and value the server wants:
|
|
@@ -140,7 +140,7 @@ Our `cookie_auth` endpoint sends back headers that allow credentialed requests,
|
|
|
140
140
|
so we set a flag in our request filter to send credentials cross-site:
|
|
141
141
|
|
|
142
142
|
```js
|
|
143
|
-
player.getNetworkingEngine().registerRequestFilter(function(type, request) {
|
|
143
|
+
player.getNetworkingEngine().registerRequestFilter(function(type, request, context) {
|
|
144
144
|
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
|
|
145
145
|
request.allowCrossSiteCredentials = true;
|
|
146
146
|
}
|
|
@@ -205,7 +205,7 @@ const authToken = null;
|
|
|
205
205
|
Now change the request filter:
|
|
206
206
|
|
|
207
207
|
```js
|
|
208
|
-
player.getNetworkingEngine().registerRequestFilter(function(type, request) {
|
|
208
|
+
player.getNetworkingEngine().registerRequestFilter(function(type, request, context) {
|
|
209
209
|
// Only add headers to license requests:
|
|
210
210
|
if (type != shaka.net.NetworkingEngine.RequestType.LICENSE) return;
|
|
211
211
|
|
|
@@ -65,7 +65,7 @@ will see `Error code 6007`, which means `LICENSE_REQUEST_FAILED`. To wrap the
|
|
|
65
65
|
license request, we must register a request filter:
|
|
66
66
|
|
|
67
67
|
```js
|
|
68
|
-
player.getNetworkingEngine().registerRequestFilter(function(type, request) {
|
|
68
|
+
player.getNetworkingEngine().registerRequestFilter(function(type, request, context) {
|
|
69
69
|
// Alias some utilities provided by the library.
|
|
70
70
|
const StringUtils = shaka.util.StringUtils;
|
|
71
71
|
const Uint8ArrayUtils = shaka.util.Uint8ArrayUtils;
|
|
@@ -136,7 +136,7 @@ Widevine CDM does not understand this wrapped format, so we must unwrap it first
|
|
|
136
136
|
using a request filter:
|
|
137
137
|
|
|
138
138
|
```js
|
|
139
|
-
player.getNetworkingEngine().registerResponseFilter(function(type, response) {
|
|
139
|
+
player.getNetworkingEngine().registerResponseFilter(function(type, response, context) {
|
|
140
140
|
// Alias some utilities provided by the library.
|
|
141
141
|
const StringUtils = shaka.util.StringUtils;
|
|
142
142
|
const Uint8ArrayUtils = shaka.util.Uint8ArrayUtils;
|
|
@@ -61,7 +61,8 @@ The following elements can be added to the UI bar using this configuration value
|
|
|
61
61
|
starts playing the presentation at an increased speed
|
|
62
62
|
* spacer: adds a chunk of empty space between the adjacent elements.
|
|
63
63
|
* picture_in_picture: adds a button that enables/disables picture-in-picture mode on browsers
|
|
64
|
-
that support it. Button is invisible on other browsers.
|
|
64
|
+
that support it. Button is invisible on other browsers. Note that it will use the
|
|
65
|
+
[Document Picture-in-Picture API]() if supported.
|
|
65
66
|
* loop: adds a button that controls if the currently selected video is played in a loop.
|
|
66
67
|
* airplay: adds a button that opens a AirPlay dialog. The button is visible only if the browser
|
|
67
68
|
supports AirPlay.
|
|
@@ -72,6 +73,7 @@ The following elements can be added to the UI bar using this configuration value
|
|
|
72
73
|
* playback_rate: adds a button that controls the playback rate selection.
|
|
73
74
|
* captions: adds a button that controls the current text track selection (including turning it off).
|
|
74
75
|
<!-- TODO: If we add more buttons that can be put in the order this way, list them here. -->
|
|
76
|
+
[Document Picture-in-Picture API]: https://developer.chrome.com/docs/web-platform/document-picture-in-picture/
|
|
75
77
|
|
|
76
78
|
Similarly, the 'overflowMenuButtons' configuration option can be used to control
|
|
77
79
|
the contents of the overflow menu.
|
|
@@ -83,7 +85,8 @@ The following buttons can be added to the overflow menu:
|
|
|
83
85
|
* quality: adds a button that controls enabling/disabling of abr and video resolution selection.
|
|
84
86
|
* language: adds a button that controls audio language selection.
|
|
85
87
|
* picture_in_picture: adds a button that enables/disables picture-in-picture mode on browsers
|
|
86
|
-
that support it. Button is invisible on other browsers.
|
|
88
|
+
that support it. Button is invisible on other browsers. Note that it will use the
|
|
89
|
+
[Document Picture-in-Picture API]() if supported.
|
|
87
90
|
* loop: adds a button that controls if the currently selected video is played in a loop.
|
|
88
91
|
* playback_rate: adds a button that controls the playback rate selection.
|
|
89
92
|
* airplay: adds a button that opens a AirPlay dialog. The button is visible only if the browser
|
|
@@ -122,7 +125,8 @@ The following buttons can be added to the context menu:
|
|
|
122
125
|
* Statistics: adds a button that displays statistics of the video.
|
|
123
126
|
* loop: adds a button that controls if the currently selected video is played in a loop.
|
|
124
127
|
* picture_in_picture: adds a button that enables/disables picture-in-picture mode on browsers
|
|
125
|
-
that support it. Button is invisible on other browsers.
|
|
128
|
+
that support it. Button is invisible on other browsers. Note that it will use the
|
|
129
|
+
[Document Picture-in-Picture API]() if supported.
|
|
126
130
|
|
|
127
131
|
Example:
|
|
128
132
|
```js
|
package/docs/tutorials/ui.md
CHANGED
|
@@ -30,7 +30,7 @@ Set up controls with HTML data attributes:
|
|
|
30
30
|
The data-shaka-player-cast-receiver-id tag allows you to provide a Cast Application ID that
|
|
31
31
|
the cast button will cast to; the value provided here is the sample cast receiver. -->
|
|
32
32
|
<div data-shaka-player-container style="max-width:40em"
|
|
33
|
-
data-shaka-player-cast-receiver-id="
|
|
33
|
+
data-shaka-player-cast-receiver-id="07AEE832">
|
|
34
34
|
<!-- The data-shaka-player tag will make the UI library use this video element.
|
|
35
35
|
If no video is provided, the UI will automatically make one inside the container div. -->
|
|
36
36
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%"></video>
|
|
@@ -111,7 +111,7 @@ set up a listener for the 'caststatuschanged' events.
|
|
|
111
111
|
<!-- Add a data-shaka-player-cast-receiver-id tag to provide a Cast Application ID that
|
|
112
112
|
the cast button will cast to; the value provided here is the sample cast receiver. -->
|
|
113
113
|
<div data-shaka-player-container style="max-width:40em"
|
|
114
|
-
data-shaka-player-cast-receiver-id="
|
|
114
|
+
data-shaka-player-cast-receiver-id="07AEE832">
|
|
115
115
|
</div>
|
|
116
116
|
```
|
|
117
117
|
|
|
@@ -139,7 +139,7 @@ casting to an Android receiver app.
|
|
|
139
139
|
|
|
140
140
|
```html
|
|
141
141
|
<div data-shaka-player-container style="max-width:40em"
|
|
142
|
-
data-shaka-player-cast-receiver-id="
|
|
142
|
+
data-shaka-player-cast-receiver-id="07AEE832"
|
|
143
143
|
data-shaka-player-cast-android-receiver-compatible="true">
|
|
144
144
|
<!-- The manifest url in the src attribute will be automatically loaded -->
|
|
145
145
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%"
|
|
@@ -154,7 +154,7 @@ or a `<source>` tag inside it to enable auto loading of the specified content.
|
|
|
154
154
|
|
|
155
155
|
```html
|
|
156
156
|
<div data-shaka-player-container style="max-width:40em"
|
|
157
|
-
data-shaka-player-cast-receiver-id="
|
|
157
|
+
data-shaka-player-cast-receiver-id="07AEE832">
|
|
158
158
|
<!-- The manifest url in the src attribute will be automatically loaded -->
|
|
159
159
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%"
|
|
160
160
|
src="https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd"></video>
|
|
@@ -165,7 +165,7 @@ or
|
|
|
165
165
|
|
|
166
166
|
```html
|
|
167
167
|
<div data-shaka-player-container style="max-width:40em"
|
|
168
|
-
data-shaka-player-cast-receiver-id="
|
|
168
|
+
data-shaka-player-cast-receiver-id="07AEE832">
|
|
169
169
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%">
|
|
170
170
|
<!-- The manifest url in the src attribute will be auto loaded -->
|
|
171
171
|
<source src="https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd"/>
|
|
@@ -178,7 +178,7 @@ call to the first one fails.
|
|
|
178
178
|
|
|
179
179
|
```html
|
|
180
180
|
<div data-shaka-player-container style="max-width:40em"
|
|
181
|
-
data-shaka-player-cast-receiver-id="
|
|
181
|
+
data-shaka-player-cast-receiver-id="07AEE832">
|
|
182
182
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%">
|
|
183
183
|
<!-- Try this first -->
|
|
184
184
|
<source src="https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd"/>
|
|
@@ -222,7 +222,7 @@ const video = controls.getVideo();
|
|
|
222
222
|
// Receiver Compatability.
|
|
223
223
|
ui.configure({
|
|
224
224
|
// Set the castReceiverAppId
|
|
225
|
-
'castReceiverAppId': '
|
|
225
|
+
'castReceiverAppId': '07AEE832',
|
|
226
226
|
// Enable casting to native Android Apps (e.g. Android TV Apps)
|
|
227
227
|
'castAndroidReceiverCompatible': true,
|
|
228
228
|
});
|
package/externs/ima.js
CHANGED
|
@@ -108,19 +108,93 @@ google.ima.AdsManager = class {
|
|
|
108
108
|
|
|
109
109
|
/** @override */
|
|
110
110
|
dispatchEvent() {}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @param {!google.ima.AdsRenderingSettings} adsRenderingSettings
|
|
114
|
+
*/
|
|
115
|
+
updateAdsRenderingSettings(adsRenderingSettings) {}
|
|
111
116
|
};
|
|
112
117
|
|
|
113
118
|
|
|
114
119
|
/** @const */
|
|
115
120
|
google.ima.AdsManagerLoadedEvent = class extends Event {
|
|
116
121
|
/**
|
|
117
|
-
* @param {!HTMLElement} video
|
|
122
|
+
* @param {!(HTMLElement|{currentTime: number})} video
|
|
123
|
+
* @param {!google.ima.AdsRenderingSettings=} adsRenderingSettings
|
|
118
124
|
* @return {!google.ima.AdsManager}
|
|
119
125
|
*/
|
|
120
|
-
getAdsManager(video) {}
|
|
126
|
+
getAdsManager(video, adsRenderingSettings) {}
|
|
121
127
|
};
|
|
122
128
|
|
|
123
129
|
|
|
130
|
+
/**
|
|
131
|
+
* @typedef {{
|
|
132
|
+
* autoAlign: (boolean),
|
|
133
|
+
* bitrate: (number),
|
|
134
|
+
* enablePreloading: (boolean),
|
|
135
|
+
* loadVideoTimeout: (number),
|
|
136
|
+
* mimeTypes: (?Array.<string>),
|
|
137
|
+
* playAdsAfterTime: (number),
|
|
138
|
+
* restoreCustomPlaybackStateOnAdBreakComplete: (boolean),
|
|
139
|
+
* uiElements: (?Array.<string>),
|
|
140
|
+
* useStyledLinearAds: (boolean),
|
|
141
|
+
* useStyledNonLinearAds: (boolean),
|
|
142
|
+
* }}
|
|
143
|
+
*
|
|
144
|
+
* @description Defines parameters that control the rendering of ads.
|
|
145
|
+
* @property {boolean} autoAlign
|
|
146
|
+
* Set to false if you wish to have fine grained control over
|
|
147
|
+
* the positioning of all non-linear ads.
|
|
148
|
+
* If this value is true, the ad is positioned in the bottom center.
|
|
149
|
+
* If this value is false, the ad is positioned in the top left corner.
|
|
150
|
+
* The default value is true.
|
|
151
|
+
* @property {number} bitrate
|
|
152
|
+
* Maximum recommended bitrate. The value is in kbit/s.
|
|
153
|
+
* The SDK will pick media with bitrate below the specified max,
|
|
154
|
+
* or the closest bitrate if there is no media with lower bitrate found.
|
|
155
|
+
* Default value, -1, means the SDK selects the maximum bitrate.
|
|
156
|
+
* @property {boolean} enablePreloading
|
|
157
|
+
* Enables preloading of video assets.
|
|
158
|
+
* For more info see [our guide to preloading media]{@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/preload}.
|
|
159
|
+
* @property {number} loadVideoTimeout
|
|
160
|
+
* Timeout (in milliseconds) when loading a video ad media file.
|
|
161
|
+
* If loading takes longer than this timeout, the ad playback is canceled
|
|
162
|
+
* and the next ad in the pod plays, if available.
|
|
163
|
+
* Use -1 for the default of 8 seconds.
|
|
164
|
+
* @property {?Array.<string>} mimeTypes
|
|
165
|
+
* Only supported for linear video mime types.
|
|
166
|
+
* If specified, the SDK will include media that matches
|
|
167
|
+
* the MIME type(s) specified in the list and exclude media.
|
|
168
|
+
* that does not match the specified MIME type(s).
|
|
169
|
+
* The format is a list of strings,
|
|
170
|
+
* for example, [ 'video/mp4', 'video/webm', ... ] If not specified,
|
|
171
|
+
* the SDK will pick the media based on player capabilities.
|
|
172
|
+
* @property {number} playAdsAfterTime
|
|
173
|
+
* For VMAP and ad rules playlists, only play ad breaks scheduled
|
|
174
|
+
* after this time (in seconds).
|
|
175
|
+
* This setting is strictly after - for example,
|
|
176
|
+
* setting playAdsAfterTime to 15 will cause IMA to ignore
|
|
177
|
+
* an ad break scheduled to play at 15s.
|
|
178
|
+
* @property {boolean} restoreCustomPlaybackStateOnAdBreakComplete
|
|
179
|
+
* Specifies whether or not the SDK should restore the custom playback
|
|
180
|
+
* state after an ad break completes. This is setting is used primarily
|
|
181
|
+
* when the publisher passes in its content player to use for
|
|
182
|
+
* custom ad playback.
|
|
183
|
+
* @property {?Array.<string>} uiElements
|
|
184
|
+
* Specifies whether the UI elements that should be displayed.
|
|
185
|
+
* The elements in this array are ignored for AdSense/AdX ads.
|
|
186
|
+
* @property {boolean} useStyledLinearAds
|
|
187
|
+
* Render linear ads with full UI styling.
|
|
188
|
+
* This setting does not apply to AdSense/AdX ads
|
|
189
|
+
* or ads played in a mobile context that already
|
|
190
|
+
* use full UI styling by default.
|
|
191
|
+
* @property {boolean} useStyledNonLinearAds
|
|
192
|
+
* Render non-linear ads with a close and recall button.
|
|
193
|
+
* @exportDoc
|
|
194
|
+
*/
|
|
195
|
+
google.ima.AdsRenderingSettings;
|
|
196
|
+
|
|
197
|
+
|
|
124
198
|
/** @const */
|
|
125
199
|
google.ima.AdDisplayContainer = class {
|
|
126
200
|
/**
|
|
@@ -173,6 +247,24 @@ google.ima.Ad = class {
|
|
|
173
247
|
|
|
174
248
|
/** @return {string} */
|
|
175
249
|
getDescription() {}
|
|
250
|
+
|
|
251
|
+
/** @return {number} */
|
|
252
|
+
getVastMediaBitrate() {}
|
|
253
|
+
|
|
254
|
+
/** @return {number} */
|
|
255
|
+
getVastMediaHeight() {}
|
|
256
|
+
|
|
257
|
+
/** @return {number} */
|
|
258
|
+
getVastMediaWidth() {}
|
|
259
|
+
|
|
260
|
+
/** @return {string} */
|
|
261
|
+
getAdId() {}
|
|
262
|
+
|
|
263
|
+
/** @return {string} */
|
|
264
|
+
getCreativeAdId() {}
|
|
265
|
+
|
|
266
|
+
/** @return {?string} */
|
|
267
|
+
getMediaUrl() {}
|
|
176
268
|
};
|
|
177
269
|
|
|
178
270
|
|
|
@@ -183,6 +275,12 @@ google.ima.AdPodInfo = class {
|
|
|
183
275
|
|
|
184
276
|
/** @return {number} */
|
|
185
277
|
getTotalAds() {}
|
|
278
|
+
|
|
279
|
+
/** @return {number} */
|
|
280
|
+
getTimeOffset() {}
|
|
281
|
+
|
|
282
|
+
/** @return {number} */
|
|
283
|
+
getPodIndex() {}
|
|
186
284
|
};
|
|
187
285
|
|
|
188
286
|
/** @const */
|
|
@@ -206,6 +304,11 @@ google.ima.ImaSdkSettings = class {
|
|
|
206
304
|
* @param {google.ima.ImaSdkSettings.VpaidMode} vpaidMode
|
|
207
305
|
*/
|
|
208
306
|
setVpaidMode(vpaidMode) {}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @param {boolean} disable
|
|
310
|
+
*/
|
|
311
|
+
setDisableCustomPlaybackForIOS10Plus(disable) {}
|
|
209
312
|
};
|
|
210
313
|
|
|
211
314
|
/**
|
|
@@ -401,6 +504,18 @@ google.ima.dai.api.Ad = class {
|
|
|
401
504
|
|
|
402
505
|
/** @return {string} */
|
|
403
506
|
getDescription() {}
|
|
507
|
+
|
|
508
|
+
/** @return {number} */
|
|
509
|
+
getVastMediaHeight() {}
|
|
510
|
+
|
|
511
|
+
/** @return {number} */
|
|
512
|
+
getVastMediaWidth() {}
|
|
513
|
+
|
|
514
|
+
/** @return {string} */
|
|
515
|
+
getAdId() {}
|
|
516
|
+
|
|
517
|
+
/** @return {string} */
|
|
518
|
+
getCreativeAdId() {}
|
|
404
519
|
};
|
|
405
520
|
|
|
406
521
|
|
|
@@ -411,6 +526,12 @@ google.ima.dai.api.AdPodInfo = class {
|
|
|
411
526
|
|
|
412
527
|
/** @return {number} */
|
|
413
528
|
getTotalAds() {}
|
|
529
|
+
|
|
530
|
+
/** @return {number} */
|
|
531
|
+
getTimeOffset() {}
|
|
532
|
+
|
|
533
|
+
/** @return {number} */
|
|
534
|
+
getPodIndex() {}
|
|
414
535
|
};
|
|
415
536
|
|
|
416
537
|
|