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(prejoin) Hide prejoin screen on init join conference
hmuresan97ea15590532
diff --git a/react/features/base/conference/middleware.web.js b/react/features/base/conference/middleware.web.jsindex 778c01377e..4a6f1a4f1f 100644--- a/react/features/base/conference/middleware.web.js+++ b/react/features/base/conference/middleware.web.js@@ -1,7 +1,6 @@// @flowimport { setPrejoinPageVisibility, setSkipPrejoinOnReload } from '../../prejoin';-import { PREJOIN_SCREEN_STATES } from '../../prejoin/constants';import { JitsiConferenceErrors } from '../lib-jitsi-meet';import { MiddlewareRegistry } from '../redux';@@ -14,7 +13,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {switch (action.type) {case CONFERENCE_JOINED: {if (enableForcedReload) {- dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));+ dispatch(setPrejoinPageVisibility(false));dispatch(setSkipPrejoinOnReload(false));}diff --git a/react/features/conference/components/web/Conference.js b/react/features/conference/components/web/Conference.jsindex f87d09cd5d..1270b4b475 100644--- a/react/features/conference/components/web/Conference.js+++ b/react/features/conference/components/web/Conference.js@@ -17,7 +17,7 @@ import { KnockingParticipantList, LobbyScreen } from '../../../lobby';import { getIsLobbyVisible } from '../../../lobby/functions';import { ParticipantsPane } from '../../../participants-pane/components/web';import { getParticipantsPaneOpen } from '../../../participants-pane/functions';-import { Prejoin, isPrejoinPageVisible, isPrejoinPageLoading } from '../../../prejoin';+import { Prejoin, isPrejoinPageVisible } from '../../../prejoin';import { fullScreenChanged, showToolbox } from '../../../toolbox/actions.web';import { JitsiPortal, Toolbox } from '../../../toolbox/components/web';import { LAYOUTS, getCurrentLayout } from '../../../video-layout';@@ -391,7 +391,7 @@ function _mapStateToProps(state) {_overflowDrawer: overflowDrawer,_roomName: getConferenceNameForTitle(state),_showLobby: getIsLobbyVisible(state),- _showPrejoin: isPrejoinPageVisible(state) || isPrejoinPageLoading(state)+ _showPrejoin: isPrejoinPageVisible(state)};}diff --git a/react/features/prejoin/actions.js b/react/features/prejoin/actions.jsindex e354da71be..771ca25ef5 100644--- a/react/features/prejoin/actions.js+++ b/react/features/prejoin/actions.js@@ -37,7 +37,6 @@ import {SET_PREJOIN_PAGE_VISIBILITY,SET_DEVICE_STATUS} from './actionTypes';-import { type PREJOIN_SCREEN_STATE, PREJOIN_SCREEN_STATES } from './constants';import {getFullDialOutNumber,getDialOutConferenceUrl,@@ -260,7 +259,7 @@ export function joinConference(options?: Object, ignoreJoiningInProgress: booleaconst jitsiTracks = localTracks.map(t => t.jitsiTrack);- dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.LOADING));+ dispatch(setPrejoinPageVisibility(false));APP.conference.prejoinStart(jitsiTracks);};@@ -556,10 +555,10 @@ export function setPrejoinDeviceErrors(value: Object) {/*** Action used to set the visibility of the prejoin page.*- * @param {string} value - The value.+ * @param {boolean} value - The value.* @returns {Object}*/-export function setPrejoinPageVisibility(value: PREJOIN_SCREEN_STATE) {+export function setPrejoinPageVisibility(value: boolean) {return {type: SET_PREJOIN_PAGE_VISIBILITY,valuediff --git a/react/features/prejoin/constants.js b/react/features/prejoin/constants.jsdeleted file mode 100644index 4200dbdece..0000000000--- a/react/features/prejoin/constants.js+++ /dev/null@@ -1,19 +0,0 @@-// @flow--export type PREJOIN_SCREEN_STATE = "hidden" | "loading" | true;---type PREJOIN_SCREEN_STATE_TYPE = {- HIDDEN: PREJOIN_SCREEN_STATE,- LOADING: PREJOIN_SCREEN_STATE,- VISIBLE: PREJOIN_SCREEN_STATE- }--/**- * Enum of possible prejoin screen states.- */-export const PREJOIN_SCREEN_STATES: PREJOIN_SCREEN_STATE_TYPE = {- HIDDEN: 'hidden',- LOADING: 'loading',- VISIBLE: true // backwards compatibility with old boolean implementation-};diff --git a/react/features/prejoin/functions.js b/react/features/prejoin/functions.jsindex f6da9dbd35..511429e4ce 100644--- a/react/features/prejoin/functions.js+++ b/react/features/prejoin/functions.js@@ -4,8 +4,6 @@ import { getRoomName } from '../base/conference';import { getDialOutStatusUrl, getDialOutUrl } from '../base/config/functions';import { isAudioMuted, isVideoMutedByUser } from '../base/media';-import { PREJOIN_SCREEN_STATES } from './constants';-/*** Selector for the visibility of the 'join by phone' button.*@@ -162,17 +160,7 @@ export function isPrejoinPageEnabled(state: Object): boolean {* @returns {boolean}*/export function isPrejoinPageVisible(state: Object): boolean {- return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin === PREJOIN_SCREEN_STATES.VISIBLE;-}--/**- * Returns true if the prejoin page is loading.- *- * @param {Object} state - The state of the app.- * @returns {boolean}- */-export function isPrejoinPageLoading(state: Object): boolean {- return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin === PREJOIN_SCREEN_STATES.LOADING;+ return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin;}/**diff --git a/react/features/prejoin/middleware.js b/react/features/prejoin/middleware.jsindex 90bbefc21d..2eca167256 100644--- a/react/features/prejoin/middleware.js+++ b/react/features/prejoin/middleware.js@@ -15,11 +15,8 @@ import {setJoiningInProgress,setPrejoinPageVisibility} from './actions';-import { PREJOIN_SCREEN_STATES } from './constants';import { isPrejoinPageVisible } from './functions';-declare var APP: Object;-/*** The redux middleware for {@link PrejoinPage}.*@@ -88,7 +85,7 @@ MiddlewareRegistry.register(store => next => async action => {* @returns {Object}*/function _conferenceJoined({ dispatch }, next, action) {- dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));+ dispatch(setPrejoinPageVisibility(false));dispatch(setJoiningInProgress(false));return next(action);diff --git a/react/features/settings/actions.js b/react/features/settings/actions.jsindex 37030eaa86..9260398515 100644--- a/react/features/settings/actions.js+++ b/react/features/settings/actions.js@@ -5,7 +5,6 @@ import { openDialog } from '../base/dialog';import { i18next } from '../base/i18n';import { updateSettings } from '../base/settings';import { setPrejoinPageVisibility } from '../prejoin/actions';-import { PREJOIN_SCREEN_STATES } from '../prejoin/constants';import { setScreenshareFramerate } from '../screen-share/actions';import {@@ -85,7 +84,7 @@ export function submitMoreTab(newState: Object): Function {// The 'showPrejoin' flag starts as 'true' on every new session.// This prevents displaying the prejoin page when the user re-enables it.if (showPrejoinPage && getState()['features/prejoin']?.showPrejoin) {- dispatch(setPrejoinPageVisibility(PREJOIN_SCREEN_STATES.HIDDEN));+ dispatch(setPrejoinPageVisibility(false));}dispatch(updateSettings({userSelectedSkipPrejoin: !showPrejoinPage