Updated November 2026: W3C Working Draft of 8 November 2026, Chrome now answering PlayReady requests on Windows (and the license-path bug that causes), and Firefox's EME-free builds and EncryptedMediaExtensions policy.
Why this matters
Encrypted Media Extensions (EME) is the W3C JavaScript API that lets a web page pass encrypted video to a Content Decryption Module (CDM) built into the browser (Google Widevine, Apple FairPlay or Microsoft PlayReady), and the CDM fetches the license through the page and decrypts the stream. EME itself never decrypts anything and never names a DRM vendor. It is only the message channel between your player and the CDM. Every major browser ships it in 2026: Chrome, Edge, Firefox, Safari and Opera on desktop, plus Chrome, Firefox and Safari on mobile.
Three decisions follow from that, and each is expensive to change after launch. Package every title once in cbcs so one master plays in all three CDMs. License Widevine, FairPlay and PlayReady together, because no single CDM covers Chrome, Safari and smart TVs. And pick a license server: a multi-DRM vendor or your own. If you still rely on Google's Widevine Cloud License Service, note that it shuts down on 13 April 2027.
If you sell access to video on the open web (a subscription streaming service, an OTT app, an e-learning platform, a telemedicine portal showing a recorded consultation, any product where the content is worth more than free), you must ship DRM, and in a browser that means EME. The studio contract that lets Netflix or Disney+ stream a movie at 4K depends on hardware-backed key handling, and only the CDM tier of EME provides it. Without it you ship at 540p or not at all. After this article, a product manager should be able to ask an engineer the right question when a key request times out at 11 p.m. on launch night. A senior frontend engineer should come away with a complete mental model of the API, including everything added since the 2017 Recommendation and carried in the 8 November 2026 Working Draft: getStatusForPolicy() for HDCP detection, encryptionScheme capability detection in requestMediaKeySystemAccess(), the usable-in-future key status, and the MediaKeySessionClosedReason taxonomy that separates a CDM crash from a license expiry. No prior DRM knowledge is needed; we define every term where it first appears. By the end you will know why three CDMs is the right number, how the W3C wrote a standard studios accept without anointing a single vendor, and which one-line packaging change gets Safari playing the same asset that already plays in Chrome.
What problem EME was invented to solve
Before EME, the browser had no standard way to play encrypted video at all. If a studio wanted DRM on the web, the page had to load a browser plugin (Adobe Flash with its Access DRM, Microsoft Silverlight with PlayReady, or a vendor-specific NPAPI module), and that plugin ran the whole video pipeline outside the browser's sandbox: networking, decoding, rendering and decryption in one opaque binary. It worked, but it had three problems the modern web could not accept. Plugins kept producing remote-code-execution vulnerabilities, and the major browsers spent the years 2014 through 2017 removing plugin support. Plugins broke on mobile: Apple never allowed Flash on iPhone, and by 2015 Android shipped without it on most carriers. And plugins gave the page no clean way to take part in the license exchange. The player either trusted the plugin's built-in license server URL or hacked around it, and neither approach scaled across studios.
So from 2012 editors from Google, Microsoft and Netflix drafted a new specification at the W3C. The rule they set was deliberate. The browser standard would expose only the message-passing surface between JavaScript and the decryption module, and say nothing about how that module worked, which algorithms it used or who issued its licenses. It would not name Widevine, FairPlay or PlayReady; it would only define requestMediaKeySystemAccess() and let each vendor register its own key system string. Encrypted Media Extensions became a W3C Recommendation on 18 September 2017 (W3C, Encrypted Media Extensions, REC-encrypted-media-20170918). A follow-on document, Encrypted Media Extensions (no version suffix in its title, often called EME 2), has been moving through the Recommendation track since then. The latest revision is the W3C Working Draft of 8 November 2026, which replaced the 13 October 2026 draft. On the day the 2017 Recommendation was published, the Electronic Frontier Foundation resigned from the W3C in protest. EME was the first web standard to depend on a closed, licensed component, and that criticism (no open-source CDM, device fingerprinting risk, legal limits on security research) still follows the API.
Politically the model was clever, and technically it was clean. Studios got the protected media path they required, and browser vendors did not have to bless any single DRM. Browser vendors also got rid of plugins. Application developers got one API surface that, with the right helper library, lets the same player code stream the same encrypted master file to Chrome, Edge, Firefox and Safari with three different CDMs underneath.
The five objects you actually use
The EME surface is small: five objects, and a working player touches roughly seven methods across them. The five objects are MediaKeySystemAccess, MediaKeys, MediaKeySession, MediaKeyMessageEvent, and the encrypted event the <video> element fires when the demuxer hits a key identifier it does not recognise.
A MediaKeySystemAccess is the handle you get back from a successful capability query. You call navigator.requestMediaKeySystemAccess(keySystem, configurations) to ask the browser whether it has a CDM for the key system you named (com.widevine.alpha, com.apple.fps, com.microsoft.playready.recommendation) under the constraints you listed: codec strings, encryption scheme, persistent or temporary session type, and audio and video robustness tiers (HDCP is checked separately with getStatusForPolicy()). If a matching CDM exists, the Promise resolves with a MediaKeySystemAccess whose keySystem and getConfiguration() show exactly which subset of your constraints the browser accepted. If not, the Promise rejects. The browser returns only the capability entries it supports, in the order you listed them. Ask for cbcs and cenc and you may get both, one or neither, so always read what came back. Every multi-DRM player starts with this call.
A MediaKeys is the JavaScript proxy for the per-origin CDM instance. You create one by calling access.createMediaKeys() on the MediaKeySystemAccess from the previous step, then attach it to the <video> element with video.setMediaKeys(keys). From then on the keys object owns the CDM's view of the video element: every license, key and session this player opens belongs to it.
A MediaKeySession is one conversation between the page and the CDM about one license. You open it by calling keys.createSession(type), where type is temporary (the license dies with the tab) or persistent-license (the license is stored on disk for offline playback, scoped to the origin). Those are the only two types the 2017 Recommendation defines and browsers ship. (A third type, persistent-usage-record, was dropped as an at-risk feature before the 2017 Recommendation, so do not design around it.) The license exchange itself happens in the session. You call session.generateRequest(initDataType, initData) to get a license request blob from the CDM, forward that blob to the license server over HTTPS, call session.update(serverResponse) with whatever the server returns, and listen for the keystatuseschange event to learn whether each key is now usable, expired, output-restricted, output-downscaled, status-pending, internal-error, or (added after the 2017 Recommendation) usable-in-future.
A MediaKeyMessageEvent fires on the session whenever the CDM has something to tell the license server. Its key field is event.message, an ArrayBuffer of opaque bytes that you forward verbatim. You never parse the message: the bytes belong to Widevine's, PlayReady's or FairPlay's protocol, not yours. The event.messageType enum says whether the bytes are a license-request, a license-renewal, a license-release, or an individualization-request. The CDM sends the last one when it needs per-device provisioning before any real license can be issued.
The encrypted event on the <video> element is where everything starts. When the demuxer reads an encrypted MP4 box and finds a PSSH ("Protection System Specific Header") it has no key for yet, it raises an encrypted event on the video element with two fields: initDataType (a registry string such as cenc, keyids or webm) and initData (the PSSH bytes). Your handler creates a MediaKeySession and passes those bytes to generateRequest(). Most production players also listen for message, keystatuseschange and the MediaKeySession.closed Promise (in the spec since 2017; in current drafts it resolves with a MediaKeySessionClosedReason), so they can tell a session that ended cleanly from one the CDM killed because the certificate was revoked.
The canonical license exchange, in working code
From "user clicks play" to "first decrypted frame", every player follows the same flow: nine steps, always in the same order.
// 1. Feature-detect the API and ask for a CDM that fits the asset.
const KEY_SYSTEM = 'com.widevine.alpha'; // Widevine example. FairPlay ('com.apple.fps') also needs setServerCertificate(), initDataType 'sinf'/'skd' and cbcs; PlayReady uses robustness '2000'/'3000'.
const VIDEO_MIME = 'video/mp4; codecs="avc1.640028"';
const AUDIO_MIME = 'audio/mp4; codecs="mp4a.40.2"';
const LICENSE_URL = 'https://drm.example.com/widevine/license';
const config = [{
initDataTypes: ['cenc'],
videoCapabilities: [{ contentType: VIDEO_MIME, encryptionScheme: 'cenc', robustness: 'SW_SECURE_DECODE' }],
audioCapabilities: [{ contentType: AUDIO_MIME, encryptionScheme: 'cenc', robustness: 'SW_SECURE_CRYPTO' }],
sessionTypes: ['temporary'],
persistentState: 'optional',
distinctiveIdentifier: 'optional',
}];
const access = await navigator.requestMediaKeySystemAccess(KEY_SYSTEM, config);
// 2. Build the per-origin MediaKeys object and attach it to the video element.
const mediaKeys = await access.createMediaKeys();
await video.setMediaKeys(mediaKeys);
// 3. Attach the stream through MSE (Shaka Player, dash.js or your own MSE code; a plain video.src cannot play an .mpd).
// The 'encrypted' event fires when the demuxer hits a PSSH it does not recognise.
attachWithMSE(video, '/streams/protected.mpd');
const seen = new Set();
video.addEventListener('encrypted', async (e) => {
// 'encrypted' can fire once per PSSH box and per track: open one session per distinct init data.
const id = btoa(String.fromCharCode(...new Uint8Array(e.initData)));
if (seen.has(id)) return;
seen.add(id);
// 4. Open a temporary session. One session per distinct license.
const session = mediaKeys.createSession('temporary');
// 5. Listen for the CDM's outgoing messages.
session.addEventListener('message', async (msg) => {
// 6. Forward the opaque CDM bytes to your license server. Do not parse them.
const resp = await fetch(LICENSE_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/octet-stream', 'Authorization': bearer() },
body: msg.message,
});
const license = await resp.arrayBuffer();
// 7. Hand the response back to the CDM.
await session.update(license);
});
session.addEventListener('keystatuseschange', () => {
for (const [_, status] of session.keyStatuses) {
if (status === 'output-downscaled') warnUser('Premium quality blocked; output not protected enough.');
if (status === 'output-restricted') warnUser('Some renditions blocked on this output (HDCP); dropping them from the ladder.');
}
});
// 8. Ask the CDM for the license request blob; the message event fires as a result.
await session.generateRequest(e.initDataType, e.initData);
// 9. (Optional) On unload, close the session so the CDM frees its keys.
window.addEventListener('beforeunload', () => session.close());
});
Three details every working implementation learns sooner or later. First, the license server URL is per key system. Widevine, FairPlay and PlayReady cannot share one endpoint, because the bytes in msg.message are each protocol's wire format and the server answers in that same format. Second, the update() call is asynchronous and returns a Promise that rejects with a useful error message if the CDM cannot parse the license; log it and your support engineers will save hours. Third, the keystatuseschange listener is how output-downscaled and output-restricted arrive. Those two signals mean "the user is on the wrong output and the CDM refused to release the full-quality keys", and a player that ignores them ships a movie that quietly caps at 540p with no error in the console.
The three CDMs you ship in 2026
The W3C standard says nothing about which CDMs exist. In practice three matter, and you ship all of them.
Google Widevine is the CDM in Chrome, Chromium-based Edge, Firefox, Opera and every Android device with Google Mobile Services. Its key system string is com.widevine.alpha. Widevine has three security levels. L1 does all media handling (decryption, decoding and output) inside a hardware Trusted Execution Environment (TEE), and studios require it for 1080p and above on Android. L2 does the cryptography inside the TEE, but the decrypted (still compressed) video leaves the TEE for decoding and processing; it is the rarest tier and almost never ships on consumer devices any more. L3 runs the whole CDM in software with no TEE, and desktop Chrome on Windows / macOS / Linux reports it for almost every user; studios typically cap L3 playback at 480p or 720p. From the browser's side, you query the L1/L2/L3 level as the robustness string in your requestMediaKeySystemAccess() call. Widevine recognises the values SW_SECURE_CRYPTO, SW_SECURE_DECODE, HW_SECURE_CRYPTO, HW_SECURE_DECODE and HW_SECURE_ALL, from least to most strict.
Apple FairPlay Streaming (FPS) is the CDM in Safari on macOS, in iPhone Safari (since iOS 11.2), on iPad, on Apple TV via tvOS, and inside the macOS / iOS native frameworks (AVContentKeySession). Its key system string on the web is com.apple.fps. Architecturally, FairPlay differs in one way. Widevine and PlayReady accept the standard MPEG Common Encryption schemes, while FairPlay accepts only the cbcs scheme (AES-128 CBC mode, subsample encryption) defined in ISO/IEC 23001-7:2023. Package a master with cenc (AES-CTR), send it to Safari, and FairPlay refuses to decrypt it. Re-package with cbcs and the same master plays on every CDM (current Widevine CDMs and PlayReady 4.0 and later both accept cbcs). That is why the modern multi-DRM playbook reads "package once in cbcs, ship to all three CDMs". On the web the license exchange has the same shape (requestMediaKeySystemAccess, encrypted event, generateRequest, message, update), but the license server protocol underneath is Apple's SPC (Server Playback Context) / CKC (Content Key Context) format rather than Widevine's or PlayReady's. Apple issues the App ID and FairPlay certificate to your account through the FairPlay developer programme.
Microsoft PlayReady is the CDM in Chromium-based Edge on Windows, on Xbox One and Series consoles, on most smart TVs (Tizen, webOS, Vidaa), and on dozens of set-top boxes the cable industry built on PlayReady-anchored silicon. Its modern key system string is com.microsoft.playready.recommendation; the older com.microsoft.playready is deprecated and lacks the SL3000 capability path. PlayReady has its own security levels: SL150 for unprotected test content, SL2000 for software-protected content (a 1080p ceiling at most studios), and SL3000 for hardware-anchored protection, where the CDM runs inside the CPU's TEE. PlayReady SL3000 is the tier that enables 4K UHD on Edge on Windows for Netflix and on Xbox for every studio. SL3000 needs a hardware-DRM client and a PlayReady 3.0-or-later server. Since Chrome 140 (late 2025), Chrome on Windows 11 x64 also exposes a hardware PlayReady CDM: ask for com.microsoft.playready.recommendation.3000 on GPU drivers that support SL3000. x86 and ARM64 builds do not get it (DoveRunner and Axinom integration guides, November to December 2025). Firefox on Windows exposes the .recommendation and .recommendation.3000 key systems through Media Foundation, with SL2000 disabled on Windows 10 (Mozilla bug 1960673, 2025). The dash.js / Shaka Player guidance is "always ask for com.microsoft.playready.recommendation first and fall back to plain com.microsoft.playready only if the recommendation key system is unavailable", because the recommendation system is the one that surfaces SL3000.
| CDM | Key system string | Browsers / platforms | Encryption schemes | Security tiers | Issuer |
|---|---|---|---|---|---|
| Google Widevine | com.widevine.alpha | Chrome, Edge, Firefox, Opera, Android, ChromeOS, Chromecast | cenc, cbcs | L1 / L2 / L3 | Google (free integration) |
| Apple FairPlay Streaming | com.apple.fps | Safari (macOS, iOS, iPadOS), Apple TV, native iOS/macOS | cbcs only | hardware (Secure Enclave) / software fallback | Apple developer programme |
| Microsoft PlayReady | com.microsoft.playready.recommendation | Edge on Windows, Chrome 140+ and Firefox on Windows 11, Xbox, Tizen, webOS, Vidaa, set-top boxes | cenc, cbcs | SL150 / SL2000 / SL3000 | Microsoft (commercial licence) |
requestMediaKeySystemAccess(), and the platforms each one covers.
Two Widevine dates matter to anyone running a license server in 2026. Google revoked the CDMs of older browsers on 31 October 2024, so a desktop user needs Chrome 117 or later to get a Widevine license, and in October 2025 Widevine required another security update of every desktop browser CDM (Axinom DRM announcements). Google's hosted Widevine Cloud License Service shuts down on 13 April 2027 (Axinom, April 2026). If your license path still calls it, move to a multi-DRM vendor or a self-hosted license server before then. Existing content keys can be imported, so the library does not need re-packaging.
EME support by browser in November 2026
Every current browser supports EME; the difference is which CDM sits behind it. In practice, Widevine covers Chromium browsers, Firefox and Android, FairPlay covers Safari, and PlayReady covers Edge, Windows hardware DRM and most smart TVs.
In the web-platform feature index the API has been Baseline "widely available" since 25 September 2021. Chrome has supported it since version 42 (April 2015), Firefox since 38 (May 2015) and Safari since 12.1 (March 2019). Feature-detecting navigator.requestMediaKeySystemAccess still deserves one line, because a user can switch EME off in Firefox or run an EME-free build.
| Browser | CDM(s) behind EME | Hardware-backed tier | Notes |
|---|---|---|---|
| Chrome (Windows, macOS, Linux, ChromeOS) | Widevine; PlayReady on Windows 11 (Chrome 140+) | Widevine L3 on desktop; PlayReady SL3000 on Windows 11 x64 | Users can block protected content in chrome://settings/content/protectedContent; chrome://media-internals lists the CDMs |
| Chrome on Android | Widevine via Android MediaDrm | L1 on most certified devices, L3 otherwise | Security level depends on the device, not the browser |
| Microsoft Edge | Widevine and PlayReady | PlayReady SL3000 on Windows | The browser to test 4K on Windows first |
| Firefox (desktop) | Widevine (downloaded as a sandboxed plugin); PlayReady on Windows | Widevine L3; PlayReady SL3000 on Windows | Controlled by media.eme.enabled; see below |
| Firefox for Android | Widevine via Android MediaDrm | Depends on the device | Uses the media.eme.mediadrm.* backend |
| Safari (macOS) | FairPlay Streaming | Hardware-backed where the Mac supports it; Apple does not publish tiers | cbcs content only |
| Safari (iOS, iPadOS) | FairPlay Streaming | Hardware | EME available since iOS 11.2; cbcs only |
| Opera and other Chromium browsers | Widevine, if the vendor licenses it | L3 on desktop | Pure Chromium builds without a Widevine licence cannot play DRM |
requestMediaKeySystemAccess() in each browser, November 2026. Sources: vendor documentation and integration guides listed in References.
How to turn EME on or off in Firefox
Firefox has the most granular EME switches, and three about:config preferences come up in support tickets. media.eme.enabled is the master switch: true lets sites play DRM content and false disables EME entirely. It is the same setting as Settings → General → Digital Rights Management (DRM) Content → Play DRM-controlled content, and enterprise admins lock it with the EncryptedMediaExtensions policy. browser.eme.ui.enabled only controls whether Firefox shows the DRM user interface (the settings checkbox and the "this site needs DRM" notification bar). Turning it off hides the prompts but does not, on its own, enable or disable playback. media.eme.mediadrm.origin-id.enabled belongs to Firefox for Android, where EME runs on the Android MediaDrm framework, and governs the per-site identifier Firefox uses when it provisions MediaDrm. Leave it at the default unless you are debugging provisioning. When a protected stream fails in Firefox, check in this order: media.eme.enabled is true, the Widevine plugin in Add-ons → Plugins is set to activate and up to date, and no privacy extension is blocking the site.
Two more Firefox facts account for most "why does DRM not work here" tickets. First, the EncryptedMediaExtensions enterprise policy (Mozilla admin reference, updated November 2026) has two keys. With Enabled: false, Firefox does not download Widevine unless the user agrees to install it; add Locked: true and it never downloads Widevine or asks. Second, Mozilla still ships official EME-free builds of Firefox (listed on archive.mozilla.org for Firefox 145.0.2, November 2025). An EME-free build has no Widevine and no DRM prompts, so protected streams cannot play in it at all. Turning media.eme.enabled off is safe for the browser. The only cost is that Netflix, Disney+, Spotify web and other DRM sites stop playing until you turn it back on.
When Wikipedia says there are "four CDMs", it usually counts the W3C-required Clear Key system as the fourth. Clear Key is the bare-minimum CDM every conformant EME browser must implement. It takes plaintext keys over JSON and is meant for testing and for the rare zero-protection use case. You do not ship Clear Key to paying customers, but you do use it for local development against a Shaka or dash.js demo build before pointing the player at a real license server.
Encryption schemes: cenc vs cbcs, and why you usually pick one
EME does not encrypt anything. Encryption happens at packaging time, when an encoder or packager cuts the encoded master into segments and writes Common Encryption metadata into each MP4 box. The Common Encryption standard, ISO/IEC 23001-7 (the 2023 edition is current), defines four protection schemes: cenc (AES-128 counter mode, full-sample or subsample), cens (AES-128 counter mode, subsample with pattern), cbc1 (AES-128 cipher-block-chaining mode, full-sample or subsample), and cbcs (AES-128 cipher-block-chaining mode, subsample with pattern, constant IV). In production in 2026 you will only meet two of them: cenc and cbcs.
The split comes down to one architectural decision. Apple built FairPlay around AES-CBC while the rest of the industry standardised on AES-CTR, and the two cipher modes are not interoperable at the byte level. For years that meant an asset packaged for Widevine and PlayReady (cenc, CTR) had to be re-packaged from scratch for FairPlay (CBC). The 2016 revision of ISO/IEC 23001-7 introduced cbcs, a CBC-subsample-with-pattern variant that Apple and everyone else could implement, and by 2020 every major CDM accepted it. The rule today is simple: package once in cbcs, and the same master streams to Widevine, FairPlay, and PlayReady. Package in cenc and you save nothing while cutting Safari off. The only modern reason to keep a separate cenc master is a legacy set-top-box fleet whose firmware predates its vendor's cbcs-aware update. If your fleet is browser-only or modern smart-TV, use cbcs.
On the EME side, this shows up as the encryptionScheme member of the MediaKeySystemMediaCapability dictionary you pass to requestMediaKeySystemAccess(). The attribute came in during the post-2017 maintenance work on the spec, so that a player could check at runtime whether a CDM had cbcs support before it committed to a packaging strategy. The latest Working Draft (8 November 2026) lists the well-known values cenc, cbcs and cbcs-1-9. In practice you query cbcs and fall back to cenc if cbcs is unsupported, which on a 2026 browser fleet effectively never happens.
const config = [{
videoCapabilities: [
{ contentType: 'video/mp4; codecs="avc1.640028"', encryptionScheme: 'cbcs' },
{ contentType: 'video/mp4; codecs="avc1.640028"', encryptionScheme: 'cenc' }, // fallback
],
audioCapabilities: [{ contentType: 'audio/mp4; codecs="mp4a.40.2"', encryptionScheme: 'cbcs' }],
sessionTypes: ['temporary'],
}];
const access = await navigator.requestMediaKeySystemAccess('com.widevine.alpha', config);
const used = access.getConfiguration().videoCapabilities[0].encryptionScheme; // 'cbcs' on a modern CDM
Robustness, key statuses, and the silent quality drop
The production complaint we hear most about EME-based players: an asset plays at 540p when it should play at 1080p, and the browser console shows nothing. The signal to look for is the per-key status in the keystatuseschange event. The cause is almost always a mismatch between the robustness you asked for and the robustness the device can deliver.
The keyStatuses map on a MediaKeySession holds the CDM's verdict for each key. The W3C-defined values, as of the 8 November 2026 Working Draft, are usable, expired, released, output-restricted, output-downscaled, status-pending, internal-error, and the newly added usable-in-future. You want usable. output-downscaled means the CDM has the key but will decrypt only the lower-resolution renditions, because the output path does not meet the studio's HDCP policy. output-restricted is the same message escalated for that key: the renditions it protects will not play on this output, though keys for lower renditions may still work. usable-in-future is the newest. It lets a license that is valid only inside a rental window say "I have the key, I just cannot use it yet" without forcing the player to throw and retry.
You avoid the silent drop by declaring your robustness honestly up front. On Widevine the values that matter are SW_SECURE_CRYPTO (software crypto, no TEE; this is L3), SW_SECURE_DECODE (software decode, software crypto), HW_SECURE_CRYPTO (hardware crypto, software decode; L2-class), HW_SECURE_DECODE (hardware decode and crypto; L1 on devices with TEE-backed video pipelines), and HW_SECURE_ALL (hardware crypto, decode, and output; L1 with secure path). PlayReady's equivalents are 150, 2000, and 3000 for its three security levels. FairPlay's web API exposes no robustness string at all: the CDM negotiates with the Secure Enclave internally, and you get whatever the platform gives you.
For a multi-DRM player, the practical recipe is to send a short ladder of robustness values, highest first, and read the first granted entry from getConfiguration(). That entry is the strongest tier the device supports.
const widevineConfig = [{
videoCapabilities: ['HW_SECURE_ALL', 'HW_SECURE_DECODE', 'SW_SECURE_DECODE'].map(r => ({
contentType: 'video/mp4; codecs="avc1.640028"',
encryptionScheme: 'cbcs',
robustness: r,
})),
}];
If the device returns HW_SECURE_ALL, your license server can issue keys for the 4K rendition. If it returns SW_SECURE_DECODE, the server's policy engine should hand out keys only for the 720p and lower renditions. The server enforces this contract; the player just reports which robustness tier it was actually granted.
The helper for this loop is MediaKeys.getStatusForPolicy() (shipped in Chromium browsers; MDN still marks it as limited availability in 2026, and Safari does not expose it). It lets a page ask what the CDM would do for a given minimum HDCP version without opening a session or fetching a real license. You pass { minHdcpVersion: '2.2' } and the Promise resolves to one of the same key-status values. A player can call it on the splash screen and warn the user "your TV is connected over HDMI 1.4 and our movies require HDCP 2.2; switch cables or fall back to a different device" before they press play.
| Key status | Meaning | What the player should do |
|---|---|---|
usable | CDM has the key and it is usable for decoding now. | Continue playback. |
expired | Key was valid; the license window passed. | Re-request a license; surface "renewing access" if the renewal takes more than a second. |
released | Persistent session released the key via remove(). | Recreate the session. |
output-restricted | The output restrictions on this key cannot be met; other keys (for example SD renditions) may still be usable. | Remove the restricted renditions from the ABR ladder; block playback and offer another device only if no key is usable. |
output-downscaled | CDM will release keys only for lower-resolution renditions. | Cap the ABR ladder at the highest rendition the CDM allows; surface "playing at reduced quality". |
status-pending | CDM has not yet evaluated the key. | Wait; do not retry. |
internal-error | CDM hit an internal failure. | Close the session, recreate from scratch; log for support. |
usable-in-future | Key is loaded but the rental window has not opened yet. | Show countdown; do not retry. (Added after the 2017 Recommendation.) |
Sessions, persistence, and offline playback
After CDM choice and encryption scheme, the third axis of EME is session type. A MediaKeySession is created with one of two string types that browsers ship: temporary and persistent-license. That choice decides whether the license outlives the page and whether the CDM keeps any state on disk.
A temporary session is the default and the simplest option. The CDM loads the keys into memory, decrypts segments as they play, and forgets everything when the page closes or the session's close() Promise resolves. We ship this for live streams, short-form on-demand, and any case where the user is online and re-requesting the license is cheap. Most production EME traffic is temporary.
A persistent-license session asks the CDM to write the license to its origin-scoped storage on disk, so the same content can play offline later. It is the browser counterpart of the offline downloads that streaming services and airline video lockers offer in their native apps. To open a persistent session, the config must list 'persistent-license' in sessionTypes and must not set persistentState: 'not-allowed' (with a persistent session type it resolves to 'required'), and the user agent may show a permission prompt. When the user wants the content offline, the player calls keys.createSession('persistent-license'), runs the normal license exchange, and the CDM writes the keys to disk under the origin's quota. Later, with the device offline, the user opens the asset; the player creates a new session with createSession('persistent-license'), calls session.load(sessionId) on it with the stored ID, and the CDM serves the cached keys without touching the network.
Older articles also describe a persistent-usage-record session, where the CDM records that a license was used without storing the license itself. The W3C working group dropped it as an at-risk feature in late 2016, before the 2017 Recommendation, and no shipping browser supports it. Rental-window accounting now lives in the license server, through license duration, playback duration and renewal messages.
Two error modes are worth knowing. The first is storage quota. The CDM stores licenses against the origin's persistent quota, and the major browsers cap that quota: once a user has piled up several hundred persistent licenses, new createSession('persistent-license') calls start failing with QuotaExceededError. A player that ships offline playback should call navigator.storage.estimate() so the user can see storage pressure, and it must offer a "clear downloaded items" UI that calls session.remove() on licenses the user no longer needs. The second is session closure. The MediaKeySession.closed Promise has been in the spec since 2017, and the post-2017 drafts have it resolve with a MediaKeySessionClosedReason: internal-error, closed-by-application, release-acknowledged, hardware-context-reset, resource-evicted. A player that watches that Promise can tell a harmless user-driven close from a CDM crash and pick the right recovery path.
Common pitfalls
Across more than seven years of multi-DRM work, the same seven failure modes explain most of the EME bugs we have seen.
Packaging for cenc only and finding out at launch that Safari does not play. Fix it at the packager: switch to cbcs, re-encrypt, re-upload. Every modern player can negotiate cbcs on Widevine and PlayReady; FairPlay is the only one restricted to it.
Sending the same license server URL to every CDM. Widevine speaks Widevine on the wire, PlayReady speaks PlayReady, and FairPlay speaks SPC/CKC. The endpoints all look roughly like HTTP, but you cannot swap one for another. Use a multi-DRM licensing service, or three separate endpoints behind a shared upstream policy layer.
Forgetting that Edge needs com.microsoft.playready.recommendation, not com.microsoft.playready. The plain key system string predates SL3000, so the browser routes it to the older CDM path. Ask for recommendation first and your 4K asset will play on Edge on Windows.
Not surfacing output-downscaled. Users do not file bug reports about a CDM enum. They cancel their subscription. Send the key-status events to a banner the user can see ("Premium quality requires a certified output device") and to your QoE dashboard.
Treating the message bytes as anything but opaque. The event.message ArrayBuffer is the CDM's wire format. Forward it as is. Do not log it, since it can leak per-device identifiers. Do not transform it. Do not retry on it client-side: let the server return an error and handle the retry.
Confusing the encrypted event with the message event. encrypted fires on the <video> element when the demuxer hits an unknown PSSH; message fires on a MediaKeySession when the CDM has bytes for the license server. Attaching the listeners to the wrong objects is a common copy-paste bug, and the result is a player that opens sessions but never sends a license request.
Assuming Chrome always means Widevine. Chrome now supports PlayReady on Windows (Chrome 140+ for SL3000; DoveRunner sees it from Chrome 142 and late 141 builds), so a player that asks for several key systems can get PlayReady back in Chrome. If your token service still hands every Chrome user a Widevine token, the license server receives a PlayReady challenge with Widevine expectations and fails. DoveRunner reports this as error 7122, "ChallengeData is invalid". Read access.keySystem after the call and issue the token and license for that key system, not for the browser name.
Pitfall callout. A Widevinerobustness: 'HW_SECURE_ALL'config that fails on a Chromebook is not a bug; it is the Chromebook telling you it cannot host a hardware-secure pipeline for the asset you asked for. Catch the rejection on therequestMediaKeySystemAccess()Promise and retry with'SW_SECURE_DECODE'. Never throw to the user without trying the lower tier.
A small piece of math, end to end
Here is a rough estimate of what ignoring robustness costs. Take an OTT product with ten million daily active users, three million of whom try to watch a 4K title. Assume 20% of them, six hundred thousand, are on hardware-capable devices but silently get the 720p stream (whether the ceiling is 540p or 720p depends on the studio's policy), because the player never asked for HW_SECURE_* robustness.
Start with streaming costs. The 4K rendition averages 18 Mbps and the 720p rendition averages 4 Mbps, a difference of 14 Mbps. Six hundred thousand users watching 90 minutes at 14 Mbps less comes to 600,000 × 90 × 60 × 14 / 8 = 5,670,000,000 megabytes, or roughly 5.67 petabytes per day the CDN never delivers. At an assumed large-scale CDN price of $0.005 per GB, the operator avoids about $28,350 per day in egress, or about $10.3 million per year.
Now subtract the cost of lost quality. If 1% of those six hundred thousand users notice the 720p ceiling and churn at a $10 monthly average revenue per user, the operator loses 6,000 × $10 × 12 = $720,000 per year in subscriptions. Measured on egress alone, the silent drop looks cheap: churn would need to hit about 14% of those viewers (600,000 × 14.4% × $120 ≈ $10.3 million) before lost revenue cancels the CDN saving. But nobody chose that saving. The player made it by omission, the user was never told, and the churn lands in the cohort paying for 4K plans.
The math doesn't argue for "ship 720p" or for "ship 4K". It argues for "ship a player that knows which tier the device can support and tells the user honestly". That player saves egress on the devices that really are lower-tier and keeps retention on the high-tier ones.
What changes when you ship a native app instead of a browser
EME covers the browser. The same three CDMs exist outside it, each with its own native API.
In iOS and macOS apps, FairPlay goes through AVContentKeySession in the AVFoundation framework. The flow is almost isomorphic to EME: the framework hands the app a key request, the app forwards an SPC to the key server, gets a CKC back and passes it to the framework. The differences are that the API is Objective-C / Swift and the framework owns the session lifecycle; the key server protocol uses the same SPC/CKC bytes as on the web. Apple's WWDC 2018 session 507, "AVContentKeySession Best Practices", is still the canonical reference for the offline rental window and the dual-expiry pattern.
On Android, Widevine goes through MediaDrm in the platform media stack, and ExoPlayer hides nearly all of it behind DefaultDrmSessionManager. The license server speaks the same Widevine wire format as in the browser. You query security levels with MediaDrm.SECURITY_LEVEL_HW_SECURE_ALL and related calls, and you get the same HW_SECURE_ALL / HW_SECURE_DECODE / SW_SECURE_DECODE ladder the browser exposes.
In native Windows apps, PlayReady goes through PlayReadyContentResolver and the broader PlayReady DRM client SDK. SL150/2000/3000 map to the same robustness contract, and the server still needs the PlayReady 3.0-or-later baseline.
This is a browser-first article in a player-engineering block, so the practical point for us is that the EME flow you build in the browser is the most portable mental model of the four. For the product view (which CDM lives where, who owns each piece, why EME was controversial), see how the browser DRM stack fits an OTT product. After you've shipped EME, the native paths read as variations of the same conversation.
Verifying the standard against the implementations
When sources disagree, go with the spec. Two cases are worth knowing.
The current W3C Working Draft is Encrypted Media Extensions dated 8 November 2026 (W3C, working draft, https://www.w3.org/TR/encrypted-media-2/). The previous draft was dated 13 October 2026, and an Editor's Draft with the same date tracks it on GitHub. It has the latest list of key statuses (including usable-in-future) and the MediaKeySessionClosedReason enum. The last Recommendation, the most authoritative form a W3C document can take, is still the September 2017 publication (W3C, Encrypted Media Extensions, REC-encrypted-media-20170918). Plenty of popular blog posts and how-tos still call getStatusForPolicy() "coming soon". It has shipped in Chromium browsers for years and sits in the Working Draft's normative text.
The current Common Encryption standard is ISO/IEC 23001-7:2023. The cbcs scheme first appeared in the 2016 edition, yet some older blog posts still call cbcs Apple-only. In 2026 every shipping CDM accepts cbcs, and the working rule is "package in cbcs". If a vendor doc tells you something different, look at when it was published.
Why you cannot do DRM in plain JavaScript
Short answer: any key your JavaScript can read, your user can read too. Teams regularly ask us whether a Video.js or custom player can "do DRM" by decrypting segments with CryptoJS or Web Crypto using a key hardcoded in the bundle. It can't. The key ships inside the JavaScript, anyone can pull it out of DevTools in a minute, and the decrypted frames sit in page memory where a screen-capture extension can copy them. That's obfuscation, and no studio licence accepts it as DRM. The secure pattern is the one this article walks through: the key never touches JavaScript, it travels inside a license only the CDM can open, and the license server decides per device which renditions it will release.
When the content doesn't justify DRM (internal training, low-value VOD), the honest middle ground is HLS AES-128 with the key endpoint behind short-lived signed tokens. That stops casual hotlinking and URL sharing. The key still reaches the client, though, so treat this as access control and don't count on it for copy protection.
FAQ
What is Encrypted Media Extensions (EME)?
EME is a W3C browser API that connects a JavaScript video player to a Content Decryption Module (Widevine, FairPlay or PlayReady) built into the browser, so the CDM can fetch a license and decrypt protected video without a plugin. It has been a W3C Recommendation since 18 September 2017.
Is EME the same thing as DRM?
No. EME is the API; the DRM is the CDM behind it plus the license server it talks to. EME passes opaque messages between the two and decrypts nothing itself.
What does media.eme.enabled do in Firefox?
It's the Firefox master switch for EME: true allows DRM-protected video (Netflix, Disney+, Spotify web) and false blocks it. It corresponds to the "Play DRM-controlled content" checkbox in Firefox settings.
What is browser.eme.ui.enabled?
A Firefox preference that shows or hides the DRM user interface, meaning the settings checkbox and the DRM notification bar. It doesn't turn playback on or off; media.eme.enabled does that.
Is it safe to disable media.eme.enabled?
Yes. Setting media.eme.enabled to false only stops DRM playback. Netflix, Disney+, Spotify web and other protected video won't play until you set it back to true.
What does EME-free mean in Firefox?
An EME-free Firefox is an official Mozilla build that ships without Encrypted Media Extensions and without the Widevine CDM. It shows no DRM prompts and can't play DRM-protected video.
What is an encrypted video player?
An encrypted video player is a web or app player, such as Shaka Player, dash.js or hls.js, that plays DRM-protected streams by passing license messages through EME to the browser's CDM. The player itself never sees the content key.
Which DRM does each browser use?
Chrome, Firefox, Opera and Android use Widevine. Safari on macOS, iOS and iPadOS uses FairPlay. Edge uses PlayReady and Widevine. Chrome 140+ and Firefox on Windows 11 can also use hardware PlayReady (SL3000).
Should I package in cenc or cbcs?
Package in cbcs. FairPlay accepts only cbcs, and current Widevine and PlayReady 4.0+ CDMs accept it as well, so a single cbcs master plays in every browser.
Is the EME specification finished?
The 2017 Recommendation is final. Its successor is still a W3C Working Draft, most recently dated 8 November 2026, and it adds getStatusForPolicy(), encryptionScheme detection, the usable-in-future key status and session-closed reasons.
Can I do DRM with CryptoJS or a hardcoded key?
No. Every viewer can see a key hardcoded in JavaScript, so it protects nothing. Real DRM keeps the key inside the CDM and delivers it only in a license the CDM can open.
Free download: EME Multi-DRM Cheat SheetOne page with the key system strings, cenc against cbcs, the Widevine, FairPlay and PlayReady security tiers, and the six pitfalls that break playback.Where Fora Soft fits in
Fora Soft has shipped EME-based playback in video streaming products since the W3C Recommendation became practical to deploy in 2018. Our engineering teams have built multi-DRM stacks across Widevine, FairPlay and PlayReady for OTT, e-learning, telemedicine and video surveillance customers. On every new product we follow the same routine. We package masters once in cbcs from day one and standardise the player layer on Shaka Player or hls.js. We integrate one of the multi-DRM licensing services, or stand up a self-hosted Axinom or castLabs server when the customer needs the licence path inside their own infrastructure. And we send every keystatuseschange event into the QoE pipeline, so a silent 540p drop shows up on the dashboard before it shows up in a support ticket. When customers ship offline playback, which is common in pilot-training and corporate-learning workloads, we connect persistent-license sessions to a quota-aware UI from the start, because retro-fitting quota handling after launch costs far more. If you need this playback path built into your own service, our OTT and Internet TV development team includes multi-DRM licensing, CBCS packaging and the device QA matrix in the build, and our video streaming software development work covers the HLS and DASH delivery underneath.
The book
Video Streaming: A Complete Guide to Video Delivery: From ABR and CDNs to Players, WebRTC, DRM, and the Economics of Streaming
This article ends where the key turns usable and playback starts. The book takes the player half of the stack from there: how a browser player picks a rendition and recovers from a stall, where DRM sits next to ABR, trick play and subtitles, what a multi-DRM licence path costs per stream, and how all of it lands on the monthly invoice. Written by Nikolay Sapunov, CEO at Fora Soft.
Not sure your DRM covers every browser and device you sell to?
Send us the key systems your player asks for today and the devices you have to support, and we will tell you where playback quietly drops to 720p, which CDM is missing, and what the licence path should look like. 250+ video products shipped since 2005.
See our case studies
Case study
Worldcast Live
Concert streaming at 0.4-0.5 s glass-to-glass for 10,000 simultaneous viewers at 1.5 Gb/s: ticketed live video, where the player has to hold up while the paying audience is already watching.
Case study
TradeCaster
A live trading platform with 46,000+ users on $99-$119 monthly plans: subscription video, where who may watch and on which device is part of the product, not an afterthought.
Case study
Speed.Space
Remote production at 1080p and 8 Mbps, used on Netflix, Electronic Arts and HBO shoots: studio material whose handling rules travel with the file to every screen that opens it.
What to read next
DRM
DRM 101: Why Three Systems, and Why You Ship All Three
The business reason behind the three CDMs this article drives from one API.
Packaging
Common Encryption (CENC) in Depth
Where cenc and cbcs come from, and why one cbcs master feeds all three CDMs.
Widevine
Widevine Security Levels: L1, L2, L3 - What They Really Mean
The tier ladder behind the HW_SECURE_ALL strings and the silent drop to 540p.
Cost
Multi-DRM Cost Calculator: What Widevine, FairPlay and PlayReady Cost
What shipping all three licence paths adds to the bill, per stream and per month.
References
- W3C. Encrypted Media Extensions. W3C Working Draft, 8 November 2026 (previous drafts 13 October and 15 May 2026; checked 20 November 2026). https://www.w3.org/TR/encrypted-media-2/. Normative source for
MediaKeySystemAccess,MediaKeys,MediaKeySession, the key-status enum (including the newusable-in-futurevalue),MediaKeySessionClosedReason,encryptionSchemecapability detection andgetStatusForPolicy(). - W3C. Encrypted Media Extensions (Recommendation). REC-encrypted-media-20170918, 18 September 2017. https://www.w3.org/TR/2017/REC-encrypted-media-20170918/. The original Recommendation, which established the EME object model and the
temporary/persistent-licensesession types. - W3C public-hme-editors. Removing EME persistent-usage-record "at risk" feature, 27 October 2016. https://lists.w3.org/Archives/Public/public-hme-editors/2016Oct/0001.html Explains why the third session type never made it into the Recommendation.
- W3C. Encrypted Media Extensions Stream Format Registry. https://www.w3.org/TR/eme-stream-registry/ The registry that lists the accepted initialization-data formats (
cenc,keyids,webm). - W3C. Encrypted Media Extensions Initialization Data Format Registry. https://w3c.github.io/encrypted-media/format-registry/initdata/ Normative reference for the
initDataTypestrings that the encrypted event delivers. - W3C / WICG. Encrypted Media: HDCP Policy Check. https://wicg.github.io/hdcp-detection/ The explainer where the
getStatusForPolicy()method originated. It also clarifies the HDCP version enum (1.0–2.3). - ISO/IEC 23001-7:2023, Information technology: MPEG systems technologies, Part 7: Common encryption in ISO base media file format files. https://www.iso.org/standard/84637.html (4th edition, published 8 August 2023; checked 15 October 2026). This is the standard that defines the
cenc,cens,cbc1, andcbcsschemes. The normative text is paywalled, so the article paraphrases from the abstract and §6 of the catalogue page. - Apple. FairPlay Streaming Overview. Apple Developer documentation, 2024 revision. https://developer.apple.com/streaming/fps/FairPlayStreamingOverview.pdf Our primary source for SPC / CKC, SAMPLE-AES, and the FairPlay-only
cbcsrequirement on the iOS/macOS / Apple TV path. - Apple. AVContentKeySession Best Practices. WWDC 2018 Session 507. https://developer.apple.com/videos/play/wwdc2018/507/ Our primary source for the offline rental-window pattern and the dual-expiry key contract on iOS / macOS.
- Microsoft. PlayReady Client-Server Compatibility and Migration. https://learn.microsoft.com/en-us/playready/overview/client-server-compatibility Defines the server-SDK baseline (3.0.2769) needed for SL3000 client interop, plus the
com.microsoft.playready.recommendationkey system string. - Microsoft. Developing SL3000 Clients. https://learn.microsoft.com/en-us/playready/overview/developing-sl3000-products Our primary source for the hardware-DRM client / TEE requirement that enables 4K UHD in Edge on Windows and Xbox.
- Google. Widevine DRM Architecture Overview. https://developers.google.com/widevine Our primary source for the L1 / L2 / L3 security-level taxonomy and for the
SW_SECURE_*/HW_SECURE_*robustness strings that go intorequestMediaKeySystemAccess(). - MDN. Navigator.requestMediaKeySystemAccess(). https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMediaKeySystemAccess A practical reference for the configuration dictionary. We used it to cross-check argument names and Promise behaviour.
- MDN. MediaKeys.getStatusForPolicy(). https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/getStatusForPolicy A practical reference for the HDCP policy check method.
- Google. Introduction to Encrypted Media Extensions. web.dev. https://web.dev/articles/eme-basics The article that first popularised the five-step EME flow. Handy for cross-checking the canonical lifecycle.
- Shaka Project. Shaka Player DRM Configuration Tutorial. https://github.com/shaka-project/shaka-player/blob/main/docs/tutorials/drm-config.md Our primary reference for the
player.configure({ drm: { servers: { ... } } })pattern and for thevideoRobustness: ['HW_SECURE_ALL']advanced-config example we use in this article. - DASH Industry Forum. PlayReady SL3000 support requires com.microsoft.playready.recommendation key system. Discussion #3869, dash.js GitHub. https://github.com/Dash-Industry-Forum/dash.js/discussions/3869 Confirms, in the voice of a primary implementer, that the
recommendationkey system string is the only one that surfaces SL3000. - DoveRunner. Supporting PlayReady SL3000 on Windows Chrome, updated 5 December 2025. https://docs.doverunner.com/content-security/multi-drm/advanced-guides/playready-sl3000-windows-chrome/ Lists the requirements: Chrome 140+,
com.microsoft.playready.recommendation.3000, Windows 11 x64. - Axinom. Hardware-backed DRM in Chrome on Windows, 18 November 2025. https://86.docs.axinom.com/blog/hardware-drm-chrome-windows Test notes on SL3000 in Chrome on Windows 11.
- Mozilla. Bug 1960673: PlayReady key systems in Firefox. https://bugzilla.mozilla.org/show_bug.cgi?id=1960673 Covers which PlayReady key systems are supported and that SL2000 is disabled on Windows 10.
- Mozilla. Enterprise policy: EncryptedMediaExtensions. https://mozilla.github.io/enterprise-admin-reference/reference/policies/encryptedmediaextensions/ The policy that sets and locks
media.eme.enabledthrough its Enabled and Locked keys; page updated 2 November 2026. - Axinom. Widevine revoked CDMs and DRM announcements. https://docs.axinom.com/blog/widevine-revoked-cdm Covers the 31 October 2024 revocation (Chrome 117+) and the October 2025 mandatory desktop CDM update.
- Axinom. Widevine CLS sunset, April 2026. https://www.axinom.com/media/article/widevine-cls-sunset The Widevine Cloud License Service shuts down on 13 April 2027.
- Web Platform DX. Encrypted Media Extensions feature entry (Baseline widely available since 25 September 2021). https://web-platform-dx.github.io/web-features-explorer/features/encrypted-media-extensions First supporting versions: Chrome 42, Firefox 38, Safari 12.1.
- DoveRunner. Error 7122 Due to Chrome Browser PlayReady DRM Support Update. https://support.doverunner.com/hc/en-us/articles/51958127931545-Error-7122-Due-to-Chrome-Browser-PlayReady-DRM-Support-Update (checked 20 November 2026; the help centre blocks automated link checkers). Describes PlayReady support in Chrome 142 and the key-system mismatch it causes during token generation.
- Mozilla Release Engineering. Partner Repacks and EME Free. https://moz-releng-docs.readthedocs.io/en/latest/how-to/release/firefox/partner-repacks.html Explains how the official EME-free Firefox builds get produced.
- Streaming Video Technology Alliance University. W3C Encrypted Media Extensions (EME) Recommendation. https://university.svta.org/industry-resource/w3c-encrypted-media-extensions-eme-recommendation/ A secondary source for the history behind the 2017 Recommendation and the case for replacing plugins.
