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: Hide self-view and buttons in visitors mode.
damencho863fd124880e
diff --git a/react/features/base/config/constants.ts b/react/features/base/config/constants.tsindex 6358c1ecf2..171bbc3791 100644--- a/react/features/base/config/constants.ts+++ b/react/features/base/config/constants.ts@@ -61,6 +61,11 @@ export const PREMEETING_BUTTONS = [ 'microphone', 'camera', 'select-background',*/export const THIRD_PARTY_PREJOIN_BUTTONS = [ 'microphone', 'camera', 'select-background' ];+/**+ * The toolbar buttons to show when in visitors mode.+ */+export const VISITORS_MODE_BUTTONS = [ 'hangup', 'tileview' ];+/*** The set of feature flags.*diff --git a/react/features/base/settings/functions.any.ts b/react/features/base/settings/functions.any.tsindex 18322c7287..175a5cf33e 100644--- a/react/features/base/settings/functions.any.ts+++ b/react/features/base/settings/functions.any.ts@@ -114,11 +114,12 @@ export function shouldHideShareAudioHelper(state: IReduxState): boolean | undefi}/**- * Gets the disable self view setting.+ * Gets the disabled self view setting.** @param {Object} state - Redux state.* @returns {boolean}*/export function getHideSelfView(state: IReduxState) {- return state['features/base/config'].disableSelfView || state['features/base/settings'].disableSelfView;+ return state['features/base/config'].disableSelfView || state['features/base/settings'].disableSelfView+ || state['features/visitors'].enabled;}diff --git a/react/features/toolbox/components/web/Toolbox.tsx b/react/features/toolbox/components/web/Toolbox.tsxindex 49a8a26133..93d26f60cc 100644--- a/react/features/toolbox/components/web/Toolbox.tsx+++ b/react/features/toolbox/components/web/Toolbox.tsx@@ -11,6 +11,7 @@ import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } frimport { sendAnalytics } from '../../../analytics/functions';import { IReduxState } from '../../../app/types';import { IJitsiConference } from '../../../base/conference/reducer';+import { VISITORS_MODE_BUTTONS } from '../../../base/config/constants';import {getButtonsWithNotifyClick,getMultipleVideoSendingSupportFeatureFlag,@@ -1562,7 +1563,11 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {const localParticipant = getLocalParticipant(state);const localVideo = getLocalVideoTrack(state['features/base/tracks']);const { clientWidth } = state['features/base/responsive-ui'];- const toolbarButtons = ownProps.toolbarButtons || getToolbarButtons(state);+ let toolbarButtons = ownProps.toolbarButtons || getToolbarButtons(state);++ if (state['features/visitors'].enabled) {+ toolbarButtons = VISITORS_MODE_BUTTONS.filter(e => toolbarButtons.indexOf(e) > -1);+ }return {_backgroundType: state['features/virtual-background'].backgroundType ?? '',