setCameraZoomRatio method

FutureOr<int> setCameraZoomRatio(
  1. float zoomRatio
)

@hidden(macOS) @detail api @brief Sets the zoom magnification of the currently used camera (front/rear). @param zoomRatio Camera zoom parameters. 1.0 means scaling to the original image, the maximum value that can be set is obtained through the getCameraZoomMaxRatio{@link #ByteRTCEngine#getCameraZoomMaxRatio} method @return - 0: Success. - -1: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details. @note - The camera zoom factor can only be set when startVideoCapture{@link #ByteRTCEngine#startVideoCapture} is called for video capture using the SDK internal capture module. - The setting result fails after calling stopVideoCapture{@link #ByteRTCEngine#stopVideoCapture} to turn off internal collection. - Call setVideoDigitalZoomConfig:size:{@link #ByteRTCEngine#setVideoDigitalZoomConfig:size} to set digital zoom. Call setVideoDigitalZoomControl:{@link #ByteRTCEngine#setVideoDigitalZoomControl} to perform digital zoom.

Implementation

FutureOr<int> setCameraZoomRatio(float zoomRatio) async {
  return await nativeCall('setCameraZoomRatio:', [zoomRatio]);
}