--- title: RTCStats slug: Web/API/RTCStats tags: - API - Dictionary - NeedsTranslation - RTCStats - Reference - Report - Statistics - Stats - TopicStub - WebRTC - rtc translation_of: Web/API/RTCStats ---
{{APIRef("WebRTC")}}

The RTCStats dictionary is the basic statistics object used by WebRTC's statistics monitoring model, providing the properties required of all statistics data objects. Specific classes of statistic are defined as dictionaries based on RTCStats. For example, statistics about a received {{Glossary("RTP")}} stream are represented by {{domxref("RTCReceivedRtpStreamStats")}}.

Properties

{{domxref("RTCStats.id", "id")}}
A {{domxref("DOMString")}} which uniquely identifies the object which was inspected to produce this object based on RTCStats.
{{domxref("RTCStats.timestamp", "timestamp")}}
A {{domxref("DOMHighResTimeStamp")}} object indicating the time at which the sample was taken for this statistics object.
{{domxref("RTCStats.type", "type")}}
A {{domxref("DOMString")}} indicating the type of statistics the object contains, taken from the enum type {{domxref("RTCStatsType")}}.

The statistics type hierarchy

The various dictionaries that are used to define the contents of the objects that contain each of the various types of statistics for WebRTC are structured in such a way that they build upon the core RTCStats dictionary, each layer adding more relevant information.

Specifications

Specification Status Comment
{{ SpecName('WebRTC 1.0', '#dom-rtcstats', 'RTCStats') }} {{ Spec2('WebRTC 1.0') }} Initial specification.

Browser compatibility

{{Compat("api.RTCStats")}}