MediaKeySession

MediaKeySession object

Represents a session with the Digital Rights Management (DRM) key system.

Important  This object is not supported in Internet Explorer 11 on Windows 7.
 

Syntax


var session = oMediaKeys.createSession(type, initData, cdmData);

DOM Information

Inheritance Hierarchy

The MediaKeySession does not inherit from any class or interface.

Members

The MediaKeySession object has these types of members:

Events

The MediaKeySession object has these events.

EventDescription
keystatuseschange

Fired when there has been a change in the keys in the session or their status.

message

Fired when the CDM has generated a message for the session.

mskeyadded

Deprecated. Occurs after a call to update and a key has been added.

mskeyerror

Deprecated. Occurs when a there is an error in the key session.

mskeymessage

Deprecated. Occurs when a key message has been generated.

 

Methods

The MediaKeySession object has these methods.

MethodDescription
close

Closes the media key session and release any resources associated with it.

generateRequest

Generates a request based on the initialization data.

load

Loads the data stored for the specified session.

remove

Removes stored session data.

update

Sends messages, including licenses, to the Content Decryption Module.

 

Properties

The MediaKeySession object has these properties.

PropertyAccess typeDescription

closed

Read-only

Signals when a MediaKeySession object closes.

error (MSMediaKeySession)

Read-only

Deprecated. Gets the error state associated with the media key session.

expiration

Read-only

The time after which the keys in the current session will expire and can no longer be used to decrypt media data, or NaN if no such time exists.

keyStatuses

Read-only

A reference to a read-only map of current session's key IDs and their statuses.

sessionId

Read-only

The identification string that identifies the media key session.

 

Standards information

Remarks

As of Microsoft Edge, the unprefixed version of MediaKeySession is supported. MSMediaKeySession is still supported in IE11. For more information on EME implementation updates in Microsoft Edge, see Encrypted Media Extensions updates.

An application can potentially have multiple sessions activate with the key system.

 

 

Show:
© 2016 Microsoft