startLastmileProbeTest method
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:
- RtcEngineEventHandler.lastmileQuality: the SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions with a score and is more closely linked to the user experience.
- RtcEngineEventHandler.lastmileProbeResult: the SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective.
Call this method to check the uplink network quality before users join a channel or before an audience switches to a host.
Note
- This method consumes extra network traffic and may affect communication quality. We do not recommend calling this method together with RtcEngine.enableLastmileTest.
- Do not call other methods before receiving the RtcEngineEventHandler.lastmileQuality and RtcEngineEventHandler.lastmileProbeResult callbacks. Otherwise, the callbacks may be interrupted by other methods.
- In the ChannelProfile.LiveBroadcasting profile, a host should not call this method after joining a channel.
Parameter config
The configurations of the last-mile network probe test. See LastmileProbeConfig.
Implementation
@override
Future<void> startLastmileProbeTest(LastmileProbeConfig config) {
return _invokeMethod('startLastmileProbeTest', {'config': config.toJson()});
}