Interface MediaKeys
interface MediaKeys {
createSession(sessionType?: MediaKeySessionType): MediaKeySession;
getStatusForPolicy(policy?: MediaKeysPolicy): Promise<MediaKeyStatus>;
setServerCertificate(serverCertificate: BufferSource): Promise<boolean>;
}
createSession(sessionType?: MediaKeySessionType): MediaKeySession;
getStatusForPolicy(policy?: MediaKeysPolicy): Promise<MediaKeyStatus>;
setServerCertificate(serverCertificate: BufferSource): Promise<boolean>;
}
Index
Methods
createSession
The
createSession()method of the MediaKeys interface returns a new MediaKeySession object, which represents a context for message exchange with a content decryption module (CDM).Parameters
OptionalsessionType: MediaKeySessionType
Returns MediaKeySession
getStatusForPolicy
The
getStatusForPolicy()method of the MediaKeys interface is used to check whether the Content Decryption Module (CDM) would allow the presentation of encrypted media data using the keys, based on the specified policy requirements.Parameters
Optionalpolicy: MediaKeysPolicy
Returns Promise<MediaKeyStatus>
setServerCertificate
The
setServerCertificate()method of the MediaKeys interface provides a server certificate to be used to encrypt messages to the license server.Parameters
- serverCertificate: BufferSource
Returns Promise<boolean>
The
MediaKeysinterface of Encrypted Media Extensions API represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback. Available only in secure contexts.MDN Reference