requestMediaKeySystemAccess method
Requests access to the specified Key System.
Syntax
var retval = navigator.requestMediaKeySystemAccess(keySystem, supportedConfigurations);Parameters
- keySystem
-
Type: DOMString
The Key System for which access is being requested.
- supportedConfigurations
-
Type: sequence<MediaKeySystemConfiguration>
A sequence of MediaKeySystemConfiguration configurations to try in order. The first element with a satisfiable configuration will be use.
Return value
Type: Promise<MediaKeySystemAccess>
A promise for a MediaKeySystemAccess object.
Standards information
Remarks
As of Microsoft Edge, this method is supported. For more information on EME implementation updates in Microsoft Edge, see Encrypted Media Extensions updates.
Dictionary of MediaKeySystemConfiguration members:
| Dictionary Member | Type | Description |
|---|---|---|
| audioCapabilities | sequence<MediaKeySystemMediaCapability> | A list of supported audio type and capability pairs. See dictionary members below. |
| distinctiveIdentifier | MediaKeysRequirement | Default is "optional". Whether a persistent Distinctive Identifier is required. See table below for enumeration description. |
| initDataTypes | sequence<DOMString> | A list of supported Initialization Data Type names. |
| persistentState | MediaKeysRequirement | Default is "optional". Whether the ability to persist state is required. |
| videoCapabilities | sequence<MediaKeySystemMediaCapability> | A list of supported video type and capability pairs. See dictionary members below. |
MediaKeysRequirement Enumeration:
| Name | Description |
|---|---|
| required | The returned object must support this feature. |
| optional | The returned object may support and use this feature. |
| not-allowed | The returned object must function without using this feature and must not use it at any time. |
Dictionary of MediaKeySystemMediaCapability members:
| Dictionary Member | Type | Description |
|---|---|---|
| contentType | DOMString | Defaults to "". The content type must not be the empty string. |
| robustness | DOMString | Defaults to "". The robustness level associated with the content type. An empty string indicates that any ability to decrypt and decode the content type is acceptable. |
See also
Show: