setVideoDigitalZoomConfig abstract method
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 increase0.5
. The scale ranges[1,8]
and defaults to1
, which means an original size.moveOffset
: Ratio of the distance to the border of video images. It ranges[0, 0.5]
and defaults to0
, which means no offset. When you call setVideoDigitalZoomControl and choosecameraMoveLeft
, the moving distance is size x original width. While for thecameraMoveUp
, the moving distance is size x original height. Suppose that a video spans 1080 px and thesize
is set to0.5
so that the distance would be 0.5 x 1080 px = 540 px.
Return value:
0
: Success.<0
: Failure. See ReturnStatus for the reason.
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
size
s. - As the default
size
is0
, 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,
});