RTCPeerConnectionIceEvent.candidate

The read-only candidate property of the RTCPeerConnectionIceEvent interface returns the RTCIceCandidate associated with the event.

Syntax

 var candidate = event.candidate;

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

pc.onicecandidate = function( 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
Yes
12
≤37
25
24
Yes
12
1.5

See also

© 2005–2021 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