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
feat: Add configuration to disable removing raised hand on dominant speaker (#9641)
dimitardelchev930bad0d9ecf7f
diff --git a/config.js b/config.jsindex 30ecdcd487..889f04113b 100644--- a/config.js+++ b/config.js@@ -144,6 +144,9 @@ var config = {// Sets the preferred resolution (height) for local video. Defaults to 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// disableSpeakerStatsSearch: false,diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.jsindex 7c9702653c..bf8fce2486 100644--- a/react/features/base/config/configWhitelist.js+++ b/react/features/base/config/configWhitelist.js@@ -103,6 +103,7 @@ export default ['disableRtx','disableShortcuts','disableShowMoreStats',+ 'disableRemoveRaisedHandOnFocus','disableSpeakerStatsSearch','disableSimulcast','disableThirdPartyRequests',diff --git a/react/features/base/config/functions.any.js b/react/features/base/config/functions.any.jsindex 8840ec5eff..3cc0189c31 100644--- a/react/features/base/config/functions.any.js+++ b/react/features/base/config/functions.any.js@@ -49,6 +49,16 @@ export function getMeetingRegion(state: Object) {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.*diff --git a/react/features/base/participants/middleware.js b/react/features/base/participants/middleware.jsindex 99ded632cf..a94dea7a45 100644--- a/react/features/base/participants/middleware.js+++ b/react/features/base/participants/middleware.js@@ -13,6 +13,7 @@ import {forEachConference,getCurrentConference} from '../conference';+import { getDisableRemoveRaisedHandOnFocus } from '../config/functions.any';import { JitsiConferenceEvents } from '../lib-jitsi-meet';import { MiddlewareRegistry, StateListenerRegistry } from '../redux';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 participantconst { conference, id } = action.participant;- const participant = getLocalParticipant(store.getState());+ const state = store.getState();+ const participant = getLocalParticipant(state);const isLocal = participant && participant.id === id;if (isLocal && participant.raisedHand === undefined) {@@ -90,13 +92,14 @@ MiddlewareRegistry.register(store => next => action => {break;}- participant- && store.dispatch(participantUpdated({+ if (!getDisableRemoveRaisedHandOnFocus(state)) {+ participant && store.dispatch(participantUpdated({conference,id,local: isLocal,raisedHand: false}));+ }break;}