bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx

124 lines
3.4 KiB
React
Raw Normal View History

2017-10-06 20:50:01 +08:00
import React from 'react';
import cx from 'classnames';
2018-01-08 14:17:18 +08:00
import { styles } from './styles.scss';
import DesktopShare from './desktop-share/component';
2016-09-27 05:55:33 +08:00
import ActionsDropdown from './actions-dropdown/component';
2019-02-22 05:01:39 +08:00
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';
2016-12-15 03:55:35 +08:00
class ActionsBar extends React.PureComponent {
render() {
const {
isUserPresenter,
handleExitVideo,
handleJoinVideo,
handleShareScreen,
handleUnshareScreen,
isVideoBroadcasting,
2018-02-16 03:42:50 +08:00
isUserModerator,
recordSettingsList,
2018-02-28 22:10:00 +08:00
toggleRecording,
screenSharingCheck,
enableVideo,
isLayoutSwapped,
toggleSwapLayout,
handleTakePresenter,
2019-02-22 05:01:39 +08:00
intl,
currentSlidHasContent,
parseCurrentSlideContent,
isSharingVideo,
screenShareEndAlert,
stopExternalVideoShare,
screenshareDataSavingSetting,
isCaptionsAvailable,
} = this.props;
2018-02-16 03:42:50 +08:00
const {
allowStartStopRecording,
recording: isRecording,
record,
2018-02-16 03:42:50 +08:00
} = recordSettingsList;
const actionBarClasses = {};
const { enableExternalVideo } = Meteor.settings.public.app;
actionBarClasses[styles.centerWithActions] = isUserPresenter;
actionBarClasses[styles.center] = true;
return (
<div className={styles.actionsbar}>
<div className={styles.left}>
<ActionsDropdown {...{
isUserPresenter,
2018-02-16 03:42:50 +08:00
isUserModerator,
allowStartStopRecording,
allowExternalVideo: enableExternalVideo,
2018-02-16 03:42:50 +08:00
isRecording,
record,
2018-02-28 22:10:00 +08:00
toggleRecording,
handleTakePresenter,
2019-02-22 05:01:39 +08:00
intl,
isSharingVideo,
stopExternalVideoShare,
}}
/>
2019-02-22 05:01:39 +08:00
<QuickPollDropdown
{...{
currentSlidHasContent,
intl,
isUserPresenter,
parseCurrentSlideContent,
}}
/>
{isCaptionsAvailable
? (
<CaptionsButtonContainer {...{ intl }} />
)
: null
}
</div>
2018-12-18 23:15:51 +08:00
<div
className={
isUserPresenter ? cx(styles.centerWithActions, actionBarClasses) : styles.center
}
>
<AudioControlsContainer />
2018-12-18 23:15:51 +08:00
{enableVideo
? (
<JoinVideoOptionsContainer
handleJoinVideo={handleJoinVideo}
handleCloseVideo={handleExitVideo}
/>
)
: null}
<DesktopShare {...{
2018-12-18 23:15:51 +08:00
handleShareScreen,
handleUnshareScreen,
isVideoBroadcasting,
isUserPresenter,
screenSharingCheck,
screenShareEndAlert,
screenshareDataSavingSetting,
2018-12-18 23:15:51 +08:00
}}
/>
</div>
<div className={styles.right}>
2019-02-22 05:01:39 +08:00
{isLayoutSwapped
? (
<PresentationOptionsContainer
toggleSwapLayout={toggleSwapLayout}
/>
)
: null
}
</div>
</div>
);
}
}
2017-03-24 23:37:33 +08:00
2017-10-06 20:50:01 +08:00
export default ActionsBar;