Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: wbamberg <[email protected]>
  • Loading branch information
hamishwillee and wbamberg authored Jul 9, 2024
1 parent 214bb1c commit a5f1644
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion files/en-us/glossary/jitter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ page-type: glossary-definition

"High jitter" indicates that packets are arriving at significantly varying rates, possibly due to network congestion, packet loss, and routing of packets in a stream through different paths.

High jitter can significantly degrade the performance of real-time web applications, including voice/video communication and streaming, and online gaming.
High jitter can significantly degrade the performance of real-time web applications, including voice/video streaming and online gaming.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ browser-compat: api.RTCStatsReport.type_remote-inbound-rtp.fractionLost

{{APIRef("WebRTC")}}

The **`fractionLost`** property of the {{domxref("RTCRemoteInboundRtpStreamStats")}} dictionary provides the fraction packet loss for this [synchronization source (SSRC)](/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/ssrc) in the last reporting interval.
The **`fractionLost`** property of the {{domxref("RTCRemoteInboundRtpStreamStats")}} dictionary provides the fraction of packets lost for this [synchronization source (SSRC)](/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/ssrc) in the last reporting interval.

The value provides a quick and convenient measure of the link quality.
It is the packet loss as a fraction, scaled up by 256.
Expand All @@ -25,7 +25,7 @@ It is calculated by dividing the expected packets by the packets received in the
If the packet loss is negative the value is set to zero.
Otherwise the value is bit-shifted 8 bits.
This has the effect of making the fractional part of the fraction packet loss into the 8 bit unsigned integer which is what is sent in the SR or RR packet and contained in this property.
For more informaiton see the definition of "fraction lost" in {{rfc("3550","SR: Sender Report RTCP Packet", "6.4.1")}} and [RFC 3550, Appendix A.3: Determining Number of Packets Expected and Lost](https://datatracker.ietf.org/doc/html/rfc3550#appendix-A.3).
For more information see the definition of "fraction lost" in {{rfc("3550","SR: Sender Report RTCP Packet", "6.4.1")}} and [RFC 3550, Appendix A.3: Determining Number of Packets Expected and Lost](https://datatracker.ietf.org/doc/html/rfc3550#appendix-A.3).

## Specifications

Expand Down
16 changes: 8 additions & 8 deletions files/en-us/web/api/rtcremoteinboundrtpstreamstats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ The statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} re
<!-- RTCRemoteInboundRtpStreamStats -->

- {{domxref("RTCRemoteInboundRtpStreamStats.localId", "localId")}} {{optional_inline}}
- : A string that is used to find the local {{domxref("RTCOutboundRtpStreamStats")}} object that shares the same [synchronization source (SSRC)](#ssrc).
- : A string that is used to find the local {{domxref("RTCOutboundRtpStreamStats")}} object that shares the same [synchronization source (SSRC)](en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/ssrc).
- {{domxref("RTCRemoteInboundRtpStreamStats.fractionLost", "fractionLost")}} {{optional_inline}}
- : A number indicating the fraction packet loss for this [synchronization source (SSRC)](#ssrc). Calculated as defined in [RFC3550] section 6.4.1 and Appendix A.3.
- : A number indicating the fraction of packets lost for this SSRC since the last sender or receiver report.
- {{domxref("RTCRemoteInboundRtpStreamStats.roundTripTime", "roundTripTime")}} {{optional_inline}}
- : A number that indicates the estimated round trip time (RTT) for this [synchronization source (SSRC)](#ssrc), in seconds.
- : A number that indicates the estimated round trip time (RTT) for this SSRC, in seconds.
This property will not exist until valid RTT data has been received.
- {{domxref("RTCRemoteInboundRtpStreamStats.roundTripTimeMeasurements", "roundTripTimeMeasurements")}} {{optional_inline}}
- : A positive integer indicating the total number of valid round trip time measurements received for this [synchronization source (SSRC)](#ssrc).
Expand All @@ -36,12 +36,12 @@ The statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} re
<!-- RTCReceivedRtpStreamStats -->

- {{domxref("RTCRemoteInboundRtpStreamStats.packetsReceived", "packetsReceived")}} {{optional_inline}}
- : A positive integer indicating the total number of RTP packets received for this [synchronization source (SSRC)](#ssrc), including retransmissions.
- : A positive integer indicating the total number of RTP packets received for this SSRC, including retransmissions.
- {{domxref("RTCRemoteInboundRtpStreamStats.packetsLost", "packetsLost")}} {{optional_inline}}
- : An integer indicating the total number of RTP packets lost for this [synchronization source (SSRC)](#ssrc), as measured at the remote endpoint.
This value can be negative.
- : An integer indicating the total number of RTP packets lost for this SSRC, as measured at the remote endpoint.
This value can be negative if duplicate packets were received.
- {{domxref("RTCRemoteInboundRtpStreamStats.jitter", "jitter")}} {{optional_inline}}
- : An indicating the {{glossary("jitter", "packet jitter")}} for this [synchronization source (SSRC)](#ssrc), measured in seconds.
- : A number indicating the {{glossary("jitter", "packet jitter")}} for this synchronization source, measured in seconds.

### Common RTP stream statistics

Expand All @@ -52,7 +52,7 @@ The statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} re
- {{domxref("RTCRemoteInboundRtpStreamStats.kind", "kind")}}
- : A string indicating whether the {{domxref("MediaStreamTrack")}} associated with the stream is an audio or a video track.
- {{domxref("RTCRemoteInboundRtpStreamStats.ssrc", "ssrc")}}
- : A positive integer that identifies the synchronization source (SSRC) of the RTP packets in this stream.
- : A positive integer that identifies the SSRC of the RTP packets in this stream.
- {{domxref("RTCRemoteInboundRtpStreamStats.transportId", "transportId")}} {{optional_inline}}
- : A string that uniquely identifies the object which was inspected to produce the {{domxref("RTCTransportStats")}} object associated with this RTP stream.

Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/rtcremoteoutboundrtpstreamstats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ browser-compat: api.RTCStatsReport.type_remote-outbound-rtp

{{APIRef("WebRTC")}}

The **`RTCRemoteOutboundRtpStreamStats`** dictionary of the [WebRTC API](/en-US/docs/Web/API/WebRTC_API) is used to report statistics from remote endpoint about its outbound RTP stream.
These will corresponds to an inbound stream that is currently received by the local {{domxref("RTCPeerConnection")}} object.
The **`RTCRemoteOutboundRtpStreamStats`** dictionary of the [WebRTC API](/en-US/docs/Web/API/WebRTC_API) is used to report statistics from a remote endpoint about its outbound RTP stream.
This will correspond to an inbound stream that is currently being received by the local {{domxref("RTCPeerConnection")}} object.

The statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} returned by {{domxref("RTCPeerConnection.getStats()")}} until you find a report with the [`type`](#type) of `remote-outbound-rtp`.

Expand All @@ -17,7 +17,7 @@ The statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} re
### Remote outbound specific statistics

- {{domxref("RTCRemoteOutboundRtpStreamStats.localId", "localId")}} {{optional_inline}}
- : A string which is used to find the local {{domxref("RTCInboundRtpStreamStats")}} object that shares the same [synchronization source(SSRC)](#ssrc).
- : A string which is used to find the local {{domxref("RTCInboundRtpStreamStats")}} object that shares the same [synchronization source(SSRC)](/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/ssrc).
- {{domxref("RTCRemoteOutboundRtpStreamStats.remoteTimestamp", "remoteTimestamp")}} {{optional_inline}}
- : A {{domxref("DOMHighResTimeStamp")}} specifying the timestamp (on the remote device) at which the statistics in the `RTCRemoteOutboundRtpStreamStats` object were sent by the remote endpoint. This is different from the {{domxref("RTCRemoteOutboundRtpStreamStats.timestamp", "timestamp")}}; it represents the time at which the object's statistics were received or generated by the local endpoint.
- `reportsSent` {{optional_inline}} {{experimental_inline}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ browser-compat: api.RTCStatsReport.type_remote-outbound-rtp.roundTripTimeMeasure

{{APIRef("WebRTC")}}

The **`roundTripTimeMeasurements`** property of the {{domxref("RTCRemoteOutboundRtpStreamStats")}} dictionary contains a positive integer value that represents the total number valid round trip time measurements received for this [synchronizing source](#ssrc).
The **`roundTripTimeMeasurements`** property of the {{domxref("RTCRemoteOutboundRtpStreamStats")}} dictionary is a positive integer value that represents the total number valid round of trip time measurements received for this [synchronizing source (SSRC)](/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/ssrc).

The count can be used as a measure of the availability and reliability of round-trip-time measurement data.
The count can be used as a measure of the availability and reliability of round trip time measurement data.

## Value

A positive number indicating the number of valid round trip time measurements.

This is the count of _RTCP Sender Reports (SR)_ received for this [synchronizing source](#ssrc) that contain a "delay since last RR (DLRR)" field from which a valid round trip time can be derived (according to {{rfc("3611","DLRR Report Block", "4.5")}}).
This is the number of _RTCP Sender Reports (SR)_ received for this SSRC that contain a "delay since last RR (DLRR)" field from which a valid round trip time can be derived (according to {{rfc("3611","DLRR Report Block", "4.5")}}).

## Specifications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ browser-compat: api.RTCStatsReport.type_remote-outbound-rtp.totalRoundTripTime

{{APIRef("WebRTC")}}

The **`totalRoundTripTime`** property of the {{domxref("RTCRemoteOutboundRtpStreamStats")}} dictionary indicates the cumulative number sum of all round trip time (RTT) measurements since the beginning of the session, in seconds.
The **`totalRoundTripTime`** property of the {{domxref("RTCRemoteOutboundRtpStreamStats")}} dictionary indicates the sum of all round trip time (RTT) measurements since the beginning of the session, in seconds.

The individual round trip time is calculated based on RTCP timestamps in the DLRR report block of RTCP Sender Reports (SR).
The average RTT can be computed by dividing `totalRoundTripTime` by {{domxref("RTCRemoteOutboundRtpStreamStats.roundTripTimeMeasurements","roundTripTimeMeasurements")}}.
Expand Down

0 comments on commit a5f1644

Please sign in to comment.