setVideoDigitalZoomControl method
@detail api
@hiddensdk(audiosdk)
@author likai.666
@brief Digital zoom or move the local video image once. This action affects both the video preview locally and the stream published.
@param direction Action of the digital zoom control. Refer to ByteRTCZoomDirectionType{@link #ByteRTCZoomDirectionType}.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details.
@note
- As the default offset is 0, you must call setVideoDigitalZoomConfig:size:{@link #ByteRTCEngine#setVideoDigitalZoomConfig:size} before this API.
- You can only move video images after they are magnified via this API or startVideoDigitalZoomControl:{@link #ByteRTCEngine#startVideoDigitalZoomControl}.
- When you request an out-of-range scale or movement, SDK will execute it with the limits. For example, when the image has been moved to the border, the image cannot be zoomed out, or has been magnified to 8x.
- Call startVideoDigitalZoomControl:{@link #ByteRTCEngine#startVideoDigitalZoomControl} to have a continuous and repeatedly digital zoom control.
- Mobile devices can control the optical zoom of the camera, see setCameraZoomRatio:.
Implementation
FutureOr<int> setVideoDigitalZoomControl(
ByteRTCZoomDirectionType direction) async {
return await nativeCall('setVideoDigitalZoomControl:', [direction.$value]);
}