The onmessage property of the MediaKeySession is an event handler, fired whenever a MediaKeyMessageEvent occurs, denoting a message is generated by the content decryption module.

This interface inherits from the ExtendableEvent interface.


MediaKeySession.onmessage = function(MediaKeyMessageEvent) { ... }


Specification Status Comment
Encrypted Media Extensions
The definition of 'onmessage' in that specification.
Recommendation Initial definition.

Browser compatibility

BCD tables only load in the browser