An ICE candidate describes the protocols and routing needed for WebRTC to be able to communicate with a remote device. When starting a WebRTC peer connection, typically a number of candidates are proposed by each end of the connection, until they mutually agree upon one which describes the connection they decide will be best. WebRTC then uses that candidate's details to initiate the connection.
DOMStringrepresenting the transport address for the candidate that can be used for connectivity checks. The format of this address is a
candidate-attributeas defined in RFC 5245. This string is empty (
"") if the
RTCIceCandidateis an "end of candidates" indicator.
DOMStringwhich indicates whether the candidate is an RTP or an RTCP candidate; its value is either
"rtcp", and is derived from the
"component-id"field in the
candidatea-line string. The permitted values are listed in the
- Returns a
DOMStringcontaining a unique identifier that is the same for any candidates of the same type, share the same base (the address from which the ICE agent sent the candidate), and come from the same STUN server. This is used to help optimize ICE performance while prioritizing and correlating candidates that appear on multiple
DOMStringcontaining the IP address of the candidate.
- An integer value indicating the candidate's port number.
- A long integer value indicating the candidate's priority.
- The address of the candidate.
- A string indicating whether the candidate's protocol is
"udp". The string is one of those in the enumerated type
- If the candidate is derived from another candidate,
DOMStringcontaining that host candidate's IP address. For host candidates, this value is
- For a candidate that is derived from another, such as a relay or reflexive candidate, the
relatedPortis a number indicating the port number of the candidate from which this candidate is derived. For host candidates, the
DOMStringspecifying the candidate's media stream identification tag which uniquely identifies the media stream within the component with which the candidate is associated, or
nullif no such association exists.
- If not
sdpMLineIndexindicates the zero-based index number of the media description (as defined in RFC 4566) in the SDP with which the candidate is associated.
tcpTyperepresents the type of TCP candidate. Otherwise,
DOMStringindicating the type of candidate as one of the strings from the
DOMStringcontaining a randomly-generated username fragment ("ice-ufrag") which ICE uses for message integrity along with a randomly-generated password ("ice-pwd"). You can use this string to verify generations of ICE generation; each generation of the same ICE process will use the same
usernameFragment, even across ICE restarts.
For examples, see the article Signaling and video calling, which demonstrates the entire process.
|WebRTC 1.0: Real-Time Communication Between Browsers (WebRTC 1.0)|
BCD tables only load in the browser