facePositionChanged property

FacePositionCallback? facePositionChanged
getter/setter pair

Reports the face detection result of the local user. Once you enable face detection by calling enableFaceDetection (true), you can get the following information on the local user in real-time: The width and height of the local video. The position of the human face in the local video. The distance between the human face and the screen. The distance between the human face and the screen is based on the fitting calculation of the local video size and the position of the human face captured by the camera. This callback is for Android and iOS only. When it is detected that the face in front of the camera disappears, the callback will be triggered immediately. In the state of no face, the trigger frequency of the callback will be reduced to save power consumption on the local device. The SDK stops triggering this callback when a human face is in close proximity to the screen. On Android, the value of distance reported in this callback may be slightly different from the actual distance. Therefore, Agora does not recommend using it for accurate calculation.

Param faces For the information of the detected face, see FacePositionInfo for details. If several faces are detected, this callback reports several FacePositionInfo arrays. The length of the array can be 0, which means that no human face is detected in front of the camera.

Implementation

FacePositionCallback? facePositionChanged;