Encrypted Media Extensions API

这是 实验性技术
检查 浏览器兼容性表格 在生产中使用这之前。

The Encrypted Media Extensions API provides interfaces for controlling the playback of content which is subject to a digital restrictions management scheme.

接口

MediaKeyMessageEvent
Contains the content and related data when the content decryption module (CDM) generates a message for the session.
MediaKeys
Represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback.
MediaKeySession
Represents a context for message exchange with a content decryption module (CDM).
MediaKeyStatusMap
Is a read-only map of media key statuses by key IDs.
MediaKeySystemAccess
Provides access to a Key System for decryption and/or a content protection provider.
MediaKeySystemConfiguration
Provides configuration information about the media key system.

规范

规范 状态 Comment
加密媒体扩展 Recommendation 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
requestMediaKeySystemAccess Chrome 42
42
注意事项
注意事项 The spec requires that the passed supportedConfigurations option contain at least one of audioCapabilities or videoCapabilities , and that said parameters include a codec string.
注意事项 The function does not exist in insecure contexts. This was not enforced until Chrome 58.
Edge 13 Firefox Yes
Yes
注意事项
注意事项 Starting in Firefox 55, if neither audioCapabilities nor videoCapabilities is specified in supportedConfigurations , a warning is output to the web console.
注意事项 In addition, starting in Firefox 55, if in supportedConfigurations , either audioCapabilities 's or videoCapabilities 's contentType value doesn't specify a "codecs" substring to define allowed codecs within the media wrapper, a warning is output to the web console. See note below table for example and correction.
注意事项 In the future, if neither audioCapabilities nor videoCapabilities is specified in the supportedConfigurations NotSupported exception will be thrown.
IE ? Opera 29
29
注意事项
注意事项 The spec requires that the passed supportedConfigurations option contain at least one of audioCapabilities or videoCapabilities , and that said parameters include a codec string.
注意事项 The function does not exist in insecure contexts. This was not enforced until Opera 45.
Safari ? WebView Android 43
43
注意事项
注意事项 The spec requires that the passed supportedConfigurations option contain at least one of audioCapabilities or videoCapabilities , and that said parameters include a codec string.
注意事项 The function does not exist in insecure contexts. This was not enforced until version 58.
Chrome Android 42
42
注意事项
注意事项 The spec requires that the passed supportedConfigurations option contain at least one of audioCapabilities or videoCapabilities , and that said parameters include a codec string.
注意事项 The function does not exist in insecure contexts. This was not enforced until Chrome 58.
Firefox Android Yes
Yes
注意事项
注意事项 Starting in Firefox 55, if neither audioCapabilities nor videoCapabilities is specified in supportedConfigurations , a warning is output to the web console.
注意事项 In addition, starting in Firefox 55, if in supportedConfigurations , either audioCapabilities 's or videoCapabilities 's contentType value doesn't specify a "codecs" substring to define allowed codecs within the media wrapper, a warning is output to the web console. See note below table for example and correction.
注意事项 In the future, if neither audioCapabilities nor videoCapabilities is specified in the supportedConfigurations NotSupported exception will be thrown.
Opera Android 29
29
注意事项
注意事项 The spec requires that the passed supportedConfigurations option contain at least one of audioCapabilities or videoCapabilities , and that said parameters include a codec string.
注意事项 The function does not exist in insecure contexts. This was not enforced until Opera 45.
Safari iOS ? Samsung Internet Android 4.0
4.0
注意事项
注意事项 The spec requires that the passed supportedConfigurations option contain at least one of audioCapabilities or videoCapabilities , and that said parameters include a codec string.
注意事项 The function does not exist in insecure contexts. This was not enforced until Samsung Internet 7.0.

图例

完整支持
完整支持
兼容性未知
兼容性未知
见实现注意事项。
见实现注意事项。