DrmConfig

class DrmConfig

DRM configuration for an OGMediaItem (Widevine).

Tokens are fetched via tokenProvider on every license request, so an expired session can always be renewed with fresh credentials — there is no snapshot of the token at playlist-build time.

Types

Link copied to clipboard
class Builder(licenseUrl: String)
Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Static headers added to every license request.

Link copied to clipboard

Transforms the raw Widevine challenge into the license request body — for license servers that expect an envelope (e.g. JSON wrapping the base64 challenge). Called on every key request; null posts the raw challenge bytes. Set a matching Content-Type via addHeader.

Link copied to clipboard

Transforms the license server's response body before it is handed to the CDM — for servers that wrap the license in an envelope (e.g. a JSON object carrying base64 license bytes, DRMtoday-style). Null passes the raw response through.

Link copied to clipboard
Link copied to clipboard

Enables multiple concurrent DRM sessions (required for key rotation on live streams).

Link copied to clipboard

Pause length after which resuming proactively renews the DRM session (fresh token + license) instead of trusting the old one. Default 25 minutes — tuned to ~30-minute token lifetimes; deployments with shorter tokens should set it below their token TTL so viewers get a silent renewal instead of a reactive recovery hiccup.

Link copied to clipboard

DRM scheme; DrmScheme.WIDEVINE unless configured otherwise.

Link copied to clipboard

Header the token from tokenProvider is sent in (e.g. "X-DRM-Token", "x-vudrm-token").

Link copied to clipboard