8.6 Mandatory To Implement Stats
The stats listed in [WEBRTC-STATS] are intended to cover a wide range of use cases. Not all of them have to be implemented by every WebRTC implementation.
An implementation MUST support generating statistics of the following type
s when the corresponding objects exist on a RTCPeerConnection
, with the fields that are listed when they are valid for that object in addition to the generic fields defined in the RTCStats
dictionary:
RTCStatsType | Dictionary | Fields |
---|
“codec “ | RTCCodecStats | payloadType , codecType , mimeType , clockRate , channels , sdpFmtpLine |
---|
“inbound-rtp “ | RTCRtpStreamStats | ssrc , kind , transportId , codecId |
---|
RTCReceivedRtpStreamStats | packetsReceived , packetsLost , jitter , packetsDiscarded , framesDropped |
RTCInboundRtpStreamStats | receiverId , remoteId , framesDecoded , nackCount , framesReceived , bytesReceived , totalAudioEnergy , totalSamplesDuration |
“outbound-rtp “ | RTCRtpStreamStats | ssrc , kind , transportId , codecId |
---|
RTCSentRtpStreamStats | packetsSent , bytesSent |
RTCOutboundRtpStreamStats | senderId , remoteId , framesEncoded , nackCount , framesSent |
“remote-inbound-rtp “ | RTCRtpStreamStats | ssrc , kind , transportId , codecId |
---|
RTCReceivedRtpStreamStats | packetsReceived , packetsLost , jitter , packetsDiscarded , framesDropped |
RTCRemoteInboundRtpStreamStats | localId , roundTripTime |
“remote-outbound-rtp “ | RTCRtpStreamStats | ssrc , kind , transportId , codecId |
---|
RTCSentRtpStreamStats | packetsSent , bytesSent |
RTCRemoteOutboundRtpStreamStats | localId , remoteTimestamp |
“media-source “ | RTCMediaSourceStats | trackIdentifier , kind |
---|
RTCAudioSourceStats | totalAudioEnergy , totalSamplesDuration (for audio tracks attached to senders) |
RTCVideoSourceStats | width , height , framesPerSecond (for video tracks attached to senders) |
“peer-connection “ | RTCPeerConnectionStats | dataChannelsOpened , dataChannelsClosed |
---|
“data-channel “ | RTCDataChannelStats | label , protocol , dataChannelIdentifier , state , messagesSent , bytesSent , messagesReceived , bytesReceived |
---|
“sender “ | RTCMediaHandlerStats | trackIdentifier |
---|
“receiver “ |
---|
“transport “ | RTCTransportStats | bytesSent , bytesReceived , selectedCandidatePairId , localCertificateId , remoteCertificateId |
---|
“candidate-pair “ | RTCIceCandidatePairStats | transportId , localCandidateId , remoteCandidateId , state , nominated , bytesSent , bytesReceived , totalRoundTripTime , currentRoundTripTime |
---|
“local-candidate “ | RTCIceCandidateStats | address , port , protocol , candidateType , url |
---|
“remote-candidate “ |
---|
“certificate “ | RTCCertificateStats | fingerprint , fingerprintAlgorithm , base64Certificate , issuerCertificateId |
---|
An implementation MAY support generating any other statistic defined in [WEBRTC-STATS], and MAY generate statistics that are not documented.