getLocalCandidates method
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Retrieves the sequence of valid local candidates associated with the RTCIceGatherer. All unpruned local candidates currently known (except for peer reflexive candidates) will be retrieved, even if an onlocalcandidate event hasn't been processed yet.
Syntax
var retval = RTCIceGatherer.getLocalCandidates();
Parameters
This method has no parameters.
Standards information
Remarks
Dictionary of RTCIceCandidate members:
dictionary RTCIceCandidate {
DOMString foundation;
unsigned long priority;
DOMString ip;
RTCIceProtocol protocol;
unsigned short port;
RTCIceCandidateType type;
RTCIceTcpCandidateType tcpType;
DOMString relatedAddress = "";
unsigned short relatedPort;
};
EXAMPLE
{
foundation: "contoso",
priority: 7985354112,
ip: "192.0.2.33",
protocol: "udp",
port: 10000,
type: "host"
};
Dictionary Member | Type | Description |
---|---|---|
foundation | DOMString | A unique identifier that allows ICE to correlate candidates that appear on multiple RTCIceTransports. |
ip | DOMString | The IP address of the candidate. |
port | unsigned short | The port for the candidate. |
priority | unsigned long | The assigned priority of the candidate (automatically populated by the browser). |
protocol | RTCIceProtocol | The protocol of the ICE candidate. Values can be UDP or TCP (examples and advantages).
ValueDescription
UDPA UDP candidate, as described in [RFC5245]. User Datagram Protocol is a connectionless protocol within TCP/IP that corresponds to the transport layer in the ISO/OSI reference model.
TCPA TCP candidate, as described in [RFC6544]. Transmission Control Protocol is a protocol used with the Internet Protocol (IP) to send data in the form of message units between computers over the Internet. TCP handles keeping track of the individual units of data (called packets) that a message is divided into for efficient routing through the Internet.
|
relatedAddress | DOMString | For candidates that are derived from others, such as relay or reflexive candidates, the relatedAddress refers to the candidate that these are derived from. For host candidates, the relatedAddress is set to the empty string. |
relatedPort | unsigned short | For candidates that are derived from others, such as relay or reflexive candidates, the relatedPort refers to the host candidate that these are derived from. For host candidates, the relatedPort is null. |
tcpType | RTCIceTcpCandidateType | The type of ICE TCP candidate, as described in [RFC6544]. Browsers MUST gather active TCP candidates and only active TCP candidates. Servers and other endpoints MAY gather active, passive or S-O (simultaneous-open) candidates.
ValueDescription
activeAn active TCP candidate is one for which the transport will attempt to open an outbound connection but will not receive incoming connection requests.
passiveA passive TCP candidate is one for which the transport will receive incoming connection attempts but not attempt a connection.
soAn S-O candidate is one for which the transport will attempt to open a connection simultaneously with its peer.
|
type | RTCIceCandidateType | The type of the ICE candidate.
ValueDescription
hostA host candidate.
srflxA server reflexive candidate.
prflxA peer reflexive candidate.
relayA relay candidate.
|