MediaRecorderErrorEvent () 构造函数创建新 MediaRecorderErrorEvent object that represents an error that occurred during the recording of media by the MediaStream 录制 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)
					

参数

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's 名称 property should indicate the name of the error that occurred. The other fields may or may not be present.

某些 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.

规范

规范 状态 注释
MediaStream 录制
The definition of 'MediaRecorderErrorEvent()' in that specification.
工作草案 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
MediaRecorderErrorEvent() 构造函数 Chrome No
不支持 No
Uses a generic event with an error 特性。
Edge No
不支持 No
Uses a generic event with an error 特性。
Firefox 57 IE No Opera No
不支持 No
Uses a generic event with an error 特性。
Safari No WebView Android No Chrome Android No
不支持 No
Uses a generic event with an error 特性。
Firefox Android 57 Opera Android No
不支持 No
Uses a generic event with an error 特性。
Safari iOS No Samsung Internet Android No
不支持 No
Uses a generic event with an error 特性。

图例

完整支持

完整支持

不支持

不支持

见实现注意事项。

元数据

  • 最后修改:
  1. MediaStream 录制 API
  2. MediaRecorderErrorEvent
  3. 构造函数
    1. MediaRecorderErrorEvent()
  4. 特性
    1. error
  5. Related pages for MediaStream Recording
    1. BlobEvent
    2. MediaRecorder

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1