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| 构造器和说明 |
|---|
ErrorStateDrmSession(DrmSession.DrmSessionException error) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 DrmSessionpublic boolean playClearSamplesWithoutKeys()
DrmSessionplayClearSamplesWithoutKeys 在接口中 DrmSessionpublic DrmSession.DrmSessionException getError()
DrmSessionDrmSession.getState() is not DrmSession.STATE_ERROR.getError 在接口中 DrmSessionpublic final java.util.UUID getSchemeUuid()
DrmSessiongetSchemeUuid 在接口中 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 在接口中 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 在接口中 DrmSessionMediaDrm.queryKeyStatus(byte[])public byte[] getOfflineLicenseKeySetId()
DrmSessiongetOfflineLicenseKeySetId 在接口中 DrmSessionpublic void acquire(DrmSessionEventListener.EventDispatcher eventDispatcher)
DrmSessionDrmSession.release(DrmSessionEventListener.EventDispatcher) to decrement the reference
count.acquire 在接口中 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 在接口中 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)).