The onerror property of the HTMLMediaElement interface specifies an event listener function which will receive error events sent to the media element. These events occur when some form of error occurs while attempting to load or perform the media.
HTMLMediaElement.onerror = EventListener;
A function which serves as the event handler for the error event. When an error occurs, the specified function will be called. If null, no error handler is in effect.
| Specification | Status | Comment | 
|---|---|---|
| HTML Living Standard The definition of 'onerror' in that specification.  |  Living Standard | 
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | Yes | Yes | 3.5 | 9 | Yes | Yes | 
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | Yes | Yes | Yes | Yes | Yes | Yes | ? | 
    © 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
    https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onerror