Selaa lähdekoodia

fix(speaker-stats): responsiveness of facial expressions (#10664)

factor2
Gabriel Borlea 4 vuotta sitten
vanhempi
commit
f8340bfd41
No account linked to committer's email address

+ 3
- 0
react/features/speaker-stats/components/AbstractSpeakerStatsList.js Näytä tiedosto

@@ -7,6 +7,7 @@ import { useDispatch, useSelector } from 'react-redux';
7 7
 import { getLocalParticipant } from '../../base/participants';
8 8
 import { initUpdateStats } from '../actions';
9 9
 import {
10
+    REDUCE_EXPRESSIONS_THRESHOLD,
10 11
     SPEAKER_STATS_RELOAD_INTERVAL
11 12
 } from '../constants';
12 13
 
@@ -22,6 +23,7 @@ const abstractSpeakerStatsList = (speakerStatsItem: Function): Function[] => {
22 23
     const conference = useSelector(state => state['features/base/conference'].conference);
23 24
     const speakerStats = useSelector(state => state['features/speaker-stats'].stats);
24 25
     const localParticipant = useSelector(getLocalParticipant);
26
+    const { clientWidth } = useSelector(state => state['features/base/responsive-ui']);
25 27
     const { defaultRemoteDisplayName, enableFacialRecognition } = useSelector(
26 28
         state => state['features/base/config']) || {};
27 29
     const { facialExpressions: localFacialExpressions } = useSelector(
@@ -93,6 +95,7 @@ const abstractSpeakerStatsList = (speakerStatsItem: Function): Function[] => {
93 95
             props.facialExpressions = statsModel.getFacialExpressions();
94 96
         }
95 97
         props.showFacialExpressions = enableFacialRecognition;
98
+        props.reduceExpressions = clientWidth < REDUCE_EXPRESSIONS_THRESHOLD;
96 99
         props.displayName = statsModel.getDisplayName() || defaultRemoteDisplayName;
97 100
         props.t = t;
98 101
 

+ 5
- 0
react/features/speaker-stats/constants.js Näytä tiedosto

@@ -1 +1,6 @@
1
+/**
2
+ * The with of the client at witch the facial expressions will be reduced to only 4.
3
+ */
4
+export const REDUCE_EXPRESSIONS_THRESHOLD = 750;
5
+
1 6
 export const SPEAKER_STATS_RELOAD_INTERVAL = 1000;

Loading…
Peruuta
Tallenna