setCameraDeviceOrientation abstract method

Future<void> setCameraDeviceOrientation({
  1. required VideoSourceType type,
  2. required VideoOrientation orientation,
})

设置采集视频的旋转角度。

该方法仅适用于 Windows。 该方法必须在 enableVideo 后调用,设置结果在摄像头成功开启后生效,即 SDK 触发 onLocalVideoStateChanged 回调返回本地视频状态为 localVideoStreamStateCapturing (1) 后。 当视频采集设备不带重力感应功能时,你可以调用该方法手动调整采集到的视频画面的旋转角度。

  • type 视频源类型,详见 VideoSourceType 。

Returns 方法成功调用时,无返回值;方法调用失败时,会抛出 AgoraRtcException 异常,你需要捕获异常并进行处理。详见错误码了解详情和解决建议。

Implementation

Future<void> setCameraDeviceOrientation(
    {required VideoSourceType type, required VideoOrientation orientation});