IAudioSpectrumObserver

Audio spectrum observer.

onRemoteAudioSpectrum

Receives the remote audio spectrum.

onRemoteAudioSpectrum?(
    spectrums: UserAudioSpectrumInfo[],
    spectrumNumber: number
  ): void;

After successfully calling registerAudioSpectrumObserver, implementing the onRemoteAudioSpectrum callback of IAudioSpectrumObserver, and enabling audio spectrum monitoring via enableAudioSpectrumMonitor, the SDK triggers this callback at the set interval to report the received remote audio spectrum data.

Parameters

spectrums
The audio spectrum information of remote users. See UserAudioSpectrumInfo. The array size equals the number of remote users detected by the SDK. An empty array indicates no remote audio spectrum was detected.
spectrumNumber
The number of remote users.