+
@@ -66,7 +67,6 @@ function Preview(props: Props) {
*/
function mapStateToProps(state) {
return {
- name: getPrejoinName(state),
videoTrack: getActiveVideoTrack(state),
showCameraPreview: !isPrejoinVideoMuted(state)
};
diff --git a/react/features/prejoin/functions.js b/react/features/prejoin/functions.js
index 5a869a075..d626df046 100644
--- a/react/features/prejoin/functions.js
+++ b/react/features/prejoin/functions.js
@@ -146,16 +146,6 @@ export function isPrejoinAudioMuted(state: Object): boolean {
return state['features/prejoin'].audioMuted;
}
-/**
- * Selector for getting the name that the user filled while configuring.
- *
- * @param {Object} state - The state of the app.
- * @returns {boolean}
- */
-export function getPrejoinName(state: Object): string {
- return state['features/prejoin'].name;
-}
-
/**
* Selector for getting the mute status of the prejoin video.
*
@@ -214,7 +204,8 @@ export function isJoinByPhoneDialogVisible(state: Object): boolean {
* @returns {boolean}
*/
export function isPrejoinPageEnabled(state: Object): boolean {
- return state['features/base/config'].prejoinPageEnabled;
+ return state['features/base/config'].prejoinPageEnabled
+ && !state['features/base/settings'].userSelectedSkipPrejoin;
}
/**
diff --git a/react/features/prejoin/middleware.js b/react/features/prejoin/middleware.js
index c3bf1672b..9e2a7f2d9 100644
--- a/react/features/prejoin/middleware.js
+++ b/react/features/prejoin/middleware.js
@@ -6,11 +6,10 @@ import {
PREJOIN_START_CONFERENCE
} from './actionTypes';
import { setPrejoinAudioMuted, setPrejoinVideoMuted } from './actions';
-import { SET_AUDIO_MUTED, SET_VIDEO_MUTED } from '../base/media';
-import { participantUpdated, getLocalParticipant } from '../base/participants';
-import { MiddlewareRegistry } from '../base/redux';
import { updateSettings } from '../base/settings';
-import { getAllPrejoinConfiguredTracks, getPrejoinName } from './functions';
+import { SET_AUDIO_MUTED, SET_VIDEO_MUTED } from '../base/media';
+import { MiddlewareRegistry } from '../base/redux';
+import { getAllPrejoinConfiguredTracks } from './functions';
declare var APP: Object;
@@ -51,10 +50,16 @@ MiddlewareRegistry.register(store => next => async action => {
}
case PREJOIN_START_CONFERENCE: {
- const { dispatch, getState } = store;
+ const { getState, dispatch } = store;
+ const state = getState();
+ const { userSelectedSkipPrejoin } = state['features/prejoin'];
- _syncParticipantName(dispatch, getState);
- const tracks = await getAllPrejoinConfiguredTracks(getState());
+ userSelectedSkipPrejoin && dispatch(updateSettings({
+ userSelectedSkipPrejoin
+ }));
+
+
+ const tracks = await getAllPrejoinConfiguredTracks(state);
APP.conference.prejoinStart(tracks);
@@ -70,26 +75,8 @@ MiddlewareRegistry.register(store => next => async action => {
store.dispatch(setPrejoinVideoMuted(Boolean(action.muted)));
break;
}
+
}
return next(action);
});
-
-/**
- * Sets the local participant name if one is present.
- *
- * @param {Function} dispatch - The redux dispatch function.
- * @param {Function} getState - Gets the current state.
- * @returns {undefined}
- */
-function _syncParticipantName(dispatch, getState) {
- const state = getState();
- const name = getPrejoinName(state);
-
- name && dispatch(
- participantUpdated({
- ...getLocalParticipant(state),
- name
- }),
- );
-}
diff --git a/react/features/prejoin/reducer.js b/react/features/prejoin/reducer.js
index ebfdb6543..c817df838 100644
--- a/react/features/prejoin/reducer.js
+++ b/react/features/prejoin/reducer.js
@@ -6,10 +6,10 @@ import {
ADD_PREJOIN_VIDEO_TRACK,
SET_DEVICE_STATUS,
SET_JOIN_BY_PHONE_DIALOG_VISIBLITY,
+ SET_SKIP_PREJOIN,
SET_PREJOIN_AUDIO_DISABLED,
SET_PREJOIN_AUDIO_MUTED,
SET_PREJOIN_DEVICE_ERRORS,
- SET_PREJOIN_NAME,
SET_PREJOIN_PAGE_VISIBILITY,
SET_PREJOIN_VIDEO_DISABLED,
SET_PREJOIN_VIDEO_MUTED
@@ -24,11 +24,11 @@ const DEFAULT_STATE = {
deviceStatusType: 'ok',
showPrejoin: true,
showJoinByPhoneDialog: false,
+ userSelectedSkipPrejoin: false,
videoTrack: null,
audioTrack: null,
contentSharingTrack: null,
- rawError: '',
- name: ''
+ rawError: ''
};
/**
@@ -58,10 +58,10 @@ ReducerRegistry.register(
};
}
- case SET_PREJOIN_NAME: {
+ case SET_SKIP_PREJOIN: {
return {
...state,
- name: action.value
+ userSelectedSkipPrejoin: action.value
};
}