RTCStatsType
The RTCStatsType
enumerated type (enum) is a set of strings which define the type
of statistics reported in a record found in the RTCStatsReport
object.
This type determines which of the RTCStats
-based dictionaries the record is based upon.
Values
candidate-pair
-
An
RTCIceCandidatePairStats
object providing statistics related to anRTCIceTransport
. Candidate pairs other than the currently active pair for the transport are deleted when theRTCPeerConnection
changes itsRTCPeerConnection.iceGatheringState
tonew
during an ICE restart. The active candidate pair is deleted after the transport switches to another candidate pair; this change cannot be detected otherwise. certificate
-
An
RTCCertificateStats
object providing statistics related to a certificate being used by anRTCIceTransport
. codec
-
An
RTCCodecStats
object containing statistics about a codec currently being used by RTP streams to send or receive data for theRTCPeerConnection
. csrc
-
An
RTCContributingSourceStats
object which contains statistics related to a contributing source (CSRC) that contributed to an inbound RTP stream. data-channel
-
An
RTCDataChannelStats
object which contains statistics about eachRTCDataChannel
on the connection. inbound-rtp
-
An
RTCInboundRtpStreamStats
object 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. local-candidate
-
An
RTCIceCandidateStats
object giving statistics about an ICE local candidate; these candidates are found in the output fromRTCIceTransport.getLocalCandidates()
. outbound-rtp
-
The report is an
RTCOutboundRtpStreamStats
object 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. peer-connection
-
A
RTCPeerConnectionStats
object provides statistics related to the overall peer connection'sRTCPeerConnection
. receiver
-
Provides statistics about a specific
RTCRtpReceiver
. The statistics object is anRTCAudioReceiverStats
object ifkind
isaudio
; ifkind
isvideo
, the object is anRTCVideoReceiverStats
object. remote-candidate
-
The report is an
RTCIceCandidateStats
object containing statistics about the remote candidate'sRTCIceTransport
. This may include information such as the type of network, the protocol, the URL, the type of relay being used, and so forth. remote-inbound-rtp
-
The report is an
RTCRemoteInboundRtpStreamStats
object providing statistics about your outbound RTP data stream, but from the perspective of the remote peer. That is, this information is about youroutbound-rtp
stream, 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. remote-outbound-rtp
-
The report is an
RTCRemoteOutboundRtpStreamStats
object that contains statistics about your inbound RTP (inbound-rtp
) stream, but from the perspective of the remote peer. sender
-
An object containing statistics about the
RTCRtpSender
for a stream on theRTCPeerConnection
. Ifkind
is"audio"
, this object is of typeRTCAudioSenderStats
; ifkind
is"video"
, this is anRTCVideoSenderStats
object. stream
-
An object of type
RTCMediaStreamStats
, providing statistics and information about aMediaStream
which is part of theRTCPeerConnection
. track
-
The object is one of the types based on
RTCMediaHandlerStats
: for audio tracks, the type isRTCSenderAudioTrackAttachmentStats
and for video tracks, the type isRTCSenderVideoTrackAttachmentStats
. The data within provides statistics related to a particularMediaStreamTrack
's attachment to anRTCRtpSender
; also included are the media level metrics that go along with the track. transport
-
An object that contains statistics related to a transport for an
RTCPeerConnection
. The object is of typeRTCTransportStats
.
Specifications
No specification data found for api.RTCStatsType
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Browser compatibility
No compatibility data found for api.RTCStatsType
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsType