public interface DrmSession<T extends ExoMediaCrypto>
Modifier and Type | Interface and Description |
---|---|
static class |
DrmSession.DrmSessionException
Wraps the throwable which is the cause of the error state.
|
static interface |
DrmSession.State
The state of the DRM session.
|
Modifier and Type | Field and Description |
---|---|
static int |
STATE_ERROR
The session has encountered an error.
|
static int |
STATE_OPENED
The session is open, but does not yet have the keys required for decryption.
|
static int |
STATE_OPENED_WITH_KEYS
The session is open and has the keys required for decryption.
|
static int |
STATE_OPENING
The session is being opened.
|
static int |
STATE_RELEASED
The session has been released.
|
Modifier and Type | Method and Description |
---|---|
DrmSession.DrmSessionException |
getError()
Returns the cause of the error state.
|
T |
getMediaCrypto()
Returns a
ExoMediaCrypto for the open session, or null if called before the session has
been opened or after it's been released. |
byte[] |
getOfflineLicenseKeySetId()
Returns the key set id of the offline license loaded into this session, or null if there isn't
one.
|
int |
getState()
Returns the current state of the session, which is one of
STATE_ERROR ,
STATE_RELEASED , STATE_OPENING , STATE_OPENED and
STATE_OPENED_WITH_KEYS . |
java.util.Map<java.lang.String,java.lang.String> |
queryKeyStatus()
Returns a map describing the key status for the session, or null if called before the session
has been opened or after it's been released.
|
static final int STATE_RELEASED
static final int STATE_ERROR
getError()
can be used to retrieve the cause.static final int STATE_OPENING
static final int STATE_OPENED
static final int STATE_OPENED_WITH_KEYS
int getState()
STATE_ERROR
,
STATE_RELEASED
, STATE_OPENING
, STATE_OPENED
and
STATE_OPENED_WITH_KEYS
.DrmSession.DrmSessionException getError()
T getMediaCrypto()
ExoMediaCrypto
for the open session, or null if called before the session has
been opened or after it's been released.java.util.Map<java.lang.String,java.lang.String> queryKeyStatus()
Since DRM license policies vary by vendor, the specific status field names are determined by each DRM vendor. Refer to your DRM provider documentation for definitions of the field names for a particular DRM engine plugin.
MediaDrm.queryKeyStatus(byte[])
byte[] getOfflineLicenseKeySetId()