W3cubDocs

/Web APIs

RTCStatsReport

The RTCStatsReport interface provides a statistics report obtained by calling one of the RTCPeerConnection.getStats(), RTCRtpReceiver.getStats(), and RTCRtpSender.getStats() methods.

This statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data.

Calling getStats() on an RTCPeerConnection lets you specify whether you wish to obtain statistics for outbound, inbound, or all streams on the connection. The RTCRtpReceiver and RTCRtpSender versions of getStats() specifically only return statistics available to the incoming or outgoing stream on which you call them.

The statistics objects

For each category of statistic information, there is a dictionary whose properties provide the relevant information.

Instance properties common to all statistic categories

All WebRTC statistics objects are fundamentally based on the RTCStats dictionary, which provides the most fundamental information: the timestamp, the statistic type string, and an ID uniquely identifying the source of the data.

The statistic categories

The type gives the name of the statistic category represented by the object, and is how you locate the specific type of data you need.

Specifications

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
@@iterator 58 79 48 No 45 11 58 58 48 43 11 7.0
RTCStatsReport 58 79 27 No 45 11 58 58 27 43 11 7.0
entries 58 79 48 No 45 11 58 58 48 43 11 7.0
forEach 58 79 27 No 45 11 58 58 27 43 11 7.0
get 58 79 27 No 45 11 58 58 27 43 11 7.0
has 58 79 27 No 45 11 58 58 27 43 11 7.0
keys 58 79 48 No 45 11 58 58 48 43 11 7.0
size 59 79 48 No 46 11 59 59 48 43 11 7.0
values 58 79 48 No 45 11 58 58 48 43 11 7.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport