mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-16 16:16:40 +03:00
52f18df21b
This change allows polyfills to be installed individually e.g. shaka.polyfill.MediaCapabilities.install() instead of shaka.polyfill.installAll() Related to #2625
32 lines
814 B
JavaScript
32 lines
814 B
JavaScript
/*! @license
|
|
* Shaka Player
|
|
* Copyright 2016 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
goog.provide('shaka.polyfill.EncryptionScheme');
|
|
|
|
goog.require('shaka.polyfill');
|
|
|
|
/**
|
|
* @summary A polyfill to add support for EncryptionScheme queries in EME.
|
|
* @see https://wicg.github.io/encrypted-media-encryption-scheme/
|
|
* @see https://github.com/w3c/encrypted-media/pull/457
|
|
* @see https://github.com/google/eme-encryption-scheme-polyfill
|
|
* @export
|
|
*/
|
|
shaka.polyfill.EncryptionScheme = class {
|
|
/**
|
|
* Install the polyfill if needed.
|
|
*
|
|
* @suppress {missingRequire}
|
|
* @export
|
|
*/
|
|
static install() {
|
|
EncryptionSchemePolyfills.install();
|
|
}
|
|
};
|
|
|
|
// Install at a low priority so that other EME polyfills go first.
|
|
shaka.polyfill.register(shaka.polyfill.EncryptionScheme.install, -2);
|