Firefox Tomorrow

web api interface

RTCIceTransport

View on MDN ↗

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.

Instance properties

The RTCIceTransport interface inherits properties from its parent, EventTarget. It also offers the following properties:

  • component Read only
    • : The ICE component being used by the transport. The value is one of the strings from the RTCIceTransport enumerated type: ["RTP"](https://developer.mozilla.org/en-US/docs/Glossary/RTP) or "RTSP".
  • gatheringState Read only
    • : A string indicating which current gathering state of the ICE agent: "new", "gathering", or "complete".
  • role Read only
    • : Returns a string whose value is either "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 Read only
    • : A string indicating what the current state of the ICE agent is. The value of 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.

Instance methods

Also includes methods from EventTarget, the parent interface.

Events

Listen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface.

  • gatheringstatechange
    • : Sent to the RTCIceTransport object to indicate that the value of the gatheringState property has changed, indicating a change in this transport’s ICE candidate negotiation process. Also available through the ongatheringstatechange event handler property.
  • selectedcandidatepairchange
    • : Sent to the 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 getSelectedCandidatePair(). Also available using the onselectedcandidatepairchange event handler property.
  • statechange
    • : Sent to the RTCIceTransport instance when the value of the state property has changed, indicating that the ICE gathering process has changed state. Also available through the onstatechange event handler property.

Examples

tbd

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.