Navigator.requestMediaKeySystemAccess()

The Navigator.requestMediaKeySystemAccess() method returns a Promise for a MediaKeySystemAccess object.

Syntax

​Navigator.requestMediaKeySystemAccess(keySystem, supportedConfigurations).then(function(mediaKeySystemAccess) { ... });

Parameters

keySystem
A DOMString identifier of the key system. For example com.example.somesystem or org.w3.clearkey.
supportedConfigurations
A non-empty Array of MediaKeySystemConfiguration objects. The first element with a satisfiable configuration will be used.

Return value

A Promise that resolves to a MediaKeySystemAccess object. If the given keySystem is not supported or none of the the requested configurations are satisfiable, the returned Promise is rejected with a DOMException whose name is NotSupportedError.

Specifications

Specification Status Comment
Encrypted Media Extensions
The definition of 'requestMediaKeySystemAccess()' in that specification.
Working Draft Initial definition

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 42 [1] (Yes) ? ? 29 [1] ?
Feature Android Webview Chrome for Android Edge Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile
Basic support 43 [1] 42 [1] (Yes) ? ? ? 29 ?

[1] The spec requires that the passed supportedConfigurations option contain at least one of audioCapabilities or videCapabilities, and that said parameters include a codec string. This was not enforced until Chrome 58/Opera45.

Document Tags and Contributors

 Contributors to this page: rillian, jpmedley, abbycar, rolfedh, Sebastianz, sjakthol, teoli
 Last updated by: rillian,