This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2018.
* Some parts of this feature may have varying levels of support.
The RTCPeerConnectionIceEvent interface represents events that occur 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 Read only
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()Returns a new RTCPeerConnectionIceEvent. It takes two parameters, the first being a string 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 method.
pc.onicecandidate = (ev) => {
console.log(
`The ICE candidate ('${ev.candidate.candidate}') added to connection.`,
);
};
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
RTCPeerConnectionIceEvent |
56 | 15 | 24 | 43 | 12 | 56 | 24 | 43 | 12 | 6.0 | 56 | 12 |
RTCPeerConnectionIceEvent |
5624–56 | 15 | 24 | 4315–43 | 12 | 5625–56 | 24 | 4314–43 | 12 | 6.01.5–6.0 | 564.4–56 | 12 |
candidate |
24 | 15 | 24 | 15 | 12 | 25 | 24 | 14 | 12 | 1.5 | 4.4 | 12 |
url |
No | No | No | No | 12 | No | No | No | 12 | No | No | 12 |
RTCPeerConnection.
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceEvent