Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

rn,flags: add feature flag to show/hide the 'Raise Hand' button

patidarsa18fd1cdb39e
diff --git a/react/features/base/flags/constants.js b/react/features/base/flags/constants.js
index 7cb793cfc5..7621476c71 100644
--- a/react/features/base/flags/constants.js
+++ b/react/features/base/flags/constants.js
@@ -69,6 +69,12 @@ export const MEETING_PASSWORD_ENABLED = 'meeting-password.enabled';
*/
export const PIP_ENABLED = 'pip.enabled';
+/**
+ * Flag indicating if raise hand feature should be enabled.
+ * Default: enabled.
+ */
+export const RAISE_HAND_ENABLED = 'raise-hand.enabled';
+
/**
* Flag indicating if recording should be enabled.
* Default: auto-detected.
diff --git a/react/features/toolbox/components/native/RaiseHandButton.js b/react/features/toolbox/components/native/RaiseHandButton.js
index 3d5c1c77b1..7e3fd85b78 100644
--- a/react/features/toolbox/components/native/RaiseHandButton.js
+++ b/react/features/toolbox/components/native/RaiseHandButton.js
@@ -15,6 +15,7 @@ import {
import { connect } from '../../../base/redux';
import { AbstractButton } from '../../../base/toolbox';
import type { AbstractButtonProps } from '../../../base/toolbox';
+import { RAISE_HAND_ENABLED, getFeatureFlag } from '../../../base/flags';
/**
* The type of the React {@code Component} props of {@link RaiseHandButton}.
@@ -96,17 +97,19 @@ class RaiseHandButton extends AbstractButton<Props, *> {
* Maps part of the Redux state to the props of this component.
*
* @param {Object} state - The Redux state.
+ * @param {Object} ownProps - The properties explicitly passed to the component instance.
* @private
- * @returns {{
- * _raisedHand: boolean
- * }}
+ * @returns {Props}
*/
-function _mapStateToProps(state): Object {
+function _mapStateToProps(state, ownProps): Object {
const _localParticipant = getLocalParticipant(state);
+ const enabled = getFeatureFlag(state, RAISE_HAND_ENABLED, true);
+ const { visible = enabled } = ownProps;
return {
_localParticipant,
- _raisedHand: _localParticipant.raisedHand
+ _raisedHand: _localParticipant.raisedHand,
+ visible
};
}