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

Specification
WebRTC: Real-Time Communication in Browsers
# rtcstatsreport-object

Browser compatibility

BCD tables only load in the browser

See also