← Back to Blog

How Netflix Protects Its Content Inside Your Browser

EME, Widevine, license rotation, HDCP output protection and forensic watermarking.

Streaming a movie means sending valuable content to a machine you do not control. The browser is the perfect example of a hostile client: open source, scriptable, and running on hardware the studio never approved. Netflix still has to trust it enough to decode several gigabytes of video every episode. Here is the stack that makes that possible.

Encrypted Media Extensions

The starting point is a W3C standard called EME, Encrypted Media Extensions. It is a small JavaScript API that lets the Netflix player ask the browser to decrypt and render a video stream without the decrypted bytes or the key ever touching page script. The player only sees encrypted chunks going in and pixels coming out on a video element it cannot read from.

The Content Decryption Module

EME itself does no decryption. It hands the work to a Content Decryption Module, a CDM, supplied by the browser vendor rather than Netflix. Chrome ships Widevine, Edge and old IE ship PlayReady, Safari ships FairPlay. Each CDM is a closed binary, often backed by a Trusted Execution Environment or a dedicated hardware decoder on supported devices. Netflix never writes decryption code itself, it just negotiates with whichever CDM the browser exposes.

Getting a license

Before playback starts, the player generates a license request tied to a device certificate and sends it to Netflix's license server. The server checks the device's security level, issues a short lived license containing the content keys, and the CDM stores that license in memory only, scoped to the current session. Keys rotate per segment, so a leaked key from one chunk is useless for the next one, and the license itself expires quickly enough that replaying an old request does not work.

Security levels and output protection

Widevine defines three tiers. L1 does key handling and video processing entirely in hardware, so nothing decrypted ever appears in regular RAM, and Netflix reserves this tier for full 4K and HDR. L2 keeps keys in a trusted zone but processes video in software. L3 is pure software with no hardware backing, and Netflix caps it around 720p since it is the easiest tier to attack. On top of that, HDCP is negotiated over HDMI or DisplayPort to refuse a decrypted signal to any external display or capture card that will not confirm it is encrypted downstream too.

The layers on top of DRM

DRM covers the pipe from server to screen, but Netflix stacks a few more obstacles around it. The player bundle is heavily obfuscated and rebuilt often, so reverse engineering the JavaScript side stays expensive. Forensic watermarking embeds an invisible, per session identifier into the decoded frames themselves, so a screen recording leaked online can be traced back to the account or press screener it came from, independent of DRM entirely. Screenshot and screen recording APIs are blocked wherever the OS allows it, which is why a captured Netflix window often shows up black.

None of it is unbreakable

Every part of this stack has been defeated at some point, L3 CDMs have been extracted and analyzed, license flows have been reverse engineered. DRM does not aim for perfection, it aims to raise the cost of piracy above the cost of just paying for the subscription. Combined with watermarking as a deterrent for the cases that do slip through, that is the actual goal, not an unbreakable vault.