Bläddra i källkod

fix(dominant-speaker): Lower hand through xmpp for dominant speaker (#10220)

master
Horatiu Muresan 4 år sedan
förälder
incheckning
2cfa5f6312
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 6 tillägg och 17 borttagningar
  1. 6
    17
      react/features/base/participants/middleware.js

+ 6
- 17
react/features/base/participants/middleware.js Visa fil

60
 } from './functions';
60
 } from './functions';
61
 import { PARTICIPANT_JOINED_FILE, PARTICIPANT_LEFT_FILE } from './sounds';
61
 import { PARTICIPANT_JOINED_FILE, PARTICIPANT_LEFT_FILE } from './sounds';
62
 
62
 
63
+import { hasRaisedHand, raiseHand } from '.';
64
+
63
 declare var APP: Object;
65
 declare var APP: Object;
64
 
66
 
65
 /**
67
 /**
86
         break;
88
         break;
87
 
89
 
88
     case DOMINANT_SPEAKER_CHANGED: {
90
     case DOMINANT_SPEAKER_CHANGED: {
89
-        // Ensure the raised hand state is cleared for the dominant speaker
90
-        // and only if it was set when this is the local participant
91
-
92
-        const { conference, id } = action.participant;
91
+        // Lower hand through xmpp when local participant becomes dominant speaker.
92
+        const { id } = action.participant;
93
         const state = store.getState();
93
         const state = store.getState();
94
         const participant = getLocalParticipant(state);
94
         const participant = getLocalParticipant(state);
95
         const isLocal = participant && participant.id === id;
95
         const isLocal = participant && participant.id === id;
96
 
96
 
97
-        if (isLocal && participant.raisedHandTimestamp === undefined) {
98
-            // if local was undefined, let's leave it like that
99
-            // avoids sending unnecessary presence updates
100
-            break;
101
-        }
102
-
103
-        if (!getDisableRemoveRaisedHandOnFocus(state)) {
104
-            participant && store.dispatch(participantUpdated({
105
-                conference,
106
-                id,
107
-                local: isLocal,
108
-                raisedHandTimestamp: 0
109
-            }));
97
+        if (isLocal && hasRaisedHand(participant) && !getDisableRemoveRaisedHandOnFocus(state)) {
98
+            store.dispatch(raiseHand(false));
110
         }
99
         }
111
 
100
 
112
         break;
101
         break;

Laddar…
Avbryt
Spara