Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 818 Bytes

File metadata and controls

37 lines (25 loc) · 818 Bytes
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).

Syntax

createSession()
createSession(mediaKeySessionType)

Parameters

  • mediaKeySessionType {{optional_inline}}
    • : A string. Either "temporary" or "persistent-license". The default value is "temporary".

Return value

A new {{domxref("MediaKeySession")}} object.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}