DrmSessionEventListener
@UnstableApi
public interface DrmSessionEventListener
AnalyticsCollector |
Interface for data collectors that forward analytics events to |
ServerSideAdInsertionMediaSource |
A |
DefaultAnalyticsCollector |
Data collector that forwards analytics events to |
Listener of DrmSessionManager events.
Summary
Nested types |
|---|
public class DrmSessionEventListener.EventDispatcherDispatches events to |
Public methods |
|
|---|---|
default void |
This method is deprecated. Implement |
default void |
onDrmKeysLoaded(Called each time keys are loaded. |
default void |
onDrmKeysRemoved(Called each time offline keys are removed. |
default void |
onDrmKeysRestored(Called each time offline keys are restored. |
default void |
onDrmSessionAcquired(Called each time a drm session is acquired. |
default void |
onDrmSessionManagerError(Called when a drm error occurs. |
default void |
onDrmSessionReleased(Called each time a drm session is released. |
Public methods
onDrmKeysLoaded
default voidonDrmKeysLoaded(
int windowIndex,
@Nullable MediaSource.MediaPeriodId mediaPeriodId
)
onDrmKeysLoaded
default void onDrmKeysLoaded(
int windowIndex,
@Nullable MediaSource.MediaPeriodId mediaPeriodId,
KeyRequestInfo keyRequestInfo
)
Called each time keys are loaded.
| Parameters | |
|---|---|
int windowIndex |
The window index in the timeline this media period belongs to. |
@Nullable MediaSource.MediaPeriodId mediaPeriodId |
The |
KeyRequestInfo keyRequestInfo |
The |
onDrmKeysRemoved
default void onDrmKeysRemoved(
int windowIndex,
@Nullable MediaSource.MediaPeriodId mediaPeriodId
)
Called each time offline keys are removed.
| Parameters | |
|---|---|
int windowIndex |
The window index in the timeline this media period belongs to. |
@Nullable MediaSource.MediaPeriodId mediaPeriodId |
The |
onDrmKeysRestored
default void onDrmKeysRestored(
int windowIndex,
@Nullable MediaSource.MediaPeriodId mediaPeriodId
)
Called each time offline keys are restored.
| Parameters | |
|---|---|
int windowIndex |
The window index in the timeline this media period belongs to. |
@Nullable MediaSource.MediaPeriodId mediaPeriodId |
The |
onDrmSessionAcquired
default void onDrmSessionAcquired(
int windowIndex,
@Nullable MediaSource.MediaPeriodId mediaPeriodId,
@DrmSession.State int state
)
Called each time a drm session is acquired.
| Parameters | |
|---|---|
int windowIndex |
The window index in the timeline this media period belongs to. |
@Nullable MediaSource.MediaPeriodId mediaPeriodId |
The |
@DrmSession.State int state |
The |
onDrmSessionManagerError
default void onDrmSessionManagerError(
int windowIndex,
@Nullable MediaSource.MediaPeriodId mediaPeriodId,
Exception error
)
Called when a drm error occurs.
This method being called does not indicate that playback has failed, or that it will fail. The player may be able to recover from the error and continue. Hence applications should not implement this method to display a user visible error or initiate an application level retry (onPlayerError is the appropriate place to implement such behavior). This method is called to provide the application with an opportunity to log the error if it wishes to do so.
| Parameters | |
|---|---|
int windowIndex |
The window index in the timeline this media period belongs to. |
@Nullable MediaSource.MediaPeriodId mediaPeriodId |
The |
Exception error |
The corresponding exception. |
onDrmSessionReleased
default void onDrmSessionReleased(
int windowIndex,
@Nullable MediaSource.MediaPeriodId mediaPeriodId
)
Called each time a drm session is released.
| Parameters | |
|---|---|
int windowIndex |
The window index in the timeline this media period belongs to. |
@Nullable MediaSource.MediaPeriodId mediaPeriodId |
The |