fix(moderation) highlight dominant speaker (#9750)

This commit is contained in:
Avram Tudor 2021-08-19 14:08:30 +03:00 committed by GitHub
parent 5c1e2b4bd2
commit 4b3d92dcbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 3 deletions

View File

@ -48,4 +48,11 @@
.participants_pane-content {
width: 100%;
}
}
}
.jitsi-icon {
&-dominant-speaker {
background-color: #1EC26A;
border-radius: 3px;
}
}

View File

@ -458,9 +458,12 @@ export function getSortedParticipants(stateful: Object | Function) {
const remoteParticipants = getRemoteParticipants(stateful);
const items = [];
const dominantSpeaker = getDominantSpeakerParticipant(stateful);
remoteParticipants.forEach(p => {
items.push(p);
if (p !== dominantSpeaker) {
items.push(p);
}
});
items.sort((a, b) =>
@ -469,6 +472,10 @@ export function getSortedParticipants(stateful: Object | Function) {
items.unshift(localParticipant);
if (dominantSpeaker && dominantSpeaker !== localParticipant) {
items.unshift(dominantSpeaker);
}
return items;
}

View File

@ -259,6 +259,10 @@ export const ParticipantStates = styled.div`
& > *:not(:last-child) {
margin-right: 8px;
}
.jitsi-icon {
padding: 3px;
}
`;
export const ParticipantContainer = styled.div`

View File

@ -65,7 +65,7 @@ export const QUICK_ACTION_BUTTON: {
export const AudioStateIcons: {[MediaState]: React$Element<any> | null} = {
[MEDIA_STATE.DOMINANT_SPEAKER]: (
<Icon
color = '#1EC26A'
className = 'jitsi-icon-dominant-speaker'
size = { 16 }
src = { IconMicrophoneEmpty } />
),