setVideoDigitalZoomConfig abstract method

Future<int?> setVideoDigitalZoomConfig({
  1. required ZoomConfigType type,
  2. double size,
})

Sets the step size for each digital zooming control to the local videos.

type: Identifying which type the size is referring to. Required parameter.

size: Reserved to three decimal places. It defaults to 0. Required parameter.
The meaning and range vary from different type. If the scale or moving distance exceeds the range, the limit is taken as the result.

  • focusOffset: Increment or decrease to the scaling factor. Range: [0, 7]. For example, when it is set to 0.5 and setVideoDigitalZoomControl is called to zoom in, the scale will increase 0.5. The scale ranges [1,8] and defaults to 1, which means an original size.
  • moveOffset: Ratio of the distance to the border of video images. It ranges [0, 0.5] and defaults to 0, which means no offset. When you call setVideoDigitalZoomControl and choose cameraMoveLeft, the moving distance is size x original width. While for the cameraMoveUp, the moving distance is size x original height. Suppose that a video spans 1080 px and the size is set to 0.5 so that the distance would be 0.5 x 1080 px = 540 px.

Return value:

Notes:

  • Only one size can be set for a single call. You must call this API to pass values respectively if you intend to set multiple sizes.
  • As the default size is 0, you must call this API before performing any digital zoom control by calling setVideoDigitalZoomControl or startVideoDigitalZoomControl.

Implementation

Future<int?> setVideoDigitalZoomConfig({
  required ZoomConfigType type,
  double size,
});