RTCStatsType
enumerated type (enum) is a set of strings which define the
type
of statistics reported in a record found in the
RTCStatsReport
对象。
This type determines which of the
RTCStats
-based dictionaries the record is based upon.
candidate-pair
RTCIceCandidatePairStats
object providing statistics related to an
RTCIceTransport
. Candidate pairs other than the currently active pair for the transport are deleted when the
RTCPeerConnection
changes its
RTCPeerConnection.iceGatheringState
to
new
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
RTCCertificateStats
object providing statistics related to a certificate being used by an
RTCIceTransport
.
codec
RTCCodecStats
object containing statistics about a codec currently being used by
RTP
streams to send or receive data for the
RTCPeerConnection
.
csrc
RTCContributingSourceStats
object which contains statistics related to a contributing source (CSRC) that contributed to an inbound RTP stream.
data-channel
RTCDataChannelStats
object which contains statistics about each
RTCDataChannel
on the connection.
inbound-rtp
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
RTCIceCandidateStats
object giving statistics about an ICE local candidate; these candidates are found in the output from
RTCIceTransport.getLocalCandidates()
.
outbound-rtp
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
RTCPeerConnectionStats
object provides statistics related to the overall peer connection's
RTCPeerConnection
.
receiver
RTCRtpReceiver
. The statistics object is an
RTCAudioReceiverStats
object if
kind
is
audio
;若
kind
is
视频
, the object is an
RTCVideoReceiverStats
对象。
remote-candidate
RTCIceCandidateStats
object 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.
remote-inbound-rtp
RTCRemoteInboundRtpStreamStats
object providing statistics about your outbound RTP data stream, but from the perspective of the remote peer. That is, this information is about your
outbound-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
RTCRemoteOutboundRtpStreamStats
object that contains statistics about your inbound RTP (
inbound-rtp
) stream, but from the perspective of the remote peer.
sender
RTCRtpSender
for a stream on the
RTCPeerConnection
。若
kind
is
"audio"
, this object is of type
RTCAudioSenderStats
;若
kind
is
"video"
, this is an
RTCVideoSenderStats
对象。
stream
RTCMediaStreamStats
, providing statistics and information about a
MediaStream
which is part of the
RTCPeerConnection
.
track
RTCMediaHandlerStats
: for audio tracks, the type is
RTCSenderAudioTrackAttachmentStats
and 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.
transport
RTCPeerConnection
. The object is of type
RTCTransportStats
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Identifiers for WebRTC's Statistics API
The definition of 'RTCStatsType' in that specification. |
候选推荐 | 初始定义。 |
No compatibility data found. Please contribute data for "api.RTCStatsType" (depth: 1) to the MDN 兼容性数据存储库 .
RTCStatsType
MediaDevices.getUserMedia()
Navigator.mediaDevices
RTCCertificate
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCDataChannel
RTCDataChannelEvent
RTCDtlsTransport
RTCErrorEvent
RTCIceCandidate
RTCIceTransport
RTCPeerConnection
RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent
RTCRtpReceiver
RTCRtpSender
RTCRtpTransceiver
RTCSctpTransport
RTCSessionDescription
RTCStatsEvent
RTCStatsReport
RTCTrackEvent