加密媒体扩展 API

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2019.

安全上下文: 此项功能仅在一些支持的浏览器安全上下文(HTTPS)中可用。

加密媒体扩展 API(Encrypted Media Extensions API)提供用于控制受数字限制管理方案约束的内容的播放的接口。

Navigator.requestMediaKeySystemAccess() 提供对这个 API 的访问。

接口

MediaEncryptedEvent

表示当 HTMLMediaElement 遇到一些初始化数据时抛出的特定 encrypted 事件。

MediaKeyMessageEvent

包含内容解密模块(CDM)为会话生成消息时的内容和相关数据。

MediaKeys

表示一组密钥。它所关联的 HTMLMediaElement 可以用它在播放期间解密媒体数据。

MediaKeySession

表示与内容解密模块(CDM)进行消息交换的上下文。

MediaKeyStatusMap

密钥 ID 和密钥状态之间的只读映射表。

MediaKeySystemAccess

提供对用于解密的密钥系统和/或内容保护提供程序的访问。

规范

Specification
Encrypted Media Extensions
# navigator-extension-requestmediakeysystemaccess

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
requestMediaKeySystemAccess

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.