ErrorStateDrmSession
@UnstableApi
public final class ErrorStateDrmSession implements DrmSession
A DrmSession that's in a terminal error state.
Summary
Public fields |
|
|---|---|
final DrmSession.DrmSessionException |
Public constructors |
|---|
Public methods |
|
|---|---|
void |
acquire(Increments the reference count. |
@Nullable CryptoConfig |
Returns a |
@Nullable DrmSession.DrmSessionException |
getError()Returns the cause of the error state, or null if |
@Nullable byte[] |
Returns the key set id of the offline license loaded into this session, or null if there isn't one. |
final UUID |
Returns the DRM scheme UUID for this session. |
int |
getState()Returns the current state of the session, which is one of |
boolean |
Returns whether this session allows playback of clear samples prior to keys being loaded. |
@Nullable Map<String, String> |
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(Decrements the reference count. |
boolean |
requiresSecureDecoder(String mimeType)Returns whether this session requires use of a secure decoder for the given MIME type. |
Inherited Constants |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited methods |
||
|---|---|---|
|
Public fields
Public constructors
Public methods
acquire
public void acquire(
@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher
)
Increments the reference count. When the caller no longer needs to use the instance, it must call release to decrement the reference count.
| Parameters | |
|---|---|
@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher |
The |
getCryptoConfig
public @Nullable CryptoConfig getCryptoConfig()
Returns a CryptoConfig for the open session, or null if called before the session has been opened or after it's been released.
getError
public @Nullable DrmSession.DrmSessionException getError()
Returns the cause of the error state, or null if getState is not STATE_ERROR.
getOfflineLicenseKeySetId
public @Nullable byte[] getOfflineLicenseKeySetId()
Returns the key set id of the offline license loaded into this session, or null if there isn't one.
getState
public 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.
playClearSamplesWithoutKeys
public boolean playClearSamplesWithoutKeys()
Returns whether this session allows playback of clear samples prior to keys being loaded.
queryKeyStatus
public @Nullable Map<String, 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.
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.
| Returns | |
|---|---|
@Nullable Map<String, String> |
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. |
| See also | |
|---|---|
queryKeyStatus |
release
public void release(
@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher
)
Decrements the reference count. If the reference count drops to 0 underlying resources are released, and the instance cannot be re-used.
| Parameters | |
|---|---|
@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher |
The |
requiresSecureDecoder
public boolean requiresSecureDecoder(String mimeType)
Returns whether this session requires use of a secure decoder for the given MIME type. Assumes a license policy that requires the highest level of security supported by the session.
The session must be in stateSTATE_OPENED or STATE_OPENED_WITH_KEYS.