RTCOutboundRtpStreamStats
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since February 2020.
* Some parts of this feature may have varying levels of support.
TheRTCOutboundRtpStreamStats dictionary of theWebRTC API is used to report metrics and statistics related to an outboundRTP stream being sent by anRTCRtpSender.
The statistics can be obtained by iterating theRTCStatsReport returned byRTCPeerConnection.getStats() orRTCRtpSender.getStats() until you find a report with thetype ofoutbound-rtp.
In this article
Instance properties
activeExperimentalA boolean that indicates whether this RTP stream is configured to be sent, or is disabled.
frameHeightAn integer indicating the height of the last encoded frame, in pixels.Undefined for audio streams.
frameWidthAn integer indicating the width of the last encoded frame, in pixels.Undefined for audio streams.
framesEncodedThe number of frames that have been successfully encoded so far for sending on this RTP stream.Undefined for audio streams.
framesPerSecondA number that represents the encoded frames sent in the last second.Undefined for audio streams.
framesSentA positive integer that represents the total number of encoded frames sent on this RTP stream.Undefined for audio streams.
headerBytesSentA positive integer that represents the total number of RTP header and padding bytes sent for this SSRC.
keyFramesEncodedExperimentalA positive integer that represents the total number of key frames successfully encoded in this RTP media stream.Undefined for audio streams.
mediaSourceIdA string that represents the id of the stats object of the track currently attached to the sender of this stream.
midA string that uniquely identifies the pairing of source and destination of the transceiver's stream.This is the value of the corresponding
RTCRtpTransceiver.midunless that is null, in which case the statistic property is not present.nackCountAn integer value indicating the total number of Negative ACKnowledgement (NACK) packets this
RTCRtpSenderhas received from the remoteRTCRtpReceiver.This locally-computed value provides an indication of the error resiliency of the connection.qpSumA 64-bit value containing the sum of the QP values for every frame encoded by this
RTCRtpSender.This locally-computed value provides an indication of how heavily compressed the data is.Undefined for audio streams.qualityLimitationDurationsExperimentalA map of the reasons that a media stream's resolution or framerate has been reduced, and the time that the quality was reduced for each reason.Undefined for audio streams.
qualityLimitationReasonExperimentalA string indicating the reason why the stream is being quality-limited.One of:
none,cpu,bandwidth, orother.Undefined for audio streams.remoteIdA string which identifies the
RTCRemoteInboundRtpStreamStatsobject that provides statistics for the remote peer for this same SSRC.This ID is stable across multiple calls togetStats().retransmittedBytesSentA positive integer that represents the total number of payload bytes retransmitted for the source associated with this stream.
retransmittedPacketsSentA positive integer that represents the total number of packets retransmitted for the source associated with this stream.
ridA string that indicates the RTP stream ID for a corresponding video stream.
scalabilityModeExperimentalA string that represents the scalability mode for the RTP stream, if one has been configured.
targetBitrateA number that represents the bit rate that the
RTCRtpSender's codec is currently attempting to achieve for the stream.totalEncodeTimeA number that represents the total number of seconds that have been spent encoding the frames encoded for this stream
RTCRtpSender.Undefined for audio streams.totalEncodedBytesTargetExperimentalA cumulative sum of thetarget frame sizes for all of the frames encoded so far.This will likely differ from the total of theactual frame sizes.Undefined for audio streams.
totalPacketSendDelayA number that represents the total time in seconds that packets have spent buffered locally before being transmitted.
Sent RTP stream statistics
bytesSentOptionalA positive integer indicating the total number of bytes sent for this SSRC, including retransmissions.
packetsSentOptionalA positive integer indicating the total number of RTP packets sent for this SSRC, including retransmissions.
Common RTP stream statistics
codecIdOptionalA string that uniquely identifies the object that was inspected to produce the
RTCCodecStatsobject associated with thisRTP stream.kindA string indicating whether the
MediaStreamTrackassociated with the stream is an audio or a video track.ssrcA positive integer that identifies the SSRC of the RTP packets in this stream.
transportIdOptionalA string that uniquely identifies the object which was inspected to produce the
RTCTransportStatsobject associated with this RTP stream.
Common instance properties
The following properties are common to all WebRTC statistics objects.
idA string that uniquely identifies the object that is being monitored to produce this set of statistics.
timestampA
DOMHighResTimeStampobject indicating the time at which the sample was taken for this statistics object.typeA string with the value
"outbound-rtp", indicating the type of statistics that the object contains.
Specifications
| Specification |
|---|
| Identifiers for WebRTC's Statistics API> # dom-rtcstatstype-outbound-rtp> |