setCameraExposureCompensation method
@detail api
@author zhangzhenyu.samuel
@brief 设置当前使用的摄像头的曝光补偿。
@param val 曝光补偿值,取值范围 -1, 1,0 为系统默认值(没有曝光补偿)。
@return
- 0: 成功。
- < 0: 失败。查看 ReturnStatus{@link #ReturnStatus} 获得更多错误说明。
@note
- 必须已调用 startVideoCapture{@link #RTCEngine#startVideoCapture} 使用 SDK 内部采集模块进行视频采集时,才能设置曝光补偿。
- 调用 stopVideoCapture{@link #RTCEngine#stopVideoCapture} 关闭内部采集后,设置的曝光补偿失效。
Implementation
Future<int?> setCameraExposureCompensation(float val) async {
$a() => ($instance as $p_a.RTCEngine).setCameraExposureCompensation(val);
$i() =>
($instance as $p_i.ByteRTCEngine).setCameraExposureCompensation(val);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}