RTCPeerConnectionIceEvent interface represents events that occurs in relation to ICE candidates with the target, usually an RTCPeerConnection . Only one event is of this type: icecandidate .

特性

RTCPeerConnectionIceEvent being an 事件 , this event also implements these properties .

RTCPeerConnectionIceEvent.candidate 只读
包含 RTCIceCandidate containing the candidate associated with the event, or null if this event indicates that there are no further candidates to come.

构造函数

RTCPeerConnectionIceEvent()
返回新的 RTCPeerConnectionIceEvent . It takes two parameters, the first being a DOMString representing the type of the event; the second a dictionary containing the RTCIceCandidate it refers to.

方法

RTCPeerConnectionIceEvent being an 事件 , this event also implements these properties . There is no specific RTCDataChannelEvent 方法。

范例

pc.onicecandidate = function( ev ) {
  alert("The ICE candidate (transport address: '" +
    ev.candidate.candidate +
    "') has been added to this connection.");
}
					

规范

规范 状态 注释
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 Alternate Name
不支持 ? — 56 Alternate Name
Alternate Name Uses the non-standard name: RTCIceCandidateEvent
56
Edge ≤18 Firefox Yes IE No Opera Yes Safari Yes WebView Android ? — 56 Alternate Name
不支持 ? — 56 Alternate Name
Alternate Name Uses the non-standard name: RTCIceCandidateEvent
56
Chrome Android ? — 56 Alternate Name
不支持 ? — 56 Alternate Name
Alternate Name Uses the non-standard name: RTCIceCandidateEvent
56
Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android ? — 6.0 Alternate Name
不支持 ? — 6.0 Alternate Name
Alternate Name Uses the non-standard name: RTCIceCandidateEvent
6.0
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
candidate Chrome 56 Edge 15 Firefox Yes IE No Opera Yes Safari Yes WebView Android 56 Chrome Android 56 Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android 6.0
url Chrome No Edge No Firefox ? IE No Opera ? Safari Yes WebView Android No Chrome Android No Firefox Android ? Opera Android ? Safari iOS Yes Samsung Internet Android No

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

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

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

使用非标名称。

另请参阅

元数据

  • 最后修改: