Skip to main content

DrmResponseModifier()

DrmResponseModifier = (drmConfiguration, response) => Promise<Response>

Hook invoked by a DRM environment immediately after a DRM-related HTTP response (license or certificate) has been received but before it is consumed by the native player.

Implementations receive the currently active DrmConfiguration and the incoming Response, may mutate the response via its setters (typically to unwrap a license payload returned by a proxy, or to strip extra metadata), and return the (possibly same) response instance. Returning a rejected promise surfaces an error to the player.

Parameters​

ParameterType
drmConfigurationDrmConfiguration
responseResponse

Returns​

Promise<Response>