Pārlūkot izejas kodu

fix(invite-sounds): Don't play joined sound for the poltergeist.

j8
hristoterezov 7 gadus atpakaļ
vecāks
revīzija
8b91afd80d

+ 1
- 0
conference.js Parādīt failu

@@ -1691,6 +1691,7 @@ export default {
1691 1691
                 conference: room,
1692 1692
                 id,
1693 1693
                 name: displayName,
1694
+                presence: user.getStatus(),
1694 1695
                 role: user.getRole()
1695 1696
             }));
1696 1697
 

+ 0
- 5
modules/UI/UI.js Parādīt failu

@@ -24,7 +24,6 @@ import { updateDeviceList } from '../../react/features/base/devices';
24 24
 import { JitsiTrackErrors } from '../../react/features/base/lib-jitsi-meet';
25 25
 import {
26 26
     getLocalParticipant,
27
-    participantPresenceChanged,
28 27
     showParticipantJoinedNotification
29 28
 } from '../../react/features/base/participants';
30 29
 import { destroyLocalTracks } from '../../react/features/base/tracks';
@@ -487,10 +486,6 @@ UI.addUser = function(user) {
487 486
     const status = user.getStatus();
488 487
 
489 488
     if (status) {
490
-        // if user has initial status dispatch it
491
-        // and skip 'connected' notifications
492
-        APP.store.dispatch(participantPresenceChanged(id, status));
493
-
494 489
         // FIXME: move updateUserStatus in participantPresenceChanged action
495 490
         UI.updateUserStatus(user, status);
496 491
     } else {

+ 7
- 1
react/features/base/participants/middleware.js Parādīt failu

@@ -2,6 +2,7 @@
2 2
 
3 3
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../app';
4 4
 import { CONFERENCE_LEFT, CONFERENCE_WILL_JOIN } from '../conference';
5
+import { CALLING, INVITED } from '../../presence-status';
5 6
 import { MiddlewareRegistry, StateListenerRegistry } from '../redux';
6 7
 import UIEvents from '../../../../service/UI/UIEvents';
7 8
 import { playSound, registerSound, unregisterSound } from '../sounds';
@@ -193,7 +194,12 @@ function _maybePlaySounds({ getState, dispatch }, action) {
193 194
             && (!startAudioMuted
194 195
                 || getParticipantCount(state) < startAudioMuted)) {
195 196
         if (action.type === PARTICIPANT_JOINED) {
196
-            dispatch(playSound(PARTICIPANT_JOINED_SOUND_ID));
197
+            const { presence } = action.participant;
198
+
199
+            // The sounds for the poltergeist are handled by features/invite.
200
+            if (presence !== INVITED && presence !== CALLING) {
201
+                dispatch(playSound(PARTICIPANT_JOINED_SOUND_ID));
202
+            }
197 203
         } else if (action.type === PARTICIPANT_LEFT) {
198 204
             dispatch(playSound(PARTICIPANT_LEFT_SOUND_ID));
199 205
         }

+ 2
- 0
react/features/base/participants/reducer.js Parādīt failu

@@ -175,6 +175,7 @@ function _participantJoined({ participant }) {
175 175
         local,
176 176
         name,
177 177
         pinned,
178
+        presence,
178 179
         role
179 180
     } = participant;
180 181
     let { avatarID, conference, id } = participant;
@@ -208,6 +209,7 @@ function _participantJoined({ participant }) {
208 209
         local: local || false,
209 210
         name,
210 211
         pinned: pinned || false,
212
+        presence,
211 213
         role: role || PARTICIPANT_ROLE.NONE
212 214
     };
213 215
 }

+ 2
- 0
react/features/invite/middleware.any.js Parādīt failu

@@ -3,6 +3,7 @@
3 3
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';
4 4
 import {
5 5
     getParticipantPresenceStatus,
6
+    PARTICIPANT_JOINED,
6 7
     PARTICIPANT_JOINED_SOUND_ID,
7 8
     PARTICIPANT_LEFT,
8 9
     PARTICIPANT_UPDATED
@@ -82,6 +83,7 @@ MiddlewareRegistry.register(store => next => action => {
82 83
         }
83 84
         break;
84 85
 
86
+    case PARTICIPANT_JOINED:
85 87
     case PARTICIPANT_LEFT:
86 88
     case PARTICIPANT_UPDATED: {
87 89
         const newParticipantPresence

Notiek ielāde…
Atcelt
Saglabāt