Updated on 2023-03-23 GMT+08:00

Setting the Network Mode

Function

This API is used to set the network mode. 1. This API needs to be called only when an application in an enterprise cannot directly access the public network (that is, when the media nodes and management nodes are deployed in the enterprise). If the media nodes of Huawei Cloud Meeting are deployed in the enterprise and management nodes are accessed through the proxy of the enterprise, set the network mode to enterprise intranet access. 2. This API is optional. If it is not called, the default mode is used.

Function Prototype

setNetworkMode(networkInfo: NetWorkModeInfo, onSetNetworkModeResult?: (ret: SDKERR, reason: string) => void): voidsetNetworkMode(networkInfo: NetWorkModeInfo, onSetNetworkModeResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
networkInfo Y NetWorkModeInfo Network mode information.
onSetNetworkModeResult Y (ret: SDKERR, reason: string) => void Callback of setting the network mode.
Table 2 NetWorkModeInfo
Parameter Mandatory Type Description
accessType Y NetworkAccessType Network access type.
Table 3 Enumerated values of NetworkAccessType
Enumeration Name Enumerated Value Description
ACCESS_TYPE_AUTO 0 Default value. Currently, the value is the same as the extranet access mode.
ACCESS_TYPE_INNER 1 Intranet access, which is used when the media and signaling nodes are deployed in the enterprise. The app uses the intranet for access. Signaling and media messages access the Huawei Cloud Meeting server through the proxy server.
ACCESS_TYPE_OUTER 2 External network access, which is used when the media and signaling nodes are not deployed in the enterprise. The app uses the Internet for access. Signaling and media messages can directly access the Huawei Cloud Meeting server.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 4 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.