setCameraDeviceOrientation abstract method
Future<void>
setCameraDeviceOrientation({
- required VideoSourceType type,
- required VideoOrientation orientation,
Sets the rotation angle of the captured video.
This method is applicable to Windows only. You must call this method after enableVideo. The setting takes effect after the camera is successfully turned on, i.e., after the SDK triggers the onLocalVideoStateChanged callback and the local video state is localVideoStreamStateCapturing (1). When the video capture device does not have a gravity sensor, you can call this method to manually adjust the rotation angle of the captured video frame.
typeVideo source type. See VideoSourceType.
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. See Error Codes for details and resolution suggestions.
Implementation
Future<void> setCameraDeviceOrientation(
{required VideoSourceType type, required VideoOrientation orientation});