Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(invite-sounds): Don't play joined sound for the poltergeist.
hristoterezov8b91afd80dc1
diff --git a/conference.js b/conference.jsindex d5ac0a340b..a960437892 100644--- a/conference.js+++ b/conference.js@@ -1691,6 +1691,7 @@ export default {conference: room,id,name: displayName,+ presence: user.getStatus(),role: user.getRole()}));diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex d3947ed48f..4425b73792 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -24,7 +24,6 @@ import { updateDeviceList } from '../../react/features/base/devices';import { JitsiTrackErrors } from '../../react/features/base/lib-jitsi-meet';import {getLocalParticipant,- participantPresenceChanged,showParticipantJoinedNotification} from '../../react/features/base/participants';import { destroyLocalTracks } from '../../react/features/base/tracks';@@ -487,10 +486,6 @@ UI.addUser = function(user) {const status = user.getStatus();if (status) {- // if user has initial status dispatch it- // and skip 'connected' notifications- APP.store.dispatch(participantPresenceChanged(id, status));-// FIXME: move updateUserStatus in participantPresenceChanged actionUI.updateUserStatus(user, status);} else {diff --git a/react/features/base/participants/middleware.js b/react/features/base/participants/middleware.jsindex ddd7f0a494..d0fc0edc6f 100644--- a/react/features/base/participants/middleware.js+++ b/react/features/base/participants/middleware.js@@ -2,6 +2,7 @@import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../app';import { CONFERENCE_LEFT, CONFERENCE_WILL_JOIN } from '../conference';+import { CALLING, INVITED } from '../../presence-status';import { MiddlewareRegistry, StateListenerRegistry } from '../redux';import UIEvents from '../../../../service/UI/UIEvents';import { playSound, registerSound, unregisterSound } from '../sounds';@@ -193,7 +194,12 @@ function _maybePlaySounds({ getState, dispatch }, action) {&& (!startAudioMuted|| getParticipantCount(state) < startAudioMuted)) {if (action.type === PARTICIPANT_JOINED) {- dispatch(playSound(PARTICIPANT_JOINED_SOUND_ID));+ const { presence } = action.participant;++ // The sounds for the poltergeist are handled by features/invite.+ if (presence !== INVITED && presence !== CALLING) {+ dispatch(playSound(PARTICIPANT_JOINED_SOUND_ID));+ }} else if (action.type === PARTICIPANT_LEFT) {dispatch(playSound(PARTICIPANT_LEFT_SOUND_ID));}diff --git a/react/features/base/participants/reducer.js b/react/features/base/participants/reducer.jsindex 20d86aadf6..cd72174798 100644--- a/react/features/base/participants/reducer.js+++ b/react/features/base/participants/reducer.js@@ -175,6 +175,7 @@ function _participantJoined({ participant }) {local,name,pinned,+ presence,role} = participant;let { avatarID, conference, id } = participant;@@ -208,6 +209,7 @@ function _participantJoined({ participant }) {local: local || false,name,pinned: pinned || false,+ presence,role: role || PARTICIPANT_ROLE.NONE};}diff --git a/react/features/invite/middleware.any.js b/react/features/invite/middleware.any.jsindex 922197f51e..6535913670 100644--- a/react/features/invite/middleware.any.js+++ b/react/features/invite/middleware.any.js@@ -3,6 +3,7 @@import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';import {getParticipantPresenceStatus,+ PARTICIPANT_JOINED,PARTICIPANT_JOINED_SOUND_ID,PARTICIPANT_LEFT,PARTICIPANT_UPDATED@@ -82,6 +83,7 @@ MiddlewareRegistry.register(store => next => action => {}break;+ case PARTICIPANT_JOINED:case PARTICIPANT_LEFT:case PARTICIPANT_UPDATED: {const newParticipantPresence