Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaKeys.getStatusForPolicy() docs #34236

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Make it clear that the method isn't a check against a real key
  • Loading branch information
hamishwillee committed Jun 18, 2024
commit 54fccc64f16d2d4c3e6287a046fc6adb8bce274d
3 changes: 3 additions & 0 deletions files/en-us/web/api/mediakeys/getstatusforpolicy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Other values indicate reasons why the keys cannot be used for presenting the con

The policy restrictions currently only include a restriction on the minimum supported HDCP version.

Note that the method checks a "hypothetical key" against the restrictions.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this, and the example, are a modified form of stuff from https://developer.chrome.com/blog/media-updates-in-chrome-69/
It's much the same API repackaged in a new standard.
The point here is that this is an easy way of checking whether the key can be used, without having to get a key.

The application does not need to first create a real key and fetch a real license using {{domxref("MediaKeySession")}}, and the {{domxref("MediaKeys")}} doesn't even have to be attached to audio or video elements.

## Syntax

```js-nolint
Expand Down
5 changes: 3 additions & 2 deletions files/en-us/web/api/mediakeysystemaccess/keysystem/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ browser-compat: api.MediaKeySystemAccess.keySystem

{{APIRef("Encrypted Media Extensions")}}{{SecureContext_Header}}

The `MediaKeySystemAccess.keySystem` read-only property returns a
string identifying the key system being used.
The **`keySystem`** read-only property of the {{domxref("MediaKeySystemAccess")}} interface returns a string identifying the key system being used.

This is the value that was passed to {{domxref("Navigator.requestMediaKeySystemAccess()")}} when system access is requested.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just did this update in passing.


## Value

Expand Down