-
Notifications
You must be signed in to change notification settings - Fork 22.4k
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
base: main
Are you sure you want to change the base?
MediaKeys.getStatusForPolicy() docs #34236
Conversation
Preview URLs
External URLs (1)URL:
(comment last updated: 2024-06-18 04:48:36) |
} | ||
``` | ||
|
||
```js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This config results in output-restricted
. I would have liked to find one that was usable
as well but don't know how.
- {{domxref("MediaKeys.setServerCertificate()")}} | ||
- : Returns a {{jsxref("Promise")}} to a server certificate to be used to encrypt messages to the license server. | ||
|
||
## Examples | ||
|
||
### Check if keys are usable with HDCP restriction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just copied example to the top level from the new MediaKeys.getStatusForPolicy()
doc. We should have other examples here, but out of scope for me.
@@ -25,7 +25,31 @@ get(key) | |||
|
|||
### Return value | |||
|
|||
The value associated with the given key, or `undefined`. | |||
A string specifying the status value associated with the given key, or `undefined`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, added the values as per MediaKeys.getStatusForPolicy()
(the set of allow status for keys are defined in an enum, which is used in both places).
|
||
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. |
There was a problem hiding this comment.
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.
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. |
There was a problem hiding this comment.
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.
This documents
MediaKeys.getStatusForPolicy()
which is newly supported in FF128.Related docs work can be tracked in #33980