setVideoCaptureRotation method
@detail api
@hiddensdk(audiosdk)
@brief Set the rotation of the video images captured from the local device.
Call this API to rotate the videos when the camera is fixed upside down or tilted. For rotating videos on a phone, we recommend to use setVideoRotationMode:{@link #ByteRTCEngine#setVideoRotationMode}.
@param rotation It defaults to ByteRTCVideoRotation0, which means not to rotate. Refer to ByteRTCVideoRotation{@link #ByteRTCVideoRotation}.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
@note
- For the videos captured by the internal module, the rotation will be combined with that set by calling setVideoRotationMode:{@link #ByteRTCEngine#setVideoRotationMode}.
- This API affects the external-sourced videos. The final rotation would be the original rotation angles adding up with the rotation set by calling this API.
- The elements added during the video pre-processing stage, such as video sticker and background applied using enableVirtualBackground{@link #ByteRTCVideoEffect#enableVirtualBackground:withSource} will also be rotated by this API.
- The rotation would be applied to both locally rendered video s and those sent out. However, if you need to rotate a video which is intended for pushing to CDN individually, use setVideoOrientation:{@link #ByteRTCEngine#setVideoOrientation}.
Implementation
FutureOr<int> setVideoCaptureRotation(ByteRTCVideoRotation rotation) async {
return await nativeCall('setVideoCaptureRotation:', [rotation.$value]);
}