Skip to content

Commit

Permalink
fix(raised-hand) Preserve raised hand order for active speaker
Browse files Browse the repository at this point in the history
- fixes: #10609
  • Loading branch information
horymury committed Jan 13, 2022
1 parent b1a2ac6 commit 2769b94
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions react/features/participants-pane/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,14 @@ export function getSortedParticipantIds(stateful: Object | Function): Array<stri
}

const dominant = [];
const dominantId = dominantSpeaker?.id;
const local = remoteRaisedHandParticipants.has(id) ? [] : [ id ];

// Remove dominant speaker.
if (dominantSpeaker && dominantSpeaker.id !== id) {
remoteRaisedHandParticipants.delete(dominantSpeaker.id);
reorderedParticipants.delete(dominantSpeaker.id);
dominant.push(dominantSpeaker.id);
// In case dominat speaker has raised hand, keep the order in the raised hand queue.
// In case they don't have raised hand, goes first in the participants list.
if (dominantId && dominantId !== id && !remoteRaisedHandParticipants.has(dominantId)) {
reorderedParticipants.delete(dominantId);
dominant.push(dominantId);
}

// Move self and participants with raised hand to the top of the list.
Expand Down

0 comments on commit 2769b94

Please sign in to comment.