The RTCRtpReceiver interface of the the WebRTC API manages the reception and decoding of data for a MediaStreamTrack on an RTCPeerConnection.
Properties
RTCRtpReceiver.trackRead only- Returns the
MediaStreamTrackassociated with the currentRTCRtpReceiverinstance. RTCRtpReceiver.transportRead only- Returns the
RTCDtlsTransportinstance over which the media for the receiver's track is received. RTCRtpReceiver.rtcpTransportRead only- Returns the
RTCDtlsTransportinstance over which RTCP is sent and received.
Methods
RTCRtpReceiver.getCapabilities()- Returns the most optimistic view of the capabilities of the system for receiving media of the given kind.
RTCRtpReceiver.getParameters()- Returns an
RTCRtpParametersobject which contains information about how the RTC data is to be decoded. RTCRtpReceiver.getContributingSources()- Returns an array of
RTCRtpContributingSourceinstances for each unique CSRC (contributing source) identifier received by the currentRTCRtpReceiverin the last ten seconds. RTCRtpReceiver.getSynchronizationSources()- Returns an array including one
RTCRtpSynchronizationSourceinstance for each unique SSRC (synchronization source) identifier received by the currentRTCRtpReceiverin the last ten seconds. RTCRtpReceiver.getStats()- Returns a
Promisewhose fulfillment handler receives aRTCStatsReportwhich contains statistics about the incoming streams and their dependencies.
Specifications
| Specification | Status | Comment |
|---|---|---|
| WebRTC 1.0: Real-time Communication Between Browsers The definition of 'RTCRtpReceiver' in that specification. |
Candidate Recommendation | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
| Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | 59 | ? | Yes | ? | No | ? |
track | 59 | 12 | ? | ? | No | ? |
transport | 59 | 12 | Yes | ? | No | ? |
rtcpTransport | 59 | 12 | Yes | ? | No | ? |
getCapabilities | 59 | 12 | Yes | ? | No | ? |
getParameters | 59 | ? | Yes | ? | No | ? |
getContributingSources | 59 | 12 | 59 | ? | No | ? |
getSynchronizationSources | No | ? | 59 | ? | No | ? |
getStats | 58 | ? | 55 | No | 45 | ? |
| Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
|---|---|---|---|---|---|---|---|
| Basic support | 59 | 59 | ? | Yes | No | ? | 7.0 |
track | 59 | 59 | ? | ? | No | ? | 7.0 |
transport | 59 | 59 | ? | Yes | No | ? | 7.0 |
rtcpTransport | 59 | 59 | ? | Yes | No | ? | 7.0 |
getCapabilities | 59 | 59 | ? | Yes | No | ? | 7.0 |
getParameters | 59 | 59 | ? | Yes | No | ? | 7.0 |
getContributingSources | 59 | 59 | ? | 591 | No | ? | 7.0 |
getSynchronizationSources | No | No | ? | 591 | No | ? | No |
getStats | 55 | 58 | Yes | 55 | 45 | ? | 7.0 |
1. From version 59: this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true). To change preferences in Firefox, visit about:config.