shaka-player 4.12.8 → 4.13.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/AUTHORS +1 -0
- package/CONTRIBUTORS +4 -0
- package/README.md +22 -21
- package/cspell.config.yaml +18 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +29 -24
- package/dist/locales.js +33 -33
- package/dist/shaka-player.compiled.d.ts +138 -36
- package/dist/shaka-player.compiled.debug.d.ts +138 -36
- package/dist/shaka-player.compiled.debug.externs.js +367 -107
- package/dist/shaka-player.compiled.debug.js +828 -765
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +367 -107
- package/dist/shaka-player.compiled.js +1451 -1416
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +172 -38
- package/dist/shaka-player.ui.debug.d.ts +172 -38
- package/dist/shaka-player.ui.debug.externs.js +406 -113
- package/dist/shaka-player.ui.debug.js +842 -766
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +406 -113
- package/dist/shaka-player.ui.js +1670 -1628
- package/dist/shaka-player.ui.map +4 -4
- package/eslint.config.mjs +343 -0
- package/externs/airplay.js +1 -1
- package/externs/audiotrack.js +1 -1
- package/externs/awesomplete.js +1 -1
- package/externs/cast-sdk-v2.js +2 -2
- package/externs/cmcd.js +16 -1
- package/externs/device_sensor_event.js +1 -1
- package/externs/ima.js +8 -8
- package/externs/isoboxer.js +31 -31
- package/externs/jwk_set.js +1 -1
- package/externs/lcevc.js +8 -8
- package/externs/mediakeys.js +1 -1
- package/externs/mediasession.js +3 -2
- package/externs/mediatailor.js +18 -18
- package/externs/pictureinpicture.js +41 -1
- package/externs/playstation.js +2 -2
- package/externs/prefixed_eme.js +1 -1
- package/externs/shaka/abortable.js +4 -4
- package/externs/shaka/abr_manager.js +1 -1
- package/externs/shaka/ads.js +45 -6
- package/externs/shaka/cea.js +2 -2
- package/externs/shaka/codecs.js +4 -4
- package/externs/shaka/drm_info.js +6 -6
- package/externs/shaka/error.js +5 -5
- package/externs/shaka/manifest.js +51 -56
- package/externs/shaka/manifest_parser.js +3 -9
- package/externs/shaka/net.js +23 -20
- package/externs/shaka/offline.js +37 -37
- package/externs/shaka/offline_compat_v1.js +10 -10
- package/externs/shaka/offline_compat_v2.js +10 -10
- package/externs/shaka/player.js +139 -109
- package/externs/shaka/text.js +10 -3
- package/externs/shaka/transmuxer.js +1 -1
- package/externs/videotrack.js +1 -1
- package/lib/abr/ewma.js +1 -1
- package/lib/abr/simple_abr_manager.js +70 -22
- package/lib/ads/ad_manager.js +43 -18
- package/lib/ads/ad_utils.js +160 -58
- package/lib/ads/ads_stats.js +1 -1
- package/lib/ads/client_side_ad_manager.js +2 -2
- package/lib/ads/interstitial_ad.js +16 -11
- package/lib/ads/interstitial_ad_manager.js +419 -72
- package/lib/ads/interstitial_static_ad.js +299 -0
- package/lib/ads/media_tailor_ad.js +1 -0
- package/lib/ads/media_tailor_ad_manager.js +37 -36
- package/lib/ads/server_side_ad_manager.js +7 -6
- package/lib/cast/cast_receiver.js +5 -3
- package/lib/cast/cast_sender.js +2 -2
- package/lib/cast/cast_utils.js +20 -13
- package/lib/cea/cea608_data_channel.js +53 -53
- package/lib/cea/cea708_service.js +42 -40
- package/lib/cea/cea708_window.js +5 -2
- package/lib/cea/cea_decoder.js +5 -7
- package/lib/cea/mp4_cea_parser.js +1 -1
- package/lib/cea/sei_processor.js +1 -1
- package/lib/dash/content_protection.js +62 -192
- package/lib/dash/dash_parser.js +119 -119
- package/lib/dash/mpd_utils.js +14 -13
- package/lib/dash/segment_base.js +5 -5
- package/lib/dash/segment_list.js +10 -10
- package/lib/dash/segment_template.js +55 -53
- package/lib/debug/log.js +2 -2
- package/lib/dependencies/all.js +2 -1
- package/lib/{media → drm}/drm_engine.js +274 -143
- package/lib/{util → drm}/drm_utils.js +20 -11
- package/lib/drm/playready.js +233 -0
- package/lib/hls/hls_classes.js +14 -14
- package/lib/hls/hls_parser.js +257 -196
- package/lib/hls/hls_utils.js +14 -14
- package/lib/hls/manifest_text_parser.js +10 -10
- package/lib/media/adaptation_set.js +6 -5
- package/lib/media/adaptation_set_criteria.js +51 -379
- package/lib/media/buffering_observer.js +5 -4
- package/lib/media/closed_caption_parser.js +2 -2
- package/lib/media/content_workarounds.js +2 -2
- package/lib/media/example_based_criteria.js +69 -0
- package/lib/media/gap_jumping_controller.js +14 -1
- package/lib/media/manifest_filterer.js +8 -8
- package/lib/media/manifest_parser.js +2 -2
- package/lib/media/media_source_capabilities.js +20 -1
- package/lib/media/media_source_engine.js +84 -35
- package/lib/media/mp4_segment_index_parser.js +5 -5
- package/lib/media/playhead.js +2 -8
- package/lib/media/playhead_observer.js +1 -1
- package/lib/media/preference_based_criteria.js +333 -0
- package/lib/media/preload_manager.js +53 -37
- package/lib/media/presentation_timeline.js +2 -2
- package/lib/media/quality_observer.js +35 -35
- package/lib/media/region_observer.js +2 -2
- package/lib/media/region_timeline.js +3 -3
- package/lib/media/segment_index.js +14 -14
- package/lib/media/segment_prefetch.js +17 -13
- package/lib/media/segment_reference.js +7 -7
- package/lib/media/segment_utils.js +9 -9
- package/lib/media/streaming_engine.js +77 -38
- package/lib/media/time_ranges_utils.js +1 -1
- package/lib/media/video_wrapper.js +1 -1
- package/lib/media/webm_segment_index_parser.js +4 -4
- package/lib/mss/content_protection.js +17 -222
- package/lib/mss/mss_parser.js +23 -24
- package/lib/net/data_uri_plugin.js +1 -0
- package/lib/net/http_fetch_plugin.js +8 -7
- package/lib/net/http_plugin_utils.js +5 -2
- package/lib/net/http_xhr_plugin.js +4 -3
- package/lib/net/networking_engine.js +72 -17
- package/lib/net/networking_utils.js +5 -2
- package/lib/offline/download_info.js +5 -1
- package/lib/offline/download_manager.js +15 -4
- package/lib/offline/download_progress_estimator.js +1 -1
- package/lib/offline/indexeddb/base_storage_cell.js +9 -9
- package/lib/offline/indexeddb/db_connection.js +1 -1
- package/lib/offline/indexeddb/db_operation.js +2 -2
- package/lib/offline/indexeddb/eme_session_storage_cell.js +1 -1
- package/lib/offline/indexeddb/storage_mechanism.js +1 -1
- package/lib/offline/indexeddb/v1_storage_cell.js +3 -3
- package/lib/offline/indexeddb/v2_storage_cell.js +2 -2
- package/lib/offline/manifest_converter.js +11 -12
- package/lib/offline/offline_scheme.js +8 -4
- package/lib/offline/session_deleter.js +11 -11
- package/lib/offline/storage.js +137 -88
- package/lib/offline/storage_muxer.js +8 -8
- package/lib/offline/stored_content_utils.js +3 -3
- package/lib/offline/stream_bandwidth_estimator.js +1 -1
- package/lib/player.js +291 -207
- package/lib/polyfill/all.js +1 -1
- package/lib/polyfill/media_capabilities.js +5 -5
- package/lib/polyfill/patchedmediakeys_apple.js +6 -6
- package/lib/polyfill/patchedmediakeys_webkit.js +8 -8
- package/lib/polyfill/video_play_promise.js +0 -1
- package/lib/text/cue.js +3 -2
- package/lib/text/lrc_text_parser.js +1 -1
- package/lib/text/mp4_ttml_parser.js +1 -1
- package/lib/text/mp4_vtt_parser.js +3 -3
- package/lib/text/sbv_text_parser.js +1 -1
- package/lib/text/simple_text_displayer.js +37 -10
- package/lib/text/ssa_text_parser.js +3 -1
- package/lib/text/stub_text_displayer.js +12 -5
- package/lib/text/text_engine.js +5 -4
- package/lib/text/text_utils.js +4 -4
- package/lib/text/ttml_text_parser.js +21 -20
- package/lib/text/ui_text_displayer.js +20 -13
- package/lib/text/vtt_text_parser.js +10 -10
- package/lib/text/web_vtt_generator.js +2 -2
- package/lib/transmuxer/aac_transmuxer.js +2 -2
- package/lib/transmuxer/ac3_transmuxer.js +2 -2
- package/lib/transmuxer/adts.js +2 -0
- package/lib/transmuxer/ec3.js +3 -3
- package/lib/transmuxer/ec3_transmuxer.js +2 -2
- package/lib/transmuxer/h264.js +5 -5
- package/lib/transmuxer/h265.js +3 -3
- package/lib/transmuxer/mp3_transmuxer.js +2 -2
- package/lib/transmuxer/mpeg_audio.js +6 -6
- package/lib/transmuxer/mss_transmuxer.js +2 -0
- package/lib/transmuxer/transmuxer_engine.js +1 -1
- package/lib/transmuxer/ts_transmuxer.js +10 -10
- package/lib/util/abortable_operation.js +10 -10
- package/lib/util/array_utils.js +6 -6
- package/lib/util/cmcd_manager.js +149 -18
- package/lib/util/cmsd_manager.js +11 -11
- package/lib/util/config_utils.js +3 -3
- package/lib/util/content_steering_manager.js +17 -17
- package/lib/util/data_view_reader.js +3 -3
- package/lib/util/ebml_parser.js +1 -1
- package/lib/util/error.js +11 -6
- package/lib/util/event_manager.js +1 -1
- package/lib/util/exp_golomb.js +1 -1
- package/lib/util/fairplay_utils.js +6 -1
- package/lib/util/fake_event.js +3 -2
- package/lib/util/fake_event_target.js +1 -1
- package/lib/util/functional.js +8 -8
- package/lib/util/id3_utils.js +1 -1
- package/lib/util/iterables.js +6 -6
- package/lib/util/language_utils.js +17 -17
- package/lib/util/manifest_parser_utils.js +13 -13
- package/lib/util/map_utils.js +6 -6
- package/lib/util/media_ready_state_utils.js +1 -1
- package/lib/util/mime_utils.js +15 -4
- package/lib/util/mp4_box_parsers.js +5 -5
- package/lib/util/mp4_generator.js +31 -30
- package/lib/util/mp4_parser.js +2 -2
- package/lib/util/multi_map.js +5 -5
- package/lib/util/mutex.js +1 -1
- package/lib/util/networking.js +1 -1
- package/lib/util/object_utils.js +5 -1
- package/lib/util/operation_manager.js +1 -1
- package/lib/util/periods.js +24 -24
- package/lib/util/platform.js +8 -4
- package/lib/util/player_configuration.js +50 -17
- package/lib/util/pssh.js +34 -6
- package/lib/util/public_promise.js +2 -2
- package/lib/util/state_history.js +2 -2
- package/lib/util/stream_utils.js +138 -120
- package/lib/util/string_utils.js +4 -3
- package/lib/util/switch_history.js +2 -2
- package/lib/util/tXml.js +22 -17
- package/lib/util/text_parser.js +2 -2
- package/lib/util/timer.js +1 -1
- package/lib/util/ts_parser.js +22 -22
- package/lib/util/xml_utils.js +1 -0
- package/package.json +7 -4
- package/project-words.txt +485 -0
- package/shaka-player.uncompiled.js +1 -1
- package/third_party/closure-uri/uri.js +2 -2
- package/third_party/closure-uri/utils.js +2 -2
- package/third_party/language-mapping-list/language-mapping-list.js +1 -1
- package/ui/ad_statistics_button.js +9 -5
- package/ui/airplay_button.js +1 -0
- package/ui/audio_language_selection.js +2 -1
- package/ui/context_menu.js +2 -2
- package/ui/controls.js +7 -7
- package/ui/externs/ui.js +29 -21
- package/ui/externs/watermark.js +64 -0
- package/ui/fast_forward_button.js +1 -1
- package/ui/gl_matrix/matrix_4x4.js +11 -5
- package/ui/hidden_fast_forward_button.js +1 -1
- package/ui/hidden_seek_button.js +1 -1
- package/ui/language_utils.js +27 -26
- package/ui/less/buttons.less +2 -2
- package/ui/localization.js +21 -21
- package/ui/loop_button.js +2 -2
- package/ui/overflow_menu.js +2 -2
- package/ui/playback_rate_selection.js +1 -1
- package/ui/presentation_time.js +4 -1
- package/ui/range_element.js +2 -2
- package/ui/resolution_selection.js +42 -6
- package/ui/rewind_button.js +1 -1
- package/ui/seek_bar.js +5 -5
- package/ui/statistics_button.js +8 -4
- package/ui/text_selection.js +3 -2
- package/ui/ui.js +32 -2
- package/ui/vr_manager.js +3 -3
- package/ui/vr_utils.js +14 -14
- package/ui/vr_webgl.js +5 -5
- package/ui/watermark.js +313 -0
- package/.eslintignore +0 -4
- package/.eslintrc.js +0 -310
- package/lib/polyfill/patchedmediakeys_nop.js +0 -148
package/externs/lcevc.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @fileoverview Externs for LcevcDec
|
|
9
|
-
* compiler.
|
|
10
|
-
*
|
|
11
|
-
* @externs
|
|
12
|
-
*/
|
|
8
|
+
* @fileoverview Externs for LcevcDec
|
|
9
|
+
* compiler.
|
|
10
|
+
*
|
|
11
|
+
* @externs
|
|
12
|
+
*/
|
|
13
13
|
|
|
14
14
|
// This empty namespace is declared to check if LcevcDec libraries are loaded.
|
|
15
15
|
/** @const */
|
|
@@ -18,9 +18,9 @@ var libDPIModule = {};
|
|
|
18
18
|
var LCEVCdec = {};
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* LCEVC Dec constructor
|
|
22
|
-
* @constructor
|
|
23
|
-
*/
|
|
21
|
+
* LCEVC Dec constructor
|
|
22
|
+
* @constructor
|
|
23
|
+
*/
|
|
24
24
|
LCEVCdec.LCEVCdec = class {
|
|
25
25
|
/**
|
|
26
26
|
* @param {HTMLVideoElement} media
|
package/externs/mediakeys.js
CHANGED
package/externs/mediasession.js
CHANGED
|
@@ -37,8 +37,9 @@ const MediaSession = class {
|
|
|
37
37
|
/** @type {string} */
|
|
38
38
|
this.type = type;
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
40
|
+
/**
|
|
41
|
+
* @type {!function(!{action: string, seekOffset: ?number,
|
|
42
|
+
* seekTime: ?number})}
|
|
42
43
|
*/
|
|
43
44
|
this.callback = callback;
|
|
44
45
|
}
|
package/externs/mediatailor.js
CHANGED
|
@@ -29,10 +29,10 @@ mediaTailor.SessionResponse;
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* @typedef {{
|
|
32
|
-
* avails: !Array
|
|
32
|
+
* avails: !Array<mediaTailor.AdBreak>
|
|
33
33
|
* }}
|
|
34
34
|
*
|
|
35
|
-
* @property {!Array
|
|
35
|
+
* @property {!Array<mediaTailor.AdBreak>} avails
|
|
36
36
|
* @exportDoc
|
|
37
37
|
*/
|
|
38
38
|
mediaTailor.TrackingResponse;
|
|
@@ -40,17 +40,17 @@ mediaTailor.TrackingResponse;
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* @typedef {{
|
|
43
|
-
* adBreakTrackingEvents: !Array
|
|
44
|
-
* ads: !Array
|
|
43
|
+
* adBreakTrackingEvents: !Array<mediaTailor.TrackingEvent>,
|
|
44
|
+
* ads: !Array<mediaTailor.Ad>,
|
|
45
45
|
* durationInSeconds: number,
|
|
46
|
-
* nonLinearAdsList: !Array
|
|
46
|
+
* nonLinearAdsList: !Array<mediaTailor.Ad>,
|
|
47
47
|
* startTimeInSeconds: number
|
|
48
48
|
* }}
|
|
49
49
|
*
|
|
50
|
-
* @property {!Array
|
|
51
|
-
* @property {!Array
|
|
50
|
+
* @property {!Array<mediaTailor.TrackingEvent>} adBreakTrackingEvents
|
|
51
|
+
* @property {!Array<mediaTailor.Ad>} ads
|
|
52
52
|
* @property {number} durationInSeconds
|
|
53
|
-
* @property {!Array
|
|
53
|
+
* @property {!Array<mediaTailor.Ad>} nonLinearAdsList
|
|
54
54
|
* @property {number} startTimeInSeconds
|
|
55
55
|
* @exportDoc
|
|
56
56
|
*/
|
|
@@ -68,8 +68,8 @@ mediaTailor.AdBreak;
|
|
|
68
68
|
* durationInSeconds: number,
|
|
69
69
|
* skipOffset: ?string,
|
|
70
70
|
* startTimeInSeconds: number,
|
|
71
|
-
* nonLinearAdList: !Array
|
|
72
|
-
* trackingEvents: !Array
|
|
71
|
+
* nonLinearAdList: !Array<mediaTailor.NonLinearAd>,
|
|
72
|
+
* trackingEvents: !Array<mediaTailor.TrackingEvent>
|
|
73
73
|
* }}
|
|
74
74
|
*
|
|
75
75
|
* @property {string} adId
|
|
@@ -81,8 +81,8 @@ mediaTailor.AdBreak;
|
|
|
81
81
|
* @property {number} durationInSeconds
|
|
82
82
|
* @property {?string} skipOffset
|
|
83
83
|
* @property {number} startTimeInSeconds
|
|
84
|
-
* @property {!Array
|
|
85
|
-
* @property {!Array
|
|
84
|
+
* @property {!Array<mediaTailor.NonLinearAd>} nonLinearAdList
|
|
85
|
+
* @property {!Array<mediaTailor.TrackingEvent>} trackingEvents
|
|
86
86
|
* @exportDoc
|
|
87
87
|
*/
|
|
88
88
|
mediaTailor.Ad;
|
|
@@ -119,11 +119,11 @@ mediaTailor.NonLinearAd;
|
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* @typedef {{
|
|
122
|
-
* beaconUrls: !Array
|
|
122
|
+
* beaconUrls: !Array<string>,
|
|
123
123
|
* eventType: string
|
|
124
124
|
* }}
|
|
125
125
|
*
|
|
126
|
-
* @property {!Array
|
|
126
|
+
* @property {!Array<string>} beaconUrls
|
|
127
127
|
* @property {string} eventType
|
|
128
128
|
* @exportDoc
|
|
129
129
|
*/
|
|
@@ -136,10 +136,10 @@ var mediaTailorExternalResource = {};
|
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* @typedef {{
|
|
139
|
-
* apps: !Array
|
|
139
|
+
* apps: !Array<mediaTailorExternalResource.App>
|
|
140
140
|
* }}
|
|
141
141
|
*
|
|
142
|
-
* @property {!Array
|
|
142
|
+
* @property {!Array<mediaTailorExternalResource.App>} apps
|
|
143
143
|
* @exportDoc
|
|
144
144
|
*/
|
|
145
145
|
mediaTailorExternalResource.Response;
|
|
@@ -173,10 +173,10 @@ mediaTailorExternalResource.AppPlaceholder;
|
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
175
|
* @typedef {{
|
|
176
|
-
* source: !Array
|
|
176
|
+
* source: !Array<mediaTailorExternalResource.AppDataSource>
|
|
177
177
|
* }}
|
|
178
178
|
*
|
|
179
|
-
* @property {!Array
|
|
179
|
+
* @property {!Array<mediaTailorExternalResource.AppDataSource>} source
|
|
180
180
|
* @exportDoc
|
|
181
181
|
*/
|
|
182
182
|
mediaTailorExternalResource.AppData;
|
|
@@ -51,6 +51,46 @@ HTMLMediaElement.prototype.webkitSupportsPresentationMode = function(mode) {};
|
|
|
51
51
|
HTMLMediaElement.prototype.webkitPresentationMode;
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @constructor
|
|
56
|
+
* @implements {EventTarget}
|
|
57
|
+
*/
|
|
58
|
+
function PictureInPictureWindow() {}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/** @type {number} */
|
|
62
|
+
PictureInPictureWindow.prototype.width;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/** @type {number} */
|
|
66
|
+
PictureInPictureWindow.prototype.height;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/** @override */
|
|
70
|
+
PictureInPictureWindow.prototype.addEventListener =
|
|
71
|
+
function(type, listener, options) {};
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/** @override */
|
|
75
|
+
PictureInPictureWindow.prototype.removeEventListener =
|
|
76
|
+
function(type, listener, options) {};
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/** @override */
|
|
80
|
+
PictureInPictureWindow.prototype.dispatchEvent = function(event) {};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @constructor
|
|
85
|
+
* @extends {Event}
|
|
86
|
+
*/
|
|
87
|
+
function PictureInPictureEvent() {}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/** @type {PictureInPictureWindow} */
|
|
91
|
+
PictureInPictureEvent.prototype.pictureInPictureWindow;
|
|
92
|
+
|
|
93
|
+
|
|
54
94
|
/**
|
|
55
95
|
* @typedef {{
|
|
56
96
|
* width: (number|undefined),
|
|
@@ -69,7 +109,7 @@ function DocumentPictureInPicture() {}
|
|
|
69
109
|
|
|
70
110
|
/**
|
|
71
111
|
* @param {DocumentPictureInPictureOptions} options
|
|
72
|
-
* @return {!Promise
|
|
112
|
+
* @return {!Promise<Window>}
|
|
73
113
|
*/
|
|
74
114
|
DocumentPictureInPicture.prototype.requestWindow = function(options) {};
|
|
75
115
|
|
package/externs/playstation.js
CHANGED
|
@@ -20,12 +20,12 @@ msdk.device = {};
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* @return {!Promise
|
|
23
|
+
* @return {!Promise<{resolution: string}>}
|
|
24
24
|
*/
|
|
25
25
|
msdk.device.getDisplayInfo = function() {};
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* @return {!Promise
|
|
29
|
+
* @return {!Promise<{resolution: string}>}
|
|
30
30
|
*/
|
|
31
31
|
msdk.device.getDisplayInfoImmediate = function() {};
|
package/externs/prefixed_eme.js
CHANGED
|
@@ -49,7 +49,7 @@ HTMLMediaElement.prototype.generateKeyRequest =
|
|
|
49
49
|
* @param {string} mimeType
|
|
50
50
|
* @param {string=} keySystem
|
|
51
51
|
* @return {string} '', 'maybe', or 'probably'
|
|
52
|
-
* @override
|
|
52
|
+
* @override
|
|
53
53
|
*/
|
|
54
54
|
HTMLVideoElement.prototype.canPlayType =
|
|
55
55
|
function(mimeType, keySystem) {};
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* A representation of an abortable operation. Note that these are not
|
|
14
|
-
* cancelable.
|
|
14
|
+
* cancelable. Cancellation implies undoing what has been done so far,
|
|
15
15
|
* whereas aborting only means that further work is stopped.
|
|
16
16
|
*
|
|
17
17
|
* @interface
|
|
@@ -26,7 +26,7 @@ shaka.extern.IAbortableOperation = class {
|
|
|
26
26
|
* aborted. Aborted operations should be rejected with a shaka.util.Error
|
|
27
27
|
* object using the error code OPERATION_ABORTED.
|
|
28
28
|
*
|
|
29
|
-
* @const {!Promise
|
|
29
|
+
* @const {!Promise<T>}
|
|
30
30
|
* @exportDoc
|
|
31
31
|
*/
|
|
32
32
|
this.promise;
|
|
@@ -34,7 +34,7 @@ shaka.extern.IAbortableOperation = class {
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Can be called by anyone holding this object to abort the underlying
|
|
37
|
-
* operation. This is not
|
|
37
|
+
* operation. This is not cancellation, and will not necessarily result in
|
|
38
38
|
* any work being undone. abort() should return a Promise which is resolved
|
|
39
39
|
* when the underlying operation has been aborted. The returned Promise
|
|
40
40
|
* should never be rejected.
|
|
@@ -49,7 +49,7 @@ shaka.extern.IAbortableOperation = class {
|
|
|
49
49
|
* @param {function(boolean)} onFinal A callback to be invoked after the
|
|
50
50
|
* operation succeeds or fails. The boolean argument is true
|
|
51
51
|
* if the operation succeeded and false if it failed.
|
|
52
|
-
* @return {!shaka.extern.IAbortableOperation
|
|
52
|
+
* @return {!shaka.extern.IAbortableOperation<T>} Returns this.
|
|
53
53
|
* @exportDoc
|
|
54
54
|
*/
|
|
55
55
|
finally(onFinal) {}
|
package/externs/shaka/ads.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {{
|
|
14
|
-
* loadTimes: !Array
|
|
14
|
+
* loadTimes: !Array<number>,
|
|
15
15
|
* averageLoadTime: number,
|
|
16
16
|
* started: number,
|
|
17
17
|
* playedCompletely: number,
|
|
@@ -60,6 +60,7 @@ shaka.extern.AdCuePoint;
|
|
|
60
60
|
/**
|
|
61
61
|
* @typedef {{
|
|
62
62
|
* id: ?string,
|
|
63
|
+
* groupId: ?string,
|
|
63
64
|
* startTime: number,
|
|
64
65
|
* endTime: ?number,
|
|
65
66
|
* uri: string,
|
|
@@ -73,7 +74,9 @@ shaka.extern.AdCuePoint;
|
|
|
73
74
|
* once: boolean,
|
|
74
75
|
* pre: boolean,
|
|
75
76
|
* post: boolean,
|
|
76
|
-
* timelineRange: boolean
|
|
77
|
+
* timelineRange: boolean,
|
|
78
|
+
* loop: boolean,
|
|
79
|
+
* overlay: ?shaka.extern.AdInterstitialOverlay
|
|
77
80
|
* }}
|
|
78
81
|
*
|
|
79
82
|
* @description
|
|
@@ -81,6 +84,8 @@ shaka.extern.AdCuePoint;
|
|
|
81
84
|
*
|
|
82
85
|
* @property {?string} id
|
|
83
86
|
* The id of the interstitial.
|
|
87
|
+
* @property {?string} groupId
|
|
88
|
+
* The group id of the interstitial.
|
|
84
89
|
* @property {number} startTime
|
|
85
90
|
* The start time of the interstitial.
|
|
86
91
|
* @property {?number} endTime
|
|
@@ -119,10 +124,39 @@ shaka.extern.AdCuePoint;
|
|
|
119
124
|
* @property {boolean} timelineRange
|
|
120
125
|
* Indicates whether the interstitial should be presented in a timeline UI
|
|
121
126
|
* as a single point or as a range.
|
|
127
|
+
* @property {boolean} loop
|
|
128
|
+
* Indicates that the interstitials should play in loop.
|
|
129
|
+
* Only applies if the interstitials is an overlay.
|
|
130
|
+
* Only supported when using multiple video elements for interstitials.
|
|
131
|
+
* @property {?shaka.extern.AdInterstitialOverlay} overlay
|
|
132
|
+
* Indicates the characteristics of the overlay
|
|
133
|
+
* Only supported when using multiple video elements for interstitials.
|
|
134
|
+
* @exportDoc
|
|
122
135
|
*/
|
|
123
136
|
shaka.extern.AdInterstitial;
|
|
124
137
|
|
|
125
138
|
|
|
139
|
+
/**
|
|
140
|
+
* @typedef {{
|
|
141
|
+
* viewport: {x: number, y: number},
|
|
142
|
+
* topLeft: {x: number, y: number},
|
|
143
|
+
* size: {x: number, y: number}
|
|
144
|
+
* }}
|
|
145
|
+
*
|
|
146
|
+
* @description
|
|
147
|
+
* Contains the ad interstitial overlay info.
|
|
148
|
+
*
|
|
149
|
+
* @property {{x: number, y: number}} viewport
|
|
150
|
+
* The viewport in pixels.
|
|
151
|
+
* @property {{x: number, y: number}} topLeft
|
|
152
|
+
* The topLeft in pixels.
|
|
153
|
+
* @property {{x: number, y: number}} size
|
|
154
|
+
* The size in pixels.
|
|
155
|
+
* @exportDoc
|
|
156
|
+
*/
|
|
157
|
+
shaka.extern.AdInterstitialOverlay;
|
|
158
|
+
|
|
159
|
+
|
|
126
160
|
/**
|
|
127
161
|
* An object that's responsible for all the ad-related logic
|
|
128
162
|
* in the player.
|
|
@@ -184,7 +218,7 @@ shaka.extern.IAdManager = class extends EventTarget {
|
|
|
184
218
|
* @param {string} url
|
|
185
219
|
* @param {Object} adsParams
|
|
186
220
|
* @param {string=} backupUrl
|
|
187
|
-
* @return {!Promise
|
|
221
|
+
* @return {!Promise<string>}
|
|
188
222
|
*/
|
|
189
223
|
requestMediaTailorStream(url, adsParams, backupUrl) {}
|
|
190
224
|
|
|
@@ -202,7 +236,7 @@ shaka.extern.IAdManager = class extends EventTarget {
|
|
|
202
236
|
/**
|
|
203
237
|
* @param {!google.ima.dai.api.StreamRequest} imaRequest
|
|
204
238
|
* @param {string=} backupUrl
|
|
205
|
-
* @return {!Promise
|
|
239
|
+
* @return {!Promise<string>}
|
|
206
240
|
*/
|
|
207
241
|
requestServerSideStream(imaRequest, backupUrl) {}
|
|
208
242
|
|
|
@@ -212,12 +246,12 @@ shaka.extern.IAdManager = class extends EventTarget {
|
|
|
212
246
|
replaceServerSideAdTagParameters(adTagParameters) {}
|
|
213
247
|
|
|
214
248
|
/**
|
|
215
|
-
* @return {!Array
|
|
249
|
+
* @return {!Array<!shaka.extern.AdCuePoint>}
|
|
216
250
|
*/
|
|
217
251
|
getServerSideCuePoints() {}
|
|
218
252
|
|
|
219
253
|
/**
|
|
220
|
-
* @return {!Array
|
|
254
|
+
* @return {!Array<!shaka.extern.AdCuePoint>}
|
|
221
255
|
*/
|
|
222
256
|
getCuePoints() {}
|
|
223
257
|
|
|
@@ -274,6 +308,11 @@ shaka.extern.IAdManager = class extends EventTarget {
|
|
|
274
308
|
* @return {!Promise}
|
|
275
309
|
*/
|
|
276
310
|
addAdUrlInterstitial(url) {}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @return {shaka.Player}
|
|
314
|
+
*/
|
|
315
|
+
getInterstitialPlayer() {}
|
|
277
316
|
};
|
|
278
317
|
|
|
279
318
|
|
package/externs/shaka/cea.js
CHANGED
|
@@ -72,7 +72,7 @@ shaka.extern.ICaptionDecoder = class {
|
|
|
72
72
|
/**
|
|
73
73
|
* Decodes all currently extracted packets and then clears them.
|
|
74
74
|
* This should be called once for a set of extracts (see comment on extract).
|
|
75
|
-
* @return {!Array
|
|
75
|
+
* @return {!Array<!shaka.extern.ICaptionDecoder.ClosedCaption>}
|
|
76
76
|
* @exportDoc
|
|
77
77
|
*/
|
|
78
78
|
decode() {}
|
|
@@ -87,7 +87,7 @@ shaka.extern.ICaptionDecoder = class {
|
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Returns the streams that the CEA decoder found.
|
|
90
|
-
* @return {!Array
|
|
90
|
+
* @return {!Array<string>}
|
|
91
91
|
* @exportDoc
|
|
92
92
|
*/
|
|
93
93
|
getStreams() {}
|
package/externs/shaka/codecs.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* packetLength: number,
|
|
15
15
|
* pts: ?number,
|
|
16
16
|
* dts: ?number,
|
|
17
|
-
* nalus: !Array
|
|
17
|
+
* nalus: !Array<!shaka.extern.VideoNalu>
|
|
18
18
|
* }}
|
|
19
19
|
*
|
|
20
20
|
* @summary MPEG_PES.
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @property {number} packetLength
|
|
23
23
|
* @property {?number} pts
|
|
24
24
|
* @property {?number} dts
|
|
25
|
-
* @property {!Array
|
|
25
|
+
* @property {!Array<!shaka.extern.VideoNalu>} nalus
|
|
26
26
|
*/
|
|
27
27
|
shaka.extern.MPEG_PES;
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ shaka.extern.MPEG_PES;
|
|
|
34
34
|
* isKeyframe: boolean,
|
|
35
35
|
* pts: ?number,
|
|
36
36
|
* dts: ?number,
|
|
37
|
-
* nalus: !Array
|
|
37
|
+
* nalus: !Array<!shaka.extern.VideoNalu>
|
|
38
38
|
* }}
|
|
39
39
|
*
|
|
40
40
|
* @summary VideoSample.
|
|
@@ -43,7 +43,7 @@ shaka.extern.MPEG_PES;
|
|
|
43
43
|
* @property {boolean} isKeyframe
|
|
44
44
|
* @property {?number} pts
|
|
45
45
|
* @property {?number} dts
|
|
46
|
-
* @property {!Array
|
|
46
|
+
* @property {!Array<!shaka.extern.VideoNalu>} nalus
|
|
47
47
|
*/
|
|
48
48
|
shaka.extern.VideoSample;
|
|
49
49
|
|
|
@@ -38,7 +38,7 @@ shaka.extern.InitDataOverride;
|
|
|
38
38
|
* @typedef {{
|
|
39
39
|
* keySystem: string,
|
|
40
40
|
* encryptionScheme: string,
|
|
41
|
-
* keySystemUris: (Set
|
|
41
|
+
* keySystemUris: (Set<string>|undefined),
|
|
42
42
|
* licenseServerUri: string,
|
|
43
43
|
* distinctiveIdentifierRequired: boolean,
|
|
44
44
|
* persistentStateRequired: boolean,
|
|
@@ -47,8 +47,8 @@ shaka.extern.InitDataOverride;
|
|
|
47
47
|
* serverCertificate: Uint8Array,
|
|
48
48
|
* serverCertificateUri: string,
|
|
49
49
|
* sessionType: string,
|
|
50
|
-
* initData: Array
|
|
51
|
-
* keyIds: Set
|
|
50
|
+
* initData: Array<!shaka.extern.InitDataOverride>,
|
|
51
|
+
* keyIds: Set<string>
|
|
52
52
|
* }}
|
|
53
53
|
*
|
|
54
54
|
* @description
|
|
@@ -60,7 +60,7 @@ shaka.extern.InitDataOverride;
|
|
|
60
60
|
* @property {string} encryptionScheme
|
|
61
61
|
* <i>Required.</i> <br>
|
|
62
62
|
* The encryption scheme, e.g., "cenc", "cbcs", "cbcs-1-9".
|
|
63
|
-
* @property {(Set
|
|
63
|
+
* @property {(Set<string>|undefined)} keySystemUris
|
|
64
64
|
* <i>Optional.</i> <br>
|
|
65
65
|
* The key system uri, e.g., "skd://" for fairplay.
|
|
66
66
|
* @property {string} licenseServerUri
|
|
@@ -95,11 +95,11 @@ shaka.extern.InitDataOverride;
|
|
|
95
95
|
* <i>Defaults to '', e.g., server certificate will be requested from the
|
|
96
96
|
* given URI if serverCertificate is not provided. Can be filled in by
|
|
97
97
|
* advanced DRM config.</i>
|
|
98
|
-
* @property {Array
|
|
98
|
+
* @property {Array<!shaka.extern.InitDataOverride>} initData
|
|
99
99
|
* <i>Defaults to [], e.g., no override.</i> <br>
|
|
100
100
|
* A list of initialization data which override any initialization data found
|
|
101
101
|
* in the content. See also shaka.extern.InitDataOverride.
|
|
102
|
-
* @property {Set
|
|
102
|
+
* @property {Set<string>} keyIds
|
|
103
103
|
* <i>Defaults to the empty Set</i> <br>
|
|
104
104
|
* If not empty, contains the default key IDs for this key system, as
|
|
105
105
|
* lowercase hex strings.
|
package/externs/shaka/error.js
CHANGED
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {{
|
|
15
15
|
* hasAppRestrictions: boolean,
|
|
16
|
-
* missingKeys: !Array
|
|
17
|
-
* restrictedKeyStatuses: !Array
|
|
16
|
+
* missingKeys: !Array<string>,
|
|
17
|
+
* restrictedKeyStatuses: !Array<string>
|
|
18
18
|
* }}
|
|
19
19
|
*
|
|
20
20
|
* @property {boolean} hasAppRestrictions
|
|
21
21
|
* Whether there are streams that are restricted due to app-provided
|
|
22
22
|
* restrictions.
|
|
23
|
-
* @property {!Array
|
|
23
|
+
* @property {!Array<string>} missingKeys
|
|
24
24
|
* The key IDs that were missing.
|
|
25
|
-
* @property {!Array
|
|
25
|
+
* @property {!Array<string>} restrictedKeyStatuses
|
|
26
26
|
* The restricted EME key statuses that the streams had. For example,
|
|
27
27
|
* 'output-restricted' would mean streams couldn't play due to restrictions
|
|
28
28
|
* on the output device (e.g. HDCP).
|
|
@@ -56,7 +56,7 @@ shaka.extern.Error = class {
|
|
|
56
56
|
this.code;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* @const {!Array
|
|
59
|
+
* @const {!Array<*>}
|
|
60
60
|
* @exportDoc
|
|
61
61
|
*/
|
|
62
62
|
this.data;
|