registerAudioFrameObserver method

FutureOr<int> registerAudioFrameObserver(
  1. IAudioFrameObserver observer
)

@detail api @author gongzhengduo @brief Register an audio frame observer. @param observer Audio data callback observer. See IAudioFrameObserver{@link #IAudioFrameObserver}. Use null to cancel the registration. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note After calling this API and enableAudioFrameCallback{@link #RTCEngine#enableAudioFrameCallback}, IAudioFrameObserver{@link #IAudioFrameObserver} receives the corresponding audio data callback. You can retrieve the audio data and perform processing on it without affecting the audio that RTC SDK uses to encode or render.

Implementation

FutureOr<int> registerAudioFrameObserver(IAudioFrameObserver observer) async {
  return await nativeCall('registerAudioFrameObserver', [observer]);
}