docs/doc/reference/com/google/android/exoplayer2/drm/ErrorStateDrmSession.html
Package com.google.android.exoplayer2.drm
All Implemented Interfaces:DrmSession
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classErrorStateDrmSessionextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[DrmSession](DrmSession.html "interface in com.google.android.exoplayer2.drm")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
A DrmSession that's in a terminal error state.
-
DrmSession.DrmSessionException, DrmSession.State
-
STATE_ERROR, STATE_OPENED, STATE_OPENED_WITH_KEYS, STATE_OPENING, STATE_RELEASED
Constructors | Constructor | Description |
| --- | --- |
| ErrorStateDrmSession(DrmSession.DrmSessionException error) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | acquire(DrmSessionEventListener.EventDispatcher eventDispatcher) |
Deprecated.
Increments the reference count.
|
| CryptoConfig | getCryptoConfig() |
Deprecated.
Returns a CryptoConfig for the open session, or null if called before the session has been opened or after it's been released.
|
| DrmSession.DrmSessionException | getError() |
Deprecated.
Returns the cause of the error state, or null if DrmSession.getState() is not DrmSession.STATE_ERROR.
|
| byte[] | getOfflineLicenseKeySetId() |
Deprecated.
Returns the key set id of the offline license loaded into this session, or null if there isn't one.
|
| UUID | getSchemeUuid() |
Deprecated.
Returns the DRM scheme UUID for this session.
|
| int | getState() |
Deprecated.
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() |
Deprecated.
Returns whether this session allows playback of clear samples prior to keys being loaded.
|
| Map<String,String> | queryKeyStatus() |
Deprecated.
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) |
Deprecated.
Decrements the reference count.
|
| boolean | requiresSecureDecoder(String mimeType) |
Deprecated.
Returns whether this session requires use of a secure decoder for the given MIME type. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public ErrorStateDrmSession([DrmSession.DrmSessionException](DrmSession.DrmSessionException.html "class in com.google.android.exoplayer2.drm")error)
Deprecated.
-
public int getState()
Deprecated.
Description copied from interface: DrmSession
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.
Specified by:getState in interface DrmSession
-
public boolean playClearSamplesWithoutKeys()
Deprecated.
Description copied from interface: DrmSession
Returns whether this session allows playback of clear samples prior to keys being loaded.
Specified by:playClearSamplesWithoutKeys in interface DrmSession
-
@Nullable
public[DrmSession.DrmSessionException](DrmSession.DrmSessionException.html "class in com.google.android.exoplayer2.drm")getError()
Deprecated.
Description copied from interface: DrmSession
Returns the cause of the error state, or null if DrmSession.getState() is not DrmSession.STATE_ERROR.
Specified by:getError in interface DrmSession
-
public final[UUID](https://developer.android.com/reference/java/util/UUID.html "class or interface in java.util")getSchemeUuid()
Deprecated.
Description copied from interface: DrmSession
Returns the DRM scheme UUID for this session.
Specified by:getSchemeUuid in interface DrmSession
-
@Nullable
public[CryptoConfig](../decoder/CryptoConfig.html "interface in com.google.android.exoplayer2.decoder")getCryptoConfig()
Deprecated.
Description copied from interface: DrmSession
Returns a CryptoConfig for the open session, or null if called before the session has been opened or after it's been released.
Specified by:getCryptoConfig in interface DrmSession
-
@Nullable
public[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> queryKeyStatus()
Deprecated.
Description copied from interface: DrmSession
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.
Specified by:queryKeyStatus in interface DrmSessionReturns: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:MediaDrm.queryKeyStatus(byte[])
-
@Nullable
public byte[] getOfflineLicenseKeySetId()
Deprecated.
Description copied from interface: DrmSession
Returns the key set id of the offline license loaded into this session, or null if there isn't one.
Specified by:getOfflineLicenseKeySetId in interface DrmSession
-
public boolean requiresSecureDecoder([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType)
Deprecated.
Description copied from interface: DrmSession
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 state DrmSession.STATE_OPENED or DrmSession.STATE_OPENED_WITH_KEYS.
Specified by:requiresSecureDecoder in interface DrmSession
-
public void acquire(@Nullable[DrmSessionEventListener.EventDispatcher](DrmSessionEventListener.EventDispatcher.html "class in com.google.android.exoplayer2.drm")eventDispatcher)
Deprecated.
Description copied from interface: DrmSession
Increments the reference count. When the caller no longer needs to use the instance, it must call DrmSession.release(DrmSessionEventListener.EventDispatcher) to decrement the reference count.
Specified by:acquire in interface DrmSessionParameters:eventDispatcher - The DrmSessionEventListener.EventDispatcher used to route DRM-related events dispatched from this session, or null if no event handling is needed.
-
public void release(@Nullable[DrmSessionEventListener.EventDispatcher](DrmSessionEventListener.EventDispatcher.html "class in com.google.android.exoplayer2.drm")eventDispatcher)
Deprecated.
Description copied from interface: DrmSession
Decrements the reference count. If the reference count drops to 0 underlying resources are released, and the instance cannot be re-used.
Specified by:release in interface DrmSessionParameters:eventDispatcher - 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)).