onExpressionDetectResult method
@hidden for intrnal use only
@detail callback
@author zhushufan.ref
@brief Callback of the result of face detection with Effect SDK.
After calling registerFaceDetectionObserver:withInterval: and setVideoEffectExpressionDetect:{@link #ByteRTCVideoEffect#setVideoEffectExpressionDetect}, you will receive this callback.
@param result Expression detection result. See ByteRTCExpressionDetectResult{@link #ByteRTCExpressionDetectResult}.
Implementation
FutureOr<void> onExpressionDetectResult(dynamic result) async {
if ($instance == null || $instance is! IFaceDetectionObserver) {
return;
}
return ($instance as IFaceDetectionObserver).onExpressionDetectResult?.call(
packObject(
result,
() => ExpressionDetectResult.fromMap(
ExpressionDetectResult.deepPackedMapValues(
ExpressionDetectResult.mapMemberToConstructorParams(
result)))));
}