public interface DrmSessionManager<T extends ExoMediaCrypto>
| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_CLOSED
The session is closed.
|
static int |
STATE_ERROR
The error state.
|
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 (i.e.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the session.
|
Exception |
getError()
Gets the cause of the error state.
|
T |
getMediaCrypto()
Gets an
ExoMediaCrypto for the open session. |
int |
getState()
Gets the current state of the session.
|
void |
open(DrmInitData drmInitData)
Opens the session, possibly asynchronously.
|
boolean |
requiresSecureDecoderComponent(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
open(DrmInitData) has been called, but the session
is not yet open).static final int STATE_OPENED
static final int STATE_OPENED_WITH_KEYS
void open(DrmInitData drmInitData)
drmInitData - DRM initialization data.void close()
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 manager is in the following states:
STATE_OPENED, STATE_OPENED_WITH_KEYS
ExoMediaCrypto for the open session.IllegalStateException - If called when a session isn't opened.boolean requiresSecureDecoderComponent(String mimeType)
Normally this method should return MediaCrypto.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 manager is in the following states:
STATE_OPENED, STATE_OPENED_WITH_KEYS
IllegalStateException - If called when a session isn't opened.Exception getError()
This method may be called when the manager is in any state.
STATE_ERROR. Null otherwise.