setBusinessId method
@detail api
@author wangzhanqiang
@brief 设置业务标识参数
可通过 businessId 区分不同的业务场景。businessId 由客户自定义,相当于一个“标签”,可以分担和细化现在 AppId 的逻辑划分的功能,但不需要鉴权。
@param businessId
用户设置的自己的 businessId 值
businessId 只是一个标签,颗粒度需要用户自定义。
@return
- 0: 成功。
- -2: 输入非法,合法字符包括所有小写字母、大写字母和数字,除此外还包括四个独立字符,分别是:英文句号,短横线,下划线和 @ 。
@note
- 需要在进房前调用,进房后调用该方法无效。
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}');
}
}