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';
|
2017-11-24 01:20:27 +08:00
|
|
|
import EmojiSelect from './emoji-select/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';
|
2017-09-20 11:12:10 +08:00
|
|
|
import JoinVideoOptionsContainer from '../video-dock/video-menu/container';
|
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,
|
|
|
|
emojiList,
|
|
|
|
emojiSelected,
|
|
|
|
handleEmojiChange,
|
2018-02-16 03:42:50 +08:00
|
|
|
isUserModerator,
|
|
|
|
recordSettingsList,
|
2018-01-10 23:44:21 +08:00
|
|
|
} = this.props;
|
|
|
|
|
2018-02-16 03:42:50 +08:00
|
|
|
const {
|
|
|
|
allowStartStopRecording,
|
2018-02-20 00:30:21 +08:00
|
|
|
recording : isRecording,
|
|
|
|
record
|
2018-02-16 03:42:50 +08:00
|
|
|
} = recordSettingsList;
|
|
|
|
|
2018-01-10 23:44:21 +08:00
|
|
|
const actionBarClasses = {};
|
|
|
|
actionBarClasses[styles.centerWithActions] = isUserPresenter;
|
|
|
|
actionBarClasses[styles.center] = true;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={styles.actionsbar}>
|
|
|
|
<div className={styles.left}>
|
|
|
|
<ActionsDropdown {...{
|
|
|
|
isUserPresenter,
|
|
|
|
handleShareScreen,
|
|
|
|
handleUnshareScreen,
|
|
|
|
isVideoBroadcasting,
|
2018-02-16 03:42:50 +08:00
|
|
|
isUserModerator,
|
|
|
|
allowStartStopRecording,
|
|
|
|
isRecording,
|
2018-02-20 00:30:21 +08:00
|
|
|
record
|
2018-01-10 23:44:21 +08:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className={isUserPresenter ? cx(styles.centerWithActions, actionBarClasses) : styles.center}>
|
|
|
|
<AudioControlsContainer />
|
|
|
|
{Meteor.settings.public.kurento.enableVideo ?
|
|
|
|
<JoinVideoOptionsContainer
|
|
|
|
handleJoinVideo={handleJoinVideo}
|
|
|
|
handleCloseVideo={handleExitVideo}
|
|
|
|
/>
|
|
|
|
: null}
|
|
|
|
<EmojiSelect options={emojiList} selected={emojiSelected} onChange={handleEmojiChange} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2017-03-24 23:37:33 +08:00
|
|
|
|
2017-10-06 20:50:01 +08:00
|
|
|
export default ActionsBar;
|