120 lines
3.4 KiB
JavaScript
Executable File
120 lines
3.4 KiB
JavaScript
Executable File
import React, { PureComponent } from 'react';
|
|
import cx from 'classnames';
|
|
import { styles } from './styles.scss';
|
|
import DesktopShare from './desktop-share/component';
|
|
import ActionsDropdown from './actions-dropdown/component';
|
|
import QuickPollDropdown from './quick-poll-dropdown/component';
|
|
import AudioControlsContainer from '../audio/audio-controls/container';
|
|
import JoinVideoOptionsContainer from '../video-provider/video-button/container';
|
|
import CaptionsButtonContainer from '/imports/ui/components/actions-bar/captions/container';
|
|
import PresentationOptionsContainer from './presentation-options/component';
|
|
|
|
class ActionsBar extends PureComponent {
|
|
render() {
|
|
const {
|
|
amIPresenter,
|
|
handleExitVideo,
|
|
handleJoinVideo,
|
|
handleShareScreen,
|
|
handleUnshareScreen,
|
|
isVideoBroadcasting,
|
|
amIModerator,
|
|
screenSharingCheck,
|
|
enableVideo,
|
|
isLayoutSwapped,
|
|
toggleSwapLayout,
|
|
handleTakePresenter,
|
|
intl,
|
|
currentSlidHasContent,
|
|
parseCurrentSlideContent,
|
|
isSharingVideo,
|
|
screenShareEndAlert,
|
|
stopExternalVideoShare,
|
|
screenshareDataSavingSetting,
|
|
isCaptionsAvailable,
|
|
isMeteorConnected,
|
|
isPollingEnabled,
|
|
isThereCurrentPresentation,
|
|
allowExternalVideo,
|
|
} = this.props;
|
|
|
|
const actionBarClasses = {};
|
|
|
|
actionBarClasses[styles.centerWithActions] = amIPresenter;
|
|
actionBarClasses[styles.center] = true;
|
|
actionBarClasses[styles.mobileLayoutSwapped] = isLayoutSwapped && amIPresenter;
|
|
|
|
return (
|
|
<div className={styles.actionsbar}>
|
|
<div className={styles.left}>
|
|
<ActionsDropdown {...{
|
|
amIPresenter,
|
|
amIModerator,
|
|
isPollingEnabled,
|
|
allowExternalVideo,
|
|
handleTakePresenter,
|
|
intl,
|
|
isSharingVideo,
|
|
stopExternalVideoShare,
|
|
isMeteorConnected,
|
|
}}
|
|
/>
|
|
{isPollingEnabled
|
|
? (
|
|
<QuickPollDropdown
|
|
{...{
|
|
currentSlidHasContent,
|
|
intl,
|
|
amIPresenter,
|
|
parseCurrentSlideContent,
|
|
}}
|
|
/>
|
|
) : null
|
|
}
|
|
{isCaptionsAvailable
|
|
? (
|
|
<CaptionsButtonContainer {...{ intl }} />
|
|
)
|
|
: null
|
|
}
|
|
</div>
|
|
<div className={cx(actionBarClasses)}>
|
|
<AudioControlsContainer />
|
|
{enableVideo
|
|
? (
|
|
<JoinVideoOptionsContainer
|
|
handleJoinVideo={handleJoinVideo}
|
|
handleCloseVideo={handleExitVideo}
|
|
/>
|
|
)
|
|
: null}
|
|
<DesktopShare {...{
|
|
handleShareScreen,
|
|
handleUnshareScreen,
|
|
isVideoBroadcasting,
|
|
amIPresenter,
|
|
screenSharingCheck,
|
|
screenShareEndAlert,
|
|
isMeteorConnected,
|
|
screenshareDataSavingSetting,
|
|
}}
|
|
/>
|
|
</div>
|
|
<div className={styles.right}>
|
|
{isLayoutSwapped
|
|
? (
|
|
<PresentationOptionsContainer
|
|
toggleSwapLayout={toggleSwapLayout}
|
|
isThereCurrentPresentation={isThereCurrentPresentation}
|
|
/>
|
|
)
|
|
: null
|
|
}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ActionsBar;
|