这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

RTCPeerConnectionIceEvent() 构造函数创建新 RTCPeerConnectionIceEvent .

句法

 var event = new RTCPeerConnectionIceEvent(type, options);
					

参数

type
DOMString containing the name of the event, like "icecandidate" .
选项
A dictionary of type RTCPeerConnectionInit , which may contain one or more of the following fields:
  • "candidate" (optional, default is null ): A RTCIceCandidate representing the ICE candidate being concerned by the event.  If null , the event indicates the end of candidate gathering.
  • "url" (optional, default is null ): The URL of the STUN or TURN server which was used to gather the candidate. If the candidate was not gathered by a STUN or TURN server, this value must be null .
  • "bubbles" (optional, default is false ): Inherited from EventInit() , this Boolean option indicates whether or not the event must bubble.
  • "cancelable" (optional, default is false , inherited from EventInit() , this Boolean indicates whether or not the event can be canceled.

返回值

A newly-created RTCPeerConnectionIceEvent , configured as specified in the provided options.

规范

规范 状态 注释
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCPeerConnectionIceEvent()' 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
RTCPeerConnectionIceEvent() 构造函数 Chrome 56 Edge ≤18 Firefox Yes IE No Opera Yes Safari ? WebView Android 56 Chrome Android 56 Firefox Android Yes Opera Android Yes Safari iOS ? Samsung Internet Android 6.0

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

另请参阅

元数据

  • 最后修改: