coderef

WebRTC statisticsBaseline · Widely available

The RTCPeerConnection.getStats(), RTCRtpSender.getStats(), and RTCRtpReceiver.getStats() methods return detailed information about the status, performance, network, and media for a given WebRTC connection.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.

Browser support

DesktopChrome
1–57Not supported
58+Supportedsince Apr 19, 2017
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–43Not supported
44+Supportedsince Jan 26, 2016
Current: 157
Safari
1–10.1Not supported
11+Supportedsince Sep 19, 2017
Current: 27
MobileChrome Android
18–57Not supported
58+Supportedsince Apr 25, 2017
Current: 155
Firefox Android
4–43Not supported
44+Supportedsince Jan 26, 2016
Current: 157
Safari iOS
1–10.3Not supported
11+Supportedsince Sep 19, 2017
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: getStats.

Feature detection

JS · check before using
if ("RTCStatsReport" in globalThis) {
  // RTCStatsReport is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (258). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
RTCPeerConnection.getStats56154411564411
RTCPeerConnection.getStats.returns_promise58794411584411
RTCPeerConnection.getStats.selector_parameter67794411674411
RTCRtpReceiver.getStats67135512.1675512.2
RTCRtpSender.getStats67135512.1675512.2
RTCStatsReport58792711582711
RTCStatsReport.@@iterator58794811584811
RTCStatsReport.entries58794811584811
RTCStatsReport.forEach58792711582711
RTCStatsReport.get58792711582711
RTCStatsReport.has58792711582711
RTCStatsReport.keys58794811584811
RTCStatsReport.size59794811594811
RTCStatsReport.type_candidate-pair58792911582911
RTCStatsReport.type_candidate-pair.availableOutgoingBitrate5879✕✕58✕✕
RTCStatsReport.type_candidate-pair.bytesDiscardedOnSend9696✕✕96✕✕
RTCStatsReport.type_candidate-pair.bytesReceived58795611585611
RTCStatsReport.type_candidate-pair.bytesSent58795611585611
RTCStatsReport.type_candidate-pair.consentRequestsSent8080✕✕80✕✕
RTCStatsReport.type_candidate-pair.currentRoundTripTime7179142✕71142✕
Show 238 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
RTCStatsReport.type_candidate-pair.id80807213.1807913.4
RTCStatsReport.type_candidate-pair.lastPacketReceivedTimestamp10910956✕10956✕
RTCStatsReport.type_candidate-pair.lastPacketSentTimestamp10910956✕10956✕
RTCStatsReport.type_candidate-pair.localCandidateId58792911582911
RTCStatsReport.type_candidate-pair.nominated58795611585611
RTCStatsReport.type_candidate-pair.packetsDiscardedOnSend9696✕✕96✕✕
RTCStatsReport.type_candidate-pair.packetsReceived9696✕✕96✕✕
RTCStatsReport.type_candidate-pair.packetsSent9696✕✕96✕✕
RTCStatsReport.type_candidate-pair.remoteCandidateId58792911582911
RTCStatsReport.type_candidate-pair.requestsReceived5879✕1158✕11
RTCStatsReport.type_candidate-pair.requestsSent5879✕1158✕11
RTCStatsReport.type_candidate-pair.responsesReceived5879142115814211
RTCStatsReport.type_candidate-pair.responsesSent5879✕1158✕11
RTCStatsReport.type_candidate-pair.state58792911582911
RTCStatsReport.type_candidate-pair.timestamp80807213.1807913.4
RTCStatsReport.type_candidate-pair.totalRoundTripTime7179142117114211
RTCStatsReport.type_candidate-pair.transportId58795611585611
RTCStatsReport.type_candidate-pair.type80807213.1807913.4
RTCStatsReport.type_certificate808015413.18015413.4
RTCStatsReport.type_certificate.base64Certificate808015413.18015413.4
RTCStatsReport.type_certificate.fingerprint808015413.18015413.4
RTCStatsReport.type_certificate.fingerprintAlgorithm808015413.18015413.4
RTCStatsReport.type_certificate.id808015413.18015413.4
RTCStatsReport.type_certificate.issuerCertificateId✕✕154✕✕154✕
RTCStatsReport.type_certificate.timestamp808015413.18015413.4
RTCStatsReport.type_certificate.type808015413.18015413.4
RTCStatsReport.type_codec80809813.1809813.4
RTCStatsReport.type_codec.channels83839814.1839814.5
RTCStatsReport.type_codec.clockRate80809813.1809813.4
RTCStatsReport.type_codec.id80809813.1809813.4
RTCStatsReport.type_codec.mimeType80809813.1809813.4
RTCStatsReport.type_codec.payloadType80809813.1809813.4
RTCStatsReport.type_codec.sdpFmtpLine83839814839814
RTCStatsReport.type_codec.timestamp80809813.1809813.4
RTCStatsReport.type_codec.transportId898998✕8998✕
RTCStatsReport.type_codec.type80809813.1809813.4
RTCStatsReport.type_data-channel80807913.180✕13.4
RTCStatsReport.type_data-channel.bytesReceived80807913.180✕13.4
RTCStatsReport.type_data-channel.bytesSent80807913.180✕13.4
RTCStatsReport.type_data-channel.dataChannelIdentifier858579✕85✕✕
RTCStatsReport.type_data-channel.id80807913.180✕13.4
RTCStatsReport.type_data-channel.label80807913.180✕13.4
RTCStatsReport.type_data-channel.messagesReceived80807913.180✕13.4
RTCStatsReport.type_data-channel.messagesSent80807913.180✕13.4
RTCStatsReport.type_data-channel.protocol80807913.180✕13.4
RTCStatsReport.type_data-channel.state80807913.180✕13.4
RTCStatsReport.type_data-channel.timestamp80807913.180✕13.4
RTCStatsReport.type_data-channel.type80807913.180✕13.4
RTCStatsReport.type_inbound-rtp79792711792711
RTCStatsReport.type_inbound-rtp.audioLevel8686106✕86106✕
RTCStatsReport.type_inbound-rtp.bytesReceived79792713.1792713.4
RTCStatsReport.type_inbound-rtp.codecId808098✕8098✕
RTCStatsReport.type_inbound-rtp.concealedSamples868610414.18610414.5
RTCStatsReport.type_inbound-rtp.concealmentEvents868610614.18610614.5
RTCStatsReport.type_inbound-rtp.estimatedPlayoutTimestamp✕✕142✕✕142✕
RTCStatsReport.type_inbound-rtp.fecPacketsDiscarded818110614.18110614.5
RTCStatsReport.type_inbound-rtp.fecPacketsReceived818110614.18110614.5
RTCStatsReport.type_inbound-rtp.frameHeight8686101✕86101✕
RTCStatsReport.type_inbound-rtp.frameWidth8686101✕86101✕
RTCStatsReport.type_inbound-rtp.framesAssembledFromMultiplePackets✕✕142✕✕142✕
RTCStatsReport.type_inbound-rtp.framesDecoded797956✕7956✕
RTCStatsReport.type_inbound-rtp.framesPerSecond8686101✕86101✕
RTCStatsReport.type_inbound-rtp.framesReceived8686101✕86101✕
RTCStatsReport.type_inbound-rtp.freezeCount✕✕142✕✕142✕
RTCStatsReport.type_inbound-rtp.headerBytesReceived808010614.18010614.5
RTCStatsReport.type_inbound-rtp.id80807213.1807913.4
RTCStatsReport.type_inbound-rtp.insertedSamplesForDeceleration868610614.18610614.5
RTCStatsReport.type_inbound-rtp.jitter80802713.1802713.4
RTCStatsReport.type_inbound-rtp.jitterBufferDelay868610414.18610414.5
RTCStatsReport.type_inbound-rtp.jitterBufferEmittedCount868610414.18610414.5
RTCStatsReport.type_inbound-rtp.jitterBufferMinimumDelay105105142✕105142✕
RTCStatsReport.type_inbound-rtp.jitterBufferTargetDelay105105142✕105142✕
RTCStatsReport.type_inbound-rtp.keyFramesDecoded7979142✕79142✕
RTCStatsReport.type_inbound-rtp.kind80806314806314
RTCStatsReport.type_inbound-rtp.lastPacketReceivedTimestamp8080106✕80106✕
RTCStatsReport.type_inbound-rtp.mid1051051351710513517
RTCStatsReport.type_inbound-rtp.nackCount808055✕80✕✕
RTCStatsReport.type_inbound-rtp.packetsDiscarded94949615.4949615.4
RTCStatsReport.type_inbound-rtp.packetsLost80807213.1807913.4
RTCStatsReport.type_inbound-rtp.packetsReceived80807213.1807913.4
RTCStatsReport.type_inbound-rtp.pauseCount✕✕142✕✕142✕
RTCStatsReport.type_inbound-rtp.playoutId111111✕✕111✕✕
RTCStatsReport.type_inbound-rtp.qpSum7979106✕79106✕
RTCStatsReport.type_inbound-rtp.remoteId919168✕9168✕
RTCStatsReport.type_inbound-rtp.removedSamplesForAcceleration868610614.18610614.5
RTCStatsReport.type_inbound-rtp.silentConcealedSamples868610414.18610414.5
RTCStatsReport.type_inbound-rtp.ssrc80802711802711
RTCStatsReport.type_inbound-rtp.timestamp80807213.1807913.4
RTCStatsReport.type_inbound-rtp.totalAssemblyTime✕✕142✕✕142✕
RTCStatsReport.type_inbound-rtp.totalAudioEnergy868610614.18610614.5
RTCStatsReport.type_inbound-rtp.totalDecodeTime7979106✕79106✕
RTCStatsReport.type_inbound-rtp.totalFreezesDuration✕✕142✕✕142✕
RTCStatsReport.type_inbound-rtp.totalInterFrameDelay7979106✕79106✕
RTCStatsReport.type_inbound-rtp.totalPausesDuration✕✕142✕✕142✕
RTCStatsReport.type_inbound-rtp.totalProcessingDelay103103106✕103106✕
RTCStatsReport.type_inbound-rtp.totalSamplesDuration868610614.18610614.5
RTCStatsReport.type_inbound-rtp.totalSamplesReceived868610414.18610414.5
RTCStatsReport.type_inbound-rtp.totalSquaredInterFrameDelay7979106✕79106✕
RTCStatsReport.type_inbound-rtp.trackIdentifier10510511116.410511116.4
RTCStatsReport.type_inbound-rtp.transportId8080153118015311
RTCStatsReport.type_inbound-rtp.type80807213.1807913.4
RTCStatsReport.type_local-candidate80802712.1802712.2
RTCStatsReport.type_local-candidate.address919165✕9165✕
RTCStatsReport.type_local-candidate.candidateType80802712.1802712.2
RTCStatsReport.type_local-candidate.foundation108108✕✕108✕✕
RTCStatsReport.type_local-candidate.id80807213.1807913.4
RTCStatsReport.type_local-candidate.port80807212.1807912.2
RTCStatsReport.type_local-candidate.priority80807212.1807912.2
RTCStatsReport.type_local-candidate.protocol80806412.1806412.2
RTCStatsReport.type_local-candidate.timestamp80807213.1807913.4
RTCStatsReport.type_local-candidate.transportId80806512.1806512.2
RTCStatsReport.type_local-candidate.type80807213.1807913.4
RTCStatsReport.type_local-candidate.usernameFragment108108✕✕108✕✕
RTCStatsReport.type_media-playout111111✕✕111✕✕
RTCStatsReport.type_media-playout.id111111✕✕111✕✕
RTCStatsReport.type_media-playout.kind111111✕✕111✕✕
RTCStatsReport.type_media-playout.synthesizedSamplesDuration111111✕✕111✕✕
RTCStatsReport.type_media-playout.synthesizedSamplesEvents111111✕✕111✕✕
RTCStatsReport.type_media-playout.timestamp111111✕✕111✕✕
RTCStatsReport.type_media-playout.totalPlayoutDelay111111✕✕111✕✕
RTCStatsReport.type_media-playout.totalSamplesCount111111✕✕111✕✕
RTCStatsReport.type_media-playout.totalSamplesDuration111111✕✕111✕✕
RTCStatsReport.type_media-playout.type111111✕✕111✕✕
RTCStatsReport.type_media-source808011314.18011314.5
RTCStatsReport.type_media-source.audioLevel8080✕✕80✕✕
RTCStatsReport.type_media-source.frames9090116✕90116✕
RTCStatsReport.type_media-source.framesPerSecond8080116✕80116✕
RTCStatsReport.type_media-source.height8080116✕80116✕
RTCStatsReport.type_media-source.id808011314.18011314.5
RTCStatsReport.type_media-source.kind808011314.18011314.5
RTCStatsReport.type_media-source.timestamp808011314.18011314.5
RTCStatsReport.type_media-source.totalAudioEnergy8080✕✕80✕✕
RTCStatsReport.type_media-source.totalSamplesDuration8080✕✕80✕✕
RTCStatsReport.type_media-source.trackIdentifier808011314.18011314.5
RTCStatsReport.type_media-source.type808011314.18011314.5
RTCStatsReport.type_media-source.width8080116✕80116✕
RTCStatsReport.type_outbound-rtp80802711802711
RTCStatsReport.type_outbound-rtp.active106106✕✕106✕✕
RTCStatsReport.type_outbound-rtp.bytesSent80807213.1807913.4
RTCStatsReport.type_outbound-rtp.codecId80809811809811
RTCStatsReport.type_outbound-rtp.frameHeight8484101✕84101✕
RTCStatsReport.type_outbound-rtp.frameWidth8484101✕84101✕
RTCStatsReport.type_outbound-rtp.framesEncoded808055✕8055✕
RTCStatsReport.type_outbound-rtp.framesPerSecond8484115✕84115✕
RTCStatsReport.type_outbound-rtp.framesSent8484101✕84101✕
RTCStatsReport.type_outbound-rtp.headerBytesSent808010014.18010014.5
RTCStatsReport.type_outbound-rtp.id80807213.1807913.4
RTCStatsReport.type_outbound-rtp.keyFramesEncoded8080✕✕80✕✕
RTCStatsReport.type_outbound-rtp.kind80806314806314
RTCStatsReport.type_outbound-rtp.mediaSourceId8080✕14.180✕14.5
RTCStatsReport.type_outbound-rtp.mid105105135✕105135✕
RTCStatsReport.type_outbound-rtp.nackCount93935515.4935515.4
RTCStatsReport.type_outbound-rtp.packetsSent80802713.1802713.4
RTCStatsReport.type_outbound-rtp.qpSum808066✕8066✕
RTCStatsReport.type_outbound-rtp.qualityLimitationDurations9393✕✕93✕✕
RTCStatsReport.type_outbound-rtp.qualityLimitationReason8080✕✕80✕✕
RTCStatsReport.type_outbound-rtp.remoteId818127✕81✕✕
RTCStatsReport.type_outbound-rtp.retransmittedBytesSent808010014.18010014.5
RTCStatsReport.type_outbound-rtp.retransmittedPacketsSent808010014.18010014.5
RTCStatsReport.type_outbound-rtp.rid105105135✕105135✕
RTCStatsReport.type_outbound-rtp.scalabilityMode110110✕✕110✕✕
RTCStatsReport.type_outbound-rtp.ssrc80802711802711
RTCStatsReport.type_outbound-rtp.targetBitrate9898✕16.498✕16.4
RTCStatsReport.type_outbound-rtp.timestamp80807213.1807913.4
RTCStatsReport.type_outbound-rtp.totalEncodeTime8080102✕80102✕
RTCStatsReport.type_outbound-rtp.totalPacketSendDelay8080✕✕80✕✕
RTCStatsReport.type_outbound-rtp.transportId8080153118015311
RTCStatsReport.type_outbound-rtp.type80807213.1807913.4
RTCStatsReport.type_peer-connection808011313.18011313.4
RTCStatsReport.type_peer-connection.dataChannelsClosed808011313.18011313.4
RTCStatsReport.type_peer-connection.dataChannelsOpened808011313.18011313.4
RTCStatsReport.type_peer-connection.id808011313.18011313.4
RTCStatsReport.type_peer-connection.timestamp808011313.18011313.4
RTCStatsReport.type_peer-connection.type808011313.18011313.4
RTCStatsReport.type_remote-candidate80802712.1802712.2
RTCStatsReport.type_remote-candidate.address919165✕9165✕
RTCStatsReport.type_remote-candidate.candidateType80802712.1802712.2
RTCStatsReport.type_remote-candidate.foundation108108✕✕108✕✕
RTCStatsReport.type_remote-candidate.id80807213.1807913.4
RTCStatsReport.type_remote-candidate.port80807212.1807912.2
RTCStatsReport.type_remote-candidate.priority80807212.1807912.2
RTCStatsReport.type_remote-candidate.protocol80806412.1806412.2
RTCStatsReport.type_remote-candidate.timestamp80807213.1807913.4
RTCStatsReport.type_remote-candidate.transportId8080✕12.180✕12.2
RTCStatsReport.type_remote-candidate.type80807213.1807913.4
RTCStatsReport.type_remote-candidate.usernameFragment108108✕✕108✕✕
RTCStatsReport.type_remote-inbound-rtp80802711802711
RTCStatsReport.type_remote-inbound-rtp.codecId80809811809811
RTCStatsReport.type_remote-inbound-rtp.fractionLost9191106✕91106✕
RTCStatsReport.type_remote-inbound-rtp.id80807214.1807914.5
RTCStatsReport.type_remote-inbound-rtp.jitter808072✕8079✕
RTCStatsReport.type_remote-inbound-rtp.kind80806314806314
RTCStatsReport.type_remote-inbound-rtp.localId80807214.1807914.5
RTCStatsReport.type_remote-inbound-rtp.packetsLost808072✕8079✕
RTCStatsReport.type_remote-inbound-rtp.packetsReceived✕✕72✕✕79✕
RTCStatsReport.type_remote-inbound-rtp.roundTripTime80809614.1809614.5
RTCStatsReport.type_remote-inbound-rtp.roundTripTimeMeasurements9191106✕91106✕
RTCStatsReport.type_remote-inbound-rtp.ssrc80802711802711
RTCStatsReport.type_remote-inbound-rtp.timestamp80807214.1807914.5
RTCStatsReport.type_remote-inbound-rtp.totalRoundTripTime9191106✕91106✕
RTCStatsReport.type_remote-inbound-rtp.transportId8080153118015311
RTCStatsReport.type_remote-inbound-rtp.type80807214.1807914.5
RTCStatsReport.type_remote-outbound-rtp91912711912711
RTCStatsReport.type_remote-outbound-rtp.bytesSent919172✕9179✕
RTCStatsReport.type_remote-outbound-rtp.codecId91919811919811
RTCStatsReport.type_remote-outbound-rtp.id919172✕9179✕
RTCStatsReport.type_remote-outbound-rtp.kind91916314916314
RTCStatsReport.type_remote-outbound-rtp.localId919168✕9168✕
RTCStatsReport.type_remote-outbound-rtp.packetsSent919172✕9179✕
RTCStatsReport.type_remote-outbound-rtp.remoteTimestamp919179✕9179✕
RTCStatsReport.type_remote-outbound-rtp.reportsSent9191✕✕91✕✕
RTCStatsReport.type_remote-outbound-rtp.roundTripTimeMeasurements9696✕✕96✕✕
RTCStatsReport.type_remote-outbound-rtp.ssrc91912711912711
RTCStatsReport.type_remote-outbound-rtp.timestamp919172✕9179✕
RTCStatsReport.type_remote-outbound-rtp.totalRoundTripTime9696✕✕96✕✕
RTCStatsReport.type_remote-outbound-rtp.transportId9191153119115311
RTCStatsReport.type_remote-outbound-rtp.type919172✕9179✕
RTCStatsReport.type_transport808015313.18015313.4
RTCStatsReport.type_transport.bytesReceived808015413.18015413.4
RTCStatsReport.type_transport.bytesSent808015413.18015413.4
RTCStatsReport.type_transport.dtlsCipher808015314.18015314.5
RTCStatsReport.type_transport.dtlsRole103103153✕103153✕
RTCStatsReport.type_transport.dtlsState808015314.18015314.5
RTCStatsReport.type_transport.iceLocalUsernameFragment103103153✕103153✕
RTCStatsReport.type_transport.iceRole103103153✕103153✕
RTCStatsReport.type_transport.iceState103103153✕103153✕
RTCStatsReport.type_transport.id808015313.18015313.4
RTCStatsReport.type_transport.localCertificateId808015413.18015413.4
RTCStatsReport.type_transport.packetsReceived8686154✕86154✕
RTCStatsReport.type_transport.packetsSent8686154✕86154✕
RTCStatsReport.type_transport.remoteCertificateId808015413.18015413.4
RTCStatsReport.type_transport.selectedCandidatePairChanges8080155✕80155✕
RTCStatsReport.type_transport.selectedCandidatePairId808015313.18015313.4
RTCStatsReport.type_transport.srtpCipher808015314.18015314.5
RTCStatsReport.type_transport.timestamp808015313.18015313.4
RTCStatsReport.type_transport.tlsVersion808015314.18015314.5
RTCStatsReport.type_transport.type808015313.18015313.4
RTCStatsReport.values58794811584811