setCloudProxy abstract method

Future<void> setCloudProxy(
  1. CloudProxyType proxyType
)

Sets the Agora cloud proxy service. When users' network access is restricted by a firewall, configure the firewall to allow specific IP addresses and ports provided by Agora; then, call this method to enable the cloud proxy and set the cloud proxy type with the proxyType parameter. After successfully connecting to the cloud proxy, the SDK triggers the connectionStateChanged (Connecting, SettingProxyServer) callback. As of v3.6.2, when a user calls this method and then joins a channel successfully, the SDK triggers the proxyConnected callback to report the user ID, the proxy type connected, and the time calculated from when the user calling the method to the callback is triggered. To disable the cloud proxy that has been set, call the setCloudProxy(None). To change the cloud proxy type that has been set, call the setCloudProxy(None) first, and then call the setCloudProxy to set the proxyType you want. Agora recommends that you call this method before joining the channel or after leaving the channel. For the SDK v3.3.x, when users use the Force UDP cloud proxy, the services for Media Push and cohosting across channels are not available; for the SDK v3.4.0 or later, when users behind a firewall use the Force UDP cloud proxy, the services for Media Push and cohosting across channels are not available. When a user is behind a firewall and uses the Force UDP cloud proxy, the services for Media Push and cohosting across channels are not available. When you use the Force UDP cloud proxy, note that an error would occur when calling the startAudioMixing method to play online music files in the HTTP protocol. The services for Media Push and cohosting across channels use the cloud proxy with the TCP protocol.

Param proxyType The type of the cloud proxy. See CloudProxyType . This parameter is mandatory. The SDK reports an error if you do not pass in a value.

Implementation

Future<void> setCloudProxy(CloudProxyType proxyType);