onKeyResponseRequired

open fun onKeyResponseRequired(assetURL: String, request: DRMKeyRequest, callback: Callback<ByteArray, Error>)

Invoked when DRM Keys are required for a particular asset.

Parameters

assetURL

URL of the asset for which DRM Keys are required

request

meta-data containing information about Request such as defaultURL, payload etc.,

callback

called once DRM Request Succeeds (or) Fails. NOTE: This API must be called for Player to proceed to the next step in Playback Process. On Success, a valid byte array must be returned as below:

callback.complete(validByteArray, null)

On Failure, a valid Error must be returned as below:

    Error(
PlayerErrorCodes.LOAD_DRM_FETCH_FAILED or
ErrorCodes.ERROR_CATEGORY_MASK_NETWORK,
"An Error Message describing the Context"
)

See also