setVideoRotationMode method
@detail api
@hiddensdk(audiosdk)
@author wangjunlin.3182
@brief 设置采集视频的旋转模式。默认以 App 方向为旋转参考系。
接收端渲染视频时,将按照和发送端相同的方式进行旋转。
@param rotationMode 视频旋转参考系为 App 方向或重力方向,参看 VideoRotationMode{@link #VideoRotationMode}。
@return
- 0: 调用成功。
- < 0 : 调用失败。查看 ReturnStatus{@link #ReturnStatus} 获得更多错误说明
@note
- 旋转仅对内部视频采集生效,不适用于外部视频源和屏幕源。
- 调用该接口时已开启视频采集,将立即生效;调用该接口时未开启视频采集,则将在采集开启后生效。
- 更多信息请参考视频采集方向。
Implementation
Future<int?> setVideoRotationMode(VideoRotationMode rotationMode) async {
$a() => ($instance as $p_a.RTCEngine).setVideoRotationMode(
t_VideoRotationMode.code_to_android(rotationMode));
$i() => ($instance as $p_i.ByteRTCEngine)
.setVideoRotationMode(t_VideoRotationMode.code_to_ios(rotationMode));
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}