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(prejoin): add showHangUp config option to prejoinConfig (#16531)
Mihaela Dumitru95ecf73c7151
diff --git a/config.js b/config.jsindex 489b3024ed..48145233ef 100644--- a/config.js+++ b/config.js@@ -805,7 +805,9 @@ var config = {// // By setting preCallTestEnabled, you enable the pre-call test in the prejoin page.// // ICE server credentials need to be provided over the preCallTestICEUrl// preCallTestEnabled: false,- // preCallTestICEUrl: ''+ // preCallTestICEUrl: '',+ // // Shows the hangup button in the lobby screen.+ // showHangUp: true,// },// When 'true', the user cannot edit the display name.diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.tsindex 7188b0ae4f..faa2d1da7c 100644--- a/react/features/base/config/configType.ts+++ b/react/features/base/config/configType.ts@@ -524,6 +524,7 @@ export interface IConfig {hideExtraJoinButtons?: Array<string>;preCallTestEnabled?: boolean;preCallTestICEUrl?: string;+ showHangUp?: boolean;};raisedHands?: {disableLowerHandByModerator?: boolean;diff --git a/react/features/base/premeeting/components/web/PreMeetingScreen.tsx b/react/features/base/premeeting/components/web/PreMeetingScreen.tsxindex 2d945627cb..314eac6590 100644--- a/react/features/base/premeeting/components/web/PreMeetingScreen.tsx+++ b/react/features/base/premeeting/components/web/PreMeetingScreen.tsx@@ -282,15 +282,18 @@ const PreMeetingScreen = ({* @returns {Object}*/function mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {- const { hiddenPremeetingButtons } = state['features/base/config'];+ const { hiddenPremeetingButtons, prejoinConfig } = state['features/base/config'];const { toolbarButtons } = state['features/toolbox'];- const { showHangUp = true } = getLobbyConfig(state);const { knocking } = state['features/lobby'];+ const { showHangUp: showHangUpLobby = true } = getLobbyConfig(state);+ const { showHangUp: showHangUpPrejoin = true } = prejoinConfig || {};const premeetingButtons = (ownProps.thirdParty? THIRD_PARTY_PREJOIN_BUTTONS: PREMEETING_BUTTONS).filter((b: any) => !(hiddenPremeetingButtons || []).includes(b));- if (showHangUp && knocking && !premeetingButtons.includes('hangup')) {+ const shouldShowHangUp = knocking ? showHangUpLobby : showHangUpPrejoin;++ if (shouldShowHangUp && !premeetingButtons.includes('hangup')) {premeetingButtons.push('hangup');}diff --git a/react/features/prejoin/components/native/Prejoin.tsx b/react/features/prejoin/components/native/Prejoin.tsxindex 8b76bd2c82..214a551645 100644--- a/react/features/prejoin/components/native/Prejoin.tsx+++ b/react/features/prejoin/components/native/Prejoin.tsx@@ -61,7 +61,8 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {const isDisplayNameReadonly = useSelector(isNameReadOnly);const roomName = useSelector((state: IReduxState) => getConferenceName(state));const roomNameEnabled = useSelector((state: IReduxState) => isRoomNameEnabled(state));- const { showHangUp = true } = useSelector((state: IReduxState) => getLobbyConfig(state));+ const { showHangUp: showHangUpLobby = true } = useSelector((state: IReduxState) => getLobbyConfig(state));+ const { showHangUp: showHangUpPrejoin = true } = useSelector((state: IReduxState) => state['features/base/config'].prejoinConfig || {});const { knocking } = useSelector((state: IReduxState) => state['features/lobby']);const participantName = localParticipant?.name;const [ displayName, setDisplayName ]@@ -190,7 +191,7 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {<VideoMuteButtonstyles = { styles.buttonStylesBorderless } />{- showHangUp && knocking+ (knocking ? showHangUpLobby : showHangUpPrejoin)&& <HangupButtonstyles = { styles.buttonStylesBorderless } />}