包详细信息

eme-encryption-scheme-polyfill

shaka-project681.1kApache-2.02.2.3

A polyfill for the encryptionScheme field in EME

EME, polyfill

自述文件

EME & MediaCapabilities Encryption Scheme Polyfill

A polyfill to add support for EncryptionScheme queries in EME and MediaCapabilities.

Because 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

npm install eme-encryption-scheme-polyfill
<script src="node_modules/eme-encryption-scheme-polyfill/dist/eme-encryption-scheme-polyfill.js"></script>
// Install both EME & MC polyfills at once:
EncryptionSchemePolyfills.install();

// Install each one separately (unminified source only):
EmeEncryptionSchemePolyfill.install();
McEncryptionSchemePolyfill.install();

更新日志

Changelog

2.2.3 (2025-05-12)

Bug Fixes

2.2.2 (2025-05-05)

Bug Fixes

  • Fix detection of encryptionScheme (#94) (04e3ac4)

2.2.1 (2025-01-29)

Bug Fixes

  • Do not check compatibility if MCap configuration is not compatible (#92) (e59e327)

2.2.0 (2025-01-09)

Features

  • Add support for huawei wiseplay drm (#90) (7760e58)

2.1.6 (2024-11-21)

Bug Fixes

  • Fix CBCS support in recent WebOS (#81) (d5ecb15)

2.1.5 (2024-05-21)

Bug Fixes

2.1.4 (2024-05-16)

Bug Fixes

  • Fix conflicts with multiple installations (#71) (d74823f)

2.1.3 (2024-05-14)

Bug Fixes

  • demo: Log demo errors to the console (#68) (ccfb179)
  • demo: Upgrade UI combo box component (#67) (0d51ba6)
  • Populate requested scheme into output, not default scheme (#69) (aa79c72)

2.1.2 (2024-05-07)

Bug Fixes

  • Fix CBCS support in some platforms (#63) (3978d61), closes #62
  • Use cbcs as default scheme for Safari (#64) (5316552)

2.1.1 (2022-08-10)

Bug Fixes

2.1.0 (2022-07-22)

Features

  • Add support for Chromecast version of PlayReady (#45) (180f697)

2.0.5 (2022-06-07)

Bug Fixes

  • Avoid duplicate calls to decodingInfo() (#43) (fafd1dd)

2.0.4 (2022-03-04)

Bug Fixes

2.0.3 (2021-04-19)

Bugfixes:

  • Fix MCap polyfill for browsers that support MCap but not the encryption-related parts of the MCap API.

2.0.2 (2021-02-05)

Bugfixes:

  • Fix infinite recursion when the MCap part of the polyfill is installed twice.
  • Fix exception when MCap returns a supported==false on encrypted content.

2.0.1 (2020-02-21)

Bugfixes:

  • Fix exception thrown on some legacy Edge versions

2.0.0 (2019-12-12)

Features:

1.0.3 (2019-12-05)

Bugfixes:

  • Update cbcs-recommended to cbcs-1-9 to keep up with spec changes

1.0.2 (2019-12-02)

Bugfixes:

  • Fix infinite recursion when the polyfill is installed twice.

1.0.1 (2019-11-22)

Bugfixes:

  • Fix RequireJS support
  • Workaround babel translation bug that resulted in undefined return value
  • Fix errors in Closure Compiler with strictest settings

Features:

1.0.0 (2019-11-18)

First public release.