LocalMediaDrmCallback


@UnstableApi
class LocalMediaDrmCallback : MediaDrmCallback


A MediaDrmCallback that provides a fixed response to key requests. Provisioning is not supported. This implementation is primarily useful for providing locally stored keys to decrypt ClearKey protected content. It is not suitable for use with Widevine or PlayReady protected content.

Summary

Public constructors

Public functions

ByteArray<Byte>!

Executes a key request.

ByteArray<Byte>!
executeProvisionRequest(
    uuid: UUID!,
    request: ExoMediaDrm.ProvisionRequest!
)

Executes a provisioning request.

Public constructors

LocalMediaDrmCallback

LocalMediaDrmCallback(keyResponse: ByteArray!)
Parameters
keyResponse: ByteArray!

The fixed response for all key requests.

Public functions

executeKeyRequest

fun executeKeyRequest(uuid: UUID!, request: ExoMediaDrm.KeyRequest!): ByteArray<Byte>!

Executes a key request.

Parameters
uuid: UUID!

The UUID of the content protection scheme.

request: ExoMediaDrm.KeyRequest!

The request.

Returns
ByteArray<Byte>!

The response data.

Throws
androidx.media3.exoplayer.drm.MediaDrmCallbackException

If an error occurred executing the request.

executeProvisionRequest

fun executeProvisionRequest(
    uuid: UUID!,
    request: ExoMediaDrm.ProvisionRequest!
): ByteArray<Byte>!

Executes a provisioning request.

Parameters
uuid: UUID!

The UUID of the content protection scheme.

request: ExoMediaDrm.ProvisionRequest!

The request.

Returns
ByteArray<Byte>!

The response data.

Throws
androidx.media3.exoplayer.drm.MediaDrmCallbackException

If an error occurred executing the request.