onPlaybackAudioData property

(void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param)?) onPlaybackAudioData
getter/setter pair

The callback for obtaining the audio data of all the streams playback by SDK.

Available: Since 1.1.0 Description: This function will callback all the mixed audio data to be playback. This callback can be used for that you needs to fetch all the mixed audio data to be playback to proccess. When to trigger: On the premise of calling setAudioDataHandler to set the listener callback, after calling startAudioDataObserver to set the mask 0b10 that means 1 << 1, this callback will be triggered only when it is in the SDK inner audio and video engine started(called the startPreivew or startPlayingStream or startPublishingStream). Restrictions: When playing copyrighted music, this callback will be disabled by default. If necessary, please contact ZEGO technical support. Caution: This callback is a high-frequency callback. Please do not perform time-consuming operations in this callback. When the engine is not in the stream publishing state and the media player is not used to play media files, the audio data in the callback is muted audio data.

  • data Audio data in PCM format.
  • dataLength Length of the data.
  • param Parameters of the audio frame.

Implementation

static void Function(
        Uint8List data, int dataLength, ZegoAudioFrameParam param)?
    onPlaybackAudioData;