This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The onencrypted property of the HTMLMediaElement is an event handler, fired whenever an encrypted event occurs, denoting the media is encrypted.

This interface inherits from the ExtendableEvent interface.


HTMLMediaElement.onencrypted = function(encrypted) { ... }


Specification Status Comment
Encrypted Media Extensions
The definition of 'onencrypted' in that specification.
Recommendation Initial definition.

Browser Compatibility

ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onencryptedChrome Full support YesEdge Full support 13Firefox Full support YesIE ? Opera Full support YesSafari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?


Full support
Full support
Compatibility unknown
Compatibility unknown