Nos bénévoles n'ont pas encore traduit cet article en Français. Inscrivez-vous et aidez-nous à réaliser cette tâche !
Vous pouvez également lire cet article en English (US).

This page is not complete.

This page is currently incomplete and under active construction. Please be aware that it's not going to answer all of your questions just yet.

The RTCStatsReport dictionary is contains statistics data about WebRTC connections as returned by the RTCPeerConnection.getStats(), RTCRtpReceiver.getStats(), and RTCRtpSender.getStats() methods. This object consists of a mapping of strings which identify a category of statistics to objects which contains the various measured values for each.

Calling getStats() on an RTCPeerConnection lets you specifiy 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 the incoming and outgoing streams, respectively.

The RTCStats subdictionaries

The full RTCStatsReport interface is made up of a mapping of strings to subdictionaries which contain the statistics for each category, such as ICE candidate or media stream statistics. Each of these subdictionaries has in common the following values:

A DOMHighResTimeStamp object which indicates the time at which the data was handled by the local WebRTC layer; for example, for statistics related to received RCTP packets, this would indicate the time at which the data was received by the local endpoint (the remote timestamp is available as well in one of the fields defined within one of the other subdictionaries. The time is specified relative to the UNIX epoch (the first moment of January 1, 1970, UTC).
A string, taken from the enum type RTCStatsType,
A DOMString which uniquely identifies the object which was inspected to produce this object based on RTCStats. This allows any two RTCStats-based objects which were produced from the same data to be correlated to one another. The format of this ID is not defined by the specification, so it cannot be relied upon to have any particular format, structure, or meaning beyond that.

From a definition standpoint, these values are defined in the RTCStats dictionary in RTCStatsReport's WebIDL file.

Using RTCStatsReport



Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCStatsReport' in that specification.
Candidate Recommendation Initial specification.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
RTCStatsReportChrome No support NoEdge ? Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No


No support  
No support
Compatibility unknown  
Compatibility unknown

See also

Étiquettes et contributeurs liés au document

Contributeurs à cette page : Sheppy, mdnwebdocs-bot, fscholz
Dernière mise à jour par : Sheppy,