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:
parent
2def75db50
commit
2a5e169c2f
|
@ -63,12 +63,12 @@ export function getActiveSpeakersToBeDisplayed(stateful: Object | Function) {
|
||||||
speakersList
|
speakersList
|
||||||
} = state['features/base/participants'];
|
} = state['features/base/participants'];
|
||||||
const { visibleRemoteParticipants } = state['features/filmstrip'];
|
const { visibleRemoteParticipants } = state['features/filmstrip'];
|
||||||
|
const activeSpeakers = new Map(speakersList);
|
||||||
|
|
||||||
// Do not re-sort the active speakers if all of them are currently visible.
|
// Do not re-sort the active speakers if all of them are currently visible.
|
||||||
if (typeof visibleRemoteParticipants === 'undefined' || speakersList.size <= visibleRemoteParticipants.size) {
|
if (typeof visibleRemoteParticipants === 'undefined' || activeSpeakers.size <= visibleRemoteParticipants.size) {
|
||||||
return speakersList;
|
return activeSpeakers;
|
||||||
}
|
}
|
||||||
const activeSpeakers = new Map(speakersList);
|
|
||||||
let availableSlotsForActiveSpeakers = visibleRemoteParticipants.size;
|
let availableSlotsForActiveSpeakers = visibleRemoteParticipants.size;
|
||||||
|
|
||||||
// Remove screenshares from the count.
|
// Remove screenshares from the count.
|
||||||
|
|
|
@ -49,10 +49,12 @@ export function updateRemoteParticipants(store: Object, participantId: ?number)
|
||||||
|
|
||||||
remoteParticipants.delete(ownerId);
|
remoteParticipants.delete(ownerId);
|
||||||
remoteParticipants.delete(screenshare);
|
remoteParticipants.delete(screenshare);
|
||||||
|
speakers.delete(ownerId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const screenshare of screenShares.keys()) {
|
for (const screenshare of screenShares.keys()) {
|
||||||
remoteParticipants.delete(screenshare);
|
remoteParticipants.delete(screenshare);
|
||||||
|
speakers.delete(screenshare);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue