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.

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

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
createSession

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support