我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

Draft
This page is not complete.

The RTCIceCandidate interface—part of the WebRTC API—represents a candidate Internet Connectivity Establishment (ICE) server which may be used to establish an RTCPeerConnection.

Constructor

RTCIceCandidate()
Creates an RTCIceCandidate object.

Properties

RTCIceCandidate.candidate Read only
A DOMString representing the transport address for the candidate that can be used for connectivity checks. The format of this address is a candidate-attribute as defined in RFC 5245. This string is empty ("") if the RTCIceCandidate represents a "end of candidates" indicator.
RTCIceCandidate.foundation Read only
Returns a unique identifier that allows ICE to correlate candidates that appear on multiple RTCIceTransport objects.
RTCIceCandidate.ip Read only
Returns the IP address of the candidate.
RTCIceCandidate.port Read only
Returns the port of the candidate.
RTCIceCandidate.priority Read only
Returns the assigned priority of the candidate.
RTCIceCandidate.protocol Read only
Returns the protocol used by the candidate, either udp or tcp.
RTCIceCandidate.relatedAddress Read only
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, the relatedAddress is null.
RTCIceCandidate.relatedPort Read only
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, the relatedPort is null.
RTCIceCandidate.sdpMid Read only
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.
RTCIceCandidate.sdpMLineIndex Read only
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.
RTCIceCandidate.tcpType Read only
If protocol is tcptcpType represents the type of TCP candidate. Otherwise, tcpType is null.
RTCIceCandidate.type Read only
One of host, srflx, prflx, or relay.

Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCIceCandidate' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes22 ? Yes ?
RTCIceCandidate() Yes Yes22 ? Yes ?
candidate Yes1522 ? Yes ?
foundation Yes Yes22 ? Yes ?
ip Yes Yes22 ? Yes ?
port Yes Yes22 ? Yes ?
priority Yes Yes22 ? Yes ?
protocol Yes Yes22 ? Yes ?
relatedAddress Yes Yes22 ? Yes ?
relatedPort Yes Yes22 ? Yes ?
sdpMid Yes1522 ? Yes ?
sdpMLineIndex Yes1522 ? Yes ?
tcpType Yes Yes22 ? Yes ?
type Yes Yes22 ? Yes ?
component ? ? ? ? ? ?
usernameFragment ? ? ? ? ? ?
toJSON ?15 ? ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes ? Yes ? Yes
RTCIceCandidate() Yes Yes Yes ? Yes ? Yes
candidate Yes Yes Yes ? Yes ? Yes
foundation Yes Yes Yes ? Yes ? Yes
ip Yes Yes Yes ? Yes ? Yes
port Yes Yes Yes ? Yes ? Yes
priority Yes Yes Yes ? Yes ? Yes
protocol Yes Yes Yes ? Yes ? Yes
relatedAddress Yes Yes Yes ? Yes ? Yes
relatedPort Yes Yes Yes ? Yes ? Yes
sdpMid Yes Yes Yes ? Yes ? Yes
sdpMLineIndex Yes Yes Yes ? Yes ? Yes
tcpType Yes Yes Yes ? Yes ? Yes
type Yes Yes Yes ? Yes ? Yes
component ? ? ? ? ? ? ?
usernameFragment ? ? ? ? ? ? ?
toJSON ? ? ? ? ? ? ?

文档标签和贡献者

 此页面的贡献者: Sheppy, fscholz, abbycar, rolfedh, jpmedley
 最后编辑者: Sheppy,