enableFaceDetection method

Future<void> enableFaceDetection(
  1. bool enable, {
  2. ZegoPublishChannel? channel,
})

Turn on or off the face detection.

Available since: 3.20.0 Description: Turn on or off the face detection. Default is on. When to call: Called after the engine is created createEngine. Restrictions: This interface is disabled when using custom video capture. Related callbacks: Detect results will be called back through onPublisherFaceDetectInfo. Caution:

  1. This interface depends on the face detection capability of the Android/iOS platform system, and the SDK only encapsulates and throws the related event callbacks.
  2. The face detection function is only effective on devices that support face detection, and some devices may not support this capability.
  3. The accuracy of the face detection result depends on the underlying system capabilities and cannot be guaranteed to be completely accurate. Please carefully evaluate and use for applications with high accuracy requirements.
  • enable Turn on or off the face detection.
  • channel Publish stream channel.

Implementation

Future<void> enableFaceDetection(bool enable,
    {ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance
      .enableFaceDetection(enable, channel: channel);
}