W3cubDocs

/Web APIs

RTCIceCandidateStats

The RTCIceCandidateStats dictionary of the WebRTC API is used to report statistics related to an RTCIceCandidate.

The statistics can be obtained by iterating the RTCStatsReport returned by RTCPeerConnection.getStats() until you find a report with the type of local-candidate.

Instance properties

address Optional

A string containing the address of the candidate. This value may be an IPv4 address, an IPv6 address, or a fully-qualified domain name. This property was previously named ip and only accepted IP addresses.

candidateType

A string matching one of the values in RTCIceCandidate.type, indicating what kind of candidate the object provides statistics for.

deleted Optional

A Boolean value indicating whether or not the candidate has been released or deleted; the default value is false. For local candidates, its value is true if the candidate has been deleted or released. For host candidates, true means that any network resources (usually a network socket) associated with the candidate have already been released. For TURN candidates, the TURN allocation is no longer active for deleted candidates. This property is not present for remote candidates.

port Optional

The network port number used by the candidate.

priority Optional

The candidate's priority, corresponding to RTCIceCandidate.priority.

protocol Optional

A string specifying the protocol (tcp or udp) used to transmit data on the port.

relayProtocol Optional

A string identifying the protocol used by the endpoint for communicating with the TURN server; valid values are tcp, udp, and tls. Only present for local candidates.

transportId

A string uniquely identifying the transport object that was inspected in order to obtain the RTCTransportStats associated with the candidate corresponding to these statistics.

url Optional

For local candidates, the url property is the URL of the ICE server from which the candidate was received. This URL matches the one included in the RTCPeerConnectionIceEvent object representing the icecandidate event that delivered the candidate to the local peer.

Common instance properties

The following properties are common to all WebRTC statistics objects.

id

A string that uniquely identifies the object that is being monitored to produce this set of statistics.

timestamp

A DOMHighResTimeStamp object indicating the time at which the sample was taken for this statistics object.

type

A string with the value "local-candidate", indicating the type of statistics that the object contains.

Examples

TBD

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
RTCIceCandidateStats 80 80 27 No 67 12.1 80 80 27 57 12.2 13.0
address 91 91 6527 No 77 No 91 91 6527 64 No 16.0
candidateType 80 80 27 No 67 12.1 80 80 27 57 12.2 13.0
foundation 108 108 No No 94 No 108 108 No 73 No 21.0
id 80 80 72 No 67 13.1 80 80 79 57 13.4 13.0
port 80 80 7227 No 67 12.1 80 80 7927 57 12.2 13.0
priority 80 80 72 No 67 12.1 80 80 79 57 12.2 13.0
protocol 80 80 6431 No 67 12.1 80 80 6431 57 12.2 13.0
timestamp 80 80 72 No 67 13.1 80 80 79 57 13.4 13.0
transportId 80 80 31 No 67 12.1 80 80 31 57 12.2 13.0
type 80 80 72 No 67 13.1 80 80 79 57 13.4 13.0
usernameFragment 108 108 No No 94 No 108 108 No 73 No 21.0

© 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/RTCIceCandidateStats