setEnvironment static method

Future<V2TXLiveCode> setEnvironment(
  1. String env
)

Set up the SDK access environment

Note: If your application does not have special requirements, please do not call this API to set up.

Parameter:

env Currently, two parameters are supported: "default" and "GDPR".

  • default: The default environment, the SDK will find the best access point around the world for access.
  • GDPR: All audio and video data and quality statistics will not pass through servers in Chinese mainland.

Implementation

static Future<V2TXLiveCode> setEnvironment(String env) async {
  var code = await V2TXLivePremier()._channel.invokeMethod("setEnvironment", {"env": env});
  if (code is V2TXLiveCode) {
    return code;
  } else {
    return V2TXLIVE_ERROR_FAILED;
  }
}