onNetworkQuality property

(void Function(String userID, ZegoStreamQualityLevel upstreamQuality, ZegoStreamQualityLevel downstreamQuality)?) onNetworkQuality
read / write

The network quality callback of users who are publishing in the room.

Available since: 2.10.0 Description: The uplink and downlink network callbacks of the local and remote users, that would be called by default every two seconds for the local and each playing remote user's network quality. Versions 2.10.0 to 2.13.1:

  1. Developer must both publish and play streams before you receive your own network quality callback.
  2. When playing a stream, the publish end has a play stream and the publish end is in the room where it is located, then the user's network quality will be received. Versions 2.14.0 to 2.21.1:
  3. As long as you publish or play a stream, you will receive your own network quality callback.
  4. When you play a stream, the publish end is in the room where you are, and you will receive the user's network quality. Version 2.22.0 and above:
  5. Estimate the network conditions of the remote stream publishing user. If the remote stream publishing user loses one heartbeat, the network quality will be called back as unknown; if the remote stream publishing user's heartbeat loss reaches 3 Second, call back its network quality to die. Use case: When the developer wants to analyze the network condition on the link, or wants to know the network condition of local and remote users. When to Trigger: After publishing a stream by called startPublishingStream or playing a stream by called startPlayingStream.
  • userID User ID, empty means local user
  • upstreamQuality Upstream network quality
  • downstreamQuality Downstream network quality

Implementation

static void Function(String userID, ZegoStreamQualityLevel upstreamQuality,
    ZegoStreamQualityLevel downstreamQuality)? onNetworkQuality;