onFaceDetectResult method

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

@detail callback @author wangjunlin.3182 @brief 特效 SDK 进行人脸检测结果的回调。
调用 enableFaceDetection:withInterval:withModelPath:{@link #ByteRTCVideoEffect#enableFaceDetection:withInterval:withModelPath} 注册了 ByteRTCFaceDetectionObserver{@link #ByteRTCFaceDetectionObserver} ,并使用 RTC SDK 中包含的特效 SDK 进行视频特效处理时,你会收到此回调。 @param result 人脸检测结果, 参看 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)))));
}