RTCPeerConnectionIceEvent

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 .

特性

A RTCPeerConnectionIceEvent being an Event , this event also implements these properties .

RTCPeerConnectionIceEvent.candidate 只读
Contains the 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.

方法

A RTCPeerConnectionIceEvent being an Event , 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.");
}
					

规范

规范 状态 Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCPeerConnectionIceEvent' in that specification.
候选推荐 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
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

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
使用非标名称。

另请参阅