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(connect): Add logging before every connect.
Hristo Terezovb7eae6c0ca3a
diff --git a/conference.js b/conference.jsindex 0d10babde3..3c69ba315c 100644--- a/conference.js+++ b/conference.js@@ -615,9 +615,6 @@ export default {if (isPrejoinPageVisible(getState())) {dispatch(gumPending([ MEDIA_TYPE.AUDIO, MEDIA_TYPE.VIDEO ], IGUMPendingState.NONE));dispatch(setInitialGUMPromise());-- // Note: Not sure if initPrejoin needs to be async. But let's wait for it just to be sure the- // tracks are added.initPrejoin(tracks, errors, dispatch);} else {APP.store.dispatch(displayErrorsForCreateInitialLocalTracks(errors));@@ -631,6 +628,7 @@ export default {})));if (!isPrejoinPageVisible(getState())) {+ logger.info('Dispatching connect from init since prejoin is not visible.');dispatch(connect());}},diff --git a/react/features/authentication/components/web/LoginDialog.tsx b/react/features/authentication/components/web/LoginDialog.tsxindex 00ff3de22a..5215e8b018 100644--- a/react/features/authentication/components/web/LoginDialog.tsx+++ b/react/features/authentication/components/web/LoginDialog.tsx@@ -15,6 +15,7 @@ import {authenticateAndUpgradeRole,cancelLogin} from '../../actions.web';+import logger from '../../logger';/*** The type of the React {@code Component} props of {@link LoginDialog}.@@ -134,6 +135,7 @@ class LoginDialog extends Component<IProps, IState> {if (conference) {dispatch(authenticateAndUpgradeRole(jid, password, conference));} else {+ logger.info('Dispatching connect from LoginDialog.');dispatch(connect(jid, password));}}diff --git a/react/features/base/conference/actions.any.ts b/react/features/base/conference/actions.any.tsindex 0b2f94db1e..6a390f1ab4 100644--- a/react/features/base/conference/actions.any.ts+++ b/react/features/base/conference/actions.any.ts@@ -1104,6 +1104,7 @@ export function redirect(vnode: string, focusJid: string, username: string) {}).then(() => {dispatch(conferenceWillInit());+ logger.info(`Dispatching connect from redirect (visitor = ${Boolean(vnode)}).`);return dispatch(connect());})diff --git a/react/features/lobby/actions.any.ts b/react/features/lobby/actions.any.tsindex 873b635620..19a38fa523 100644--- a/react/features/lobby/actions.any.ts+++ b/react/features/lobby/actions.any.ts@@ -206,6 +206,8 @@ export function startKnocking() {const state = getState();const { membersOnly } = state['features/base/conference'];+ logger.info(`Lobby starting knocking (membersOnly = ${membersOnly})`);+if (!membersOnly) {// no membersOnly, this means we got lobby screen shown as someonediff --git a/react/features/prejoin/actions.web.ts b/react/features/prejoin/actions.web.tsindex 5cafbc4db5..067f675812 100644--- a/react/features/prejoin/actions.web.ts+++ b/react/features/prejoin/actions.web.ts@@ -209,6 +209,7 @@ export function joinConference(options?: Object, ignoreJoiningInProgress = falseoptions && dispatch(updateConfig(options));+ logger.info('Dispatching connect from joinConference.');dispatch(connect(jid, password)).catch(() => {// There is nothing to do here. This is handled and dispatched in base/connection/actions.@@ -257,6 +258,8 @@ export function joinConferenceWithoutAudio() {}}+ logger.info('Dispatching joinConference action with startSilent=true from joinConferenceWithoutAudio.');+dispatch(joinConference({startSilent: true}, true));diff --git a/react/features/prejoin/components/web/Prejoin.tsx b/react/features/prejoin/components/web/Prejoin.tsxindex 3d66d7463e..40f4d7bec8 100644--- a/react/features/prejoin/components/web/Prejoin.tsx+++ b/react/features/prejoin/components/web/Prejoin.tsx@@ -35,6 +35,7 @@ import {isJoinByPhoneDialogVisible,isPrejoinDisplayNameVisible} from '../../functions';+import logger from '../../logger';import { hasDisplayName } from '../../utils';import JoinByPhoneDialog from './dialogs/JoinByPhoneDialog';@@ -256,6 +257,9 @@ const Prejoin = ({return;}++ logger.info('Prejoin join button clicked.');+joinConference();};@@ -337,6 +341,7 @@ const Prejoin = ({&& (e.key === ' '|| e.key === 'Enter')) {e.preventDefault();+ logger.info('Prejoin joinConferenceWithoutAudio dispatched on a key pressed.');joinConferenceWithoutAudio();}};@@ -352,7 +357,10 @@ const Prejoin = ({testId: 'prejoin.joinWithoutAudio',icon: IconVolumeOff,label: t('prejoin.joinWithoutAudio'),- onClick: joinConferenceWithoutAudio,+ onClick: () => {+ logger.info('Prejoin join conference without audio pressed.');+ joinConferenceWithoutAudio();+ },onKeyPress: onJoinConferenceWithoutAudioKeyPress};@@ -379,6 +387,7 @@ const Prejoin = ({*/const onInputKeyPress = (e: React.KeyboardEvent) => {if (e.key === 'Enter') {+ logger.info('Dispatching join conference on Enter key press from the prejoin screen.');joinConference();}};diff --git a/react/features/visitors/actions.ts b/react/features/visitors/actions.tsindex f3748740c2..3e36cbbd17 100644--- a/react/features/visitors/actions.ts+++ b/react/features/visitors/actions.ts@@ -15,6 +15,7 @@ import {UPDATE_VISITORS_IN_QUEUE_COUNT,VISITOR_PROMOTION_REQUEST} from './actionTypes';+import logger from './logger';import { IPromotionRequest } from './types';/**@@ -95,6 +96,7 @@ export function demoteRequest(id: string) {dispatch(disconnect(true)).then(() => {dispatch(setPreferVisitor(true));+ logger.info('Dispatching connect to demote the local participant.');return dispatch(connect());});diff --git a/react/features/visitors/middleware.ts b/react/features/visitors/middleware.tsindex 89d5c3bf6d..ba44430214 100644--- a/react/features/visitors/middleware.ts+++ b/react/features/visitors/middleware.ts@@ -118,6 +118,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {dispatch(setVisitorDemoteActor(participantById.name));}+ logger.info('Dispatching connect on demote request visitor message for local participant.');+return dispatch(connect());});}@@ -198,6 +200,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {}setTimeout(() => {+ logger.info('Dispatching joinConference on conference live event.');dispatch(joinConference());dispatch(setInVisitorsQueue(false));}, Math.random() * delay);