onFaceDetectResult method

FutureOr<void> onFaceDetectResult(
  1. dynamic result
)
override

@detail callback @author wangjunlin.3182 @brief Callback of the result of face detection with Effect SDK.
After calling enableFaceDetection:withInterval:withModelPath:{@link #ByteRTCVideoEffect#enableFaceDetection:withInterval:withModelPath} and using the Effect SDK integrated in the RTC SDK, you will receive this callback. @param result Face detection result. See ByteRTCFaceDetectionResult{@link #ByteRTCFaceDetectionResult}.

Implementation

FutureOr<void> onFaceDetectResult(dynamic result) async {
  if ($instance == null || $instance is! IFaceDetectionObserver) {
    return;
  }
  return ($instance as IFaceDetectionObserver).onFaceDetectResult?.call(
      packObject(
          result,
          () => FaceDetectionResult.fromMap(
              FaceDetectionResult.deepPackedMapValues(
                  FaceDetectionResult.mapMemberToConstructorParams(
                      result)))));
}