public final class ErrorStateDrmSession extends java.lang.Object implements DrmSession
DrmSession that's in a terminal error state.DrmSession.DrmSessionException, DrmSession.StateSTATE_ERROR, STATE_OPENED, STATE_OPENED_WITH_KEYS, STATE_OPENING, STATE_RELEASED| Constructor and Description |
|---|
ErrorStateDrmSession(DrmSession.DrmSessionException error) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquire(DrmSessionEventListener.EventDispatcher eventDispatcher)
Increments the reference count.
|
DrmSession.DrmSessionException |
getError()
Returns the cause of the error state, or null if
DrmSession.getState() is not DrmSession.STATE_ERROR. |
ExoMediaCrypto |
getMediaCrypto()
Returns an
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.
|
java.util.UUID |
getSchemeUuid()
Returns the DRM scheme UUID for this session.
|
int |
getState()
Returns the current state of the session, which is one of
DrmSession.STATE_ERROR,
DrmSession.STATE_RELEASED, DrmSession.STATE_OPENING, DrmSession.STATE_OPENED and
DrmSession.STATE_OPENED_WITH_KEYS. |
boolean |
playClearSamplesWithoutKeys()
Returns whether this session allows playback of clear samples prior to keys being loaded.
|
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.
|
void |
release(DrmSessionEventListener.EventDispatcher eventDispatcher)
Decrements the reference count.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreplaceSessionpublic ErrorStateDrmSession(DrmSession.DrmSessionException error)
public int getState()
DrmSessionDrmSession.STATE_ERROR,
DrmSession.STATE_RELEASED, DrmSession.STATE_OPENING, DrmSession.STATE_OPENED and
DrmSession.STATE_OPENED_WITH_KEYS.getState in interface DrmSessionpublic boolean playClearSamplesWithoutKeys()
DrmSessionplayClearSamplesWithoutKeys in interface DrmSessionpublic DrmSession.DrmSessionException getError()
DrmSessionDrmSession.getState() is not DrmSession.STATE_ERROR.getError in interface DrmSessionpublic final java.util.UUID getSchemeUuid()
DrmSessiongetSchemeUuid in interface DrmSessionpublic ExoMediaCrypto getMediaCrypto()
DrmSessionExoMediaCrypto for the open session, or null if called before the session
has been opened or after it's been released.getMediaCrypto in interface DrmSessionpublic java.util.Map<java.lang.String,java.lang.String> queryKeyStatus()
DrmSessionSince 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.
queryKeyStatus in interface DrmSessionMediaDrm.queryKeyStatus(byte[])public byte[] getOfflineLicenseKeySetId()
DrmSessiongetOfflineLicenseKeySetId in interface DrmSessionpublic void acquire(DrmSessionEventListener.EventDispatcher eventDispatcher)
DrmSessionDrmSession.release(DrmSessionEventListener.EventDispatcher) to decrement the reference
count.acquire in interface DrmSessioneventDispatcher - The DrmSessionEventListener.EventDispatcher used to route
DRM-related events dispatched from this session, or null if no event handling is needed.public void release(DrmSessionEventListener.EventDispatcher eventDispatcher)
DrmSessionrelease in interface DrmSessioneventDispatcher - The DrmSessionEventListener.EventDispatcher to disconnect when
the session is released (the same instance (possibly null) that was passed by the caller to
DrmSession.acquire(DrmSessionEventListener.EventDispatcher)).