Skip to content

Multi-DRM

Bring your DRM vendor’s license URLs and OGPlayer handles the rest — key exchange, renewals, error mapping to the stable 4000-series codes, and the DrmKeysLoaded analytics event on success.

PlatformSystems
AndroidWidevine (default), PlayReady, ClearKey
iOSFairPlay
WebWidevine, PlayReady and FairPlay — the SDK engages whichever the browser supports
OGMediaItem.Builder("https://example.com/protected.mpd")
.setDrm(
DrmConfig.Builder("https://drm.example.com/widevine")
.addHeader("x-custom", "value")
.build(),
)
.build()

Failures are never mysterious: every DRM problem maps to a stable code — 4000 license failed, 4001+status HTTP, 4002 token fetch, 4003 provisioning, 4004 session expired, 4005 unsupported — see error codes. Android additionally retries silently (max 2 attempts / 60 s) before surfacing anything.

For expiring tokens, use a token provider instead of static headers.