MediaKeyMessageEvent Class

The event of a message of a key session to the license server (message, https://w3c.github.io/encrypted-media/#mediakeymessageevent).

public sealed class MediaKeyMessageEvent : Event
Inheritance
Event MediaKeyMessageEvent

Constructors

NameDescription
MediaKeyMessageEvent(string, MediaKeyMessageEventInit)Creates an event.

MediaKeyMessageEvent(string, MediaKeyMessageEventInit)

EncryptedMediaTypes.cs

Creates an event.

public MediaKeyMessageEvent(string type, MediaKeyMessageEventInit eventInitDict)

Parameters

type string
The type of the event.
eventInitDict MediaKeyMessageEventInit
The initialization dictionary, with the message.

See also

Properties

NameDescription
MessageGets the message (for Clear Key, a JSON object encoded in UTF-8).
MessageBufferGets the ArrayBuffer of the message for the scripts: use MediaKeyMessageEvent.Message in .NET code.
MessageTypeGets the type of the message.

Gets the message (for Clear Key, a JSON object encoded in UTF-8).

public ReadOnlyMemory<byte> Message { get; }

Property value

ReadOnlyMemory<byte>

Gets the ArrayBuffer of the message for the scripts: use MediaKeyMessageEvent.Message in .NET code.

public object MessageBuffer { get; }

Gets the type of the message.

public MediaKeyMessageType MessageType { get; }