MediaEncryptedEvent Class

The event fired at a media element when its media data contains Initialization Data (encrypted, https://w3c.github.io/encrypted-media/#mediaencryptedevent): the application creates a key session with it.

public sealed class MediaEncryptedEvent : Event
Inheritance
Event MediaEncryptedEvent

Constructors

NameDescription
MediaEncryptedEvent(string, MediaEncryptedEventInit?)Creates an event.

MediaEncryptedEvent(string, MediaEncryptedEventInit?)

EncryptedMediaTypes.cs

Creates an event.

public MediaEncryptedEvent(string type, MediaEncryptedEventInit? eventInitDict = null)

Parameters

type string
The type of the event.
eventInitDict MediaEncryptedEventInit?
The initialization dictionary.

See also

Properties

NameDescription
InitDataGets the Initialization Data, or null (e.g. when the media data is not CORS-same-origin).
InitDataBufferGets the ArrayBuffer of the Initialization Data for the scripts, or null: use MediaEncryptedEvent.InitData in .NET code.
InitDataTypeGets the Initialization Data Type of MediaEncryptedEvent.InitData (cenc, keyids, webm), or the empty string.

Gets the Initialization Data, or null (e.g. when the media data is not CORS-same-origin).

public ReadOnlyMemory<byte>? InitData { get; }

Property value

ReadOnlyMemory<byte>?

Gets the ArrayBuffer of the Initialization Data for the scripts, or null: use MediaEncryptedEvent.InitData in .NET code.

public object? InitDataBuffer { get; }

Gets the Initialization Data Type of MediaEncryptedEvent.InitData (cenc, keyids, webm), or the empty string.

public string InitDataType { get; }