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