startNetworkDetection abstract method
Starts pre-call network detection.
isTestUplink: Whether to detect uplink bandwidth.
expectedUplinkBitrate: Expected uplink bandwidth in kbps within a range of {0, [100-10000]}. 0 indicates that the maximum code rate is specified by the SDK.
isTestDownlink: Whether to detect downlink bandwidth.
expectedDownlinkBitrate: Expected downlink bandwidth in kbps within a range of {0, [100-10000]}. 0 indicates that the maximum code rate is specified by the SDK.
Return value:
0: Success.<0: Failure. See ReturnStatus for the reason.
Notes:
- After a successful call to this API, the RTCVideoEventHandler.onNetworkDetectionResult callback will be received once in 3s and every 2s thereafter to notify the detection result.
- If detection is stopped, the detection will be notified once by RTCVideoEventHandler.onNetworkDetectionStopped.
Implementation
Future<int?> startNetworkDetection({
required bool isTestUplink,
required int expectedUplinkBitrate,
required bool isTestDownlink,
required int expectedDownlinkBitrate,
});