audioVolumeIndication property

AudioVolumeCallback? audioVolumeIndication
getter/setter pair

Reports which users are speaking and the speakers' volume, and whether the local user is speaking.

This callback reports the IDs and volumes of the loudest speakers (at most 3) at the moment in the channel, and whether the local user is speaking. By default, this callback is disabled. You can enable it by calling the RtcEngine.enableAudioVolumeIndication method. Once enabled, this callback is triggered at the set interval, regardless of whether a user speaks or not. The SDK triggers two independent audioVolumeIndication callbacks at one time, which separately report the volume information of the local user and all the remote speakers. For more information, see the detailed parameter descriptions.

Note

The AudioVolumeCallback typedef includes the following parameters:

  • List<AudioVolumeInfo> speakers: An array containing the user ID and volume information for each speaker.
  • int totalVolume: Total volume after audio mixing. The value ranges between 0 (lowest volume) and 255 (highest volume).

Implementation

AudioVolumeCallback? audioVolumeIndication;