Nuestros voluntarios aún no han traducido este artículo al Español. ¡Únete a nosotros y ayúdanos a traducirlo!
También puedes leer el artículo en English (US).

Draft
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:

timestamp
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).
type
A string, taken from the enum type RTCStatsType,
id
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

 

Specifications

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
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox 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 NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

No support  
No support
Compatibility unknown  
Compatibility unknown

See also

Etiquetas y colaboradores del documento

Colaboradores en esta página: Sheppy, mdnwebdocs-bot, fscholz
Última actualización por: Sheppy,