startCloudProxy method

Future<int?> startCloudProxy(
  1. List<CloudProxyInfo> cloudProxiesInfo
)

@detail api @author daining.nemo @brief Start cloud proxy @param cloudProxiesInfo cloud proxy informarion list. See CloudProxyInfo{@link #CloudProxyInfo}. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - Call this API before joining the room. - Start pre-call network detection after starting cloud proxy. - After starting cloud proxy and connects the cloud proxy server successfully, receives onCloudProxyConnected{@link #IRTCEngineEventHandler#onCloudProxyConnected}. - To stop cloud proxy, call stopCloudProxy{@link #RTCEngine#stopCloudProxy}.

Implementation

Future<int?> startCloudProxy(List<CloudProxyInfo> cloudProxiesInfo) async {
  $a() => ($instance as $p_a.RTCEngine).startCloudProxy(cloudProxiesInfo
      .map(($item) => unpackObject<$p_a.CloudProxyInfo>($item))
      .toList());
  $i() => ($instance as $p_i.ByteRTCEngine).startCloudProxy(cloudProxiesInfo
      .map(($item) => unpackObject<$p_i.ByteRTCCloudProxyInfo>($item))
      .toList());

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}