You can track the quality of a call from the following aspects:
startLastmileProbeTest
Starts the last-mile network probe test before joining a channel to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
Once this method is enabled, the SDK returns the following callbacks:
startEchoTest
This method launches an audio call test to determine whether the audio devices (for example, headset and speaker) and the network connection are working properly.
To conduct the test, the user speaks, and the recording is played back within the set interval. If the user can hear the recording within the interval, the audio devices and network connection are working properly.
During a call, the SDK triggers the following callbacks every two seconds. For callbacks that reflect the network quality of the remote user, if there are multiple users or broadcasters, the SDK returns the callbacks as many times.
1. onNetworkQuality
This callback reflects the uplink and downlink quality with scores. The uplink transmission quality of the user in terms of the transmission bitrate, packet loss rate, average RTT (Round-Trip Time) and jitter of the uplink network, while Downlink network quality rating of the user in terms of packet loss rate, average RTT, and jitter of the downlink network.
2. onLocalVideoStats
This callback reports the statistics of the local video streams, including the sent bitrate, sent frame rate, target bitrate, target frame rate, and quality adaption.
3. onRemoteVideoStats
This callback reports the statistics of the video stream from each remote user or broadcaster, including the width and height of the video stream, the received bitrate, the decoder output frame rate, and the stream type.
4. onRemoteAudioStats
This callback reports the statistics of the audio stream from each remote user or broadcaster, including the quality score, network transport delay, jitter buffer delay and audio loss rate.
5. onRtcStats
This calback reports the statistics of the RtcEngine, including the total duration, received and sent bytes, received and sent bitrate, number of users, last-mile delay, CPU total usage and CPU app usage.
6. onRemoteAudioTransportStats
This callback reports the transport-layer statistics, such as the packet loss rate and time delay the local user receives an audio packet from a remote user.
7. onRemoteVideoTransportStats
This callback reports the transport-layer statistics, such as the packet loss rate and time delay after the local user receives the video packet from a remote user.
1. onLocalVideoStateChanged
This callback returns the current video state and possible reasons for a video failure. When exceptions occur, you can use this callback for trouble shooting.
2. onRemoteVideoStateChanged
This callback reports whether the current remote video is running or frozen.
onRtmpStreamingStateChanged
This callback reports the state of the RTMP streaming and possible reasons when an error occurs.