Interface RemoteAudioTrackStats

Statistics of the remote audio track, such as connection and transmission statistics, which can be retrieved by calling [AgoraRTCClient.getRemoteAudioStats]IAgoraRTCClient.getRemoteAudioStats.

interface RemoteAudioTrackStats {
    codecType?: "opus" | "aac" | "PCMU" | "PCMA" | "G722";
    currentPacketLossRate: number;
    end2EndDelay: number;
    freezeRate: number;
    packetLossRate: number;
    publishDuration: number;
    receiveBitrate: number;
    receiveBytes: number;
    receiveDelay: number;
    receiveLevel: number;
    receivePackets: number;
    receivePacketsDiscarded: number;
    receivePacketsLost: number;
    totalDuration: number;
    totalFreezeTime: number;
    transportDelay: number;
}

Properties

codecType?: "opus" | "aac" | "PCMU" | "PCMA" | "G722"

The audio codec.

  • "opus": The audio codec is OPUS。
  • "aac": The audio codec is AAC。
  • "pcmu": Reserved for future use.
  • "pcma": Reserved for future use.
  • "g722": Reserved for future use.

Firefox does not support this property.

currentPacketLossRate: number

The packet loss rate of the received audio.

end2EndDelay: number

End-to-end delay (ms).

The delay (ms) between a remote client sampling the audio and the local client playing the audio. This delay does not include the time spent in encoding at the remote client and the time spent in decoding at the local client.

freezeRate: number

The freeze rate of the received audio.

packetLossRate: number

The packet loss rate of the received audio.

publishDuration: number
receiveBitrate: number

The bitrate (bps) of the received audio.

receiveBytes: number

The total bytes of the received audio.

receiveDelay: number

The delay (ms) between a remote client sending the audio and the local client playing the audio.

This property is inaccurate on Safari and Firefox.

receiveLevel: number

The energy level of the received audio.

The value range is [0,32767].

This value is retrieved by calling WebRTC-Stats and may not be up-to-date. To get the real-time sound volume, call [RemoteAudioTrack.getVolumeLevel]IRemoteAudioTrack.getVolumeLevel.

receivePackets: number

The total packets of the received audio.

receivePacketsDiscarded: number

The number of packets discarded by the jitter buffer due to early or late arrival.

receivePacketsLost: number

The total number of lost audio packets that should be received.

totalDuration: number

The total duration of the received audio in seconds.

totalFreezeTime: number

The total freeze time of the received audio in seconds.

transportDelay: number

Transmission delay (ms).

The delay (ms) between a remote client sending the audio and the local client receiving the audio.