MediaKeys: createSession() method

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("Encrypted Media Extensions")}}{{SecureContext_Header}}

The createSession() method of the {{domxref("MediaKeys")}} interface returns a new {{domxref("MediaKeySession")}} object, which represents a context for message exchange with a content decryption module (CDM).

Syntax

js-nolint
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}}