The read-only candidate
property of the RTCPeerConnectionIceEvent
interface returns the RTCIceCandidate
associated with the event.
RTCPeerConnectionIceEvent.candidate
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
Specification |
---|
WebRTC 1.0: Real-Time Communication Between Browsers # dom-rtcpeerconnectioniceevent-candidate |
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
|
≤37
|
25
|
24
|
14
|
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