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

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.

规范

规范 状态 注释
加密媒体扩展 推荐 初始定义

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
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 指定在 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 指定在 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.

图例

完整支持

完整支持

兼容性未知 ?

兼容性未知

见实现注意事项。

见实现注意事项。

元数据

  • 最后修改:
  1. Encrypted Media Extensions API
  2. 接口
    1. MediaKeySessionEvent
    2. MediaKeys
    3. MediaKeySession
    4. MediaKeyStatusMap
    5. MediaKeySystemAccess
    6. MediaKeySystemConfiguration
  3. 特性
    1. HTMLMediaElement.mediaKeys
    2. HMTLMediaElement.onencrypted
  4. 方法
    1. Navigator.requestMediaKeySystemAccess()
    2. HTMLMediaElement.setMediaKeys()

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1