GO-V.ORG
As seen in

HTMLMediaElement: encrypted event

Encrypted Media Extensions

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 addEventListener():

```js-nolint
addEventListener("encrypted", (event) => { })
```

Alternatively, assign to the [event handler property](/docs/Web/API/Document_Object_Model/Events#using_onevent_properties) of the interface:

```js-nolint
onencrypted = (event) => { }
```

## Event type

A MediaEncryptedEvent. Inherits from Event.

MediaEncryptedEvent

## Specifications

## Browser compatibility

## See also

- HTMLAudioElement
- HTMLVideoElement
- audio
- video
- MediaEncryptedEvent

source: MDN Web Docs mirror · page

Cite this

"HTMLMediaElement: encrypted event". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/encrypted_event

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·