The message
event of the MediaKeySession
interface fires when a message is generated by the content decryption module.
MediaKeySession: message event
Syntax
Use the event name in methods like addEventListener()
, or set an event handler property.
addEventListener('message', event => { }); onmessage = event => { };
Event type
An MediaKeyMessageEvent
. Inherits from Event
.
Event properties
Inherits properties from its parent, Event
.
-
MediaKeyMessageEvent.message
Read only -
Returns an
ArrayBuffer
with a message from the content decryption module. Messages vary by key system. -
MediaKeyMessageEvent.messageType
Read only -
Indicates the type of message. May be one of
license-request
,license-renewal
,license-release
, orindividualization-request
.
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
message_event |
55
42-55
The
onmessage event handler property is not supported.
|
79
|
52
|
No
|
42
29-42
The
onmessage event handler property is not supported.
|
12.1
|
55
43-55
The
onmessage event handler property is not supported.
|
55
42-55
The
onmessage event handler property is not supported.
|
52
|
42
29-42
The
onmessage event handler property is not supported.
|
12.2
|
6.0
4.0-6.0
The
onmessage event handler property is not supported.
|
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/message_event