files/en-us/web/api/rtcicetransport/index.md
{{APIRef("WebRTC")}}
The RTCIceTransport interface provides access to information about the {{Glossary("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.
{{InheritanceDiagram}}
The RTCIceTransport interface inherits properties from its parent, {{domxref("EventTarget")}}. It also offers the following properties:
RTCIceTransport enumerated type: {{Glossary("RTP", '"RTP"')}} or "RTSP"."new", "gathering", or "complete"."controlling" or "controlled"; this indicates whether the ICE agent is the one that makes the final decision as to the candidate pair to use or not.state can be used to determine whether the ICE agent has made an initial connection using a viable candidate pair ("connected"), made its final selection of candidate pairs ("completed"), or in an error state ("failed"), among other states.Also includes methods from {{domxref("EventTarget")}}, the parent interface.
null if parameters have not yet been received.setRemoteDescription() hasn't been called yet, the return value is null.null.Listen to these events using {{domxref("EventTarget.addEventListener", "addEventListener()")}} or by assigning an event listener to the oneventname property of this interface.
RTCIceTransport object to indicate that the value of the {{domxref("RTCIceTransport.gatheringState", "gatheringState")}} property has changed, indicating a change in this transport's ICE candidate negotiation process.
Also available through the {{domxref("RTCIceTransport.gatheringstatechange_event", "ongatheringstatechange")}} event handler property.RTCIceTransport when a new, better pair of candidates has been selected to describe the connectivity between the two peers. This occurs during negotiation or renegotiation, including after an ICE restart, which reuses the existing RTCIceTransport objects. The current candidate pair can be obtained using {{domxref("RTCIceTransport.getSelectedCandidatePair", "getSelectedCandidatePair()")}}.
Also available using the {{domxref("RTCIceTransport.selectedcandidatepairchange_event", "onselectedcandidatepairchange")}} event handler property.RTCIceTransport instance when the value of the {{domxref("RTCIceTransport.state", "state")}} property has changed, indicating that the ICE gathering process has changed state.
Also available through the {{domxref("RTCIceTransport.statechange_event", "onstatechange")}} event handler property.tbd
{{Specifications}}
{{Compat}}