IAudioEncodedFrameObserver
Observer for encoded audio frames.
onMixedAudioEncodedFrame
Retrieves the encoded audio data after mixing local and all remote users' audio.
onMixedAudioEncodedFrame?(
frameBuffer: Uint8Array,
length: number,
audioEncodedFrameInfo: EncodedAudioFrameInfo
): void;
After calling registerAudioEncodedFrameObserver and setting the audio encoding content to AudioEncodedFrameObserverPositionMixed, you can use this callback to get the encoded audio data after mixing local and all remote users' audio.
Parameters
- frameBuffer
- Audio buffer.
- length
- Length of the audio data, in bytes.
- audioEncodedFrameInfo
- Information about the encoded audio. See EncodedAudioFrameInfo.
onPlaybackAudioEncodedFrame
Retrieves the encoded audio data of all remote users.
onPlaybackAudioEncodedFrame?(
frameBuffer: Uint8Array,
length: number,
audioEncodedFrameInfo: EncodedAudioFrameInfo
): void;
After calling registerAudioEncodedFrameObserver and setting the audio encoding content to AudioEncodedFrameObserverPositionPlayback, you can use this callback to get the encoded audio data of all remote users.
Parameters
- frameBuffer
- Audio buffer.
- length
- Length of the audio data, in bytes.
- audioEncodedFrameInfo
- Information about the encoded audio. See EncodedAudioFrameInfo.
onRecordAudioEncodedFrame
Retrieves the encoded audio data of the local user.
onRecordAudioEncodedFrame?(
frameBuffer: Uint8Array,
length: number,
audioEncodedFrameInfo: EncodedAudioFrameInfo
): void;
After calling registerAudioEncodedFrameObserver and setting the audio encoding content to AudioEncodedFrameObserverPositionRecord, you can use this callback to get the encoded audio data of the local user.
Parameters
- frameBuffer
- Audio buffer.
- length
- Length of the audio data, in bytes.
- audioEncodedFrameInfo
- Information about the encoded audio. See EncodedAudioFrameInfo.