onRecordAudioFrame method
@detail callback @author wangjunzheng @brief Returns the audio data recorded by local microphone. @param audioFrame Audio data. See IAudioFrame{@link #IAudioFrame}.
Implementation
FutureOr<void> onRecordAudioFrame(dynamic audioFrame) async {
if ($instance == null || $instance is! IAudioFrameObserver) {
return;
}
return ($instance as IAudioFrameObserver).onRecordAudioFrame?.call(
packObject(
audioFrame,
() => AudioFrame.fromMap(AudioFrame.deepPackedMapValues(
AudioFrame.mapMemberToConstructorParams(audioFrame)))));
}