requestMediaKeySystemAccess method

JSPromise<MediaKeySystemAccess> requestMediaKeySystemAccess(
  1. String keySystem,
  2. JSArray<MediaKeySystemConfiguration> supportedConfigurations
)

The Navigator.requestMediaKeySystemAccess() method returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream. This method is part of the Encrypted Media Extensions API, which brings support for encrypted media and DRM-protected video to the web.

This method may have user-visible effects such as asking for permission to access one or more system resources. Consider that when deciding when to call requestMediaKeySystemAccess(); you don't want those requests to happen at inconvenient times. As a general rule, this function should be called only when it's about time to create and use a MediaKeys object by calling the returned MediaKeySystemAccess object's MediaKeySystemAccess.createMediaKeys method.

Implementation

external JSPromise<MediaKeySystemAccess> requestMediaKeySystemAccess(
  String keySystem,
  JSArray<MediaKeySystemConfiguration> supportedConfigurations,
);