Interface IAudioFrameObserver

The audio frame observer.

Hierarchy

Methods

  • Gets the in-ear monitoring audio frame.

    In order to ensure that the obtained in-ear audio data meets the expectations, Agora recommends that you set the in-ear monitoring-ear audio data format as follows: After calling setEarMonitoringAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onEarMonitoringAudioFrame callback according to the sampling interval.

    Parameters

    • audioFrame: AudioFrame

      The raw audio data. See AudioFrame.

    Returns void

  • Retrieves the mixed captured and playback audio frame.

    To ensure that the data format of mixed captured and playback audio frame meets the expectations, Agora recommends that you set the data format as follows: After calling setMixedAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onMixedAudioFrame callback according to the sampling interval.

    Parameters

    • channelId: string

      The channel ID.

    • audioFrame: AudioFrame

      The raw audio data. See AudioFrame.

    Returns void

  • Gets the raw audio frame for playback.

    To ensure that the data format of audio frame for playback is as expected, Agora recommends that you set the audio data format as follows: After calling setPlaybackAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onPlaybackAudioFrame callback according to the sampling interval.

    Parameters

    • channelId: string

      The channel ID.

    • audioFrame: AudioFrame

      The raw audio data. See AudioFrame.

    Returns void

  • Retrieves the audio frame before mixing of subscribed remote users.

    Due to framework limitations, this callback does not support sending processed audio data back to the SDK.

    Parameters

    • channelId: string

      The channel ID.

    • uid: number

      The ID of subscribed remote users.

    • audioFrame: AudioFrame

      The raw audio data. See AudioFrame.

    Returns void

  • Gets the captured audio frame.

    To ensure that the data format of captured audio frame is as expected, Agora recommends that you set the audio data format as follows: After calling setRecordingAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object, the SDK will calculate the sampling interval according to the parameters set in this method, and triggers the onRecordAudioFrame callback according to the sampling interval.

    Parameters

    • channelId: string

      The channel ID.

    • audioFrame: AudioFrame

      The raw audio data. See AudioFrame.

    Returns void

Generated using TypeDoc