setCameraFocusPositionInPreview abstract method

Future<void> setCameraFocusPositionInPreview({
  1. required double positionX,
  2. required double positionY,
})

Sets the camera manual focus position.

You must call this method after enableVideo. The setting result will take effect after the camera is successfully turned on, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as localVideoStreamStateCapturing (1). This method is for Android and iOS only. After a successful method call, the SDK triggers the onCameraFocusAreaChanged callback.

  • positionX The horizontal coordinate of the touchpoint in the view.
  • positionY The vertical coordinate of the touchpoint in 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.

Implementation

Future<void> setCameraFocusPositionInPreview(
    {required double positionX, required double positionY});