onMixedAudioFrame method

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

@detail callback @author wangjunzheng @brief Returns mixed audio data including both data recorded by the local microphone and data from all subscribed remote users @param audioFrame Mixed audio data, see ByteRTCAudioFrame{@link #ByteRTCAudioFrame}

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)))));
}