fix(invite-sounds): Don't play joined sound for the poltergeist.
This commit is contained in:
parent
d89227829f
commit
8b91afd80d
|
@ -1691,6 +1691,7 @@ export default {
|
||||||
conference: room,
|
conference: room,
|
||||||
id,
|
id,
|
||||||
name: displayName,
|
name: displayName,
|
||||||
|
presence: user.getStatus(),
|
||||||
role: user.getRole()
|
role: user.getRole()
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import { updateDeviceList } from '../../react/features/base/devices';
|
||||||
import { JitsiTrackErrors } from '../../react/features/base/lib-jitsi-meet';
|
import { JitsiTrackErrors } from '../../react/features/base/lib-jitsi-meet';
|
||||||
import {
|
import {
|
||||||
getLocalParticipant,
|
getLocalParticipant,
|
||||||
participantPresenceChanged,
|
|
||||||
showParticipantJoinedNotification
|
showParticipantJoinedNotification
|
||||||
} from '../../react/features/base/participants';
|
} from '../../react/features/base/participants';
|
||||||
import { destroyLocalTracks } from '../../react/features/base/tracks';
|
import { destroyLocalTracks } from '../../react/features/base/tracks';
|
||||||
|
@ -487,10 +486,6 @@ UI.addUser = function(user) {
|
||||||
const status = user.getStatus();
|
const status = user.getStatus();
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
// if user has initial status dispatch it
|
|
||||||
// and skip 'connected' notifications
|
|
||||||
APP.store.dispatch(participantPresenceChanged(id, status));
|
|
||||||
|
|
||||||
// FIXME: move updateUserStatus in participantPresenceChanged action
|
// FIXME: move updateUserStatus in participantPresenceChanged action
|
||||||
UI.updateUserStatus(user, status);
|
UI.updateUserStatus(user, status);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../app';
|
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../app';
|
||||||
import { CONFERENCE_LEFT, CONFERENCE_WILL_JOIN } from '../conference';
|
import { CONFERENCE_LEFT, CONFERENCE_WILL_JOIN } from '../conference';
|
||||||
|
import { CALLING, INVITED } from '../../presence-status';
|
||||||
import { MiddlewareRegistry, StateListenerRegistry } from '../redux';
|
import { MiddlewareRegistry, StateListenerRegistry } from '../redux';
|
||||||
import UIEvents from '../../../../service/UI/UIEvents';
|
import UIEvents from '../../../../service/UI/UIEvents';
|
||||||
import { playSound, registerSound, unregisterSound } from '../sounds';
|
import { playSound, registerSound, unregisterSound } from '../sounds';
|
||||||
|
@ -193,7 +194,12 @@ function _maybePlaySounds({ getState, dispatch }, action) {
|
||||||
&& (!startAudioMuted
|
&& (!startAudioMuted
|
||||||
|| getParticipantCount(state) < startAudioMuted)) {
|
|| getParticipantCount(state) < startAudioMuted)) {
|
||||||
if (action.type === PARTICIPANT_JOINED) {
|
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) {
|
} else if (action.type === PARTICIPANT_LEFT) {
|
||||||
dispatch(playSound(PARTICIPANT_LEFT_SOUND_ID));
|
dispatch(playSound(PARTICIPANT_LEFT_SOUND_ID));
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,6 +175,7 @@ function _participantJoined({ participant }) {
|
||||||
local,
|
local,
|
||||||
name,
|
name,
|
||||||
pinned,
|
pinned,
|
||||||
|
presence,
|
||||||
role
|
role
|
||||||
} = participant;
|
} = participant;
|
||||||
let { avatarID, conference, id } = participant;
|
let { avatarID, conference, id } = participant;
|
||||||
|
@ -208,6 +209,7 @@ function _participantJoined({ participant }) {
|
||||||
local: local || false,
|
local: local || false,
|
||||||
name,
|
name,
|
||||||
pinned: pinned || false,
|
pinned: pinned || false,
|
||||||
|
presence,
|
||||||
role: role || PARTICIPANT_ROLE.NONE
|
role: role || PARTICIPANT_ROLE.NONE
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';
|
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';
|
||||||
import {
|
import {
|
||||||
getParticipantPresenceStatus,
|
getParticipantPresenceStatus,
|
||||||
|
PARTICIPANT_JOINED,
|
||||||
PARTICIPANT_JOINED_SOUND_ID,
|
PARTICIPANT_JOINED_SOUND_ID,
|
||||||
PARTICIPANT_LEFT,
|
PARTICIPANT_LEFT,
|
||||||
PARTICIPANT_UPDATED
|
PARTICIPANT_UPDATED
|
||||||
|
@ -82,6 +83,7 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PARTICIPANT_JOINED:
|
||||||
case PARTICIPANT_LEFT:
|
case PARTICIPANT_LEFT:
|
||||||
case PARTICIPANT_UPDATED: {
|
case PARTICIPANT_UPDATED: {
|
||||||
const newParticipantPresence
|
const newParticipantPresence
|
||||||
|
|
Loading…
Reference in New Issue