interface provides a statistics report obtained by calling one of the
This statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data.
lets you specify whether you wish to obtain statistics for outbound, inbound, or all streams on the connection. The
specifically only return statistics available to the incoming or outgoing stream on which you call them.
For each category of statistic information, there is a dictionary whose properties provide the relevant information.
All WebRTC statistics objects are fundamentally based on the
dictionary, which provides the most fundamental information: the timestamp, the statistic type string, and an ID uniquely identifying the source of the data:
DOMStringwhich uniquely identifies the object which was inspected to produce this object based on
DOMHighResTimeStampobject indicating the time at which the sample was taken for this statistics object.
DOMStringindicating the type of statistics the object contains, taken from the enum type
gives the name of the statistic category represented by the object, and is how you locate the specific type of data you need. The statistic category names are members of the enumerated type
, as follows:
RTCIceCandidatePairStatsobject providing statistics related to an
RTCIceTransport. Candidate pairs other than the currently active pair for the transport are deleted when the
newduring an ICE restart . The active candidate pair is deleted after the transport switches to another candidate pair; this change cannot be detected otherwise.
RTCCertificateStatsobject providing statistics related to a certificate being used by an
RTCCodecStatsobject containing statistics about a codec currently being used by RTP streams to send or receive data for the
RTCContributingSourceStatsobject which contains statistics related to a contributing source (CSRC) that contributed to an inbound RTP stream.
RTCDataChannelStatsobject which contains statistics about each
RTCDataChannelon the connection.
RTCInboundRtpStreamStatsobject providing statistics about inbound data being received from remote peers. Since this only provides statistics related to inbound data, without considering the local peer's state, any values that require knowledge of both, such as round-trip time, is not included. This report isn't available if there are no connected peers.
RTCIceCandidateStatsobject giving statistics about an ICE local candidate; these candidates are found in the output from
RTCOutboundRtpStreamStatsobject providing statistics based on the local peer's outgoing data being sent to its peers. This information considers only the outbound RTP stream, so any data which requires information about the state of the remote peers (such as round-trip time) is unavailable, since those values can't be computed without knowing about the other peers' states.
RTCPeerConnectionStatsobject provides statistics related to the overall peer connection's
RTCRtpReceiver. The statistics object is an
video, the object is an
RTCIceCandidateStatsobject containing statistics about the remote candidate's
RTCIceTransport. This may include information such as the type of network, the protocol, the URL, the type of relay being used, and so forth.
RTCRemoteInboundRtpStreamStatsobject providing statistics about your outbound RTP data stream, but from the perspective of the remote peer. That is, this information is about your
outbound-rtpstream, but as seen by the remote device that's handling the stream. You can use this information to do things like determine how well the remote peer is receiving data.
RTCRemoteOutboundRtpStreamStatsobject that contains statistics about your inbound RTP (
inbound-rtp) stream, but from the perspective of the remote peer.
RTCRtpSenderfor a stream on the
"audio", this object is of type
"video", this is an
RTCMediaStreamStats, providing statistics and information about a
MediaStreamwhich is part of the
RTCMediaHandlerStats: for audio tracks, the type is
RTCSenderAudioTrackAttachmentStatsand for video tracks, the type is
RTCSenderVideoTrackAttachmentStats. The data within provides statistics related to a particular
MediaStreamTrack's attachment to an
RTCRtpSender; also included are the media level metrics that go along with the track.
RTCPeerConnection. The object is of type
... coming soon-ish ...
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCStatsReport' in that specification.
||Chrome No||Edge No||Firefox No||IE No||Opera No||Safari No||WebView Android No||Chrome Android No||Firefox Android No||Opera Android No||Safari iOS No||Samsung Internet Android No|