2019-06-13 02:40:58 +08:00
|
|
|
import React, { PureComponent } from 'react';
|
2018-01-10 23:44:21 +08:00
|
|
|
import cx from 'classnames';
|
2018-01-08 14:17:18 +08:00
|
|
|
import { styles } from './styles.scss';
|
2018-07-10 03:04:24 +08:00
|
|
|
import DesktopShare from './desktop-share/component';
|
2016-09-27 05:55:33 +08:00
|
|
|
import ActionsDropdown from './actions-dropdown/component';
|
2017-09-20 01:47:57 +08:00
|
|
|
import AudioControlsContainer from '../audio/audio-controls/container';
|
2019-11-28 21:13:06 +08:00
|
|
|
import JoinVideoOptionsContainer from '../video-provider/video-button/container';
|
2019-05-17 04:11:10 +08:00
|
|
|
import CaptionsButtonContainer from '/imports/ui/components/actions-bar/captions/container';
|
2018-12-15 04:16:15 +08:00
|
|
|
import PresentationOptionsContainer from './presentation-options/component';
|
2016-12-15 03:55:35 +08:00
|
|
|
|
2019-06-13 02:40:58 +08:00
|
|
|
class ActionsBar extends PureComponent {
|
2018-01-10 23:44:21 +08:00
|
|
|
render() {
|
|
|
|
const {
|
2019-09-07 04:28:02 +08:00
|
|
|
amIPresenter,
|
2018-01-10 23:44:21 +08:00
|
|
|
handleShareScreen,
|
|
|
|
handleUnshareScreen,
|
|
|
|
isVideoBroadcasting,
|
2019-09-07 04:28:02 +08:00
|
|
|
amIModerator,
|
2018-09-14 02:09:30 +08:00
|
|
|
screenSharingCheck,
|
|
|
|
enableVideo,
|
2018-12-15 04:16:15 +08:00
|
|
|
isLayoutSwapped,
|
|
|
|
toggleSwapLayout,
|
2019-01-11 00:10:45 +08:00
|
|
|
handleTakePresenter,
|
2019-02-22 05:01:39 +08:00
|
|
|
intl,
|
|
|
|
currentSlidHasContent,
|
|
|
|
parseCurrentSlideContent,
|
2019-02-16 01:32:03 +08:00
|
|
|
isSharingVideo,
|
2019-04-16 05:39:07 +08:00
|
|
|
screenShareEndAlert,
|
2019-04-25 01:19:35 +08:00
|
|
|
stopExternalVideoShare,
|
2019-05-29 04:46:29 +08:00
|
|
|
screenshareDataSavingSetting,
|
2019-05-17 04:11:10 +08:00
|
|
|
isCaptionsAvailable,
|
2019-06-27 00:29:34 +08:00
|
|
|
isMeteorConnected,
|
2019-07-02 22:54:37 +08:00
|
|
|
isPollingEnabled,
|
2019-07-08 22:33:32 +08:00
|
|
|
isThereCurrentPresentation,
|
2019-09-17 06:00:05 +08:00
|
|
|
allowExternalVideo,
|
2020-01-25 09:02:36 +08:00
|
|
|
presentations,
|
|
|
|
setPresentation,
|
|
|
|
podIds,
|
2018-01-10 23:44:21 +08:00
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
const actionBarClasses = {};
|
2018-11-30 01:24:02 +08:00
|
|
|
|
2019-09-07 04:28:02 +08:00
|
|
|
actionBarClasses[styles.centerWithActions] = amIPresenter;
|
2018-01-10 23:44:21 +08:00
|
|
|
actionBarClasses[styles.center] = true;
|
2019-11-08 01:33:03 +08:00
|
|
|
actionBarClasses[styles.mobileLayoutSwapped] = isLayoutSwapped && amIPresenter;
|
2018-01-10 23:44:21 +08:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={styles.actionsbar}>
|
|
|
|
<div className={styles.left}>
|
|
|
|
<ActionsDropdown {...{
|
2019-09-07 04:28:02 +08:00
|
|
|
amIPresenter,
|
|
|
|
amIModerator,
|
2019-07-02 22:54:37 +08:00
|
|
|
isPollingEnabled,
|
2019-09-17 06:00:05 +08:00
|
|
|
allowExternalVideo,
|
2019-01-11 00:10:45 +08:00
|
|
|
handleTakePresenter,
|
2019-02-22 05:01:39 +08:00
|
|
|
intl,
|
2019-02-16 01:32:03 +08:00
|
|
|
isSharingVideo,
|
2019-04-25 01:19:35 +08:00
|
|
|
stopExternalVideoShare,
|
2019-06-27 00:29:34 +08:00
|
|
|
isMeteorConnected,
|
2020-01-25 09:02:36 +08:00
|
|
|
presentations,
|
|
|
|
setPresentation,
|
|
|
|
podIds,
|
2018-07-10 03:04:24 +08:00
|
|
|
}}
|
2018-01-10 23:44:21 +08:00
|
|
|
/>
|
2019-06-20 23:06:13 +08:00
|
|
|
{isCaptionsAvailable
|
|
|
|
? (
|
|
|
|
<CaptionsButtonContainer {...{ intl }} />
|
|
|
|
)
|
|
|
|
: null
|
|
|
|
}
|
2018-01-10 23:44:21 +08:00
|
|
|
</div>
|
2019-11-08 01:33:03 +08:00
|
|
|
<div className={cx(actionBarClasses)}>
|
2018-01-10 23:44:21 +08:00
|
|
|
<AudioControlsContainer />
|
2018-12-18 23:15:51 +08:00
|
|
|
{enableVideo
|
|
|
|
? (
|
2019-12-19 01:44:56 +08:00
|
|
|
<JoinVideoOptionsContainer />
|
2018-12-18 23:15:51 +08:00
|
|
|
)
|
2018-01-10 23:44:21 +08:00
|
|
|
: null}
|
2018-07-10 03:04:24 +08:00
|
|
|
<DesktopShare {...{
|
2018-12-18 23:15:51 +08:00
|
|
|
handleShareScreen,
|
|
|
|
handleUnshareScreen,
|
|
|
|
isVideoBroadcasting,
|
2019-09-07 04:28:02 +08:00
|
|
|
amIPresenter,
|
2018-12-18 23:15:51 +08:00
|
|
|
screenSharingCheck,
|
2019-04-16 05:39:07 +08:00
|
|
|
screenShareEndAlert,
|
2019-06-27 00:29:34 +08:00
|
|
|
isMeteorConnected,
|
2019-05-29 04:46:29 +08:00
|
|
|
screenshareDataSavingSetting,
|
2018-12-18 23:15:51 +08:00
|
|
|
}}
|
2018-07-10 03:04:24 +08:00
|
|
|
/>
|
2018-01-10 23:44:21 +08:00
|
|
|
</div>
|
2018-12-15 04:16:15 +08:00
|
|
|
<div className={styles.right}>
|
2019-02-22 05:01:39 +08:00
|
|
|
{isLayoutSwapped
|
2019-01-17 00:50:24 +08:00
|
|
|
? (
|
|
|
|
<PresentationOptionsContainer
|
|
|
|
toggleSwapLayout={toggleSwapLayout}
|
2019-07-08 22:33:32 +08:00
|
|
|
isThereCurrentPresentation={isThereCurrentPresentation}
|
2019-01-17 00:50:24 +08:00
|
|
|
/>
|
|
|
|
)
|
2018-12-15 04:16:15 +08:00
|
|
|
: null
|
|
|
|
}
|
|
|
|
</div>
|
2018-01-10 23:44:21 +08:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2017-03-24 23:37:33 +08:00
|
|
|
|
2017-10-06 20:50:01 +08:00
|
|
|
export default ActionsBar;
|