MediaPlayer2.DrmEventCallback

public static abstract class MediaPlayer2.DrmEventCallback
extends Object

java.lang.Object
   ↳ androidx.media2.MediaPlayer2.DrmEventCallback


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

Summary

Public constructors

MediaPlayer2.DrmEventCallback()

Public methods

void onDrmInfo(MediaPlayer2 mp, DataSourceDesc2 dsd, MediaPlayer2.DrmInfo drmInfo)

Called to indicate DRM info is available

void onDrmPrepared(MediaPlayer2 mp, DataSourceDesc2 dsd, int status)

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

Inherited methods

Public constructors

MediaPlayer2.DrmEventCallback

public MediaPlayer2.DrmEventCallback ()

Public methods

onDrmInfo

public void onDrmInfo (MediaPlayer2 mp, 
                DataSourceDesc2 dsd, 
                MediaPlayer2.DrmInfo drmInfo)

Called to indicate DRM info is available

Parameters
mp MediaPlayer2: the MediaPlayer2 associated with this callback

dsd DataSourceDesc2: the DataSourceDesc2 of this data source

drmInfo MediaPlayer2.DrmInfo: DRM info of the source including PSSH, and subset of crypto schemes supported by this device

onDrmPrepared

public void onDrmPrepared (MediaPlayer2 mp, 
                DataSourceDesc2 dsd, 
                int status)

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

Parameters
mp MediaPlayer2: the MediaPlayer2 associated with this callback

dsd DataSourceDesc2: the DataSourceDesc2 of this data source

status int: the result of DRM preparation.