docs.rodeo

MDN Web Docs mirror

HTMLMediaElement: encrypted event

{{APIRef("Encrypted Media Extensions")}} 

The encrypted event is fired when initialization data is found in the media that indicates it is encrypted.

This event is not cancelable and does not bubble.

Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}} , or set an event handler property.

addEventListener("encrypted", (event) => {});

onencrypted = (event) => {};

Event type

A {{domxref("MediaEncryptedEvent")}} . Inherits from {{domxref("Event")}} .

{{InheritanceDiagram("MediaEncryptedEvent")}} 

Event properties

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN