setScreenCaptureVolume method
@detail api
@valid Available since 3.60.
@author wangjunzheng
@brief 调节屏幕共享时采集的音频音量。
只改变音频数据的音量信息,不影响麦克风采集的音量,也不会改变本端音频设备本身的音量。
@param volume 采集的音量值和原始音量的百分比,范围是 0, 400,单位为 %,自带溢出保护。
为保证更好的通话质量,建议将 volume 值设为 0, 100。
- 0:静音
- 100:原始音量
- 400: 最大可为原始音量的 4 倍(自带溢出保护)
@return
+ 0: 调用成功。
+ < 0: 调用失败。查看 ReturnStatus{@link #ReturnStatus} 获得更多错误说明。
@note 在开启屏幕音频采集前后,你都可以使用此接口设定采集音量。
Implementation
Future<int?> setScreenCaptureVolume(int volume) async {
$a() => ($instance as $p_a.RTCEngine).setScreenCaptureVolume(volume);
$i() => ($instance as $p_i.ByteRTCEngine).setScreenCaptureVolume(volume);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}