-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a polyfill for EME encryption scheme queries
Note that the encryptionScheme field isn't being used by Shaka Player yet, but that this will enable us to experiment with it ahead of the full launch of the feature in browsers. See also: - https://wicg.github.io/encrypted-media-encryption-scheme/ - WICG/encrypted-media-encryption-scheme#13 - w3c/encrypted-media#457 Change-Id: I9e8c2b6ce4ce3f4fe634fa4164669c69959e7fde
- Loading branch information
1 parent
c17bfe0
commit 979b373
Showing
9 changed files
with
84 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
goog.provide('shaka.polyfill.EncryptionScheme'); | ||
|
||
goog.require('shaka.polyfill.register'); | ||
|
||
/** | ||
* @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 | ||
*/ | ||
shaka.polyfill.EncryptionScheme = class { | ||
/** | ||
* Install the polyfill if needed. | ||
* | ||
* @suppress {missingRequire} | ||
*/ | ||
static install() { | ||
EmeEncryptionSchemePolyfill.install(); | ||
} | ||
}; | ||
|
||
// Install at a low priority so that other EME polyfills go first. | ||
shaka.polyfill.register(shaka.polyfill.EncryptionScheme.install, -1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters