activeSpeaker property Null safety

UidCallback? activeSpeaker
read / write

Reports which user is the loudest speaker.

This callback reports the speaker with the highest accumulative volume during a certain period. If the user enables the audio volume indication by calling RtcEngine.enableAudioVolumeIndication, this callback returns the uid of the active speaker whose voice is detected by the audio volume detection module of the SDK.

Note

  • To receive this callback, you need to call RtcEngine.enableAudioVolumeIndication.
  • This callback returns the user ID of the user with the highest voice volume during a period of time, instead of at the moment.

The UidCallback typedef includes the following parameters:

  • int uid: User ID of the active speaker. A uid of 0 represents the local user.

Implementation

UidCallback? activeSpeaker;