Table of Contents

Class RTCIceCandidateStats

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

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

[ToObject]
public class RTCIceCandidateStats : RTCStats
Inheritance
RTCIceCandidateStats
Inherited Members

Remarks

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

See also on MDN

Constructors

RTCIceCandidateStats()

public RTCIceCandidateStats()

Fields

Address

The address property of the RTCIceCandidateStats dictionary indicates the address of the {{Glossary("ICE")}} candidate.
While it's preferred that the address be specified as an IPv4 or IPv6 numeric address, a fully-qualified domain name can be used as well.

[Value("address")]
public string? Address

Field Value

string

Either an IPv4 or IPv6 address or a fully-qualified domain name, which corresponds to the candidate.

Remarks

When a domain name is specified, the first IP address selected for that address is used, even if the domain name maps to multiple IP addresses.

See also on MDN

CandidateType

The candidateType property of the RTCIceCandidateStats dictionary is a string that indicates the type of {{Glossary("ICE")}} candidate the object represents.

[Value("candidateType")]
public required RTCIceCandidateType CandidateType

Field Value

RTCIceCandidateType

A string whose value is one of the strings found in RTCIceCandidate.type.

Remarks

Foundation

NOTE
Experimental
The foundation property of the RTCIceCandidateStats interface is a string that allows correlation of candidates from a common network path on multiple RTCIceTransport objects.
[Value("foundation")]
public string Foundation

Field Value

string

A string representing the Foundation of the corresponding RTCIceCandidate.

Remarks

It is the same for two candidates that are of the same type, are using the same transport protocol, originate from the same IP address, use ports that fall within the same range, and come from the same STUN server.

For more information see Foundation.

See also on MDN

Port

The port property of the RTCIceCandidateStats dictionary specifies the network port used by the candidate.

[Value("port")]
public long Port

Field Value

long

An integer value indicating the network port used by the RTCIceCandidate described by this RTCIceCandidateStats object.
Corresponds to Port.

Remarks

Priority

The priority property of the RTCIceCandidateStats dictionary is a positive integer value indicating the priority (or desirability) of the described candidate.

[Value("priority")]
public long Priority

Field Value

long

A positive integer indicating the priority of the RTCIceCandidate described by the RTCIceCandidateStats object.
The value may be anywhere from 1 to 2,147,483,647.

Remarks

-{{RFC(5245, "", "4.1.2.1")}}: Recommended Formula section in the ICE specification

See also on MDN

Protocol

The protocol property of the RTCIceCandidateStats dictionary indicates the protocol the specified candidate would use for communication with the remote peer.

[Value("protocol")]
public string Protocol

Field Value

string

The value is one of the following strings:

Remarks

RelatedAddress

[Value("relatedAddress")]
public string RelatedAddress

Field Value

string

RelatedPort

[Value("relatedPort")]
public long RelatedPort

Field Value

long

RelayProtocol

The RTCIceCandidateStats dictionary's
relayProtocol property specifies the protocol being used
by a local ICE candidate to communicate with the TURN
server.

[Value("relayProtocol")]
public RTCIceServerTransportProtocol RelayProtocol

Field Value

RTCIceServerTransportProtocol

A string identifying the protocol being used by the endpoint to
communicate with the TURN server. The possible values are:

NOTE
This property is only present on
RTCIceCandidateStats objects that represent local candidates.

Remarks

The ICE protocol being used by the candidate otherwise can be obtained from the
Protocol property.

See also on MDN

TcpType

[Value("tcpType")]
public RTCIceTcpCandidateType TcpType

Field Value

RTCIceTcpCandidateType

TransportId

The transportId property of the RTCIceCandidateStats dictionary is a string that uniquely identifies the transport that produced the RTCTransportStats from which information about this candidate was taken.

[Value("transportId")]
public required string TransportId

Field Value

string

A string whose value uniquely identifies the transport from which any transport-related information accumulated in the RTCIceCandidateStats was taken.

Remarks

This can be used, for example, to compare candidates that use the same transport.

See also on MDN

Url

The RTCIceCandidateStats dictionary's
url property specifies the URL of the
ICE server from which the described candidate was obtained. This
property is only available for local candidates.

[Value("url")]
public string Url

Field Value

string

A string specifying the URL of the ICE server from which the
candidate described by the RTCIceCandidateStats was obtained. This is the
same URL that would be received in the RTCPeerConnection.Icecandidate event's
Url property.

NOTE
This property does not exist for remote candidates.

Remarks

UsernameFragment

NOTE
Experimental
The usernameFragment property of the RTCIceCandidateStats interface is a string that represents the {{Glossary("ICE")}} username fragment ("ice-ufrag").
[Value("usernameFragment")]
public string UsernameFragment

Field Value

string

A string representing the UsernameFragment of the corresponding RTCIceCandidate.

Remarks

The fragment uniquely identifies a single ICE interaction session, and can be used to identify communications that are part of the same session even across ICE restarts.

For more information see UsernameFragment.

See also on MDN