Class RTCRemoteInboundRtpStreamStats
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The RTCRemoteInboundRtpStreamStats dictionary of the WebRTC API is used to report statistics from the remote endpoint about a particular incoming RTP stream.
These will correspond to an outgoing RTP stream at the local end of the RTCPeerConnection.
[ToObject]
public class RTCRemoteInboundRtpStreamStats : RTCReceivedRtpStreamStats
- Inheritance
-
RTCRemoteInboundRtpStreamStats
- Inherited Members
Remarks
The statistics can be obtained by iterating the RTCStatsReport returned by GetStats(MediaStreamTrack?) or GetStats() until you find a report with the type of remote-inbound-rtp.
Constructors
RTCRemoteInboundRtpStreamStats()
public RTCRemoteInboundRtpStreamStats()
Fields
FractionLost
The fractionLost property of the RTCRemoteInboundRtpStreamStats dictionary provides a value that can be used to determine the fraction of packets lost for this synchronization source (SSRC) in the last reporting interval.
[Value("fractionLost")]
public Number FractionLost
Field Value
- Number
A number giving the fraction packet loss in the last reporting interval, multiplied by 256.
The value is 0 if the calculated packet loss is negative.NOTE
The value comes from the 8-bitfraction lostfield of the last Sender Report (SR) or Receiver Report (RR) RTCP packet.
The algorithm for calculating the value is defined in RFC 3550, Appendix A.3: Determining Number of Packets Expected and Lost.
Remarks
To convert the value to a percentage, divide it by 256 and multiply by 100.
For example, a value of 20 indicates a 7.8% packet loss.
Note that the value may not be precisely accurate due to the way that it is calculated, but it does provides a quick and convenient measure of the link quality.
-rfc("3550","SR: Sender Report RTCP Packet", "6.4.1")
-rfc("3550","RR: Receiver Report RTCP Packet", "6.4.2")
LocalId
The RTCRemoteInboundRtpStreamStats dictionary's localId property is a string that can be used to identify the RTCOutboundRtpStreamStats object whose RemoteId matches this value.
[Value("localId")]
public string LocalId
Field Value
- string
A string which can be compared to the value of an RTCOutboundRtpStreamStats object's RemoteId property to see if the two represent statistics for each of the two sides of the same set of data sent by the local peer.
Remarks
Together, these two objects provide statistics about the inbound and outbound sides of the same synchronization source (SSRC).
RoundTripTime
The roundTripTime property of the RTCRemoteInboundRtpStreamStats dictionary indicates the estimated round trip time (RTT) for this synchronization source (SSRC), in seconds.
[Value("roundTripTime")]
public Number RoundTripTime
Field Value
- Number
A number indicating the current estimated round trip time, in seconds.
Remarks
The round trip time is calculated based on the RTCP timestamps in the RTCP Sender Report (SR), and requires a report with a Delay Since Last SR (DLSR) block that has a value other than 0.
The property does not exist until such a report has been received.
Note that the average RTT for the session can be computed by dividing TotalRoundTripTime by RoundTripTimeMeasurements.
-rfc("3550","SR: Sender Report RTCP Packet", "6.4.1")
RoundTripTimeMeasurements
The roundTripTimeMeasurements property of the RTCRemoteInboundRtpStreamStats dictionary contains a positive integer value that represents the total number valid round trip time measurements received for this synchronizing source.
[Value("roundTripTimeMeasurements")]
public ulong RoundTripTimeMeasurements
Field Value
- ulong
A positive number indicating the number of valid round trip time measurements.This is the count of RTCP Receiver Reports (RR) received for this synchronizing source that contain a non-zero value for the "delay since last SR (DLSR)" field.
Remarks
The count can be used as a measure of the availability and reliability of round-trip-time measurement data.
-rfc("3550","RR: Receiver Report RTCP Packet", "6.4.2")
TotalRoundTripTime
The totalRoundTripTime property of the RTCRemoteInboundRtpStreamStats dictionary indicates the cumulative number sum of all round trip time (RTT) measurements since the beginning of the session, in seconds.
[Value("totalRoundTripTime")]
public Number TotalRoundTripTime
Field Value
- Number
A number indicating the total round trip time for the session, in seconds.
Remarks
The individual round trip time is calculated based on the RTCP timestamps in the RTCP Receiver Report (RR), hence requires a DLSR value other than 0.
The average RTT can be computed by dividing totalRoundTripTime by RoundTripTimeMeasurements.
-rfc("3550","RR: Receiver Report RTCP Packet", "6.4.2")