2021-03-23 02:02:31 +08:00
|
|
|
import React, { PureComponent } from 'react';
|
2021-10-16 03:07:13 +08:00
|
|
|
import CaptionsButtonContainer from '/imports/ui/components/captions/button/container';
|
2022-05-14 00:04:23 +08:00
|
|
|
import deviceInfo from '/imports/utils/deviceInfo';
|
2021-10-25 21:29:29 +08:00
|
|
|
import Styled from './styles';
|
2021-03-12 09:47:05 +08:00
|
|
|
import ActionsDropdown from './actions-dropdown/container';
|
2022-03-25 03:05:20 +08:00
|
|
|
import AudioCaptionsButtonContainer from '/imports/ui/components/audio/captions/button/container';
|
2021-03-12 09:47:05 +08:00
|
|
|
import ScreenshareButtonContainer from '/imports/ui/components/actions-bar/screenshare/container';
|
|
|
|
import AudioControlsContainer from '../audio/audio-controls/container';
|
|
|
|
import JoinVideoOptionsContainer from '../video-provider/video-button/container';
|
|
|
|
import PresentationOptionsContainer from './presentation-options/component';
|
2022-09-22 23:02:19 +08:00
|
|
|
import RaiseHandDropdownContainer from './raise-hand/container';
|
2023-02-23 04:16:43 +08:00
|
|
|
import { isPresentationEnabled } from '/imports/ui/services/features';
|
2016-12-15 03:55:35 +08:00
|
|
|
|
2021-03-23 02:02:31 +08:00
|
|
|
class ActionsBar extends PureComponent {
|
2021-03-12 09:47:05 +08:00
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
amIPresenter,
|
|
|
|
amIModerator,
|
|
|
|
enableVideo,
|
2022-02-11 22:30:35 +08:00
|
|
|
presentationIsOpen,
|
|
|
|
setPresentationIsOpen,
|
2021-03-12 09:47:05 +08:00
|
|
|
handleTakePresenter,
|
|
|
|
intl,
|
|
|
|
isSharingVideo,
|
2023-02-17 23:44:36 +08:00
|
|
|
isSharedNotesPinned,
|
2021-09-28 03:13:06 +08:00
|
|
|
hasScreenshare,
|
2021-03-12 09:47:05 +08:00
|
|
|
stopExternalVideoShare,
|
|
|
|
isCaptionsAvailable,
|
|
|
|
isMeteorConnected,
|
|
|
|
isPollingEnabled,
|
2021-03-20 02:52:03 +08:00
|
|
|
isSelectRandomUserEnabled,
|
2021-05-19 00:34:42 +08:00
|
|
|
isRaiseHandButtonEnabled,
|
2021-03-12 09:47:05 +08:00
|
|
|
isThereCurrentPresentation,
|
|
|
|
allowExternalVideo,
|
2021-03-22 01:06:16 +08:00
|
|
|
setEmojiStatus,
|
|
|
|
currentUser,
|
2021-08-05 19:03:24 +08:00
|
|
|
layoutContextDispatch,
|
2021-07-22 22:04:38 +08:00
|
|
|
actionsBarStyle,
|
2022-02-08 03:36:21 +08:00
|
|
|
setMeetingLayout,
|
2022-04-26 03:57:11 +08:00
|
|
|
showPushLayout,
|
2022-05-12 05:48:12 +08:00
|
|
|
setPushLayout,
|
2023-08-05 00:41:42 +08:00
|
|
|
setPresentationFitToWidth,
|
2021-03-12 09:47:05 +08:00
|
|
|
} = this.props;
|
2018-01-10 23:44:21 +08:00
|
|
|
|
2023-02-23 04:16:43 +08:00
|
|
|
const shouldShowOptionsButton = (isPresentationEnabled() && isThereCurrentPresentation)
|
2023-02-17 23:44:36 +08:00
|
|
|
|| isSharingVideo || hasScreenshare || isSharedNotesPinned;
|
2021-03-12 09:47:05 +08:00
|
|
|
return (
|
2021-10-25 21:29:29 +08:00
|
|
|
<Styled.ActionsBar
|
2021-07-22 22:04:38 +08:00
|
|
|
style={
|
2021-08-05 12:22:07 +08:00
|
|
|
{
|
|
|
|
height: actionsBarStyle.innerHeight,
|
|
|
|
}
|
2021-07-22 22:04:38 +08:00
|
|
|
}
|
2021-03-12 09:47:05 +08:00
|
|
|
>
|
2021-10-25 21:29:29 +08:00
|
|
|
<Styled.Left>
|
2021-03-12 09:47:05 +08:00
|
|
|
<ActionsDropdown {...{
|
|
|
|
amIPresenter,
|
|
|
|
amIModerator,
|
|
|
|
isPollingEnabled,
|
2021-03-20 02:52:03 +08:00
|
|
|
isSelectRandomUserEnabled,
|
2021-03-12 09:47:05 +08:00
|
|
|
allowExternalVideo,
|
|
|
|
handleTakePresenter,
|
|
|
|
intl,
|
|
|
|
isSharingVideo,
|
|
|
|
stopExternalVideoShare,
|
|
|
|
isMeteorConnected,
|
2022-02-08 03:36:21 +08:00
|
|
|
setMeetingLayout,
|
2022-05-12 05:48:12 +08:00
|
|
|
setPushLayout,
|
2022-02-11 22:30:35 +08:00
|
|
|
presentationIsOpen,
|
2022-04-26 03:57:11 +08:00
|
|
|
showPushLayout,
|
2023-08-05 00:41:42 +08:00
|
|
|
setPresentationFitToWidth,
|
2018-07-10 03:04:24 +08:00
|
|
|
}}
|
2021-03-12 09:47:05 +08:00
|
|
|
/>
|
|
|
|
{isCaptionsAvailable
|
|
|
|
? (
|
|
|
|
<CaptionsButtonContainer {...{ intl }} />
|
|
|
|
)
|
2021-05-04 03:04:54 +08:00
|
|
|
: null}
|
2022-05-14 00:04:23 +08:00
|
|
|
{ !deviceInfo.isMobile
|
|
|
|
? (
|
|
|
|
<AudioCaptionsButtonContainer />
|
|
|
|
)
|
|
|
|
: null }
|
2021-10-25 21:29:29 +08:00
|
|
|
</Styled.Left>
|
|
|
|
<Styled.Center>
|
2021-03-12 09:47:05 +08:00
|
|
|
<AudioControlsContainer />
|
|
|
|
{enableVideo
|
|
|
|
? (
|
|
|
|
<JoinVideoOptionsContainer />
|
|
|
|
)
|
|
|
|
: null}
|
|
|
|
<ScreenshareButtonContainer {...{
|
|
|
|
amIPresenter,
|
|
|
|
isMeteorConnected,
|
|
|
|
}}
|
|
|
|
/>
|
2021-10-25 21:29:29 +08:00
|
|
|
</Styled.Center>
|
|
|
|
<Styled.Right>
|
2023-02-17 23:44:36 +08:00
|
|
|
{ shouldShowOptionsButton ?
|
|
|
|
<PresentationOptionsContainer
|
|
|
|
presentationIsOpen={presentationIsOpen}
|
|
|
|
setPresentationIsOpen={setPresentationIsOpen}
|
|
|
|
layoutContextDispatch={layoutContextDispatch}
|
2023-03-14 00:09:31 +08:00
|
|
|
hasPresentation={isThereCurrentPresentation}
|
2023-02-17 23:44:36 +08:00
|
|
|
hasExternalVideo={isSharingVideo}
|
|
|
|
hasScreenshare={hasScreenshare}
|
2023-02-21 23:44:12 +08:00
|
|
|
hasPinnedSharedNotes={isSharedNotesPinned}
|
2023-02-17 23:44:36 +08:00
|
|
|
/>
|
|
|
|
: null
|
|
|
|
}
|
2021-05-19 00:34:42 +08:00
|
|
|
{isRaiseHandButtonEnabled
|
|
|
|
? (
|
2022-09-22 23:02:19 +08:00
|
|
|
<RaiseHandDropdownContainer {...{
|
|
|
|
setEmojiStatus,
|
|
|
|
currentUser,
|
|
|
|
intl,
|
|
|
|
}
|
|
|
|
}
|
2021-05-19 00:34:42 +08:00
|
|
|
/>
|
2022-09-22 23:02:19 +08:00
|
|
|
) : null}
|
2021-10-25 21:29:29 +08:00
|
|
|
</Styled.Right>
|
|
|
|
</Styled.ActionsBar>
|
2018-01-10 23:44:21 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2017-03-24 23:37:33 +08:00
|
|
|
|
2022-09-22 23:02:19 +08:00
|
|
|
export default ActionsBar;
|