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
EventMediaEncryptedEvent
Constructors
| Name | Description |
|---|---|
| MediaEncryptedEvent(string, MediaEncryptedEventInit?) | Creates an event. |
MediaEncryptedEvent(string, MediaEncryptedEventInit?)
EncryptedMediaTypes.csCreates an event.
public MediaEncryptedEvent(string type, MediaEncryptedEventInit? eventInitDict = null)Parameters
typestring- The type of the event.
eventInitDictMediaEncryptedEventInit?- The initialization dictionary.
See also
Properties
| Name | Description |
|---|---|
| InitData | Gets the Initialization Data, or null (e.g. when the media data is not CORS-same-origin). |
| InitDataBuffer | Gets the ArrayBuffer of the Initialization Data for the scripts, or null: use MediaEncryptedEvent.InitData in .NET code. |
| InitDataType | Gets the Initialization Data Type of MediaEncryptedEvent.InitData (cenc, keyids, webm), or the empty string. |
InitData
EncryptedMediaTypes.csGets the Initialization Data, or null (e.g. when the media data is not CORS-same-origin).
public ReadOnlyMemory<byte>? InitData { get; }Property value
InitDataBuffer
EncryptedMediaTypes.csGets the ArrayBuffer of the Initialization Data for the scripts, or null: use MediaEncryptedEvent.InitData in .NET code.
public object? InitDataBuffer { get; }Property value
See also
InitDataType
EncryptedMediaTypes.csGets the Initialization Data Type of MediaEncryptedEvent.InitData (cenc, keyids, webm), or the empty string.
public string InitDataType { get; }