startNetworkDetection method

FutureOr<int> startNetworkDetection(
  1. boolean isTestUplink,
  2. int expectedUplinkBitrate,
  3. boolean isTestDownlink,
  4. int expectedDownlinkBitrate,
)

@detail api @author hanchenchen.c @brief Enable pre-call network detection @param isTestUplink Whether to detect uplink bandwidth @param expectedUplinkBitrate Expected uplink bandwidth in kbps, unit: kbps
Range: {0, [100-10000]}, 0: Auto, that RTC will set the highest bite rate. @param isTestDownlink Whether to detect downlink bandwidth @param expectedDownlinkBitrate Expected downlink bandwidth in kbps, unit: kbps
Range: {0, [100-10000]}, 0: Auto, that RTC will set the highest bite rate. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - After successfully calling this interface, you will receive onNetworkDetectionResult{@link #IRTCEngineEventHandler#onNetworkDetectionResult} within 3s and every 2s thereafter notifying the probe results; - If the probe stops, you will receive onNetworkDetectionStopped{@link #IRTCEngineEventHandler#onNetworkDetectionStopped} to notify the probe to stop.

Implementation

FutureOr<int> startNetworkDetection(
    boolean isTestUplink,
    int expectedUplinkBitrate,
    boolean isTestDownlink,
    int expectedDownlinkBitrate) async {
  return await nativeCall('startNetworkDetection', [
    isTestUplink,
    expectedUplinkBitrate,
    isTestDownlink,
    expectedDownlinkBitrate
  ]);
}