setCameraDeviceOrientation abstract method

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

Sets the rotation angle of the captured video.

This method applies to Windows only. You must call this method after enableVideo. The setting result will take effect after the camera is successfully turned on, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as localVideoStreamStateCapturing (1). When the video capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video.

  • type The video source type. See VideoSourceType.
  • orientation The clockwise rotation angle. See VideoOrientation.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

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