The MediaRecorderErrorEvent() constructor creates a new MediaRecorderErrorEvent object that represents an error that occurred during the recording of media by the MediaStream Recording API.

In general, you won't create these yourself; they are delivered to your implementation of MediaRecorder.onerror when errors occur while recording media.


var errorEvent = new MediaRecorderErrorEvent(errorInfo)


An object describing the error object to be created. It must contain the error property at a minimum.
A DOMException that describes the error that occurred. This object's name property should indicate the name of the error that occurred. The other fields may or may not be present.

Some user agents add to the error object other properties that provide information such as stack dumps, the name of the JavaScript file and the line number where the error occurred, and other debugging aids, but you should not rely on this information in a production environment.


Specification Status Comment
MediaStream Recording
The definition of 'MediaRecorderErrorEvent()' in that specification.
Working Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No1 No57 No No1 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No1 No57 No1 No No

1. Uses a generic event with an error property.


Document Tags and Contributors

Contributors to this page: Sheppy
Last updated by: Sheppy,