registerAudioEncodedFrameObserver abstract method

void registerAudioEncodedFrameObserver({
  1. required AudioEncodedFrameObserverConfig config,
  2. required AudioEncodedFrameObserver observer,
})

Registers an encoded audio observer.

Call this method after joining a channel. You can call this method or startAudioRecording to set the recording type and quality of audio files, but Agora does not recommend using this method and startAudioRecording at the same time. Only the method called later will take effect.

  • config Observer settings for the encoded audio. See AudioEncodedFrameObserverConfig.
  • observer The encoded audio observer. See AudioEncodedFrameObserver.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

void registerAudioEncodedFrameObserver(
    {required AudioEncodedFrameObserverConfig config,
    required AudioEncodedFrameObserver observer});