RTCPeerConnection: getTransceivers() method

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

* Some parts of this feature may have varying levels of support.

The getTransceivers() method of the RTCPeerConnection interface returns a list of the RTCRtpTransceiver objects being used to send and receive data on the connection.

Syntax

js
getTransceivers()

Parameters

None.

Return value

An array of the RTCRtpTransceiver objects representing the transceivers handling sending and receiving all media on the RTCPeerConnection. The array is in the order in which the transceivers were added to the connection. The array does not include transceivers that have already been stopped (following offer/answer).

Examples

The following snippet of code stops all transceivers associated with an RTCPeerConnection.

js
pc.getTransceivers().forEach((transceiver) => {
  transceiver.stop();
});

Specifications

Specification
WebRTC: Real-Time Communication in Browsers
# dom-peerconnection-gettranseceivers

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
getTransceivers
Chrome – Full support
Chrome 69 (Release date: 2018-09-04)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 59 (Release date: 2018-03-13)
footnote Full support
Opera – Full support
Opera 56 (Release date: 2018-09-25)
footnote Full support
Safari – Full support
Safari 11 (Release date: 2017-09-19)
footnote Full support
Chrome Android – Full support
Chrome Android 69 (Release date: 2018-09-04)
footnote Full support
Firefox for Android – Full support
Firefox for Android 59 (Release date: 2018-03-13)
footnote Full support
Opera Android – Full support
Opera Android 48 (Release date: 2018-11-08)
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 10 (Release date: 2019-08-22)
footnote Full support
WebView Android – Full support
WebView Android 79 (Release date: 2019-12-17)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11 (Release date: 2017-09-19)
footnote Full support
Stopped transcievers not returned
Chrome – Full support
Chrome 88 (Release date: 2021-01-19)
footnote Full support
Edge – Full support
Edge 88 (Release date: 2021-01-21)
footnote Full support
Firefox – Full support
Firefox 118 (Release date: 2023-09-26)
footnote Full support
Opera – Full support
Opera 74 (Release date: 2021-02-02)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 88 (Release date: 2021-01-19)
footnote Full support
Firefox for Android – Full support
Firefox for Android 118 (Release date: 2023-09-26)
footnote Full support
Opera Android – Full support
Opera Android 63 (Release date: 2021-04-16)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 15 (Release date: 2021-08-13)
footnote Full support
WebView Android – Full support
WebView Android 88 (Release date: 2021-01-19)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

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

Full support
Full support
No support
No support

See also