Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(moderation) highlight dominant speaker #9750

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion css/_participants-pane.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,11 @@
.participants_pane-content {
width: 100%;
}
}
}

.jitsi-icon {
&-dominant-speaker {
background-color: #1EC26A;
border-radius: 3px;
}
}
9 changes: 8 additions & 1 deletion react/features/base/participants/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand All @@ -469,6 +472,10 @@ export function getSortedParticipants(stateful: Object | Function) {

items.unshift(localParticipant);

if (dominantSpeaker && dominantSpeaker !== localParticipant) {
items.unshift(dominantSpeaker);
}

return items;
}

Expand Down
4 changes: 4 additions & 0 deletions react/features/participants-pane/components/web/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ export const ParticipantStates = styled.div`
& > *:not(:last-child) {
margin-right: 8px;
}

.jitsi-icon {
padding: 3px;
}
`;

export const ParticipantContainer = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion react/features/participants-pane/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 } />
),
Expand Down