https://github.com/shaka-project/eme-encryption-scheme-polyfill
A polyfill to add support for EncryptionScheme queries in EME and MediaCapabilities.
https://github.com/shaka-project/eme-encryption-scheme-polyfill
eme encrypted-media polyfill
Last synced: 6 months ago
JSON representation
A polyfill to add support for EncryptionScheme queries in EME and MediaCapabilities.
- Host: GitHub
- URL: https://github.com/shaka-project/eme-encryption-scheme-polyfill
- Owner: shaka-project
- License: apache-2.0
- Created: 2019-11-18T21:06:14.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-01-29T11:33:55.000Z (8 months ago)
- Last Synced: 2025-03-29T07:06:03.399Z (6 months ago)
- Topics: eme, encrypted-media, polyfill
- Language: JavaScript
- Homepage:
- Size: 443 KB
- Stars: 19
- Watchers: 7
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# EME & MediaCapabilities Encryption Scheme Polyfill
A polyfill to add support for EncryptionScheme queries in EME and
MediaCapabilities.- https://wicg.github.io/encrypted-media-encryption-scheme/
- https://shaka-project.github.io/eme-encryption-scheme-polyfill/demo/
- https://github.com/WICG/encrypted-media-encryption-scheme/issues/13
- https://github.com/w3c/media-capabilities/issues/100Because this polyfill can't know what schemes the UA or CDM actually support,
it assumes support for the historically-supported schemes of each well-known
key system.In source form (`index.js`), this is compatible with the Closure Compiler and
the CommonJS module format. It can also be directly included via a script tag.The minified bundle (`dist/eme-encryption-scheme-polyfill.js`) is a standalone
module compatible with the CommonJS and AMD module formats, and can also be
directly included via a script tag.The v2.0.3 build is about 5.3kB uncompressed, and gzips to about 1.7kB.
To avoid the possibility of extra user prompts, this will shim EME & MC so long
as they exist, without checking support for `encryptionScheme` upfront. The
support check will happen on-demand the first time EME/MC are used.## Usage
```sh
npm install eme-encryption-scheme-polyfill
``````html
```
```js
// Install both EME & MC polyfills at once:
EncryptionSchemePolyfills.install();// Install each one separately (unminified source only):
EmeEncryptionSchemePolyfill.install();
McEncryptionSchemePolyfill.install();
```