WebRTS plays DRM-protected streams via the W3C Encrypted Media Extensions (EME) API, which is supported by all modern browsers. When the stream metadata signals that content protection is required, the player automatically negotiates the best key system available in the current browser, fetches a license from your server, and unlocks the decryption keys — all without any additional code beyond providing the license URL.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CeeblueTV/wrts-client/llms.txt
Use this file to discover all available pages before exploring further.
Supported Key Systems
Widevine
com.widevine.alphaChrome, Firefox, Edge, Opera, AndroidPlayReady
com.microsoft.playreadyEdge, Xbox, Windows Store, Samsung Tizen, LG webOSFairPlay
com.apple.fps.1_0Safari (macOS, iOS, iPadOS)Configuring DRM
Pass acontentProtection map to player.start(). The key is the key system string; the value is either a license URL string (for Widevine and PlayReady) or an object with license and certificate URLs (required for FairPlay).
FairPlay specifics
FairPlay requires both alicense URL (where license challenges are POSTed) and a certificate URL (used to fetch the Application Certificate from Apple). Both fields are mandatory for FairPlay to work on Safari.
Reacting to DRM State Changes
TheonMediaKeys event fires whenever the MediaKeysEngine becomes ready or is released. Use it to show or hide DRM status indicators in your UI.
Standalone MediaKeysEngine
TheMediaKeysEngine class can be used independently of Player — for example, to drive EME from a custom player implementation or to pre-negotiate keys.
PlayReady on Edge — Known Limitations
For browser playback, prefer Widevine wherever available. PlayReady is fully supported but the Edge/Chromium implementation has constraints that require specific workarounds.Avoid increasing playback rate with PlayReady
Avoid increasing playback rate with PlayReady
The default This keeps the player’s stall-protection behaviour (slowing down when the buffer runs low) while preventing the audio artifacts caused by speeding up.
Player raises <video>.playbackRate above 1.0 to stay close to the live edge. With PlayReady on Edge this produces audio artifacts and visible video lag. Override onBufferChange to clamp the rate to ≤ 1.0:Use larger buffer thresholds with PlayReady
Use larger buffer thresholds with PlayReady
PlayReady’s decoder path needs more headroom under bandwidth jitter. Configure the buffer thresholds to roughly
min=400ms / max=2000ms instead of the WebRTS low-latency defaults:Combined workaround for PlayReady on Edge
Combined workaround for PlayReady on Edge
Apply both fixes together for the best experience with PlayReady: