AudioEncodedFrameObserver

The encoded audio observer.

onMixedAudioEncodedFrame

Gets the mixed and encoded audio data of the local and all remote users.

final void Function(Uint8List frameBuffer, int length,
      EncodedAudioFrameInfo audioEncodedFrameInfo)? onMixedAudioEncodedFrame;

After calling registerAudioEncodedFrameObserver and setting the audio profile as audioEncodedFrameObserverPositionMixed, you can get the mixed and encoded audio data of the local and all remote users through this callback.

Parameters

frameBuffer
The audio buffer.
length
The data length (byte).
audioEncodedFrameInfo
Audio information after encoding. See EncodedAudioFrameInfo.

onPlaybackAudioEncodedFrame

Gets the encoded audio data of all remote users.

final void Function(Uint8List frameBuffer, int length,
      EncodedAudioFrameInfo audioEncodedFrameInfo)? onPlaybackAudioEncodedFrame;

After calling registerAudioEncodedFrameObserver and setting the encoded audio as audioEncodedFrameObserverPositionPlayback, you can get encoded audio data of all remote users through this callback.

Parameters

frameBuffer
The audio buffer.
length
The data length (byte).
audioEncodedFrameInfo
Audio information after encoding. See EncodedAudioFrameInfo.

onRecordAudioEncodedFrame

Gets the encoded audio data of the local user.

final void Function(Uint8List frameBuffer, int length,
      EncodedAudioFrameInfo audioEncodedFrameInfo)? onRecordAudioEncodedFrame;

After calling registerAudioEncodedFrameObserver and setting the encoded audio as audioEncodedFrameObserverPositionRecord, you can get the encoded audio data of the local user from this callback.

Parameters

frameBuffer
The audio buffer.
length
The data length (byte).
audioEncodedFrameInfo
Audio information after encoding. See EncodedAudioFrameInfo.