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.
candidate
Optional
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
null
if there is no associated media stream. The default is null
.sdpMLineIndex
Optional
null
if no such associated exists. The default is null
.usernameFragment
Optional
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.Specification | Status | Comment |
---|---|---|
WebRTC 1.0: Real-time Communication Between Browsers The definition of 'RTCIceCandidateInit' in that specification. | Candidate Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | Yes | 22 | ? | Yes | ? |
candidate |
Yes | Yes | 22 | ? | Yes | ? |
sdpMid |
Yes | Yes | 22 | ? | Yes | ? |
sdpMLineIndex |
Yes | Yes | 22 | ? | Yes | ? |
usernameFragment |
Yes | Yes | 22 | ? | Yes | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | Yes | Yes | ? | Yes |
candidate |
Yes | Yes | Yes | Yes | Yes | ? | Yes |
sdpMid |
Yes | Yes | Yes | Yes | Yes | ? | Yes |
sdpMLineIndex |
Yes | Yes | Yes | Yes | Yes | ? | Yes |
usernameFragment |
Yes | Yes | Yes | Yes | Yes | ? | Yes |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateInit