public abstract class

MediaPlayer2.DrmEventCallback

extends java.lang.Object

 java.lang.Object

↳androidx.media2.MediaPlayer2.DrmEventCallback

Overview

Interface definition for callbacks to be invoked when the player has the corresponding DRM events.

Summary

Constructors
publicDrmEventCallback()

Methods
public voidonDrmInfo(MediaPlayer2 mp, MediaItem item, MediaPlayer2.DrmInfo drmInfo)

Called to indicate DRM info is available

public voidonDrmPrepared(MediaPlayer2 mp, MediaItem item, int status)

Called to notify the client that MediaPlayer2.prepareDrm(UUID) is finished and ready for key request/response.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public DrmEventCallback()

Methods

public void onDrmInfo(MediaPlayer2 mp, MediaItem item, MediaPlayer2.DrmInfo drmInfo)

Called to indicate DRM info is available

Parameters:

mp: the MediaPlayer2 associated with this callback
item: the MediaItem of this media item
drmInfo: DRM info of the source including PSSH, and subset of crypto schemes supported by this device

public void onDrmPrepared(MediaPlayer2 mp, MediaItem item, int status)

Called to notify the client that MediaPlayer2.prepareDrm(UUID) is finished and ready for key request/response.

Parameters:

mp: the MediaPlayer2 associated with this callback
item: the MediaItem of this media item
status: the result of DRM preparation.