{{APIRef("WebRTC")}}{{SeeCompatTable}}
The RTCIceCandidate
interface of the the WebRTC API represents a candidate internet connectivity establishment (ICE) server for establishing an {{domxref("RTCPeerConnection")}}.
Constructors
- {{domxref("RTCIceCandidate.RTCIceCandidate()","RTCIceCandidate()")}}
- Creates an
RTCIceCandidate
object.
Properties
- {{domxref("RTCIceCandidate.candidate")}}
- Returns a transport address for the candidate that can be used for connectivity checks. The format of this address is a
candidate-attribute
as defined in RTC 5245. - {{domxref("RTCIceCandidate.foundation")}}
- Returns a unique identifier that allows ICE to correlate candidates that appear on multiple {{domxref("RTCIceTransport")}} objects.
- {{domxref("RTCIceCandidate.ip")}}
- Returns the IP address of the candidate.
- {{domxref("RTCIceCandidate.port")}}
- Returns the port of the candidate.
- {{domxref("RTCIceCandidate.priority")}}
- Returns the assigned priority of the candidate.
- {{domxref("RTCIceCandidate.protocol")}}
- Returns the protocol used by the candidate, either udp or tcp.
- {{domxref("RTCIceCandidate.relatedAddress")}}
- For a candidate that is derived from another, such as a relay or reflexive candidate, the
relatedAddress
is the IP address of the candidate that it is derived from. For host candidates, therelatedAddress
isnull
. - {{domxref("RTCIceCandidate.relatedPort")}}
- For a candidate that is derived from another, such as a relay or reflexive candidate, the
relatedPort
is the port of the candidate that it is derived from. For host candidates, therelatedPort
isnull
. - {{domxref("RTCIceCandidate.sdpMid")}}
- If not
null
, this contains the identifier of the "media stream identification" (as defined in RFC 5888) for the media component this candidate is associated with. - {{domxref("RTCIceCandidate.sdpMLineIndex")}}
- If not
null
, this indicates the index (starting at zero) of the media description (as defined in RFC 4566) in the SDP this candidate is associated with. - {{domxref("RTCIceCandidate.tcpType")}}
- TBD
- {{domxref("RTCIceCandidate.type")}}
- TBD
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('WebRTC 1.0')}} | {{Spec2('WebRTC 1.0')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|---|
Basic support |