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
RTCIceCandidatePairStatsobject providing statistics related to anRTCIceTransport. Candidate pairs other than the currently active pair for the transport are deleted when theRTCPeerConnectionchanges itsRTCPeerConnection.iceGatheringStatetonewduring 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
RTCCertificateStatsobject providing statistics related to a certificate being used by anRTCIceTransport. codec- An
RTCCodecStatsobject containing statistics about a codec currently being used by RTP streams to send or receive data for theRTCPeerConnection. csrc- An
RTCContributingSourceStatsobject which contains statistics related to a contributing source (CSRC) that contributed to an inbound RTP stream. data-channel- An
RTCDataChannelStatsobject which contains statistics about eachRTCDataChannelon the connection. inbound-rtp- An
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. local-candidate- An
RTCIceCandidateStatsobject giving statistics about an ICE local candidate; these candidates are found in the output fromRTCIceTransport.getLocalCandidates(). outbound-rtp- The report is an
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. peer-connection- A
RTCPeerConnectionStatsobject provides statistics related to the overall peer connection'sRTCPeerConnection. receiver- Provides statistics about a specific
RTCRtpReceiver. The statistics object is anRTCAudioReceiverStatsobject ifkindisaudio; ifkindisvideo, the object is anRTCVideoReceiverStatsobject. remote-candidate- The report is an
RTCIceCandidateStatsobject 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
RTCRemoteInboundRtpStreamStatsobject providing statistics about your outbound RTP data stream, but from the perspective of the remote peer. That is, this information is about youroutbound-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. remote-outbound-rtp- The report is an
RTCRemoteOutboundRtpStreamStatsobject 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
RTCRtpSenderfor a stream on theRTCPeerConnection. Ifkindis"audio", this object is of typeRTCAudioSenderStats; ifkindis"video", this is anRTCVideoSenderStatsobject. stream- An object of type
RTCMediaStreamStats, providing statistics and information about aMediaStreamwhich is part of theRTCPeerConnection. track- The object is one of the types based on
RTCMediaHandlerStats: for audio tracks, the type isRTCSenderAudioTrackAttachmentStatsand 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
| Specification | Status | Comment |
|---|---|---|
| Identifiers for WebRTC's Statistics API The definition of 'RTCStatsType' in that specification. |
Candidate Recommendation | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
No compatibility data found. Please contribute data for "api.RTCStatsType" (depth: 1) to the MDN compatibility data repository.
