大网数据广告活动
Web 标准与前端开发

MediaKeyStatusMap: get() method

· 52CE 我爱测

The **`get()`** method of the MediaKeyStatusMap interface returns the status value associated with the given key, or `undefined` if there is none.

Encrypted Media Extensions

The get() method of the MediaKeyStatusMap interface returns the status value associated with the given key, or undefined if there is none.

The status value indicates whether or not the specific key can be used for decryption.

Syntax

get(key)

Parameters

  • key
    • : The key whose value you want returned.

Return value

A string specifying the status value associated with the given key, or undefined.

The following status values are allowed:

  • usable
    • : The key is currently usable for decryption.
  • expired
    • : The key is no longer usable for decryption because its expiration time has passed.
  • released
    • : The key has been released and is no longer available to the CDM. However information about the key is available, such as a record of license destruction.
  • output-restricted
    • : There are output restrictions associated with the key based on the specified policy. Media data decrypted with this key may be blocked from presentation. The status indicates that the connection between the source and output (for example, your computer and an external display), is not trusted. This might indicate that there are HDCP version mismatches between the source, intermediate devices, and output, or that intermediate connecting devices such as HDMI cables or video splitters are damaged or non-compliant. An application might opt to use a higher HDCP version, content that does not require such a high version. You should also check that intermediate devices and cables support HDCP, are connected firmly, and are not damaged.
  • output-downscaled
    • : There are output restrictions associated with the key based on the specified policy, however these restrictions might be relaxed if the content is played at a lower quality. If this value is returned an application might play the content at a lower resolution, or it could choose to use a higher HDCP version, or use other content that does not require such a high HDCP version.
  • usable-in-future
    • : The key will become usable for decryption in future, once its start time is reached.
  • status-pending
    • : The status of the key is not yet known and is being determined.
  • internal-error
    • : The key is not currently usable for decryption because of an error in the CDM. The application can't do anything to handle this case.

Specifications

Browser compatibility

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。