title | short-title | slug | page-type | browser-compat |
---|---|---|---|---|
MediaKeys: createSession() method |
createSession() |
Web/API/MediaKeys/createSession |
web-api-instance-method |
api.MediaKeys.createSession |
{{APIRef("EncryptedMediaExtensions")}}{{SecureContext_Header}}
The MediaKeys.createSession()
method returns a new
{{domxref("MediaKeySession")}} object, which represents a context for message exchange
with a content decryption module (CDM).
createSession()
createSession(mediaKeySessionType)
mediaKeySessionType
{{optional_inline}}- : A string. Either "temporary" or "persistent-license". The default value is "temporary".
A new {{domxref("MediaKeySession")}} object.
{{Specifications}}
{{Compat}}