onNetworkQuality property

(void Function(TRTCQualityInfo localQuality, List<TRTCQualityInfo> remoteQuality)?) onNetworkQuality
final

Real-time Network Quality Statistics

This callback is returned every 2 seconds and notifies you of the upstream and downstream network quality detected by the SDK.

The SDK uses a built-in proprietary algorithm to assess the current latency, bandwidth, and stability of the network and returns a result.

If the result is 1 (excellent), it means that the current network conditions are excellent; if it is 6 (down), it means that the current network conditions are too bad to support TRTC calls.

  • Parameters:
    • localQuality(TRTCQualityInfo):
      • Upstream network quality.
    • remoteQuality(List):
      • Downstream network quality, which refers to the data quality finally measured on the local side after the data flow passes through a complete transmission link of "remote -> cloud -> local". Therefore, the downlink network quality here represents the joint impact of the remote uplink and the local downlink.

Note The uplink quality of remote users cannot be determined independently through this interface.

Implementation

final void Function(TRTCQualityInfo localQuality, List<TRTCQualityInfo> remoteQuality)? onNetworkQuality;