onPlayerQualityUpdate method

void onPlayerQualityUpdate(
  1. String streamID,
  2. ZegoPlayStreamQuality quality
)

Callback for current stream playing quality.

Available since: 1.1.0 Description: After calling the startPlayingStream successfully, the callback will be received every 3 seconds default(If you need to change the time, please contact the instant technical support to configure). Through the callback, the collection frame rate, bit rate, RTT, packet loss rate and other quality data can be obtained, and the health of the played audio and video streams can be monitored in real time. Use cases: You can monitor the health of the played audio and video streams in real time according to the quality parameters of the callback function, in order to show the down-link network status on the device UI in real time. Caution: If you does not know how to use the various parameters of the callback function, you can only focus on the level field of the quality parameter, which is a comprehensive value describing the down-link network calculated by SDK based on the quality parameters. Related callbacks: After calling the startPublishingStream successfully, a callback onPublisherQualityUpdate will be received every 3 seconds. You can monitor the health of publish streams in real time based on quality data such as frame rate, code rate, RTT, packet loss rate, etc.

  • streamID Stream ID.
  • quality Playing stream quality, including audio and video framerate, bitrate, RTT, etc.

Implementation

void onPlayerQualityUpdate(
  String streamID,
  ZegoPlayStreamQuality quality,
) {}