MediaKeys: createSession()-Methode

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2019.

We'd love to hear more about your role and the company you work for
Please help us by answering a few questions.

Sicherer Kontext: Diese Funktion ist nur in sicheren Kontexten (HTTPS) in einigen oder allen unterstützenden Browsern verfügbar.

Die createSession()-Methode des MediaKeys-Interfaces gibt ein neues MediaKeySession-Objekt zurück, das einen Kontext für den Nachrichtenaustausch mit einem Content Decryption Module (CDM) darstellt.

Syntax

js
createSession()
createSession(mediaKeySessionType)

Parameter

mediaKeySessionType Optional

Ein String. Entweder "temporary" oder "persistent-license". Der Standardwert ist "temporary".

Rückgabewert

Ein neues MediaKeySession-Objekt.

Spezifikationen

Specification
Encrypted Media Extensions
# dom-mediakeys-createsession

Browser-Kompatibilität