setBusinessId method

Future<int?> setBusinessId(
  1. string businessId
)

@detail api @author wangzhanqiang @brief Sets the business ID
You can use businessId to distinguish different business scenarios. You can customize your businessId to serve as a sub AppId, which can share and refine the function of the AppId, but it does not need authentication. @param businessId
Your customized businessId
BusinessId is a tag, and you can customize its granularity. @return - 0: Success. - -2: The input is invalid. Legal characters include all lowercase letters, uppercase letters, numbers, and four other symbols, including '.', '-','_', and '@'. @note - You must call this API before entering the room, otherwise it will be invalid.

Implementation

Future<int?> setBusinessId(string businessId) async {
  $a() => ($instance as $p_a.RTCEngine).setBusinessId(businessId);
  $i() => ($instance as $p_i.ByteRTCEngine).setBusinessId(businessId);

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