Class ErrorStateDrmSession
- java.lang.Object
-
- com.google.android.exoplayer2.drm.ErrorStateDrmSession
-
- All Implemented Interfaces:
DrmSession
@Deprecated public final class ErrorStateDrmSession extends Object implements DrmSession
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.ADrmSessionthat's in a terminal error state.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.drm.DrmSession
DrmSession.DrmSessionException, DrmSession.State
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.drm.DrmSession
STATE_ERROR, STATE_OPENED, STATE_OPENED_WITH_KEYS, STATE_OPENING, STATE_RELEASED
-
-
Constructor Summary
Constructors Constructor Description ErrorStateDrmSession(DrmSession.DrmSessionException error)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidacquire(DrmSessionEventListener.EventDispatcher eventDispatcher)Deprecated.Increments the reference count.CryptoConfiggetCryptoConfig()Deprecated.Returns aCryptoConfigfor the open session, or null if called before the session has been opened or after it's been released.DrmSession.DrmSessionExceptiongetError()Deprecated.Returns the cause of the error state, or null ifDrmSession.getState()is notDrmSession.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.UUIDgetSchemeUuid()Deprecated.Returns the DRM scheme UUID for this session.intgetState()Deprecated.Returns the current state of the session, which is one ofDrmSession.STATE_ERROR,DrmSession.STATE_RELEASED,DrmSession.STATE_OPENING,DrmSession.STATE_OPENEDandDrmSession.STATE_OPENED_WITH_KEYS.booleanplayClearSamplesWithoutKeys()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.voidrelease(DrmSessionEventListener.EventDispatcher eventDispatcher)Deprecated.Decrements the reference count.booleanrequiresSecureDecoder(String mimeType)Deprecated.Returns whether this session requires use of a secure decoder for the given MIME type.
-
-
-
Constructor Detail
-
ErrorStateDrmSession
public ErrorStateDrmSession(DrmSession.DrmSessionException error)
Deprecated.
-
-
Method Detail
-
getState
public int getState()
Deprecated.Description copied from interface:DrmSessionReturns the current state of the session, which is one ofDrmSession.STATE_ERROR,DrmSession.STATE_RELEASED,DrmSession.STATE_OPENING,DrmSession.STATE_OPENEDandDrmSession.STATE_OPENED_WITH_KEYS.- Specified by:
getStatein interfaceDrmSession
-
playClearSamplesWithoutKeys
public boolean playClearSamplesWithoutKeys()
Deprecated.Description copied from interface:DrmSessionReturns whether this session allows playback of clear samples prior to keys being loaded.- Specified by:
playClearSamplesWithoutKeysin interfaceDrmSession
-
getError
@Nullable public DrmSession.DrmSessionException getError()
Deprecated.Description copied from interface:DrmSessionReturns the cause of the error state, or null ifDrmSession.getState()is notDrmSession.STATE_ERROR.- Specified by:
getErrorin interfaceDrmSession
-
getSchemeUuid
public final UUID getSchemeUuid()
Deprecated.Description copied from interface:DrmSessionReturns the DRM scheme UUID for this session.- Specified by:
getSchemeUuidin interfaceDrmSession
-
getCryptoConfig
@Nullable public CryptoConfig getCryptoConfig()
Deprecated.Description copied from interface:DrmSessionReturns aCryptoConfigfor the open session, or null if called before the session has been opened or after it's been released.- Specified by:
getCryptoConfigin interfaceDrmSession
-
queryKeyStatus
@Nullable public Map<String,String> queryKeyStatus()
Deprecated.Description copied from 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.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:
queryKeyStatusin interfaceDrmSession- 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.
- See Also:
MediaDrm.queryKeyStatus(byte[])
-
getOfflineLicenseKeySetId
@Nullable public byte[] getOfflineLicenseKeySetId()
Deprecated.Description copied from interface:DrmSessionReturns the key set id of the offline license loaded into this session, or null if there isn't one.- Specified by:
getOfflineLicenseKeySetIdin interfaceDrmSession
-
requiresSecureDecoder
public boolean requiresSecureDecoder(String mimeType)
Deprecated.Description copied from interface:DrmSessionReturns 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
stateDrmSession.STATE_OPENEDorDrmSession.STATE_OPENED_WITH_KEYS.- Specified by:
requiresSecureDecoderin interfaceDrmSession
-
acquire
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher)Deprecated.Description copied from interface:DrmSessionIncrements the reference count. When the caller no longer needs to use the instance, it must callDrmSession.release(DrmSessionEventListener.EventDispatcher)to decrement the reference count.- Specified by:
acquirein interfaceDrmSession- Parameters:
eventDispatcher- TheDrmSessionEventListener.EventDispatcherused to route DRM-related events dispatched from this session, or null if no event handling is needed.
-
release
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher)Deprecated.Description copied from interface:DrmSessionDecrements the reference count. If the reference count drops to 0 underlying resources are released, and the instance cannot be re-used.- Specified by:
releasein interfaceDrmSession- Parameters:
eventDispatcher- TheDrmSessionEventListener.EventDispatcherto disconnect when the session is released (the same instance (possibly null) that was passed by the caller toDrmSession.acquire(DrmSessionEventListener.EventDispatcher)).
-
-