This feature is well established and works across many devices and browser versions. It’s been available across browsers since February 2020.
* Some parts of this feature may have varying levels of support.
The RTCRemoteInboundRtpStreamStats dictionary of the WebRTC API is used to report statistics from the remote endpoint about a particular incoming RTP stream. These will correspond to an outgoing RTP stream at the local end of the RTCPeerConnection.
The statistics can be obtained by iterating the RTCStatsReport returned by RTCPeerConnection.getStats() or RTCRtpReceiver.getStats() until you find a report with the type of remote-inbound-rtp.
fractionLost Optional
A number indicating the fraction of packets lost for this SSRC since the last sender or receiver report.
localId Optional
A string that is used to find the local RTCOutboundRtpStreamStats object that shares the same synchronization source (SSRC).
roundTripTime Optional
A number that indicates the estimated round trip time (RTT) for this SSRC, in seconds. This property will not exist until valid RTT data has been received.
roundTripTimeMeasurements Optional
A positive integer indicating the total number of valid round trip time measurements received for this synchronization source (SSRC).
totalRoundTripTime Optional
A number indicating the cumulative sum of all round trip time measurements since the beginning of the session, in seconds. The average round trip time can be computed by dividing totalRoundTripTime by roundTripTimeMeasurements.
jitter Optional
A number indicating the packet jitter for this synchronization source, measured in seconds.
packetsLost Optional
An integer indicating the total number of RTP packets lost for this SSRC, as measured at the remote endpoint. This value can be negative if duplicate packets were received.
packetsReceived Optional Experimental
A positive integer indicating the total number of RTP packets received for this SSRC, including retransmissions.
codecId Optional
A string that uniquely identifies the object that was inspected to produce the RTCCodecStats object associated with this RTP stream.
kindA string indicating whether the MediaStreamTrack associated with the stream is an audio or a video track.
ssrcA positive integer that identifies the SSRC of the RTP packets in this stream.
transportId Optional
A string that uniquely identifies the object which was inspected to produce the RTCTransportStats object associated with this RTP stream.
The following properties are common to all WebRTC statistics objects.
idA string that uniquely identifies the object that is being monitored to produce this set of statistics.
timestampA DOMHighResTimeStamp object indicating the time at which the sample was taken for this statistics object.
typeA string with the value "inbound-rtp", indicating the type of statistics that the object contains.
Given a variable peerConnection that is an instance of an RTCPeerConnection, the code below uses await to wait for the statistics report, and then iterates it using RTCStatsReport.forEach(). It then filters the dictionaries for just those reports that have the type of remote-inbound-rtp and logs the result.
const stats = await myPeerConnection.getStats();
stats.forEach((report) => {
if (report.type === "remote-inbound-rtp") {
console.log("Remote Inbound RTP Stream Stats:");
console.log(`id: ${report.id}`);
console.log(`timestamp: ${report.timestamp}`);
console.log(`transportId: ${report.transportId}`);
console.log(`ssrc: ${report.ssrc}`);
console.log(`kind: ${report.kind}`);
console.log(`codecId: ${report.codecId}`);
console.log(`packetsReceived: ${report.packetsReceived}`);
console.log(`packetsLost: ${report.packetsLost}`);
console.log(`jitter: ${report.jitter}`);
console.log(`totalRoundTripTime: ${report.totalRoundTripTime}`);
console.log(
`roundTripTimeMeasurements: ${report.roundTripTimeMeasurements}`,
);
console.log(`roundTripTime: ${report.roundTripTime}`);
console.log(`localId: ${report.localId}`);
console.log(`fractionLost: ${report.fractionLost}`);
}
});
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
RTCRemoteInboundRtpStreamStats |
80 | 80 | 27 | 67 | 11 | 80 | 27 | 57 | 11 | 13.0 | 80 | 11 |
codecId |
80 | 80 | 98 | 67 | 11 | 80 | 98 | 57 | 11 | 13.0 | 80 | 11 |
fractionLost |
91 | 91 | 106 | 77 | No | 91 | 106 | 64 | No | 16.0 | 91 | No |
id |
80 | 80 | 72 | 67 | 14.1 | 80 | 79 | 57 | 14.5 | 13.0 | 80 | 14.5 |
jitter |
80 | 80 | 72 | 67 | No | 80 | 79 | 57 | No | 13.0 | 80 | No |
kind |
80 | 80 | 63 | 67 | 14 | 80 | 63 | 57 | 14 | 13.0 | 80 | 14 |
localId |
80 | 80 | 72 | 67 | 14.1 | 80 | 79 | 57 | 14.5 | 13.0 | 80 | 14.5 |
packetsLost |
80 | 80 | 72 | 67 | No | 80 | 79 | 57 | No | 13.0 | 80 | No |
packetsReceived |
No | No | 72 | No | No | No | 79 | No | No | No | No | No |
roundTripTime |
80 | 80 | 96 | 67 | 14.1 | 80 | 96 | 57 | 14.5 | 13.0 | 80 | 14.5 |
roundTripTimeMeasurements |
91 | 91 | 106 | 77 | No | 91 | 106 | 64 | No | 16.0 | 91 | No |
ssrc |
80 | 80 | 27 | 67 | 11 | 80 | 27 | 57 | 11 | 13.0 | 80 | 11 |
timestamp |
80 | 80 | 72 | 67 | 14.1 | 80 | 79 | 57 | 14.5 | 13.0 | 80 | 14.5 |
totalRoundTripTime |
91 | 91 | 106 | 77 | No | 91 | 106 | 64 | No | 16.0 | 91 | No |
transportId |
80 | 80 | No | 67 | 11 | 80 | No | 57 | 11 | 13.0 | 80 | 11 |
type |
80 | 80 | 72 | 67 | 14.1 | 80 | 79 | 57 | 14.5 | 13.0 | 80 | 14.5 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats