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
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/*! @license
|
|
2
|
-
* Shaka Player
|
|
3
|
-
* Copyright 2016 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
goog.provide('shaka.polyfill.PatchedMediaKeysNop');
|
|
8
|
-
|
|
9
|
-
goog.require('goog.asserts');
|
|
10
|
-
goog.require('shaka.log');
|
|
11
|
-
goog.require('shaka.polyfill');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @summary A polyfill to stub out
|
|
16
|
-
* {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
|
|
17
|
-
* EME.
|
|
18
|
-
* All methods will fail.
|
|
19
|
-
* @export
|
|
20
|
-
*/
|
|
21
|
-
shaka.polyfill.PatchedMediaKeysNop = class {
|
|
22
|
-
/**
|
|
23
|
-
* Installs the polyfill if needed.
|
|
24
|
-
* @export
|
|
25
|
-
*/
|
|
26
|
-
static install() {
|
|
27
|
-
if (!window.HTMLVideoElement ||
|
|
28
|
-
(navigator.requestMediaKeySystemAccess &&
|
|
29
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
30
|
-
MediaKeySystemAccess.prototype.getConfiguration)) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
shaka.log.info('EME not available.');
|
|
34
|
-
|
|
35
|
-
// Alias.
|
|
36
|
-
const PatchedMediaKeysNop = shaka.polyfill.PatchedMediaKeysNop;
|
|
37
|
-
|
|
38
|
-
// Install patches.
|
|
39
|
-
navigator.requestMediaKeySystemAccess =
|
|
40
|
-
PatchedMediaKeysNop.requestMediaKeySystemAccess;
|
|
41
|
-
// Delete mediaKeys to work around strict mode compatibility issues.
|
|
42
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
43
|
-
delete HTMLMediaElement.prototype['mediaKeys'];
|
|
44
|
-
// Work around read-only declaration for mediaKeys by using a string.
|
|
45
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
46
|
-
HTMLMediaElement.prototype['mediaKeys'] = null;
|
|
47
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
48
|
-
HTMLMediaElement.prototype.setMediaKeys = PatchedMediaKeysNop.setMediaKeys;
|
|
49
|
-
// These are not usable, but allow Player.isBrowserSupported to pass.
|
|
50
|
-
window.MediaKeys = PatchedMediaKeysNop.MediaKeys;
|
|
51
|
-
window.MediaKeySystemAccess = PatchedMediaKeysNop.MediaKeySystemAccess;
|
|
52
|
-
|
|
53
|
-
window.shakaMediaKeysPolyfill = PatchedMediaKeysNop.apiName_;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* An implementation of navigator.requestMediaKeySystemAccess.
|
|
58
|
-
* Retrieves a MediaKeySystemAccess object.
|
|
59
|
-
*
|
|
60
|
-
* @this {!Navigator}
|
|
61
|
-
* @param {string} keySystem
|
|
62
|
-
* @param {!Array.<!MediaKeySystemConfiguration>} supportedConfigurations
|
|
63
|
-
* @return {!Promise.<!MediaKeySystemAccess>}
|
|
64
|
-
*/
|
|
65
|
-
static requestMediaKeySystemAccess(keySystem, supportedConfigurations) {
|
|
66
|
-
shaka.log.debug('PatchedMediaKeysNop.requestMediaKeySystemAccess');
|
|
67
|
-
goog.asserts.assert(this == navigator,
|
|
68
|
-
'bad "this" for requestMediaKeySystemAccess');
|
|
69
|
-
|
|
70
|
-
return Promise.reject(new Error(
|
|
71
|
-
'The key system specified is not supported.'));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* An implementation of HTMLMediaElement.prototype.setMediaKeys.
|
|
76
|
-
* Attaches a MediaKeys object to the media element.
|
|
77
|
-
*
|
|
78
|
-
* @this {!HTMLMediaElement}
|
|
79
|
-
* @param {MediaKeys} mediaKeys
|
|
80
|
-
* @return {!Promise}
|
|
81
|
-
*/
|
|
82
|
-
static setMediaKeys(mediaKeys) {
|
|
83
|
-
shaka.log.debug('PatchedMediaKeysNop.setMediaKeys');
|
|
84
|
-
goog.asserts.assert(this instanceof HTMLMediaElement,
|
|
85
|
-
'bad "this" for setMediaKeys');
|
|
86
|
-
|
|
87
|
-
if (mediaKeys == null) {
|
|
88
|
-
return Promise.resolve();
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return Promise.reject(new Error('MediaKeys not supported.'));
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* An unusable constructor for MediaKeys.
|
|
98
|
-
* @implements {MediaKeys}
|
|
99
|
-
*/
|
|
100
|
-
shaka.polyfill.PatchedMediaKeysNop.MediaKeys = class {
|
|
101
|
-
/** */
|
|
102
|
-
constructor() {
|
|
103
|
-
throw new TypeError('Illegal constructor.');
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** @override */
|
|
107
|
-
createSession() {}
|
|
108
|
-
|
|
109
|
-
/** @override */
|
|
110
|
-
setServerCertificate() {}
|
|
111
|
-
|
|
112
|
-
/** @override */
|
|
113
|
-
getStatusForPolicy(policy) {
|
|
114
|
-
return Promise.resolve('usable');
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* An unusable constructor for MediaKeySystemAccess.
|
|
121
|
-
* @implements {MediaKeySystemAccess}
|
|
122
|
-
*/
|
|
123
|
-
shaka.polyfill.PatchedMediaKeysNop.MediaKeySystemAccess = class {
|
|
124
|
-
/** */
|
|
125
|
-
constructor() {
|
|
126
|
-
/** @override */
|
|
127
|
-
this.keySystem = ''; // For the compiler.
|
|
128
|
-
|
|
129
|
-
throw new TypeError('Illegal constructor.');
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** @override */
|
|
133
|
-
getConfiguration() {}
|
|
134
|
-
|
|
135
|
-
/** @override */
|
|
136
|
-
createMediaKeys() {}
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* API name.
|
|
141
|
-
*
|
|
142
|
-
* @private {string}
|
|
143
|
-
*/
|
|
144
|
-
shaka.polyfill.PatchedMediaKeysNop.apiName_ = 'nop';
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// A low priority ensures this is the last and acts as a fallback.
|
|
148
|
-
shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysNop.install, -10);
|