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

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


new MediaRecorderErrorEvent(type, options)



A string with the name of the event. It is case-sensitive and browsers always set it to error.


An object that, in addition of the properties defined in Event(), can have the following properties:


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.

Note: 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.

Return value


No specification found

No specification data found for api.MediaRecorderErrorEvent.MediaRecorderErrorEvent.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

BCD tables only load in the browser