This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Chrome Full support 55Edge Full support ≤79Firefox Full support YesIE ? Opera Full support 42Safari ? WebView Android Full support 43Chrome Android Full support 55Firefox Android Full support YesOpera Android Full support 42Safari iOS ? Samsung Internet Android Full support 6.0


Full support  
Full support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.