setServerParams abstract method
Sets application server parameters.
Before calling RTCVideo.sendServerMessage or RTCVideo.sendServerBinaryMessage to send messages to the application server, call this API to set a valid signature and application server address.
signature
: Dynamic signature. The App server may use the signature to verify the source of messages.
You need to define the signature yourself. It can be any non-empty string. It is recommended to encode information such as UID into the signature.
The signature will be sent to the address set through the "url" parameter in the form of a POST request.
url
: Address of the application server.
Return value:
-
0
: Success. -
<0
: Failure. See ReturnStatus for the reason. -
Call this API after calling RTCVideo.login to log in.
-
After this API is called, the local user will receive RTCVideoEventHandler.onServerParamsSetResult.
Implementation
Future<int?> setServerParams({
required String signature,
required String url,
});