Explorar el Código

fix(moderation) highlight dominant speaker (#9750)

master
Avram Tudor hace 4 años
padre
commit
4b3d92dcbd
No account linked to committer's email address

+ 8
- 1
css/_participants-pane.scss Ver fichero

@@ -48,4 +48,11 @@
48 48
     .participants_pane-content {
49 49
         width: 100%;
50 50
     }
51
-}
51
+}
52
+
53
+.jitsi-icon {
54
+    &-dominant-speaker {
55
+        background-color: #1EC26A;
56
+        border-radius: 3px;
57
+    }
58
+}

+ 8
- 1
react/features/base/participants/functions.js Ver fichero

@@ -458,9 +458,12 @@ export function getSortedParticipants(stateful: Object | Function) {
458 458
     const remoteParticipants = getRemoteParticipants(stateful);
459 459
 
460 460
     const items = [];
461
+    const dominantSpeaker = getDominantSpeakerParticipant(stateful);
461 462
 
462 463
     remoteParticipants.forEach(p => {
463
-        items.push(p);
464
+        if (p !== dominantSpeaker) {
465
+            items.push(p);
466
+        }
464 467
     });
465 468
 
466 469
     items.sort((a, b) =>
@@ -469,6 +472,10 @@ export function getSortedParticipants(stateful: Object | Function) {
469 472
 
470 473
     items.unshift(localParticipant);
471 474
 
475
+    if (dominantSpeaker && dominantSpeaker !== localParticipant) {
476
+        items.unshift(dominantSpeaker);
477
+    }
478
+
472 479
     return items;
473 480
 }
474 481
 

+ 4
- 0
react/features/participants-pane/components/web/styled.js Ver fichero

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

+ 1
- 1
react/features/participants-pane/constants.js Ver fichero

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

Loading…
Cancelar
Guardar