Added in API level 26

OnDrmPreparedListener


interface OnDrmPreparedListener
android.media.MediaPlayer.OnDrmPreparedListener

Interface definition of a callback to notify the app when the DRM is ready for key request/response

Summary

Public methods
abstract Unit
onDrmPrepared(mp: MediaPlayer!, status: Int)

Called to notify the app that prepareDrm is finished and ready for key request/response

Public methods

onDrmPrepared

Added in API level 26
abstract fun onDrmPrepared(
    mp: MediaPlayer!,
    status: Int
): Unit

Called to notify the app that prepareDrm is finished and ready for key request/response

Parameters
mp MediaPlayer!: the MediaPlayer associated with this callback
status Int: the result of DRM preparation which can be PREPARE_DRM_STATUS_SUCCESS, PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR, PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR, or PREPARE_DRM_STATUS_PREPARATION_ERROR. Value is android.media.MediaPlayer#PREPARE_DRM_STATUS_SUCCESS, android.media.MediaPlayer#PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR, android.media.MediaPlayer#PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR, or android.media.MediaPlayer#PREPARE_DRM_STATUS_PREPARATION_ERROR