RtcStats

Call-related statistics.

export class RtcStats {
  
  duration?: number;
  
  txBytes?: number;
  
  rxBytes?: number;
  
  txAudioBytes?: number;
  
  txVideoBytes?: number;
  
  rxAudioBytes?: number;
  
  rxVideoBytes?: number;
  
  txKBitRate?: number;
  
  rxKBitRate?: number;
  
  rxAudioKBitRate?: number;
  
  txAudioKBitRate?: number;
  
  rxVideoKBitRate?: number;
  
  txVideoKBitRate?: number;
  
  lastmileDelay?: number;
  
  userCount?: number;
  
  cpuAppUsage?: number;
  
  cpuTotalUsage?: number;
  
  gatewayRtt?: number;
  
  memoryAppUsageRatio?: number;
  
  memoryTotalUsageRatio?: number;
  
  memoryAppUsageInKbytes?: number;
  
  connectTimeMs?: number;
  
  firstAudioPacketDuration?: number;
  
  firstVideoPacketDuration?: number;
  
  firstVideoKeyFramePacketDuration?: number;
  
  packetsBeforeFirstKeyFramePacket?: number;
  
  firstAudioPacketDurationAfterUnmute?: number;
  
  firstVideoPacketDurationAfterUnmute?: number;
  
  firstVideoKeyFramePacketDurationAfterUnmute?: number;
  
  firstVideoKeyFrameDecodedDurationAfterUnmute?: number;
  
  firstVideoKeyFrameRenderedDurationAfterUnmute?: number;
  
  txPacketLossRate?: number;
  
  rxPacketLossRate?: number;
}

Properties

duration
Call duration of the local user (seconds), cumulative value.
txBytes
Number of bytes sent.
rxBytes
Number of bytes received.
txAudioBytes
Number of audio bytes sent, cumulative value.
txVideoBytes
Number of video bytes sent, cumulative value.
rxAudioBytes
Number of audio bytes received, cumulative value.
rxVideoBytes
Number of video bytes received, cumulative value.
txKBitRate
Sending bitrate (Kbps).
rxKBitRate
Receiving bitrate (Kbps).
rxAudioKBitRate
Audio receiving bitrate (Kbps).
txAudioKBitRate
Audio sending bitrate (Kbps).
rxVideoKBitRate
Video receiving bitrate (Kbps).
txVideoKBitRate
Video sending bitrate (Kbps).
lastmileDelay
Client-to-access-server latency (ms).
txPacketLossRate
Uplink packet loss rate (%) from client to server before anti-packet-loss technique is applied.
rxPacketLossRate
Downlink packet loss rate (%) from server to client before anti-packet-loss technique is applied.
userCount
Number of users in the current channel.
cpuAppUsage
CPU usage (%) of the current app.
Note:
  • The cpuAppUsage reported in the onLeaveChannel callback is always 0.
cpuTotalUsage
CPU usage (%) of the current system.
Note:
  • The cpuTotalUsage reported in the onLeaveChannel callback is always 0.
  • Since Android 8.1, due to system limitations, you cannot obtain CPU usage through this property.
connectTimeMs
Time from starting connection to successful connection (ms). A value of 0 indicates invalid.
gatewayRtt
Round-trip time (ms) from client to local router.
Note: This property is enabled by default on devices before iOS 14 and disabled on iOS 14 and later. To enable this property on iOS 14 and later, contact technical support. On Android, to obtain gatewayRtt, ensure that the android.permission.ACCESS_WIFI_STATE permission is added after </application> in your project's AndroidManifest.xml file.
memoryAppUsageRatio
Memory usage ratio (%) of the current app.
Note: This value is for reference only. It may not be available due to system limitations.
memoryTotalUsageRatio
Memory usage ratio (%) of the current system.
Note: This value is for reference only. It may not be available due to system limitations.
memoryAppUsageInKbytes
Memory usage (KB) of the current app.
Note: This value is for reference only. It may not be available due to system limitations.