How to get current active speaker

Can we get the current active speaker from onActiveSpeakerVideoUserChanged callback?

Seems the onActiveSpeakerVideoUserChanged will not be triggered when there are only 2 users in the meeting?

Which version?

Hi @reamer, thanks for the post.

Can you please provide some more info about your use case while we look into this behavior?


hello @jon.zoom

My test case is:
user A joined via SDK, user B joined via Zoom Native APP, and only these 2 users in meeting, onActiveSpeakerVideoUserChanged was not triggered no matter who was speaking.
Then user C joined via SDK, onActiveSpeakerVideoUserChanged was triggered correctly when someone spoke.

So is there any limitation for onActiveSpeakerVideoUserChanged? How it works currently?

Thank you

Hi @reamer, thanks for clarifying.

I was able to reproduce this behavior locally and will have to investigate whether this is intentional or is a bug and get back to you.


Hi @reamer, after looking into this further, we have determined that this is expected behavior.

When you are in a meeting containing X participants (self-inclusive), there will be X-1 possible targets for the currently active audio. Your own audio is not part of the pool of potentially active audio users because you do not hear your own audio played.

Keeping that in mind, when you join a meeting with one other participant, the pool of potentially active users consists of the other user only. When only one possible target exists, it is not logically possible for the user who is considered active to change to another user.

Now when a third user joins the meeting, the pool of non-self participants grows to two, allowing the active user to be updated between the two of them.

Hope this helps!

hi @jon.zoom

Noted on above, thanks for your reply.

A supplement as I observed: if the third user leaves the meeting, the onActiveSpeakerVideoUserChanged can still be triggered correctly even if there are only 2 users again