Class RTCIceTransport
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The RTCIceTransport interface provides access to information about the ICE transport layer over which the data is being sent and received.
This is particularly useful if you need to access state information about the connection.
[Value("RTCIceTransport")]
public class RTCIceTransport : EventTarget
- Inheritance
-
RTCIceTransport
- Inherited Members
Remarks
Constructors
RTCIceTransport()
public RTCIceTransport()
Properties
Component
The component read-only property of the RTCIceTransport interface specifies whether the object is serving to transport {{Glossary("RTP")}} or {{Glossary("RTCP")}}.
[Value("component")]
public RTCIceComponent Component { get; }
Property Value
- RTCIceComponent
A string which is one of the following:
Remarks
GatheringState
The gatheringState read-only property of the RTCIceTransport interface returns a string that indicates the current gathering state of the ICE agent for this transport: "new", "gathering", or "complete".
[Value("gatheringState")]
public RTCIceGathererState GatheringState { get; }
Property Value
- RTCIceGathererState
A string that indicates the current state of the ICE agent's candidate gathering process:
Remarks
You can detect when the value of this property changes by watching for an event of type RTCIceTransportgatheringstatechange.
Note that gatheringState represents the gathering state of just this transport, while IceGatheringState represents the overall gathering state of the whole connection, including every RTCIceTransport used by every RTCRtpSender and every RTCRtpReceiver on the entire connection.
Onerror
[Value("onerror")]
public EventHandlerNonNull Onerror { get; set; }
Property Value
Ongatheringstatechange
[Value("ongatheringstatechange")]
public EventHandlerNonNull Ongatheringstatechange { get; set; }
Property Value
Onicecandidate
[Value("onicecandidate")]
public EventHandlerNonNull Onicecandidate { get; set; }
Property Value
Onselectedcandidatepairchange
[Value("onselectedcandidatepairchange")]
public EventHandlerNonNull Onselectedcandidatepairchange { get; set; }
Property Value
Onstatechange
[Value("onstatechange")]
public EventHandlerNonNull Onstatechange { get; set; }
Property Value
Role
The role read-only property of the RTCIceTransport interface indicates which {{Glossary("ICE")}} role the transport is fulfilling: that of the controlling agent, or the agent that is being controlled.
[Value("role")]
public RTCIceRole Role { get; }
Property Value
- RTCIceRole
A string specifying whether the RTCIceTransport represents the controlling agent or the controlled agent.The value must be one of the following:
Remarks
You can learn more about ICE roles in Choosing a candidate pair.
State
The state read-only property of the RTCIceTransport interface returns the current state of the ICE transport, so you can determine the state of ICE gathering in which the ICE agent currently is operating.
[Value("state")]
public RTCIceTransportState State { get; }
Property Value
- RTCIceTransportState
A string whose value is one of the following:
Remarks
This differs from the GatheringState, which only indicates whether or not ICE gathering is currently underway.
It also differs from ConnectionState, which aggregates the states across every RTCIceTransport used by every RTCRtpSender and every RTCRtpReceiver on the entire connection.
Methods
AddRemoteCandidate(RTCIceCandidateInit)
[Value("addRemoteCandidate")]
public GlobalObject.Undefined AddRemoteCandidate(RTCIceCandidateInit remoteCandidate = null)
Parameters
remoteCandidateRTCIceCandidateInit
Returns
Gather(RTCIceGatherOptions)
[Value("gather")]
public GlobalObject.Undefined Gather(RTCIceGatherOptions options = null)
Parameters
optionsRTCIceGatherOptions
Returns
GetLocalCandidates()
The getLocalCandidates() method of the RTCIceTransport interface returns an array of RTCIceCandidate objects, one for each of the candidates that have been gathered by the local device during the current {{Glossary("ICE")}} agent session.
[Value("getLocalCandidates")]
public List<RTCIceCandidate> GetLocalCandidates()
Returns
- List<RTCIceCandidate>
A JavaScript {{jsxref("Array")}} containing one RTCIceCandidate object for each candidate that has been identified so far during the ICE candidate gathering session.You can't correlate these local candidates with matching remote candidates.
To find the best match found so far, call GetSelectedCandidatePair().
Remarks
The local candidates are placed in this list by the ICE agent prior to being delivered to the local client's code in an RTCPeerConnection.Icecandidate event so that the client can forward the candidates to the remote peer.
GetLocalParameters()
The getLocalParameters() method of the RTCIceTransport interface returns an RTCIceParameters object that provides information uniquely identifying the local peer for the duration of the ICE session.
[Value("getLocalParameters")]
public RTCIceParameters? GetLocalParameters()
Returns
- RTCIceParameters
An RTCIceParameters object indicating the UsernameFragment and Password which uniquely identify the local peer for the duration of the ICE session.Returns
nullif the parameters have not yet been received.
Remarks
The local peer's parameters are obtained during ICE signaling and delivered to the transport when the client calls SetLocalDescription(RTCLocalSessionDescriptionInit).
GetRemoteCandidates()
The getRemoteCandidates() method of the RTCIceTransport interface returns an array that contains one RTCIceCandidate for each of the candidates that have been received from the remote peer so far during the current {{Glossary("ICE")}} gathering session.
[Value("getRemoteCandidates")]
public List<RTCIceCandidate> GetRemoteCandidates()
Returns
- List<RTCIceCandidate>
An array containing one RTCIceCandidate object for each candidate that has been received so far from the remote peer during the current ICE candidate gathering session.It's important to keep in mind that there's no way to correlate these remote candidates with compatible local candidates.
To find the best match found so far, call GetSelectedCandidatePair().
Remarks
Each time your signaling code calls AddIceCandidate(RTCIceCandidateInit) to add a received candidate to the ICE session, the ICE agent places it in the list returned by this function.
GetRemoteParameters()
The getRemoteParameters() method of the RTCIceTransport interface returns an RTCIceParameters object that provides information uniquely identifying the remote peer for the duration of the ICE session.
[Value("getRemoteParameters")]
public RTCIceParameters? GetRemoteParameters()
Returns
- RTCIceParameters
An RTCIceParameters object indicating the UsernameFragment and Password which uniquely identify the remote peer for the duration of the ICE session.Returns
nullif the parameters haven't been received yet.
Remarks
The remote peer's parameters are received during ICE signaling and delivered to the transport when the client calls SetRemoteDescription(RTCSessionDescriptionInit).
GetSelectedCandidatePair()
The getSelectedCandidatePair() method of the RTCIceTransport interface returns an RTCIceCandidatePair object containing the current best-choice pair of {{Glossary("ICE")}} candidates describing the configuration of the endpoints of the transport.
[Value("getSelectedCandidatePair")]
public RTCIceCandidatePair? GetSelectedCandidatePair()
Returns
- RTCIceCandidatePair
A RTCIceCandidatePair object describing the configurations of the currently-selected candidate pair's two endpoints.
Local describes the configuration of the local end of the connection, while Remote describes the remote peer's configuration.The return value isnullif no pair of candidates has been selected yet.
Remarks
Start(RTCIceParameters, RTCIceRole)
[Value("start")]
public GlobalObject.Undefined Start(RTCIceParameters remoteParameters = null, RTCIceRole role = RTCIceRole.Unknown)
Parameters
remoteParametersRTCIceParametersroleRTCIceRole
Returns
Stop()
[Value("stop")]
public GlobalObject.Undefined Stop()