Interface DrmSessionEventListener

    • Method Detail

      • onDrmSessionAcquired

        default void onDrmSessionAcquired​(int windowIndex,
                                          @Nullable
                                          MediaSource.MediaPeriodId mediaPeriodId)
        Called each time a drm session is acquired.
        Parameters:
        windowIndex - The window index in the timeline this media period belongs to.
        mediaPeriodId - The MediaSource.MediaPeriodId associated with the drm session.
      • onDrmKeysLoaded

        default void onDrmKeysLoaded​(int windowIndex,
                                     @Nullable
                                     MediaSource.MediaPeriodId mediaPeriodId)
        Called each time keys are loaded.
        Parameters:
        windowIndex - The window index in the timeline this media period belongs to.
        mediaPeriodId - The MediaSource.MediaPeriodId associated with the drm session.
      • 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 (Player.EventListener.onPlayerError(com.google.android.exoplayer2.ExoPlaybackException) 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:
        windowIndex - The window index in the timeline this media period belongs to.
        mediaPeriodId - The MediaSource.MediaPeriodId associated with the drm session.
        error - The corresponding exception.
      • onDrmKeysRestored

        default void onDrmKeysRestored​(int windowIndex,
                                       @Nullable
                                       MediaSource.MediaPeriodId mediaPeriodId)
        Called each time offline keys are restored.
        Parameters:
        windowIndex - The window index in the timeline this media period belongs to.
        mediaPeriodId - The MediaSource.MediaPeriodId associated with the drm session.
      • onDrmKeysRemoved

        default void onDrmKeysRemoved​(int windowIndex,
                                      @Nullable
                                      MediaSource.MediaPeriodId mediaPeriodId)
        Called each time offline keys are removed.
        Parameters:
        windowIndex - The window index in the timeline this media period belongs to.
        mediaPeriodId - The MediaSource.MediaPeriodId associated with the drm session.
      • onDrmSessionReleased

        default void onDrmSessionReleased​(int windowIndex,
                                          @Nullable
                                          MediaSource.MediaPeriodId mediaPeriodId)
        Called each time a drm session is released.
        Parameters:
        windowIndex - The window index in the timeline this media period belongs to.
        mediaPeriodId - The MediaSource.MediaPeriodId associated with the drm session.