diff --git a/react/features/base/flags/constants.js b/react/features/base/flags/constants.js index 0dcfe2988..e2e4ee04d 100644 --- a/react/features/base/flags/constants.js +++ b/react/features/base/flags/constants.js @@ -37,6 +37,12 @@ export const CONFERENCE_TIMER_ENABLED = 'conference-timer.enabled'; */ export const CHAT_ENABLED = 'chat.enabled'; +/** + * Flag indicating if the filmstrip should be enabled. + * Default: enabled (true). + */ +export const FILMSTRIP_ENABLED = 'filmstrip.enabled'; + /** * Flag indicating if invite functionality should be enabled. * Default: enabled (true). @@ -75,6 +81,13 @@ export const MEETING_NAME_ENABLED = 'meeting-name.enabled'; */ export const MEETING_PASSWORD_ENABLED = 'meeting-password.enabled'; + +/** + * Flag indicating if the notifications should be enabled. + * Default: enabled (true). + */ +export const NOTIFICATIONS_ENABLED = 'notifications.enabled'; + /** * Flag indicating if Picture-in-Picture should be enabled. * Default: auto-detected. @@ -118,6 +131,12 @@ export const TILE_VIEW_ENABLED = 'tile-view.enabled'; */ export const TOOLBOX_ALWAYS_VISIBLE = 'toolbox.alwaysVisible'; +/** + * Flag indicating if the toolbox should be enabled + * Default: enabled. + */ +export const TOOLBOX_ENABLED = 'toolbox.enabled'; + /** * Flag indicating if the video share button should be enabled * Default: enabled (true). diff --git a/react/features/filmstrip/functions.native.js b/react/features/filmstrip/functions.native.js index f53fbfcef..859fca6bd 100644 --- a/react/features/filmstrip/functions.native.js +++ b/react/features/filmstrip/functions.native.js @@ -1,5 +1,6 @@ // @flow +import { getFeatureFlag, FILMSTRIP_ENABLED } from '../base/flags'; import { toState } from '../base/redux'; /** @@ -14,6 +15,13 @@ import { toState } from '../base/redux'; */ export function isFilmstripVisible(stateful: Object | Function) { const state = toState(stateful); + + const enabled = getFeatureFlag(state, FILMSTRIP_ENABLED, true); + + if (!enabled) { + return false; + } + const { length: participantCount } = state['features/base/participants']; return participantCount > 1; diff --git a/react/features/notifications/actions.js b/react/features/notifications/actions.js index 6531c31e0..9685143c2 100644 --- a/react/features/notifications/actions.js +++ b/react/features/notifications/actions.js @@ -3,6 +3,8 @@ import throttle from 'lodash/throttle'; import type { Dispatch } from 'redux'; +import { NOTIFICATIONS_ENABLED, getFeatureFlag } from '../base/flags'; + import { CLEAR_NOTIFICATIONS, HIDE_NOTIFICATION, @@ -81,9 +83,12 @@ export function showErrorNotification(props: Object) { export function showNotification(props: Object = {}, timeout: ?number) { return function(dispatch: Function, getState: Function) { const { notifications } = getState()['features/base/config']; - const shouldDisplay = !notifications - || notifications.includes(props.descriptionKey) - || notifications.includes(props.titleKey); + const enabledFlag = getFeatureFlag(getState(), NOTIFICATIONS_ENABLED, true); + + const shouldDisplay = enabledFlag + && (!notifications + || notifications.includes(props.descriptionKey) + || notifications.includes(props.titleKey)); if (shouldDisplay) { return dispatch({ diff --git a/react/features/toolbox/functions.native.js b/react/features/toolbox/functions.native.js index 5679ff5b1..961cc12e4 100644 --- a/react/features/toolbox/functions.native.js +++ b/react/features/toolbox/functions.native.js @@ -1,7 +1,7 @@ // @flow import { hasAvailableDevices } from '../base/devices'; -import { TOOLBOX_ALWAYS_VISIBLE, getFeatureFlag } from '../base/flags'; +import { TOOLBOX_ALWAYS_VISIBLE, getFeatureFlag, TOOLBOX_ENABLED } from '../base/flags'; import { toState } from '../base/redux'; import { isLocalVideoTrackDesktop } from '../base/tracks'; @@ -16,9 +16,10 @@ export function isToolboxVisible(stateful: Object | Function) { const state = toState(stateful); const { alwaysVisible, enabled, visible } = state['features/toolbox']; const { length: participantCount } = state['features/base/participants']; - const flag = getFeatureFlag(state, TOOLBOX_ALWAYS_VISIBLE, false); + const alwaysVisibleFlag = getFeatureFlag(state, TOOLBOX_ALWAYS_VISIBLE, false); + const enabledFlag = getFeatureFlag(state, TOOLBOX_ENABLED, true); - return enabled && (alwaysVisible || visible || participantCount === 1 || flag); + return enabledFlag && enabled && (alwaysVisible || visible || participantCount === 1 || alwaysVisibleFlag); } /** diff --git a/react/features/video-layout/functions.js b/react/features/video-layout/functions.js index fa3455b64..9e90777ac 100644 --- a/react/features/video-layout/functions.js +++ b/react/features/video-layout/functions.js @@ -1,5 +1,6 @@ // @flow +import { getFeatureFlag, TILE_VIEW_ENABLED } from '../base/flags'; import { getPinnedParticipant, getParticipantCount } from '../base/participants'; import { isYoutubeVideoPlaying } from '../youtube-player/functions'; @@ -82,9 +83,10 @@ export function shouldDisplayTileView(state: Object = {}) { return false; } + const tileViewEnabledFeatureFlag = getFeatureFlag(state, TILE_VIEW_ENABLED, true); const { disableTileView } = state['features/base/config']; - if (disableTileView) { + if (disableTileView || !tileViewEnabledFeatureFlag) { return false; }