onMixedAudioFrame method

FutureOr<void> onMixedAudioFrame(
  1. dynamic audioFrame
)
override

@detail callback @author wangjunzheng @brief Returns the mixed audio data including the data recorded by local microphone and that of all remote users subscribed by the local user. @param audioFrame Audio data. See IAudioFrame{@link #IAudioFrame}.

Implementation

FutureOr<void> onMixedAudioFrame(dynamic audioFrame) async {
  if ($instance == null || $instance is! IAudioFrameObserver) {
    return;
  }
  return ($instance as IAudioFrameObserver).onMixedAudioFrame?.call(
      packObject(
          audioFrame,
          () => AudioFrame.fromMap(AudioFrame.deepPackedMapValues(
              AudioFrame.mapMemberToConstructorParams(audioFrame)))));
}