RTCOutboundRtpStreamStats
The RTCOutboundRtpStreamStats
dictionary of the WebRTC API is used to report metrics and statistics related to an outbound RTP stream being sent by an RTCRtpSender
.
The statistics can be obtained by iterating the RTCStatsReport
returned by RTCPeerConnection.getStats()
or RTCRtpSender.getStats()
until you find a report with the type
of outbound-rtp
.
Instance properties
averageRtcpInterval
-
A floating-point value indicating the average RTCP interval between two consecutive compound RTCP packets.
firCount
-
An integer value which indicates the total number of Full Intra Request (FIR) packets which this RTCRtpSender
has sent to the remote RTCRtpReceiver
. This is an indicator of how often the stream has lagged, requiring frames to be skipped in order to catch up. Valid only for video streams.
framesEncoded
-
The number of frames that have been successfully encoded so far for sending on this RTP stream. Only valid for video streams.
nackCount
-
An integer value indicating the total number of Negative ACKnolwedgement (NACK) packets this RTCRtpSender
has received from the remote RTCRtpReceiver
.
perDscpPacketsSent
-
A record of key-value pairs with strings as the keys mapped to 32-bit integer values, each indicating the total number of packets this RTCRtpSender
has transmitted for this source for each Differentiated Services Code Point (DSCP).
pliCount
-
An integer specifying the number of times the remote receiver has notified this RTCRtpSender
that some amount of encoded video data for one or more frames has been lost, using Picture Loss Indication (PLI) packets. Only available for video streams.
qpSum
-
A 64-bit value containing the sum of the QP values for every frame encoded by this RTCRtpSender
. Valid only for video streams.
qualityLimitationDurations
-
A record mapping each of the quality limitation reasons in the RTCRemoteInboundRtpStreamStats
enumeration to a floating-point value indicating the number of seconds the stream has spent with its quality limited for that reason.
qualityLimitationReason
-
One of the string none
, cpu
, bandwidth
, or other
, explaining why the resolution and/or frame rate is being limited for this RTP stream. Valid only for video streams.
remoteId
-
A string which identifies the RTCRemoteInboundRtpStreamStats
object that provides statistics for the remote peer for this same SSRC. This ID is stable across multiple calls to getStats()
.
retransmittedBytesSent
-
The total number of bytes that have been retransmitted for this source as of the time the statistics were sampled. These retransmitted bytes comprise the packets included in the value returned by retransmittedPacketsSent
.
retransmittedPacketsSent
-
The total number of packets that have needed to be retransmitted for this source as of the time the statistics were sampled. These retransmitted packets are included in the value returned by packetsSent
.
senderId
-
The id
of the RTCAudioSenderStats
or RTCVideoSenderStats
object containing statistics about this stream's RTCRtpSender
.
sliCount
-
An integer indicating the number of times this sender received a Slice Loss Indication (SLI) frame from the remote peer, indicating that one or more consecutive video macroblocks have been lost or corrupted. Available only for video streams.
targetBitrate
-
A value indicating the bit rate the RTCRtpSender
's codec is configured to attempt to achieve in its output media.
totalEncodedBytesTarget
-
A cumulative sum of the target frame sizes (the targeted maximum size of the frame in bytes when the codec is asked to compress it) for all of the frames encoded so far. This will likely differ from the total of the actual frame sizes.
totalEncodeTime
-
A floating-point value indicating the total number of seconds that have been spent encoding the frames encoded so far by this RTCRtpSender
.
trackId
-
The id
of the RTCSenderAudioTrackAttachmentStats
or RTCSenderVideoTrackAttachmentStats
object containing the current track attachment to the RTCRtpSender
responsible for this stream.
Common instance properties
The following properties are common to all WebRTC statistics objects.
id
-
A string that uniquely identifies the object that is being monitored to produce this set of statistics.
timestamp
-
A DOMHighResTimeStamp
object indicating the time at which the sample was taken for this statistics object.
type
-
A string with the value "outbound-rtp"
, indicating the type of statistics that the object contains.
Examples
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
RTCOutboundRtpStreamStats |
80 |
80 |
27 |
No |
67 |
11 |
80 |
80 |
27 |
57 |
11 |
13.0 |
active |
106 |
106 |
No |
No |
92 |
No |
106 |
106 |
No |
72 |
No |
20.0 |
bytesSent |
80 |
80 |
72 |
No |
67 |
13.1 |
80 |
80 |
79 |
57 |
13.4 |
13.0 |
codecId |
80 |
80 |
98 |
No |
67 |
11 |
80 |
80 |
98 |
57 |
11 |
13.0 |
headerBytesSent |
80 |
80 |
100 |
No |
67 |
14.1 |
80 |
80 |
100 |
57 |
14.5 |
13.0 |
id |
80 |
80 |
72 |
No |
67 |
13.1 |
80 |
80 |
79 |
57 |
13.4 |
13.0 |
kind |
80 |
80 |
63 |
No |
67 |
14 |
80 |
80 |
63 |
57 |
14 |
13.0 |
mediaSourceId |
80 |
80 |
No |
No |
67 |
14.1 |
80 |
80 |
No |
57 |
14.5 |
13.0 |
mid |
105 |
105 |
No |
No |
91 |
No |
105 |
105 |
No |
72 |
No |
20.0 |
nackCount |
93 |
93 |
55 |
No |
79 |
15.4 |
93 |
93 |
55 |
66 |
15.4 |
17.0 |
packetsSent |
80 |
80 |
27 |
No |
67 |
13.1 |
80 |
80 |
27 |
57 |
13.4 |
13.0 |
remoteId |
81 |
81 |
27 |
No |
68 |
15.3–15.4 |
81 |
81 |
No |
58 |
No |
13.0 |
retransmittedBytesSent |
80 |
80 |
100 |
No |
67 |
14.1 |
80 |
80 |
100 |
57 |
14.5 |
13.0 |
retransmittedPacketsSent |
80 |
80 |
100 |
No |
67 |
14.1 |
80 |
80 |
100 |
57 |
14.5 |
13.0 |
ssrc |
80 |
80 |
27 |
No |
67 |
11 |
80 |
80 |
27 |
57 |
11 |
13.0 |
targetBitrate |
98 |
98 |
No |
No |
84 |
16.4 |
98 |
98 |
No |
68 |
16.4 |
18.0 |
timestamp |
80 |
80 |
72 |
No |
67 |
13.1 |
80 |
80 |
79 |
57 |
13.4 |
13.0 |
totalPacketSendDelay |
80 |
80 |
No |
No |
67 |
No |
80 |
80 |
No |
57 |
No |
13.0 |
transportId |
80 |
80 |
No |
No |
67 |
11 |
80 |
80 |
No |
57 |
11 |
13.0 |
type |
80 |
80 |
72 |
No |
67 |
13.1 |
80 |
80 |
79 |
57 |
13.4 |
13.0 |
See also