The read-only candidate
property of the RTCPeerConnectionIceEvent
interface returns the RTCIceCandidate
associated with the event.
On this page
RTCPeerConnectionIceEvent: candidate property
Value
An RTCIceCandidate
object representing the ICE candidate that has been received, or null
to indicate that there are no further candidates for this negotiation session.
Example
js
pc.onicecandidate = (ev) => {
alert(
`The ICE candidate (transport address: '${ev.candidate.candidate}') has been added to this connection.`,
);
};
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
candidate |
24 | 15 | 24 | No | 15 | 12 | 4.4 | 25 | 24 | 14 | 12 | 1.5 |
See also
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceEvent/candidate