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
fix(pre-meeting) Hide invite button for JaaS
hmuresana892d5fed1d1
diff --git a/config.js b/config.jsindex 4b97379a06..9a040740cf 100644--- a/config.js+++ b/config.js@@ -515,6 +515,10 @@ var config = {// '__end'// ],+ // List of pre meeting screens buttons to hide. The values must be one or more of the 5 allowed buttons:+ // 'microphone', 'camera', 'select-background', 'invite', 'settings'+ // hiddenPremeetingButtons: [],+// Stats//diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.jsindex 0c22c633e2..dc22382bc2 100644--- a/react/features/base/config/configWhitelist.js+++ b/react/features/base/config/configWhitelist.js@@ -134,6 +134,7 @@ export default ['forceTurnRelay','gatherStats','googleApiApplicationClientID',+ 'hiddenPremeetingButtons','hideConferenceSubject','hideRecordingLabel','hideParticipantsStats',diff --git a/react/features/base/config/constants.js b/react/features/base/config/constants.jsindex 3abca50b4c..812c908ccd 100644--- a/react/features/base/config/constants.js+++ b/react/features/base/config/constants.js@@ -46,3 +46,13 @@ export const TOOLBAR_BUTTONS = ['toggle-camera','videoquality'];++/**+ * The toolbar buttons to show on premeeting screens.+ */+export const PREMEETING_BUTTONS = [ 'microphone', 'camera', 'select-background', 'invite', 'settings' ];++/**+ * The toolbar buttons to show on 3rdParty prejoin screen.+ */+export const THIRD_PARTY_PREJOIN_BUTTONS = [ 'microphone', 'camera', 'select-background' ];diff --git a/react/features/base/premeeting/components/web/PreMeetingScreen.js b/react/features/base/premeeting/components/web/PreMeetingScreen.jsindex c4ffc2a094..b3cf4a0a62 100644--- a/react/features/base/premeeting/components/web/PreMeetingScreen.js+++ b/react/features/base/premeeting/components/web/PreMeetingScreen.js@@ -2,14 +2,21 @@import React, { PureComponent } from 'react';+import { connect } from '../../../../base/redux';import DeviceStatus from '../../../../prejoin/components/preview/DeviceStatus';import { Toolbox } from '../../../../toolbox/components/web';+import { PREMEETING_BUTTONS, THIRD_PARTY_PREJOIN_BUTTONS } from '../../../config/constants';import ConnectionStatus from './ConnectionStatus';import Preview from './Preview';type Props = {+ /**+ * The list of toolbar buttons to render.+ */+ _buttons: Array<string>,+/*** Children component(s) to be rendered on the screen.*/@@ -46,9 +53,9 @@ type Props = {title?: string,/**- * Override for default toolbar buttons+ * Whether it's used in the 3rdParty prejoin screen or not.*/- toolbarButtons?: Array<string>,+ thirdParty?: boolean,/*** True if the preview overlay should be muted, false otherwise.@@ -61,13 +68,11 @@ type Props = {videoTrack?: Object}-const buttons = [ 'microphone', 'camera', 'select-background', 'invite', 'settings' ];-/*** Implements a pre-meeting screen that can be used at various pre-meeting phases, for example* on the prejoin screen (pre-connection) or lobby (post-connection).*/-export default class PreMeetingScreen extends PureComponent<Props> {+class PreMeetingScreen extends PureComponent<Props> {/*** Default values for {@code Prejoin} component's properties.*@@ -85,12 +90,12 @@ export default class PreMeetingScreen extends PureComponent<Props> {*/render() {const {+ _buttons,children,className,showDeviceStatus,skipPrejoinButton,title,- toolbarButtons,videoMuted,videoTrack} = this.props;@@ -107,7 +112,7 @@ export default class PreMeetingScreen extends PureComponent<Props> {{ title }</h1>{ children }- <Toolbox toolbarButtons = { toolbarButtons || buttons } />+ { _buttons.length && <Toolbox toolbarButtons = { _buttons } /> }{ skipPrejoinButton }{ showDeviceStatus && <DeviceStatus /> }</div>@@ -120,3 +125,24 @@ export default class PreMeetingScreen extends PureComponent<Props> {);}}+++/**+ * Maps (parts of) the redux state to the React {@code Component} props.+ *+ * @param {Object} state - The redux state.+ * @param {Object} ownProps - The props passed to the component.+ * @returns {Object}+ */+function mapStateToProps(state, ownProps): Object {+ const hideButtons = state['features/base/config'].hiddenPremeetingButtons || [];+ const premeetingButtons = ownProps.thirdParty+ ? THIRD_PARTY_PREJOIN_BUTTONS+ : PREMEETING_BUTTONS;++ return {+ _buttons: premeetingButtons.filter(b => !hideButtons.includes(b))+ };+}++export default connect(mapStateToProps)(PreMeetingScreen);diff --git a/react/features/prejoin/components/PrejoinThirdParty.js b/react/features/prejoin/components/PrejoinThirdParty.jsindex 9e64a506ba..273bc7fc73 100644--- a/react/features/prejoin/components/PrejoinThirdParty.js+++ b/react/features/prejoin/components/PrejoinThirdParty.js@@ -37,7 +37,6 @@ type Props = {videoTrack: ?Object};-const buttons = [ 'microphone', 'camera', 'select-background' ];/*** This component is displayed before joining a meeting.@@ -62,7 +61,7 @@ class PrejoinThirdParty extends Component<Props> {className = { `prejoin-third-party ${className}` }showDeviceStatus = { deviceStatusVisible }skipPrejoinButton = { false }- toolbarButtons = { buttons }+ thirdParty = { true }videoMuted = { !showCameraPreview }videoTrack = { videoTrack } />);