RTCPeerConnection: getReceivers() 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 getReceivers() method of the RTCPeerConnection interface returns an array of RTCRtpReceiver objects, each of which represents one RTP receiver. Each RTP receiver manages the reception and decoding of data for a MediaStreamTrack on an RTCPeerConnection.

Syntax

js
getReceivers()

Return value

An array of RTCRtpReceiver objects, one for each track on the connection. The array is empty if there are no RTP receivers on the connection.

The order of the returned RTCRtpReceiver instances is not defined by the specification, and may change from one call to getReceivers() to the next.

The array does not include receivers associated with transceivers that have been stopped (following offer/answer).

Example

tbd

Specifications

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

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
getReceivers
Receivers for stopped transceivers not returned

Legend

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

Full support
Full support
No support
No support

See also