diff --git a/react/features/welcome/components/WelcomePage.web.js b/react/features/welcome/components/WelcomePage.web.js index de3d2abc9..3feeb20bc 100644 --- a/react/features/welcome/components/WelcomePage.web.js +++ b/react/features/welcome/components/WelcomePage.web.js @@ -1,4 +1,4 @@ -/* global interfaceConfig */ +/* global APP, config, interfaceConfig, JitsiMeetJS */ import Button from '@atlaskit/button'; import { FieldTextStateless } from '@atlaskit/field-text'; @@ -6,7 +6,9 @@ import { AtlasKitThemeProvider } from '@atlaskit/theme'; import React from 'react'; import { connect } from 'react-redux'; +import { initAnalytics } from '../../analytics'; import { translate } from '../../base/i18n'; +import { isAnalyticsEnabled } from '../../base/lib-jitsi-meet'; import { Watermarks } from '../../base/react'; import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage'; @@ -66,6 +68,17 @@ class WelcomePage extends AbstractWelcomePage { * @returns {void} */ componentDidMount() { + // FIXME: This is not the best place for this logic. Ideally we should + // use features/base/lib-jitsi-meet#initLib() action for this use case. + // But currently lib-jitsi-meet#initLib()'s logic works for mobile only + // (on web it ends up with infinite loop over initLib). + JitsiMeetJS.init({ + enableAnalyticsLogging: isAnalyticsEnabled(APP.store), + ...config + }).then(() => { + initAnalytics(APP.store); + }); + if (this.state.generateRoomnames) { this._updateRoomname(); }