RTCIceTransport: gatheringState property

Baseline 2024
Newly available

Since April 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

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".

You can detect when the value of this property changes by watching for an event of type gatheringstatechange.

Note that gatheringState represents the gathering state of just this transport, while RTCPeerConnection.iceGatheringState represents the overall gathering state of the whole connection, including every RTCIceTransport used by every RTCRtpSender and every RTCRtpReceiver on the entire connection.

Value

A string that indicates the current state of the ICE agent's candidate gathering process:

"new"

The RTCIceTransport is newly created and has not yet started to gather ICE candidates.

"gathering"

The transport is in the process of gathering candidates.

"complete"

The transport has finished gathering ICE candidates and has sent the end-of-candidates indicator to the remote device. The transport won't gather any further candidates unless an ICE restart occurs, at which point the gathering process starts over from scratch.

Specifications

Specification
WebRTC: Real-Time Communication in Browsers
# dom-icetransport-gatheringstate

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
gatheringState
Chrome – Full support
Chrome 75 (Release date: 2019-06-04)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 125 (Release date: 2024-04-16)
footnote Full support
Opera – Full support
Opera 62 (Release date: 2019-06-27)
footnote Full support
Safari – Full support
Safari 11 (Release date: 2017-09-19)
footnote Full support
Chrome Android – Full support
Chrome Android 75 (Release date: 2019-06-04)
footnote Full support
Firefox for Android – Full support
Firefox for Android 125 (Release date: 2024-04-16)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 11 (Release date: 2017-09-19)
footnote Full support
Samsung Internet – Full support
Samsung Internet 11 (Release date: 2019-12-05)
footnote Full support
WebView Android – Full support
WebView Android 75 (Release date: 2019-06-04)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11 (Release date: 2017-09-19)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support