mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Some options were missing on the mobile side, notably calltsts enableDisplayNameInStats and enableEmailInStats. Now the same logic will be used in web and mobile.
110 lines
2.8 KiB
JavaScript
110 lines
2.8 KiB
JavaScript
// @flow
|
|
|
|
import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
|
import React from 'react';
|
|
import { batch } from 'react-redux';
|
|
|
|
import { BaseApp } from '../../../features/base/app';
|
|
import { getConferenceOptions } from '../../base/conference/functions';
|
|
import { setConfig } from '../../base/config';
|
|
import { DialogContainer } from '../../base/dialog';
|
|
import { createPrejoinTracks } from '../../base/tracks';
|
|
import { initPrejoin, makePrecallTest } from '../actions';
|
|
|
|
import Prejoin from './Prejoin';
|
|
|
|
type Props = {
|
|
|
|
/**
|
|
* Indicates whether the avatar should be shown when video is off
|
|
*/
|
|
showAvatar: boolean,
|
|
|
|
/**
|
|
* Flag signaling the visibility of join label, input and buttons
|
|
*/
|
|
showJoinActions: boolean,
|
|
|
|
/**
|
|
* Flag signaling the visibility of the skip prejoin toggle
|
|
*/
|
|
showSkipPrejoin: boolean,
|
|
};
|
|
|
|
/**
|
|
* Wrapper application for prejoin.
|
|
*
|
|
* @extends BaseApp
|
|
*/
|
|
export default class PrejoinApp extends BaseApp<Props> {
|
|
_init: Promise<*>;
|
|
|
|
/**
|
|
* Navigates to {@link Prejoin} upon mount.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
componentDidMount() {
|
|
super.componentDidMount();
|
|
|
|
this._init.then(async () => {
|
|
const { store } = this.state;
|
|
const { dispatch } = store;
|
|
const { showAvatar, showJoinActions, showSkipPrejoin } = this.props;
|
|
|
|
super._navigate({
|
|
component: Prejoin,
|
|
props: {
|
|
showAvatar,
|
|
showJoinActions,
|
|
showSkipPrejoin
|
|
}
|
|
});
|
|
|
|
const { startWithAudioMuted, startWithVideoMuted } = store.getState()['features/base/settings'];
|
|
|
|
dispatch(setConfig({
|
|
prejoinPageEnabled: true,
|
|
startWithAudioMuted,
|
|
startWithVideoMuted
|
|
}));
|
|
|
|
const { tryCreateLocalTracks, errors } = createPrejoinTracks();
|
|
|
|
const tracks = await tryCreateLocalTracks;
|
|
|
|
batch(() => {
|
|
dispatch(initPrejoin(tracks, errors));
|
|
dispatch(makePrecallTest(getConferenceOptions(store.getState())));
|
|
});
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Overrides the parent method to inject {@link AtlasKitThemeProvider} as
|
|
* the top most component.
|
|
*
|
|
* @override
|
|
*/
|
|
_createMainElement(component, props) {
|
|
return (
|
|
<AtlasKitThemeProvider mode = 'dark'>
|
|
{ super._createMainElement(component, props) }
|
|
</AtlasKitThemeProvider>
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Renders the platform specific dialog container.
|
|
*
|
|
* @returns {React$Element}
|
|
*/
|
|
_renderDialogContainer() {
|
|
return (
|
|
<AtlasKitThemeProvider mode = 'dark'>
|
|
<DialogContainer />
|
|
</AtlasKitThemeProvider>
|
|
);
|
|
}
|
|
}
|