public interface DrmSession<T extends ExoMediaCrypto>
| Modifier and Type | Interface and Description |
|---|---|
static class |
DrmSession.DrmSessionException
Wraps the exception 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_CLOSED
The session is closed.
|
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.
|
| 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. |
byte[] |
getOfflineLicenseKeySetId()
Returns the key set id of the offline license loaded into this session, if there is one.
|
int |
getState()
Returns the current state of the session.
|
java.util.Map<java.lang.String,java.lang.String> |
queryKeyStatus()
Returns an informative description of the key status for the session.
|
boolean |
requiresSecureDecoderComponent(java.lang.String mimeType)
Whether the session requires a secure decoder for the specified mime type.
|
static final int STATE_ERROR
getError() can be used to retrieve the cause.static final int STATE_CLOSED
static final int STATE_OPENING
static final int STATE_OPENED
static final int STATE_OPENED_WITH_KEYS
int getState()
STATE_ERROR, STATE_CLOSED, STATE_OPENING,
STATE_OPENED and STATE_OPENED_WITH_KEYS.T getMediaCrypto()
ExoMediaCrypto for the open session.
This method may be called when the session is in the following states:
STATE_OPENED, STATE_OPENED_WITH_KEYS
ExoMediaCrypto for the open session.java.lang.IllegalStateException - If called when a session isn't opened.boolean requiresSecureDecoderComponent(java.lang.String mimeType)
Normally this method should return
ExoMediaCrypto.requiresSecureDecoderComponent(String), however in some cases
implementations may wish to modify the return value (i.e. to force a secure decoder even when
one is not required).
This method may be called when the session is in the following states:
STATE_OPENED, STATE_OPENED_WITH_KEYS
java.lang.IllegalStateException - If called when a session isn't opened.DrmSession.DrmSessionException getError()
This method may be called when the session is in any state.
STATE_ERROR. Null otherwise.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.
java.lang.IllegalStateException - If called when the session isn't opened.MediaDrm.queryKeyStatus(byte[])byte[] getOfflineLicenseKeySetId()