瀏覽代碼

fix(moderation) highlight dominant speaker (#9750)

master
Avram Tudor 4 年之前
父節點
當前提交
4b3d92dcbd
沒有連結到貢獻者的電子郵件帳戶。

+ 8
- 1
css/_participants-pane.scss 查看文件

48
     .participants_pane-content {
48
     .participants_pane-content {
49
         width: 100%;
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 查看文件

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

+ 4
- 0
react/features/participants-pane/components/web/styled.js 查看文件

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

+ 1
- 1
react/features/participants-pane/constants.js 查看文件

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

Loading…
取消
儲存