MediaRecorderErrorEvent()
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 MediaRecorder.onerror
when errors occur while recording media.
Syntax
var errorEvent = new MediaRecorderErrorEvent(errorInfo)
Parameters
errorInfo
-
An object describing the error object to be created. It must contain the
error
property at a minimum.error
-
A
DOMException
that describes the error that occurred. This object'sname
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.
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
MediaRecorderErrorEvent |
No
Uses a generic event with an
error property. |
No
Uses a generic event with an
error property. |
57 |
No |
No
Uses a generic event with an
error property. |
14 |
No |
No
Uses a generic event with an
error property. |
57 |
No
Uses a generic event with an
error property. |
14 |
No
Uses a generic event with an
error property. |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorderErrorEvent/MediaRecorderErrorEvent