startAudioSpectrumMonitor method
- {int? millisecond}
Starts audio spectrum monitoring. Support setting the listening interval.
Available since: 1.15.0 Description: After starting monitoring, you can receive local audio spectrum via onCapturedAudioSpectrumUpdate callback, and receive remote audio spectrum via onRemoteAudioSpectrumUpdate callback. Use cases: In the host K song scene, has been published or played under the premise that the host or audience to see the tone and volume change animation. When to call: After the engine is created createEngine. Caution: onCapturedAudioSpectrumUpdate and onRemoteAudioSpectrumUpdate callback notification period is the value set by the parameter.
millisecond
Monitoring time period of the audio spectrum, in milliseconds, has a value range of100, 3000
. Default is 100 ms.
Implementation
Future<void> startAudioSpectrumMonitor({int? millisecond}) async {
return await ZegoExpressImpl.instance
.startAudioSpectrumMonitor(millisecond: millisecond);
}