IAudioEncodedFrameObserver
The encoded audio observer.
onMixedAudioEncodedFrame
Gets the mixed and encoded audio data of the local and all remote users.
onMixedAudioEncodedFrame?( frameBuffer: Uint8Array, length: number, audioEncodedFrameInfo: EncodedAudioFrameInfo ): void;
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.
onPlaybackAudioEncodedFrame?( frameBuffer: Uint8Array, length: number, audioEncodedFrameInfo: EncodedAudioFrameInfo ): void;
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.
onRecordAudioEncodedFrame?( frameBuffer: Uint8Array, length: number, audioEncodedFrameInfo: EncodedAudioFrameInfo ): void;
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.