fix(filmstrip): Remove SS ep from list of active speakers.

This fixes a case where duplicate SS tile appears when SS ep is the dominant speaker and all the active speakers are currently visisble.
This commit is contained in:
Jaya Allamsetty 2022-07-21 11:53:35 -04:00
parent 2def75db50
commit 2a5e169c2f
2 changed files with 5 additions and 3 deletions

View File

@ -63,12 +63,12 @@ export function getActiveSpeakersToBeDisplayed(stateful: Object | Function) {
speakersList
} = state['features/base/participants'];
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' || speakersList.size <= visibleRemoteParticipants.size) {
return speakersList;
if (typeof visibleRemoteParticipants === 'undefined' || activeSpeakers.size <= visibleRemoteParticipants.size) {
return activeSpeakers;
}
const activeSpeakers = new Map(speakersList);
let availableSlotsForActiveSpeakers = visibleRemoteParticipants.size;
// Remove screenshares from the count.

View File

@ -49,10 +49,12 @@ export function updateRemoteParticipants(store: Object, participantId: ?number)
remoteParticipants.delete(ownerId);
remoteParticipants.delete(screenshare);
speakers.delete(ownerId);
}
} else {
for (const screenshare of screenShares.keys()) {
remoteParticipants.delete(screenshare);
speakers.delete(screenshare);
}
}