feat: Add configuration to disable removing raised hand on dominant speaker (#9641)
* Add configuration to disable removing raised hand on dominant speaker change * Fix lint problem * Avoid dispatching unnecessary action * Fix lint problem
This commit is contained in:
parent
f1bf8e5f9a
commit
0bad0d9ecf
|
@ -144,6 +144,9 @@ var config = {
|
||||||
// Sets the preferred resolution (height) for local video. Defaults to 720.
|
// Sets the preferred resolution (height) for local video. Defaults to 720.
|
||||||
// resolution: 720,
|
// resolution: 720,
|
||||||
|
|
||||||
|
// Specifies whether the raised hand will hide when someone becomes a dominant speaker or not
|
||||||
|
// disableRemoveRaisedHandOnFocus: false,
|
||||||
|
|
||||||
// Specifies whether there will be a search field in speaker stats or not
|
// Specifies whether there will be a search field in speaker stats or not
|
||||||
// disableSpeakerStatsSearch: false,
|
// disableSpeakerStatsSearch: false,
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@ export default [
|
||||||
'disableRtx',
|
'disableRtx',
|
||||||
'disableShortcuts',
|
'disableShortcuts',
|
||||||
'disableShowMoreStats',
|
'disableShowMoreStats',
|
||||||
|
'disableRemoveRaisedHandOnFocus',
|
||||||
'disableSpeakerStatsSearch',
|
'disableSpeakerStatsSearch',
|
||||||
'disableSimulcast',
|
'disableSimulcast',
|
||||||
'disableThirdPartyRequests',
|
'disableThirdPartyRequests',
|
||||||
|
|
|
@ -49,6 +49,16 @@ export function getMeetingRegion(state: Object) {
|
||||||
return state['features/base/config']?.deploymentInfo?.region || '';
|
return state['features/base/config']?.deploymentInfo?.region || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selector used to get the disableRemoveRaisedHandOnFocus.
|
||||||
|
*
|
||||||
|
* @param {Object} state - The global state.
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
export function getDisableRemoveRaisedHandOnFocus(state: Object) {
|
||||||
|
return state['features/base/config']?.disableRemoveRaisedHandOnFocus || false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selector used to get the endpoint used for fetching the recording.
|
* Selector used to get the endpoint used for fetching the recording.
|
||||||
*
|
*
|
||||||
|
|
|
@ -13,6 +13,7 @@ import {
|
||||||
forEachConference,
|
forEachConference,
|
||||||
getCurrentConference
|
getCurrentConference
|
||||||
} from '../conference';
|
} from '../conference';
|
||||||
|
import { getDisableRemoveRaisedHandOnFocus } from '../config/functions.any';
|
||||||
import { JitsiConferenceEvents } from '../lib-jitsi-meet';
|
import { JitsiConferenceEvents } from '../lib-jitsi-meet';
|
||||||
import { MiddlewareRegistry, StateListenerRegistry } from '../redux';
|
import { MiddlewareRegistry, StateListenerRegistry } from '../redux';
|
||||||
import { playSound, registerSound, unregisterSound } from '../sounds';
|
import { playSound, registerSound, unregisterSound } from '../sounds';
|
||||||
|
@ -81,7 +82,8 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
// and only if it was set when this is the local participant
|
// and only if it was set when this is the local participant
|
||||||
|
|
||||||
const { conference, id } = action.participant;
|
const { conference, id } = action.participant;
|
||||||
const participant = getLocalParticipant(store.getState());
|
const state = store.getState();
|
||||||
|
const participant = getLocalParticipant(state);
|
||||||
const isLocal = participant && participant.id === id;
|
const isLocal = participant && participant.id === id;
|
||||||
|
|
||||||
if (isLocal && participant.raisedHand === undefined) {
|
if (isLocal && participant.raisedHand === undefined) {
|
||||||
|
@ -90,13 +92,14 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
participant
|
if (!getDisableRemoveRaisedHandOnFocus(state)) {
|
||||||
&& store.dispatch(participantUpdated({
|
participant && store.dispatch(participantUpdated({
|
||||||
conference,
|
conference,
|
||||||
id,
|
id,
|
||||||
local: isLocal,
|
local: isLocal,
|
||||||
raisedHand: false
|
raisedHand: false
|
||||||
}));
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue