Auto enlarge speaker for large conferences

We are using Jitsi to broadcast low latency video from one speaker to many participants.
The speaker is the only person whose video and audio is shown. For all others audio and video is muted.
For the sake of user experience we automatically enlarge the speaker video.

We enlarge the video by scrolling through the participants list via javascript to find the video and click on it when found. This approach works well for smaller audiences but gets error prone for 200 participants and above. Mainly because the video is not in the DOM, until it is scrolled to the visible area.

I am wondering whether there is a better way to find the video and automatically enlarge the speaker.
Any suggestions would be welcome.

Wouldn’t switching to stage view fix this issue as it focuses to the active speaker?

Thank you for your suggestion.
Is stage view the view where the participants are shown in the filmstrip?
If yes, that’s the way we do it. But the participant with the camera on (active speaker) is not shown automatically. Instead we have to scroll through the participants list until the camera appears, so that we can click on it.

Hmm… it should. But with the caveat that if you are the active speaker then you may not see yourself and instead see the previous active speaker (?).

You can also make sure it doesn’t automatically flip back to tile view using disableTileView=true.

For example, you could do:

Are there websocket errors in your browser console?

No, everything seems to be fine. No websocket errors.

I am still looking for a more clever way to automatically enlarge the speaker. To me it seems that the main thing is that the video is not part of the DOM until a participant scrolls to it. I guess it is an optimization which makes a lot of sense (why should I add add video to the DOM if the participant doesn’t see it?). Unfortunately in my (probably somewhat unusual scenario) it prevents to auto enlarge the speaker without scrolling through the DOM via javascript:element.scrollIntoView. This approach works, but takes more time the more participants are in the conference.
I guess there must be a better approach…