The WebRTC API's RTCIceCandidateInit
dictionary, which contains the information needed to fundamentally describe an RTCIceCandidate
. RTCIceCandidateInit
is used when using new RTCIceCandidate()
to create a new ICE candidate object. It's also used as the return value from the RTCIceCandidate.toJSON()
method, and can be passed directly into RTCPeerConnection.addIceCandidate()
to add a candidate to the peer connection.
Properties
candidate
Optional- The ICE
candidate-attribute
. If the candidate is an indicator that there are no further candidates (rather than representing a new candidate), this is the empty string (""
). The default is the empty string. sdpMid
Optional- The identification tag of the media stream with which the candidate is associated, or
null
if there is no associated media stream. The default isnull
. sdpMLineIndex
Optional- The zero-based index of the m-line within the SDP of the media description with which the candidate is associated, or
null
if no such associated exists. The default isnull
. usernameFragment
Optional- A
DOMString
containing a string which uniquely identifies the remote peer. This string is generated by WebRTC at the beginning of the session, and at least 24 bits worth of the string contain random data. The string may be up to 256 characters long. This property has no default value and is not present unless set explicitly.
Specifications
Specification | Status | Comment |
WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCIceCandidateInit' in that specification. | Candidate Recommendation | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
RTCIceCandidateInit
|
Chrome
Full support Yes |
Edge
Full support ≤18 |
Firefox
Full support 22 |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support Yes |
Opera Android
Full support Yes |
Safari iOS
? |
Samsung Internet Android
Full support Yes |
candidate
|
Chrome
Full support Yes |
Edge
Full support ≤18 |
Firefox Full support 22 Full support 22 Notes' Prior to Firefox 68, the |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android Full support Yes Full support Yes Notes' Prior to Firefox 68, the |
Opera Android
Full support Yes |
Safari iOS
? |
Samsung Internet Android
Full support Yes |
sdpMid
|
Chrome
Full support Yes |
Edge
Full support ≤18 |
Firefox
Full support 22 |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support Yes |
Opera Android
Full support Yes |
Safari iOS
? |
Samsung Internet Android
Full support Yes |
sdpMLineIndex
|
Chrome
Full support Yes |
Edge
Full support ≤18 |
Firefox
Full support 22 |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support Yes |
Opera Android
Full support Yes |
Safari iOS
? |
Samsung Internet Android
Full support Yes |
usernameFragment
|
Chrome
Full support Yes |
Edge
Full support ≤18 |
Firefox
Full support 67 |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 67 |
Opera Android
Full support Yes |
Safari iOS
? |
Samsung Internet Android
Full support Yes |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- See implementation notes.'
- See implementation notes.
RTCIceCandidateInit by Mozilla Contributors is licensed under CC-BY-SA 2.5.