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.