The WebRTC API's RTCErrorEvent interface represents an error sent to a WebRTC object. It's based on the standard 事件 interface, but adds RTC-specific information describing the error, as shown below.

构造函数

RTCErrorEvent()
创建并返回新 RTCErrorEvent 对象。

特性

In addition to the standard properties available on the 事件 interface, RTCErrorEvent also includes the following:

error 只读
RTCError object specifying the error which occurred; this object includes the type of error that occurred, information about where the error occurred (such as which line number in the SDP or what SCTP cause code was at issue).

方法

No additional methods are provided beyond any found on the parent interface, 事件 .

描述

There are other data types used for error events in WebRTC, as needed for errors with special information sharing requirements. The most common of these is probably RTCPeerConnectionIceErrorEvent , used by the icecandidateerror event, which signals an error that has occurred while gathering ICE candidates during connection negotiation.

规范

规范 状态 注释
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCErrorEvent' 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
RTCErrorEvent Chrome ? Edge ? Firefox ? IE No Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS 6 Samsung Internet Android ?
error Chrome ? Edge ? Firefox ? IE No Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS 6 Samsung Internet Android ?

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

另请参阅

元数据

  • 最后修改: