setCameraZoomRatio method

FutureOr<int> setCameraZoomRatio(
  1. float zoom
)

@detail api @author zhangzhenyu.samuel @brief Change the optical zoom magnification. @param zoom Zoom magnification of the currently used camera (front/postcondition). The value range is 1, < Maximum Zoom Multiplier >.
The maximum zoom factor can be obtained by calling getCameraZoomMaxRatio{@link #RTCEngine#getCameraZoomMaxRatio}. @return - 0: Success. - < 0: Failure. See ReturnStatus{@link #ReturnStatus} for more details. @note - The camera zoom factor can only be set when startVideoCapture{@link #RTCEngine#startVideoCapture} is called for video capture using the SDK internal capture module. - The setting result fails after calling stopVideoCapture{@link #RTCEngine#stopVideoCapture} to turn off internal collection. - Call setVideoDigitalZoomConfig{@link #RTCEngine#setVideoDigitalZoomConfig} to set digital zoom. Call setVideoDigitalZoomControl{@link #RTCEngine#setVideoDigitalZoomControl} to perform digital zoom.

Implementation

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