Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(fimstrip): Do not re-sort the active speakers if dominant speaker is visible. Fixes a case where re-sorting doesn't happen even when dominant speaker is currently not visible.

Jaya Allamsetty3975db7a68db
diff --git a/react/features/base/participants/functions.ts b/react/features/base/participants/functions.ts
index 7cda4a4a96..ce9ceef099 100644
--- a/react/features/base/participants/functions.ts
+++ b/react/features/base/participants/functions.ts
@@ -64,6 +64,7 @@ const AVATAR_CHECKER_FUNCTIONS = [
export function getActiveSpeakersToBeDisplayed(stateful: IStore | Function) {
const state = toState(stateful);
const {
+ dominantSpeaker,
fakeParticipants,
sortedRemoteScreenshares,
sortedRemoteVirtualScreenshareParticipants,
@@ -72,8 +73,8 @@ export function getActiveSpeakersToBeDisplayed(stateful: IStore | Function) {
const { visibleRemoteParticipants } = state['features/filmstrip'];
const activeSpeakers = new Map(speakersList);
- // Do not re-sort the active speakers if all of them are currently visible.
- if (typeof visibleRemoteParticipants === 'undefined' || activeSpeakers.size <= visibleRemoteParticipants.size) {
+ // Do not re-sort the active speakers if dominant speaker is currently visible.
+ if (dominantSpeaker && visibleRemoteParticipants.has(dominantSpeaker)) {
return activeSpeakers;
}
let availableSlotsForActiveSpeakers = visibleRemoteParticipants.size;