setCameraFocusPositionInPreview abstract method
Sets the manual focus position and triggers focusing.
This method is applicable to Android and iOS only. You must call this method after enableVideo. The setting takes effect after the camera is successfully turned on, i.e., after the SDK triggers the onLocalVideoStateChanged callback and the local video state is localVideoStreamStateCapturing (1). After this method is successfully called, the local client triggers the onCameraFocusAreaChanged callback.
positionXThe horizontal coordinate of the touch point relative to the view.positionYThe vertical coordinate of the touch point relative to the view.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.
Implementation
Future<void> setCameraFocusPositionInPreview(
{required double positionX, required double positionY});