onCapturedAudioData property
getter/setter pair
The callback for obtaining the audio data captured by the local microphone.
Available: Since 1.1.0
Description: In non-custom audio capture mode, the SDK capture the microphone's sound, but the developer may also need to get a copy of the audio data captured by the SDK is available through this callback.
When to trigger: On the premise of calling setAudioDataHandler
to set the listener callback, after calling startAudioDataObserver
to set the mask 0b01 that means 1 << 0, this callback will be triggered only when it is in the publishing stream state.
Restrictions: None.
Caution: This callback is a high-frequency callback, please do not perform time-consuming operations in this callback.
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)?
onCapturedAudioData;