ErrorStateDrmSession
@UnstableApi
class ErrorStateDrmSession : DrmSession
A DrmSession that's in a terminal error state.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
acquire(eventDispatcher: DrmSessionEventListener.EventDispatcher?)Increments the reference count. |
CryptoConfig? |
Returns a |
ByteArray<Byte>? |
Returns the key set id of the offline license loaded into this session, or null if there isn't one. |
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. |
(Mutable)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. |
Unit |
release(eventDispatcher: DrmSessionEventListener.EventDispatcher?)Decrements the reference count. |
Boolean |
requiresSecureDecoder(mimeType: String!)Returns whether this session requires use of a secure decoder for the given MIME type. |
Public properties |
|
|---|---|
DrmSession.DrmSessionException! |
Inherited Constants |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited functions |
||
|---|---|---|
|
Public constructors
Public functions
acquire
fun acquire(eventDispatcher: DrmSessionEventListener.EventDispatcher?): Unit
Increments the reference count. When the caller no longer needs to use the instance, it must call release to decrement the reference count.
| Parameters | |
|---|---|
eventDispatcher: DrmSessionEventListener.EventDispatcher? |
The |
getCryptoConfig
fun getCryptoConfig(): CryptoConfig?
Returns a CryptoConfig for the open session, or null if called before the session has been opened or after it's been released.
getOfflineLicenseKeySetId
fun getOfflineLicenseKeySetId(): ByteArray<Byte>?
Returns the key set id of the offline license loaded into this session, or null if there isn't one.
getState
fun getState(): Int
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
fun playClearSamplesWithoutKeys(): Boolean
Returns whether this session allows playback of clear samples prior to keys being loaded.
queryKeyStatus
fun queryKeyStatus(): (Mutable)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.
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 | |
|---|---|
(Mutable)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
fun release(eventDispatcher: DrmSessionEventListener.EventDispatcher?): Unit
Decrements the reference count. If the reference count drops to 0 underlying resources are released, and the instance cannot be re-used.
| Parameters | |
|---|---|
eventDispatcher: DrmSessionEventListener.EventDispatcher? |
The |
requiresSecureDecoder
fun requiresSecureDecoder(mimeType: String!): Boolean
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.