RTCPeerConnection.getReceivers()
The RTCPeerConnection.getReceivers()
method 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
var receivers = rtcPeerConnection.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.
Example
tbd
Specifications
Specification |
---|
WebRTC 1.0: Real-Time Communication Between Browsers (WebRTC 1.0) # dom-peerconnection-getreceivers |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
getReceivers |
59 |
79 |
34 |
No |
46 |
11 |
59 |
59 |
34 |
43 |
11 |
6.0 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/getReceivers