onStatistics property
Real-time Statistics on Technical Metrics
This callback is returned every 2 seconds and notifies you of the statistics on technical metrics related to video, audio, and network. The metrics are listed in TRTCStatistics :
-
Video statistics: video resolution (
resolution
), frame rate (FPS
), bitrate (bitrate
), etc. -
Audio statistics: audio sample rate (
samplerate
), number of audio channels (channel
), bitrate (bitrate
), etc. -
Network statistics: the round trip time (
rtt
) between the SDK and the cloud (SDK -> Cloud -> SDK), packet loss rate (loss
), upstream traffic (sentBytes
), downstream traffic (receivedBytes
), etc. -
Parameters:
- statistics(TRTCStatistics):
- Statistics, including local statistics and the statistics of remote users.
- statistics(TRTCStatistics):
Note If you want to learn about only the current network quality and do not want to spend much time analyzing the statistics returned by this callback, we recommend you use onNetworkQuality.
Implementation
final void Function(TRTCStatistics statistics)? onStatistics;