2017-06-04 10:40:14 +08:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2018-06-05 02:44:23 +08:00
|
|
|
import { throttle } from 'lodash';
|
2020-05-26 04:00:13 +08:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
2017-07-06 23:30:50 +08:00
|
|
|
import Modal from 'react-modal';
|
2021-04-01 19:14:24 +08:00
|
|
|
import browserInfo from '/imports/utils/browserInfo';
|
2021-04-01 01:13:36 +08:00
|
|
|
import deviceInfo from '/imports/utils/deviceInfo';
|
2018-11-22 22:46:24 +08:00
|
|
|
import PanelManager from '/imports/ui/components/panel-manager/component';
|
2018-10-12 23:05:53 +08:00
|
|
|
import PollingContainer from '/imports/ui/components/polling/container';
|
2018-12-07 01:26:08 +08:00
|
|
|
import logger from '/imports/startup/client/logger';
|
2019-02-27 01:40:01 +08:00
|
|
|
import ActivityCheckContainer from '/imports/ui/components/activity-check/container';
|
2019-04-06 06:32:21 +08:00
|
|
|
import UserInfoContainer from '/imports/ui/components/user-info/container';
|
2019-06-07 21:49:50 +08:00
|
|
|
import BreakoutRoomInvitation from '/imports/ui/components/breakout-room/invitation/container';
|
2017-10-13 02:53:33 +08:00
|
|
|
import ToastContainer from '../toast/container';
|
2017-04-19 03:06:51 +08:00
|
|
|
import ModalContainer from '../modal/container';
|
2016-08-10 00:28:16 +08:00
|
|
|
import NotificationsBarContainer from '../notifications-bar/container';
|
2017-03-28 04:40:44 +08:00
|
|
|
import AudioContainer from '../audio/container';
|
2018-08-10 01:02:18 +08:00
|
|
|
import ChatAlertContainer from '../chat/alert/container';
|
2019-03-16 04:07:14 +08:00
|
|
|
import BannerBarContainer from '/imports/ui/components/banner-bar/container';
|
2019-02-27 01:08:15 +08:00
|
|
|
import WaitingNotifierContainer from '/imports/ui/components/waiting-users/alert/container';
|
2019-03-19 22:15:44 +08:00
|
|
|
import LockNotifier from '/imports/ui/components/lock-viewers/notify/container';
|
2020-06-30 10:43:20 +08:00
|
|
|
import StatusNotifier from '/imports/ui/components/status-notifier/container';
|
2019-06-25 05:01:54 +08:00
|
|
|
import MediaService from '/imports/ui/components/media/service';
|
2019-06-13 02:03:23 +08:00
|
|
|
import ManyWebcamsNotifier from '/imports/ui/components/video-provider/many-users-notify/container';
|
2020-02-26 03:29:14 +08:00
|
|
|
import UploaderContainer from '/imports/ui/components/presentation/presentation-uploader/container';
|
2020-08-29 01:23:27 +08:00
|
|
|
import RandomUserSelectContainer from '/imports/ui/components/modal/random-user/container';
|
2020-01-17 21:20:03 +08:00
|
|
|
import { withDraggableContext } from '../media/webcam-draggable-overlay/context';
|
2018-01-08 14:17:18 +08:00
|
|
|
import { styles } from './styles';
|
2019-11-20 01:49:18 +08:00
|
|
|
import { makeCall } from '/imports/ui/services/api';
|
2021-03-26 05:22:50 +08:00
|
|
|
import ConnectionStatusService from '/imports/ui/components/connection-status/service';
|
2020-03-25 20:52:23 +08:00
|
|
|
import { NAVBAR_HEIGHT } from '/imports/ui/components/layout/layout-manager';
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2018-06-05 02:44:23 +08:00
|
|
|
const MOBILE_MEDIA = 'only screen and (max-width: 40em)';
|
2019-01-04 01:14:45 +08:00
|
|
|
const APP_CONFIG = Meteor.settings.public.app;
|
2019-01-04 01:55:10 +08:00
|
|
|
const DESKTOP_FONT_SIZE = APP_CONFIG.desktopFontSize;
|
|
|
|
const MOBILE_FONT_SIZE = APP_CONFIG.mobileFontSize;
|
2019-06-13 04:27:49 +08:00
|
|
|
const ENABLE_NETWORK_MONITORING = Meteor.settings.public.networkMonitoring.enableNetworkMonitoring;
|
2018-06-05 02:44:23 +08:00
|
|
|
|
2017-03-28 03:49:46 +08:00
|
|
|
const intlMessages = defineMessages({
|
|
|
|
userListLabel: {
|
2017-09-23 01:51:47 +08:00
|
|
|
id: 'app.userList.label',
|
2017-04-10 23:50:03 +08:00
|
|
|
description: 'Aria-label for Userlist Nav',
|
2017-03-28 03:49:46 +08:00
|
|
|
},
|
|
|
|
chatLabel: {
|
2017-09-23 01:23:25 +08:00
|
|
|
id: 'app.chat.label',
|
2017-04-19 03:42:55 +08:00
|
|
|
description: 'Aria-label for Chat Section',
|
2017-03-28 03:49:46 +08:00
|
|
|
},
|
|
|
|
mediaLabel: {
|
2017-08-11 00:05:51 +08:00
|
|
|
id: 'app.media.label',
|
2017-04-19 03:42:55 +08:00
|
|
|
description: 'Aria-label for Media Section',
|
2017-03-28 03:49:46 +08:00
|
|
|
},
|
2017-08-11 00:05:51 +08:00
|
|
|
actionsBarLabel: {
|
|
|
|
id: 'app.actionsBar.label',
|
2017-04-19 03:42:55 +08:00
|
|
|
description: 'Aria-label for ActionsBar Section',
|
2017-03-28 03:49:46 +08:00
|
|
|
},
|
2019-04-13 14:06:50 +08:00
|
|
|
iOSWarning: {
|
|
|
|
id: 'app.iOSWarning.label',
|
|
|
|
description: 'message indicating to upgrade ios version',
|
|
|
|
},
|
2019-05-30 22:42:38 +08:00
|
|
|
clearedEmoji: {
|
|
|
|
id: 'app.toast.clearedEmoji.label',
|
2019-06-01 02:48:41 +08:00
|
|
|
description: 'message for cleared emoji status',
|
2019-05-30 22:42:38 +08:00
|
|
|
},
|
|
|
|
setEmoji: {
|
|
|
|
id: 'app.toast.setEmoji.label',
|
2019-06-01 02:48:41 +08:00
|
|
|
description: 'message when a user emoji has been set',
|
2019-05-30 22:42:38 +08:00
|
|
|
},
|
2021-03-22 01:06:16 +08:00
|
|
|
raisedHand: {
|
|
|
|
id: 'app.toast.setEmoji.raiseHand',
|
|
|
|
description: 'toast message for raised hand notification',
|
|
|
|
},
|
|
|
|
loweredHand: {
|
|
|
|
id: 'app.toast.setEmoji.lowerHand',
|
|
|
|
description: 'toast message for lowered hand notification',
|
|
|
|
},
|
2019-05-30 22:42:38 +08:00
|
|
|
meetingMuteOn: {
|
|
|
|
id: 'app.toast.meetingMuteOn.label',
|
2019-06-01 02:48:41 +08:00
|
|
|
description: 'message used when meeting has been muted',
|
2019-05-30 22:42:38 +08:00
|
|
|
},
|
|
|
|
meetingMuteOff: {
|
|
|
|
id: 'app.toast.meetingMuteOff.label',
|
2019-06-01 02:48:41 +08:00
|
|
|
description: 'message used when meeting has been unmuted',
|
2019-05-30 22:42:38 +08:00
|
|
|
},
|
2019-05-22 22:44:17 +08:00
|
|
|
pollPublishedLabel: {
|
|
|
|
id: 'app.whiteboard.annotations.poll',
|
|
|
|
description: 'message displayed when a poll is published',
|
|
|
|
},
|
2017-03-28 03:49:46 +08:00
|
|
|
});
|
|
|
|
|
2016-04-29 03:02:51 +08:00
|
|
|
const propTypes = {
|
|
|
|
navbar: PropTypes.element,
|
|
|
|
sidebar: PropTypes.element,
|
|
|
|
media: PropTypes.element,
|
|
|
|
actionsbar: PropTypes.element,
|
2019-05-17 04:11:10 +08:00
|
|
|
captions: PropTypes.element,
|
2017-09-22 22:24:24 +08:00
|
|
|
locale: PropTypes.string,
|
2020-05-26 04:00:13 +08:00
|
|
|
intl: PropTypes.object.isRequired,
|
2017-03-17 03:57:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
const defaultProps = {
|
2017-09-22 22:24:24 +08:00
|
|
|
navbar: null,
|
|
|
|
sidebar: null,
|
|
|
|
media: null,
|
|
|
|
actionsbar: null,
|
2019-05-17 04:11:10 +08:00
|
|
|
captions: null,
|
2017-09-22 22:24:24 +08:00
|
|
|
locale: 'en',
|
2016-04-29 03:02:51 +08:00
|
|
|
};
|
|
|
|
|
2019-05-09 01:52:12 +08:00
|
|
|
const LAYERED_BREAKPOINT = 640;
|
|
|
|
const isLayeredView = window.matchMedia(`(max-width: ${LAYERED_BREAKPOINT}px)`);
|
|
|
|
|
2017-03-28 03:49:46 +08:00
|
|
|
class App extends Component {
|
2017-10-26 07:11:06 +08:00
|
|
|
constructor() {
|
|
|
|
super();
|
2016-09-15 01:48:50 +08:00
|
|
|
this.state = {
|
2018-06-05 02:44:23 +08:00
|
|
|
enableResize: !window.matchMedia(MOBILE_MEDIA).matches,
|
2016-09-15 01:48:50 +08:00
|
|
|
};
|
2018-06-05 02:44:23 +08:00
|
|
|
|
|
|
|
this.handleWindowResize = throttle(this.handleWindowResize).bind(this);
|
2019-05-16 06:51:43 +08:00
|
|
|
this.shouldAriaHide = this.shouldAriaHide.bind(this);
|
2021-01-24 09:22:52 +08:00
|
|
|
this.renderMedia = withDraggableContext(this.renderMedia.bind(this));
|
2017-02-25 04:19:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount() {
|
2019-04-19 01:14:34 +08:00
|
|
|
const {
|
2019-06-13 23:02:02 +08:00
|
|
|
locale, notify, intl, validIOSVersion, startBandwidthMonitoring, handleNetworkConnection,
|
2019-04-19 01:14:34 +08:00
|
|
|
} = this.props;
|
2021-04-01 19:14:24 +08:00
|
|
|
const { browserName } = browserInfo;
|
2021-04-01 01:13:36 +08:00
|
|
|
const { isMobile, osName } = deviceInfo;
|
2017-07-04 22:32:22 +08:00
|
|
|
|
2019-06-25 05:01:54 +08:00
|
|
|
MediaService.setSwapLayout();
|
2017-07-06 23:30:50 +08:00
|
|
|
Modal.setAppElement('#app');
|
2017-07-04 22:32:22 +08:00
|
|
|
document.getElementsByTagName('html')[0].lang = locale;
|
2021-04-01 01:13:36 +08:00
|
|
|
document.getElementsByTagName('html')[0].style.fontSize = isMobile ? MOBILE_FONT_SIZE : DESKTOP_FONT_SIZE;
|
2018-06-05 02:44:23 +08:00
|
|
|
|
2018-06-08 01:51:00 +08:00
|
|
|
const body = document.getElementsByTagName('body')[0];
|
2021-04-01 19:14:24 +08:00
|
|
|
|
|
|
|
body.classList.add(`browser-${browserName.toLowerCase()}`);
|
2021-04-01 01:13:36 +08:00
|
|
|
body.classList.add(`os-${osName.split(' ').shift().toLowerCase()}`);
|
2018-06-08 01:51:00 +08:00
|
|
|
|
2019-04-19 01:14:34 +08:00
|
|
|
if (!validIOSVersion()) {
|
|
|
|
notify(
|
2019-06-01 01:28:41 +08:00
|
|
|
intl.formatMessage(intlMessages.iOSWarning), 'error', 'warning',
|
2019-04-19 01:14:34 +08:00
|
|
|
);
|
2019-04-13 14:06:50 +08:00
|
|
|
}
|
|
|
|
|
2018-06-05 02:44:23 +08:00
|
|
|
this.handleWindowResize();
|
|
|
|
window.addEventListener('resize', this.handleWindowResize, false);
|
2020-06-03 23:39:02 +08:00
|
|
|
window.ondragover = function (e) { e.preventDefault(); };
|
|
|
|
window.ondrop = function (e) { e.preventDefault(); };
|
2018-12-07 01:26:08 +08:00
|
|
|
|
2019-06-13 04:27:49 +08:00
|
|
|
if (ENABLE_NETWORK_MONITORING) {
|
2019-05-10 05:25:29 +08:00
|
|
|
if (navigator.connection) {
|
2019-05-27 22:27:01 +08:00
|
|
|
handleNetworkConnection();
|
|
|
|
navigator.connection.addEventListener('change', handleNetworkConnection);
|
2019-05-10 05:25:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
startBandwidthMonitoring();
|
2019-03-12 08:34:34 +08:00
|
|
|
}
|
|
|
|
|
2021-04-01 01:13:36 +08:00
|
|
|
if (isMobile) makeCall('setMobileUser');
|
2019-11-20 01:49:18 +08:00
|
|
|
|
2021-03-26 05:22:50 +08:00
|
|
|
ConnectionStatusService.startRoundTripTime();
|
|
|
|
|
2019-02-02 03:12:06 +08:00
|
|
|
logger.info({ logCode: 'app_component_componentdidmount' }, 'Client loaded successfully');
|
2018-06-05 02:44:23 +08:00
|
|
|
}
|
|
|
|
|
2019-05-30 22:42:38 +08:00
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
const {
|
2020-09-26 03:41:30 +08:00
|
|
|
meetingMuted,
|
|
|
|
notify,
|
|
|
|
currentUserEmoji,
|
|
|
|
intl,
|
|
|
|
hasPublishedPoll,
|
|
|
|
randomlySelectedUser,
|
|
|
|
currentUserId,
|
|
|
|
mountModal,
|
2019-05-30 22:42:38 +08:00
|
|
|
} = this.props;
|
|
|
|
|
2020-09-26 03:41:30 +08:00
|
|
|
if (randomlySelectedUser === currentUserId) mountModal(<RandomUserSelectContainer />);
|
2020-08-29 01:23:27 +08:00
|
|
|
|
2019-06-01 02:36:52 +08:00
|
|
|
if (prevProps.currentUserEmoji.status !== currentUserEmoji.status) {
|
|
|
|
const formattedEmojiStatus = intl.formatMessage({ id: `app.actionsBar.emojiMenu.${currentUserEmoji.status}Label` })
|
|
|
|
|| currentUserEmoji.status;
|
2019-05-30 22:42:38 +08:00
|
|
|
|
2021-03-22 01:06:16 +08:00
|
|
|
const raisedHand = currentUserEmoji.status === 'raiseHand';
|
|
|
|
|
|
|
|
let statusLabel = '';
|
|
|
|
if (currentUserEmoji.status === 'none') {
|
|
|
|
statusLabel = prevProps.currentUserEmoji.status === 'raiseHand'
|
|
|
|
? intl.formatMessage(intlMessages.loweredHand)
|
|
|
|
: intl.formatMessage(intlMessages.clearedEmoji);
|
|
|
|
} else {
|
|
|
|
statusLabel = raisedHand
|
|
|
|
? intl.formatMessage(intlMessages.raisedHand)
|
|
|
|
: intl.formatMessage(intlMessages.setEmoji, ({ 0: formattedEmojiStatus }));
|
|
|
|
}
|
|
|
|
|
2019-06-01 02:36:52 +08:00
|
|
|
notify(
|
2021-03-22 01:06:16 +08:00
|
|
|
statusLabel,
|
2019-06-01 02:36:52 +08:00
|
|
|
'info',
|
|
|
|
currentUserEmoji.status === 'none'
|
|
|
|
? 'clear_status'
|
|
|
|
: 'user',
|
|
|
|
);
|
2019-05-30 22:42:38 +08:00
|
|
|
}
|
|
|
|
if (!prevProps.meetingMuted && meetingMuted) {
|
|
|
|
notify(
|
2019-06-01 01:28:41 +08:00
|
|
|
intl.formatMessage(intlMessages.meetingMuteOn), 'info', 'mute',
|
2019-05-30 22:42:38 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
if (prevProps.meetingMuted && !meetingMuted) {
|
|
|
|
notify(
|
2019-06-01 01:28:41 +08:00
|
|
|
intl.formatMessage(intlMessages.meetingMuteOff), 'info', 'unmute',
|
2019-05-30 22:42:38 +08:00
|
|
|
);
|
|
|
|
}
|
2019-05-22 22:44:17 +08:00
|
|
|
if (!prevProps.hasPublishedPoll && hasPublishedPoll) {
|
|
|
|
notify(
|
2019-06-01 01:28:41 +08:00
|
|
|
intl.formatMessage(intlMessages.pollPublishedLabel), 'info', 'polling',
|
2019-05-22 22:44:17 +08:00
|
|
|
);
|
|
|
|
}
|
2019-05-30 22:42:38 +08:00
|
|
|
}
|
|
|
|
|
2018-06-05 02:44:23 +08:00
|
|
|
componentWillUnmount() {
|
2019-06-13 23:02:02 +08:00
|
|
|
const { handleNetworkConnection } = this.props;
|
2018-06-05 02:44:23 +08:00
|
|
|
window.removeEventListener('resize', this.handleWindowResize, false);
|
2019-05-25 06:41:30 +08:00
|
|
|
if (navigator.connection) {
|
2019-05-27 22:27:01 +08:00
|
|
|
navigator.connection.addEventListener('change', handleNetworkConnection, false);
|
2019-05-25 06:41:30 +08:00
|
|
|
}
|
2021-03-26 05:22:50 +08:00
|
|
|
|
|
|
|
ConnectionStatusService.stopRoundTripTime();
|
2018-06-05 02:44:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
handleWindowResize() {
|
|
|
|
const { enableResize } = this.state;
|
|
|
|
const shouldEnableResize = !window.matchMedia(MOBILE_MEDIA).matches;
|
2018-06-08 01:51:00 +08:00
|
|
|
if (enableResize === shouldEnableResize) return;
|
2018-06-05 02:44:23 +08:00
|
|
|
|
|
|
|
this.setState({ enableResize: shouldEnableResize });
|
2016-09-15 01:48:50 +08:00
|
|
|
}
|
|
|
|
|
2019-05-16 06:51:43 +08:00
|
|
|
shouldAriaHide() {
|
2019-05-16 05:13:05 +08:00
|
|
|
const { openPanel, isPhone } = this.props;
|
|
|
|
return openPanel !== '' && (isPhone || isLayeredView.matches);
|
2019-03-12 08:34:34 +08:00
|
|
|
}
|
|
|
|
|
2018-11-20 07:29:48 +08:00
|
|
|
renderPanel() {
|
2018-11-20 23:28:00 +08:00
|
|
|
const { enableResize } = this.state;
|
2019-07-16 03:15:58 +08:00
|
|
|
const { openPanel, isRTL } = this.props;
|
2018-09-15 01:50:18 +08:00
|
|
|
|
|
|
|
return (
|
2018-11-20 23:28:00 +08:00
|
|
|
<PanelManager
|
2018-11-23 20:37:18 +08:00
|
|
|
{...{
|
|
|
|
openPanel,
|
2018-12-18 23:15:51 +08:00
|
|
|
enableResize,
|
2019-07-16 03:15:58 +08:00
|
|
|
isRTL,
|
2018-11-23 20:37:18 +08:00
|
|
|
}}
|
2019-05-16 06:51:43 +08:00
|
|
|
shouldAriaHide={this.shouldAriaHide}
|
2018-11-20 23:28:00 +08:00
|
|
|
/>
|
2018-09-15 01:50:18 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2016-05-04 22:48:53 +08:00
|
|
|
renderNavBar() {
|
2016-04-29 03:02:51 +08:00
|
|
|
const { navbar } = this.props;
|
|
|
|
|
2017-03-17 00:52:43 +08:00
|
|
|
if (!navbar) return null;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2017-03-17 00:52:43 +08:00
|
|
|
return (
|
2020-03-25 20:52:23 +08:00
|
|
|
<header
|
|
|
|
className={styles.navbar}
|
|
|
|
style={{
|
|
|
|
height: NAVBAR_HEIGHT,
|
|
|
|
}}
|
|
|
|
>
|
2017-03-17 00:52:43 +08:00
|
|
|
{navbar}
|
|
|
|
</header>
|
|
|
|
);
|
2016-04-29 03:02:51 +08:00
|
|
|
}
|
|
|
|
|
2016-05-04 04:40:46 +08:00
|
|
|
renderSidebar() {
|
|
|
|
const { sidebar } = this.props;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2017-03-17 00:52:43 +08:00
|
|
|
if (!sidebar) return null;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2017-03-17 00:52:43 +08:00
|
|
|
return (
|
2017-05-16 05:45:44 +08:00
|
|
|
<aside className={styles.sidebar}>
|
2017-03-17 00:52:43 +08:00
|
|
|
{sidebar}
|
2017-05-16 05:45:44 +08:00
|
|
|
</aside>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-05-17 04:11:10 +08:00
|
|
|
renderCaptions() {
|
|
|
|
const { captions } = this.props;
|
2017-05-16 05:45:44 +08:00
|
|
|
|
2019-05-17 04:11:10 +08:00
|
|
|
if (!captions) return null;
|
2017-05-16 05:45:44 +08:00
|
|
|
|
|
|
|
return (
|
2019-05-17 04:11:10 +08:00
|
|
|
<div className={styles.captionsWrapper}>
|
|
|
|
{captions}
|
2017-05-13 03:17:08 +08:00
|
|
|
</div>
|
2017-03-17 00:52:43 +08:00
|
|
|
);
|
2016-04-29 03:02:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
renderMedia() {
|
2018-04-29 09:59:45 +08:00
|
|
|
const {
|
2019-05-09 01:52:12 +08:00
|
|
|
media,
|
|
|
|
intl,
|
2018-04-29 09:59:45 +08:00
|
|
|
} = this.props;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2017-03-17 00:52:43 +08:00
|
|
|
if (!media) return null;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2017-03-17 00:52:43 +08:00
|
|
|
return (
|
2017-03-28 03:49:46 +08:00
|
|
|
<section
|
|
|
|
className={styles.media}
|
2017-06-03 03:25:02 +08:00
|
|
|
aria-label={intl.formatMessage(intlMessages.mediaLabel)}
|
2019-05-16 06:51:43 +08:00
|
|
|
aria-hidden={this.shouldAriaHide()}
|
2017-06-03 03:25:02 +08:00
|
|
|
>
|
|
|
|
{media}
|
2019-05-17 04:11:10 +08:00
|
|
|
{this.renderCaptions()}
|
2017-03-17 00:52:43 +08:00
|
|
|
</section>
|
|
|
|
);
|
2016-07-23 08:12:31 +08:00
|
|
|
}
|
|
|
|
|
2016-05-04 22:48:53 +08:00
|
|
|
renderActionsBar() {
|
2018-04-29 09:59:45 +08:00
|
|
|
const {
|
2019-05-09 01:52:12 +08:00
|
|
|
actionsbar,
|
|
|
|
intl,
|
2018-04-29 09:59:45 +08:00
|
|
|
} = this.props;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2017-03-17 00:52:43 +08:00
|
|
|
if (!actionsbar) return null;
|
2016-04-29 03:02:51 +08:00
|
|
|
|
2016-05-12 04:43:07 +08:00
|
|
|
return (
|
2017-03-28 03:49:46 +08:00
|
|
|
<section
|
|
|
|
className={styles.actionsbar}
|
2017-08-11 00:05:51 +08:00
|
|
|
aria-label={intl.formatMessage(intlMessages.actionsBarLabel)}
|
2019-05-16 06:51:43 +08:00
|
|
|
aria-hidden={this.shouldAriaHide()}
|
2017-06-03 03:25:02 +08:00
|
|
|
>
|
|
|
|
{actionsbar}
|
2017-03-17 00:52:43 +08:00
|
|
|
</section>
|
2016-05-12 04:43:07 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-02-27 01:40:01 +08:00
|
|
|
renderActivityCheck() {
|
|
|
|
const { User } = this.props;
|
|
|
|
|
|
|
|
const { inactivityCheck, responseDelay } = User;
|
|
|
|
|
|
|
|
return (inactivityCheck ? (
|
|
|
|
<ActivityCheckContainer
|
|
|
|
inactivityCheck={inactivityCheck}
|
|
|
|
responseDelay={responseDelay}
|
|
|
|
/>) : null);
|
|
|
|
}
|
|
|
|
|
2019-04-06 06:32:21 +08:00
|
|
|
renderUserInformation() {
|
|
|
|
const { UserInfo, User } = this.props;
|
|
|
|
|
|
|
|
return (UserInfo.length > 0 ? (
|
|
|
|
<UserInfoContainer
|
|
|
|
UserInfo={UserInfo}
|
|
|
|
requesterUserId={User.userId}
|
|
|
|
meetingId={User.meetingId}
|
|
|
|
/>) : null);
|
|
|
|
}
|
|
|
|
|
2017-01-14 07:57:29 +08:00
|
|
|
render() {
|
2018-10-19 04:37:14 +08:00
|
|
|
const {
|
2021-03-22 01:06:16 +08:00
|
|
|
customStyle, customStyleUrl, openPanel, layoutContextState,
|
2018-10-19 04:37:14 +08:00
|
|
|
} = this.props;
|
2021-02-24 01:04:00 +08:00
|
|
|
|
2016-04-29 03:02:51 +08:00
|
|
|
return (
|
2016-05-03 06:42:54 +08:00
|
|
|
<main className={styles.main}>
|
2019-02-27 01:40:01 +08:00
|
|
|
{this.renderActivityCheck()}
|
2019-04-06 06:32:21 +08:00
|
|
|
{this.renderUserInformation()}
|
2019-03-16 04:07:14 +08:00
|
|
|
<BannerBarContainer />
|
2016-08-10 00:28:16 +08:00
|
|
|
<NotificationsBarContainer />
|
2016-05-03 06:42:54 +08:00
|
|
|
<section className={styles.wrapper}>
|
2019-01-09 23:59:16 +08:00
|
|
|
<div className={openPanel ? styles.content : styles.noPanelContent}>
|
2016-05-04 22:48:53 +08:00
|
|
|
{this.renderNavBar()}
|
2016-04-29 03:02:51 +08:00
|
|
|
{this.renderMedia()}
|
2016-05-04 22:48:53 +08:00
|
|
|
{this.renderActionsBar()}
|
2016-04-29 03:02:51 +08:00
|
|
|
</div>
|
2018-11-20 07:29:48 +08:00
|
|
|
{this.renderPanel()}
|
2018-11-20 23:28:00 +08:00
|
|
|
{this.renderSidebar()}
|
2016-04-29 03:02:51 +08:00
|
|
|
</section>
|
2020-03-10 23:07:59 +08:00
|
|
|
<UploaderContainer />
|
2019-06-07 21:49:50 +08:00
|
|
|
<BreakoutRoomInvitation />
|
2021-02-24 01:04:00 +08:00
|
|
|
{!layoutContextState.presentationIsFullscreen && !layoutContextState.screenShareIsFullscreen && <PollingContainer />}
|
2017-04-19 03:06:51 +08:00
|
|
|
<ModalContainer />
|
2019-01-24 00:06:14 +08:00
|
|
|
<AudioContainer />
|
2019-05-14 21:15:54 +08:00
|
|
|
<ToastContainer rtl />
|
2018-10-16 04:03:17 +08:00
|
|
|
<ChatAlertContainer />
|
2019-02-27 01:08:15 +08:00
|
|
|
<WaitingNotifierContainer />
|
2019-03-19 22:15:44 +08:00
|
|
|
<LockNotifier />
|
2020-06-30 10:43:20 +08:00
|
|
|
<StatusNotifier status="raiseHand" />
|
2019-06-13 02:03:23 +08:00
|
|
|
<ManyWebcamsNotifier />
|
2018-11-15 02:04:23 +08:00
|
|
|
{customStyleUrl ? <link rel="stylesheet" type="text/css" href={customStyleUrl} /> : null}
|
|
|
|
{customStyle ? <link rel="stylesheet" type="text/css" href={`data:text/css;charset=UTF-8,${encodeURIComponent(customStyle)}`} /> : null}
|
2016-04-29 03:02:51 +08:00
|
|
|
</main>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
App.propTypes = propTypes;
|
2017-03-17 03:57:45 +08:00
|
|
|
App.defaultProps = defaultProps;
|
2018-06-05 03:11:11 +08:00
|
|
|
|
2017-03-28 03:49:46 +08:00
|
|
|
export default injectIntl(App);
|