Interface: SessionToken

SessionToken

All session identifiers (tokens) returned by ProtectionController as well as ProtectionModel implementations are guaranteed to contain certain properties regardless of the proprietary data each ProtectionModel will need to attach. This interface defines the common APIs for session tokens available for applications to access.

Source:

Members


<readonly> initData :ArrayBuffer

The initialization data used to create this session

Type:
  • ArrayBuffer
Source:

Methods


getExpirationTime()

The time, in milliseconds since 01 January, 1970 UTC, after which the key(s) in the session will no longer be usable to decrypt media data, or NaN if no such time exists

Source:
Returns:

the expiration time or NaN if no expiration time exists for this session

Type
number

getKeyStatuses()

Returns a read-only map of key IDs known to the session to the current status of the associated key.

Source:
Returns:

the map of keys in this session and their associated status

Type
maplike.<BufferSource, MediaKeyStatus>

getSessionID()

Returns the unique session ID designated to this session

Source:
Returns:

the session ID or the empty string if the implementation does not support session IDs or the sessionID has not yet been established

Type
string

getSessionType()

Returns the session type. Session types are defined here

Source:
Returns:

The session type

Type
string