enableFaceDetection method

FutureOr<int> enableFaceDetection(
  1. id<ByteRTCFaceDetectionObserver> observer,
  2. NSUInteger interval,
  3. NSString path
)

@detail api @author wangjunlin.3182 @brief Starts face detection and registers the observer for the result.
With this observer, you will receive onFaceDetectResult:{@link #ByteRTCFaceDetectionObserver#onFaceDetectResult} periodically. @param observer See ByteRTCFaceDetectionObserver{@link #ByteRTCFaceDetectionObserver}. @param interval The minimum time interval between two callbacks in milliseconds. The value should be greater than 0. The actual time interval is between interval and interval+the time slot of a captured video frame. @param path The absolute path of the face detection algorithm file. Typically it is the tt_face_vXXX.model file in the ttfacemodel folder. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - -1004: Initializing. This function will be available when the initialization is completed. - < 0: Other error. See error code table for specific instructions.

Implementation

FutureOr<int> enableFaceDetection(id<ByteRTCFaceDetectionObserver> observer,
    NSUInteger interval, NSString path) async {
  return await nativeCall('enableFaceDetection:withInterval:withModelPath:',
      [observer, interval, path]);
}