2017-10-06 20:50:01 +08:00
|
|
|
import React 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-01-28 21:21:29 +08:00
|
|
|
import JoinVideoOptionsContainer from '../video-provider/video-button/container';
|
2016-12-15 03:55:35 +08:00
|
|
|
|
2018-12-15 04:16:15 +08:00
|
|
|
import PresentationOptionsContainer from './presentation-options/component';
|
2016-12-15 03:55:35 +08:00
|
|
|
|
2018-01-10 23:44:21 +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,
|
2018-09-14 02:09:30 +08:00
|
|
|
screenSharingCheck,
|
|
|
|
enableVideo,
|
2018-10-24 01:18:09 +08:00
|
|
|
createBreakoutRoom,
|
|
|
|
meetingIsBreakout,
|
|
|
|
hasBreakoutRoom,
|
2018-10-30 03:29:45 +08:00
|
|
|
meetingName,
|
2018-11-27 20:44:22 +08:00
|
|
|
users,
|
2018-12-15 04:16:15 +08:00
|
|
|
isLayoutSwapped,
|
|
|
|
toggleSwapLayout,
|
2018-12-28 00:20:03 +08:00
|
|
|
getUsersNotAssigned,
|
2018-12-28 19:51:41 +08:00
|
|
|
sendInvitation,
|
2018-12-28 00:20:03 +08:00
|
|
|
getBreakouts,
|
2019-01-11 00:10:45 +08:00
|
|
|
handleTakePresenter,
|
2018-01-10 23:44:21 +08:00
|
|
|
} = this.props;
|
|
|
|
|
2018-02-16 03:42:50 +08:00
|
|
|
const {
|
|
|
|
allowStartStopRecording,
|
2018-02-21 02:23:35 +08:00
|
|
|
recording: isRecording,
|
|
|
|
record,
|
2018-02-16 03:42:50 +08:00
|
|
|
} = recordSettingsList;
|
|
|
|
|
2018-01-10 23:44:21 +08:00
|
|
|
const actionBarClasses = {};
|
2018-11-30 01:24:02 +08:00
|
|
|
const { enableExternalVideo } = Meteor.settings.public.app;
|
|
|
|
|
2018-01-10 23:44:21 +08:00
|
|
|
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,
|
2018-11-30 01:24:02 +08:00
|
|
|
allowExternalVideo: enableExternalVideo,
|
2018-02-16 03:42:50 +08:00
|
|
|
isRecording,
|
2018-02-21 02:23:35 +08:00
|
|
|
record,
|
2018-02-28 22:10:00 +08:00
|
|
|
toggleRecording,
|
2018-10-24 01:18:09 +08:00
|
|
|
createBreakoutRoom,
|
|
|
|
meetingIsBreakout,
|
|
|
|
hasBreakoutRoom,
|
2018-10-30 03:29:45 +08:00
|
|
|
meetingName,
|
2018-11-27 20:44:22 +08:00
|
|
|
users,
|
2018-12-28 00:20:03 +08:00
|
|
|
getUsersNotAssigned,
|
2018-12-28 19:51:41 +08:00
|
|
|
sendInvitation,
|
2018-12-28 00:20:03 +08:00
|
|
|
getBreakouts,
|
2019-01-11 00:10:45 +08:00
|
|
|
handleTakePresenter,
|
2018-07-10 03:04:24 +08:00
|
|
|
}}
|
2018-01-10 23:44:21 +08:00
|
|
|
/>
|
|
|
|
</div>
|
2018-12-18 23:15:51 +08:00
|
|
|
<div
|
|
|
|
className={
|
|
|
|
isUserPresenter ? cx(styles.centerWithActions, actionBarClasses) : styles.center
|
|
|
|
}
|
|
|
|
>
|
2018-01-10 23:44:21 +08:00
|
|
|
<AudioControlsContainer />
|
2018-12-18 23:15:51 +08:00
|
|
|
{enableVideo
|
|
|
|
? (
|
|
|
|
<JoinVideoOptionsContainer
|
|
|
|
handleJoinVideo={handleJoinVideo}
|
|
|
|
handleCloseVideo={handleExitVideo}
|
|
|
|
/>
|
|
|
|
)
|
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,
|
|
|
|
isUserPresenter,
|
|
|
|
screenSharingCheck,
|
|
|
|
}}
|
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-01-17 00:50:24 +08:00
|
|
|
{ isLayoutSwapped
|
|
|
|
? (
|
|
|
|
<PresentationOptionsContainer
|
|
|
|
toggleSwapLayout={toggleSwapLayout}
|
|
|
|
/>
|
|
|
|
)
|
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;
|