12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604 |
- import { withStyles } from '@mui/styles';
- import React, { Component, RefObject } from 'react';
- import { WithTranslation } from 'react-i18next';
- import { batch, connect } from 'react-redux';
-
- import { isSpeakerStatsDisabled } from '../../../../features/speaker-stats/functions';
- import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents';
- import { sendAnalytics } from '../../../analytics/functions';
- import { IReduxState } from '../../../app/types';
- import { IJitsiConference } from '../../../base/conference/reducer';
- import { VISITORS_MODE_BUTTONS } from '../../../base/config/constants';
- import {
- getButtonsWithNotifyClick,
- getMultipleVideoSendingSupportFeatureFlag,
- getToolbarButtons,
- isToolbarButtonEnabled
- } from '../../../base/config/functions.web';
- import { openDialog, toggleDialog } from '../../../base/dialog/actions';
- import { isIosMobileBrowser, isMobileBrowser } from '../../../base/environment/utils';
- import { translate } from '../../../base/i18n/functions';
- import JitsiMeetJS from '../../../base/lib-jitsi-meet';
- import {
- raiseHand
- } from '../../../base/participants/actions';
- import {
- getLocalParticipant,
- hasRaisedHand,
- isLocalParticipantModerator
- } from '../../../base/participants/functions';
- import { getLocalVideoTrack } from '../../../base/tracks/functions.web';
- import { ITrack } from '../../../base/tracks/types';
- import ContextMenu from '../../../base/ui/components/web/ContextMenu';
- import ContextMenuItemGroup from '../../../base/ui/components/web/ContextMenuItemGroup';
- import { toggleChat } from '../../../chat/actions.web';
- import ChatButton from '../../../chat/components/web/ChatButton';
- import EmbedMeetingButton from '../../../embed-meeting/components/EmbedMeetingButton';
- import SharedDocumentButton from '../../../etherpad/components/SharedDocumentButton.web';
- import FeedbackButton from '../../../feedback/components/FeedbackButton.web';
- import { setGifMenuVisibility } from '../../../gifs/actions';
- import { isGifEnabled } from '../../../gifs/functions.web';
- import InviteButton from '../../../invite/components/add-people-dialog/web/InviteButton';
- import { isVpaasMeeting } from '../../../jaas/functions';
- import { registerShortcut, unregisterShortcut } from '../../../keyboard-shortcuts/actions';
- import KeyboardShortcutsButton from '../../../keyboard-shortcuts/components/web/KeyboardShortcutsButton';
- import { areKeyboardShortcutsEnabled } from '../../../keyboard-shortcuts/functions';
- import NoiseSuppressionButton from '../../../noise-suppression/components/NoiseSuppressionButton';
- import {
- close as closeParticipantsPane,
- open as openParticipantsPane
- } from '../../../participants-pane/actions.web';
- import ParticipantsPaneButton from '../../../participants-pane/components/web/ParticipantsPaneButton';
- import { getParticipantsPaneOpen } from '../../../participants-pane/functions';
- import {
- addReactionToBuffer,
- toggleReactionsMenuVisibility
- } from '../../../reactions/actions.web';
- import ReactionsMenuButton from '../../../reactions/components/web/ReactionsMenuButton';
- import { REACTIONS } from '../../../reactions/constants';
- import { isReactionsEnabled } from '../../../reactions/functions.web';
- import LiveStreamButton from '../../../recording/components/LiveStream/web/LiveStreamButton';
- import RecordButton from '../../../recording/components/Recording/web/RecordButton';
- import { isSalesforceEnabled } from '../../../salesforce/functions';
- import {
- startScreenShareFlow
- } from '../../../screen-share/actions.web';
- import ShareAudioButton from '../../../screen-share/components/web/ShareAudioButton';
- import {
- isScreenAudioSupported,
- isScreenVideoShared
- } from '../../../screen-share/functions';
- import SecurityDialogButton from '../../../security/components/security-dialog/web/SecurityDialogButton';
- import SettingsButton from '../../../settings/components/web/SettingsButton';
- import SharedVideoButton from '../../../shared-video/components/web/SharedVideoButton';
- import SpeakerStats from '../../../speaker-stats/components/web/SpeakerStats';
- import SpeakerStatsButton from '../../../speaker-stats/components/web/SpeakerStatsButton';
- import ClosedCaptionButton from '../../../subtitles/components/web/ClosedCaptionButton';
- import { toggleTileView } from '../../../video-layout/actions.web';
- import TileViewButton from '../../../video-layout/components/TileViewButton';
- import { shouldDisplayTileView } from '../../../video-layout/functions.web';
- import VideoQualityButton from '../../../video-quality/components/VideoQualityButton.web';
- import VideoQualityDialog from '../../../video-quality/components/VideoQualityDialog.web';
- import VideoBackgroundButton from '../../../virtual-background/components/VideoBackgroundButton';
- import { iAmVisitor } from '../../../visitors/functions';
- import WhiteboardButton from '../../../whiteboard/components/web/WhiteboardButton';
- import { isWhiteboardButtonVisible } from '../../../whiteboard/functions';
- import {
- setFullScreen,
- setHangupMenuVisible,
- setOverflowMenuVisible,
- setToolbarHovered,
- showToolbox
- } from '../../actions.web';
- import { NOTIFY_CLICK_MODE, NOT_APPLICABLE, THRESHOLDS } from '../../constants';
- import {
- getJwtDisabledButtons,
- isDesktopShareButtonDisabled,
- isToolboxVisible
- } from '../../functions.web';
- import DownloadButton from '../DownloadButton';
- import HangupButton from '../HangupButton';
- import HelpButton from '../HelpButton';
-
- import AudioSettingsButton from './AudioSettingsButton';
- import CustomOptionButton from './CustomOptionButton';
- import { EndConferenceButton } from './EndConferenceButton';
- import FullscreenButton from './FullscreenButton';
- import HangupMenuButton from './HangupMenuButton';
- import { LeaveConferenceButton } from './LeaveConferenceButton';
- import LinkToSalesforceButton from './LinkToSalesforceButton';
- import OverflowMenuButton from './OverflowMenuButton';
- import ProfileButton from './ProfileButton';
- import Separator from './Separator';
- import ShareDesktopButton from './ShareDesktopButton';
- import ToggleCameraButton from './ToggleCameraButton';
- import VideoSettingsButton from './VideoSettingsButton';
-
- /**
- * The type of the React {@code Component} props of {@link Toolbox}.
- */
- interface IProps extends WithTranslation {
-
- /**
- * String showing if the virtual background type is desktop-share.
- */
- _backgroundType: string;
-
- /**
- * Toolbar buttons which have their click exposed through the API.
- */
- _buttonsWithNotifyClick?: Array<string | {
- key: string;
- preventExecution: boolean;
- }>;
-
- /**
- * Whether or not the chat feature is currently displayed.
- */
- _chatOpen: boolean;
-
- /**
- * The width of the client.
- */
- _clientWidth: number;
-
- /**
- * The {@code JitsiConference} for the current conference.
- */
- _conference?: IJitsiConference;
-
- /**
- * Custom Toolbar buttons.
- */
- _customToolbarButtons?: Array<{ icon: string; id: string; text: string; }>;
-
- /**
- * Whether or not screensharing button is disabled.
- */
- _desktopSharingButtonDisabled: boolean;
-
- /**
- * Whether or not screensharing is initialized.
- */
- _desktopSharingEnabled: boolean;
-
- /**
- * Whether or not a dialog is displayed.
- */
- _dialog: boolean;
-
- /**
- * Whether or not the toolbox is disabled. It is for recorders.
- */
- _disabled: boolean;
-
- /**
- * Whether the end conference feature is supported.
- */
- _endConferenceSupported: boolean;
-
- /**
- * Whether or not call feedback can be sent.
- */
- _feedbackConfigured: boolean;
-
- /**
- * Whether or not the app is currently in full screen.
- */
- _fullScreen?: boolean;
-
- /**
- * Whether or not the GIFs feature is enabled.
- */
- _gifsEnabled: boolean;
-
- /**
- * Whether the hangup menu is visible.
- */
- _hangupMenuVisible: boolean;
-
- /**
- * Whether the app has Salesforce integration.
- */
- _hasSalesforce: boolean;
-
- /**
- * Whether or not the app is running in an ios mobile browser.
- */
- _isIosMobile: boolean;
-
- /**
- * Whether or not the app is running in mobile browser.
- */
- _isMobile: boolean;
-
- /**
- * Whether we are in narrow layout mode.
- */
- _isNarrowLayout: boolean;
-
- /**
- * Whether or not the profile is disabled.
- */
- _isProfileDisabled: boolean;
-
- /**
- * Whether or not speaker stats is disable.
- */
- _isSpeakerStatsDisabled?: boolean;
-
-
- /**
- * Whether or not the current meeting belongs to a JaaS user.
- */
- _isVpaasMeeting: boolean;
-
- /**
- * The array of toolbar buttons disabled through jwt features.
- */
- _jwtDisabledButons: string[];
-
- /**
- * The ID of the local participant.
- */
- _localParticipantID?: string;
-
- /**
- * The JitsiLocalTrack to display.
- */
- _localVideo?: ITrack;
-
- /**
- * Whether or not multi-stream send support is enabled.
- */
- _multiStreamModeEnabled: boolean;
-
- /**
- * Whether or not the overflow menu is displayed in a drawer drawer.
- */
- _overflowDrawer: boolean;
-
- /**
- * Whether or not the overflow menu is visible.
- */
- _overflowMenuVisible: boolean;
-
- /**
- * Whether or not the participants pane is open.
- */
- _participantsPaneOpen: boolean;
-
- /**
- * Whether or not the local participant's hand is raised.
- */
- _raisedHand: boolean;
-
- /**
- * Whether or not reactions feature is enabled.
- */
- _reactionsEnabled: boolean;
-
- /**
- * Whether or not the local participant is screenSharing.
- */
- _screenSharing: boolean;
-
- /**
- * Whether or not the local participant is sharing a YouTube video.
- */
- _sharingVideo?: boolean;
-
- /**
- * Whether or not the shortcut buttons are enabled.
- */
- _shortcutsEnabled: boolean;
-
- /**
- * Whether or not the tile view is enabled.
- */
- _tileViewEnabled: boolean;
-
- /**
- * The enabled buttons.
- */
- _toolbarButtons: Array<string>;
-
- /**
- * Returns the selected virtual source object.
- */
- _virtualSource: any;
-
- /**
- * Flag showing whether toolbar is visible.
- */
- _visible: boolean;
-
- /**
- * Whether the whiteboard is visible.
- */
- _whiteboardEnabled: boolean;
-
- /**
- * An object containing the CSS classes.
- */
- classes: any;
-
- /**
- * Invoked to active other features of the app.
- */
- dispatch: Function;
-
- /**
- * Explicitly passed array with the buttons which this Toolbox should display.
- */
- toolbarButtons: Array<string>;
- }
-
- const styles = () => {
- return {
- contextMenu: {
- position: 'relative' as const,
- right: 'auto',
- margin: 0,
- marginBottom: '8px',
- maxHeight: 'calc(100vh - 100px)',
- minWidth: '240px'
- },
-
- hangupMenu: {
- position: 'relative' as const,
- right: 'auto',
- display: 'flex',
- flexDirection: 'column' as const,
- rowGap: '8px',
- margin: 0,
- padding: '16px',
- marginBottom: '4px'
- }
- };
- };
-
- /**
- * Implements the conference toolbox on React/Web.
- *
- * @augments Component
- */
- class Toolbox extends Component<IProps> {
- _toolboxRef: RefObject<HTMLDivElement>;
-
- /**
- * Initializes a new {@code Toolbox} instance.
- *
- * @param {IProps} props - The read-only React {@code Component} props with
- * which the new instance is to be initialized.
- */
- constructor(props: IProps) {
- super(props);
-
- this._toolboxRef = React.createRef();
-
- // Bind event handlers so they are only bound once per instance.
- this._onMouseOut = this._onMouseOut.bind(this);
- this._onMouseOver = this._onMouseOver.bind(this);
- this._onSetHangupVisible = this._onSetHangupVisible.bind(this);
- this._onSetOverflowVisible = this._onSetOverflowVisible.bind(this);
- this._onTabIn = this._onTabIn.bind(this);
-
- this._onShortcutToggleChat = this._onShortcutToggleChat.bind(this);
- this._onShortcutToggleFullScreen = this._onShortcutToggleFullScreen.bind(this);
- this._onShortcutToggleParticipantsPane = this._onShortcutToggleParticipantsPane.bind(this);
- this._onShortcutToggleRaiseHand = this._onShortcutToggleRaiseHand.bind(this);
- this._onShortcutToggleScreenshare = this._onShortcutToggleScreenshare.bind(this);
- this._onShortcutToggleVideoQuality = this._onShortcutToggleVideoQuality.bind(this);
- this._onToolbarToggleParticipantsPane = this._onToolbarToggleParticipantsPane.bind(this);
- this._onToolbarOpenVideoQuality = this._onToolbarOpenVideoQuality.bind(this);
- this._onToolbarToggleChat = this._onToolbarToggleChat.bind(this);
- this._onToolbarToggleFullScreen = this._onToolbarToggleFullScreen.bind(this);
- this._onToolbarToggleRaiseHand = this._onToolbarToggleRaiseHand.bind(this);
- this._onToolbarToggleScreenshare = this._onToolbarToggleScreenshare.bind(this);
- this._onShortcutToggleTileView = this._onShortcutToggleTileView.bind(this);
- this._onShortcutSpeakerStats = this._onShortcutSpeakerStats.bind(this);
- this._onEscKey = this._onEscKey.bind(this);
- }
-
- /**
- * Sets keyboard shortcuts for to trigger ToolbarButtons actions.
- *
- * @inheritdoc
- * @returns {void}
- */
- componentDidMount() {
- const { _toolbarButtons, t, dispatch, _reactionsEnabled, _gifsEnabled, _isSpeakerStatsDisabled } = this.props;
-
- const KEYBOARD_SHORTCUTS = [
- isToolbarButtonEnabled('videoquality', _toolbarButtons) && {
- character: 'A',
- exec: this._onShortcutToggleVideoQuality,
- helpDescription: 'toolbar.callQuality'
- },
- isToolbarButtonEnabled('chat', _toolbarButtons) && {
- character: 'C',
- exec: this._onShortcutToggleChat,
- helpDescription: 'keyboardShortcuts.toggleChat'
- },
- isToolbarButtonEnabled('desktop', _toolbarButtons) && {
- character: 'D',
- exec: this._onShortcutToggleScreenshare,
- helpDescription: 'keyboardShortcuts.toggleScreensharing'
- },
- isToolbarButtonEnabled('participants-pane', _toolbarButtons) && {
- character: 'P',
- exec: this._onShortcutToggleParticipantsPane,
- helpDescription: 'keyboardShortcuts.toggleParticipantsPane'
- },
- isToolbarButtonEnabled('raisehand', _toolbarButtons) && {
- character: 'R',
- exec: this._onShortcutToggleRaiseHand,
- helpDescription: 'keyboardShortcuts.raiseHand'
- },
- isToolbarButtonEnabled('fullscreen', _toolbarButtons) && {
- character: 'S',
- exec: this._onShortcutToggleFullScreen,
- helpDescription: 'keyboardShortcuts.fullScreen'
- },
- isToolbarButtonEnabled('tileview', _toolbarButtons) && {
- character: 'W',
- exec: this._onShortcutToggleTileView,
- helpDescription: 'toolbar.tileViewToggle'
- },
- !_isSpeakerStatsDisabled && isToolbarButtonEnabled('stats', _toolbarButtons) && {
- character: 'T',
- exec: this._onShortcutSpeakerStats,
- helpDescription: 'keyboardShortcuts.showSpeakerStats'
- }
- ];
-
- KEYBOARD_SHORTCUTS.forEach(shortcut => {
- if (typeof shortcut === 'object') {
- dispatch(registerShortcut({
- character: shortcut.character,
- handler: shortcut.exec,
- helpDescription: shortcut.helpDescription
- }));
- }
- });
-
- if (_reactionsEnabled) {
- const REACTION_SHORTCUTS = Object.keys(REACTIONS).map(key => {
- const onShortcutSendReaction = () => {
- dispatch(addReactionToBuffer(key));
- sendAnalytics(createShortcutEvent(
- `reaction.${key}`
- ));
- };
-
- return {
- character: REACTIONS[key].shortcutChar,
- exec: onShortcutSendReaction,
- helpDescription: t(`toolbar.reaction${key.charAt(0).toUpperCase()}${key.slice(1)}`),
- altKey: true
- };
- });
-
- REACTION_SHORTCUTS.forEach(shortcut => {
- dispatch(registerShortcut({
- alt: shortcut.altKey,
- character: shortcut.character,
- handler: shortcut.exec,
- helpDescription: shortcut.helpDescription
- }));
- });
-
- if (_gifsEnabled) {
- const onGifShortcut = () => {
- batch(() => {
- dispatch(toggleReactionsMenuVisibility());
- dispatch(setGifMenuVisibility(true));
- });
- };
-
- dispatch(registerShortcut({
- character: 'G',
- handler: onGifShortcut,
- helpDescription: 'keyboardShortcuts.giphyMenu'
- }));
- }
- }
- }
-
- /**
- * Update the visibility of the {@code OverflowMenuButton}.
- *
- * @inheritdoc
- */
- componentDidUpdate(prevProps: IProps) {
- const { _dialog, _visible, dispatch } = this.props;
-
- if (prevProps._overflowMenuVisible
- && !prevProps._dialog
- && _dialog) {
- this._onSetOverflowVisible(false);
- dispatch(setToolbarHovered(false));
- }
- if (prevProps._hangupMenuVisible
- && prevProps._visible
- && !_visible) {
- this._onSetHangupVisible(false);
- dispatch(setToolbarHovered(false));
- }
-
- if (!_visible && prevProps._visible !== _visible) {
- if (document.activeElement instanceof HTMLElement
- && this._toolboxRef.current?.contains(document.activeElement)) {
- document.activeElement.blur();
- }
- }
- }
-
- /**
- * Removes keyboard shortcuts registered by this component.
- *
- * @inheritdoc
- * @returns {void}
- */
- componentWillUnmount() {
- const { dispatch } = this.props;
-
- [ 'A', 'C', 'D', 'R', 'S' ].forEach(letter =>
- dispatch(unregisterShortcut(letter)));
-
- if (this.props._reactionsEnabled) {
- Object.keys(REACTIONS).map(key => REACTIONS[key].shortcutChar)
- .forEach(letter =>
- dispatch(unregisterShortcut(letter, true)));
- }
- }
-
- /**
- * Implements React's {@link Component#render()}.
- *
- * @inheritdoc
- * @returns {ReactElement}
- */
- render() {
- if (this.props._disabled) {
- return null;
- }
-
- const { _chatOpen, _visible, _toolbarButtons } = this.props;
- const rootClassNames = `new-toolbox ${_visible ? 'visible' : ''} ${
- _toolbarButtons.length ? '' : 'no-buttons'} ${_chatOpen ? 'shift-right' : ''}`;
-
- return (
- <div
- className = { rootClassNames }
- id = 'new-toolbox'>
- { this._renderToolboxContent() }
- </div>
- );
- }
-
- /**
- * Key handler for overflow/hangup menus.
- *
- * @param {KeyboardEvent} e - Esc key click to close the popup.
- * @returns {void}
- */
- _onEscKey(e?: React.KeyboardEvent) {
- if (e?.key === 'Escape') {
- e?.stopPropagation();
- this._closeHangupMenuIfOpen();
- this._closeOverflowMenuIfOpen();
- }
- }
-
- /**
- * Closes the hangup menu if opened.
- *
- * @private
- * @returns {void}
- */
- _closeHangupMenuIfOpen() {
- const { dispatch, _hangupMenuVisible } = this.props;
-
- _hangupMenuVisible && dispatch(setHangupMenuVisible(false));
- }
-
- /**
- * Closes the overflow menu if opened.
- *
- * @private
- * @returns {void}
- */
- _closeOverflowMenuIfOpen() {
- const { dispatch, _overflowMenuVisible } = this.props;
-
- _overflowMenuVisible && dispatch(setOverflowMenuVisible(false));
- }
-
- /**
- * Dispatches an action to open the video quality dialog.
- *
- * @private
- * @returns {void}
- */
- _doOpenVideoQuality() {
- this.props.dispatch(openDialog(VideoQualityDialog));
- }
-
- /**
- * Dispatches an action to toggle the display of chat.
- *
- * @private
- * @returns {void}
- */
- _doToggleChat() {
- this.props.dispatch(toggleChat());
- }
-
- /**
- * Dispatches an action to toggle screensharing.
- *
- * @private
- * @returns {void}
- */
- _doToggleFullScreen() {
- const fullScreen = !this.props._fullScreen;
-
- this.props.dispatch(setFullScreen(fullScreen));
- }
-
- /**
- * Dispatches an action to toggle the local participant's raised hand state.
- *
- * @private
- * @returns {void}
- */
- _doToggleRaiseHand() {
- const { _raisedHand } = this.props;
-
- this.props.dispatch(raiseHand(!_raisedHand));
- }
-
- /**
- * Dispatches an action to toggle screensharing.
- *
- * @private
- * @param {boolean} enabled - The state to toggle screen sharing to.
- * @param {boolean} audioOnly - Only share system audio.
- * @returns {void}
- */
- _doToggleScreenshare() {
- const {
- _desktopSharingButtonDisabled,
- _desktopSharingEnabled,
- _screenSharing,
- dispatch
- } = this.props;
-
- if (_desktopSharingEnabled && !_desktopSharingButtonDisabled) {
- dispatch(startScreenShareFlow(!_screenSharing));
- }
- }
-
- /**
- * Dispatches an action to toggle the video quality dialog.
- *
- * @private
- * @returns {void}
- */
- _doToggleVideoQuality() {
- this.props.dispatch(toggleDialog(VideoQualityDialog));
- }
-
- /**
- * Dispaches an action to toggle tile view.
- *
- * @private
- * @returns {void}
- */
- _doToggleTileView() {
- this.props.dispatch(toggleTileView());
- }
-
- /**
- * Returns all buttons that could be rendered.
- *
- * @param {Object} state - The redux state.
- * @returns {Object} The button maps mainMenuButtons and overflowMenuButtons.
- */
- _getAllButtons() {
- const {
- _customToolbarButtons,
- _feedbackConfigured,
- _hasSalesforce,
- _isIosMobile,
- _isMobile,
- _isNarrowLayout,
- _isSpeakerStatsDisabled,
- _multiStreamModeEnabled,
- _reactionsEnabled,
- _screenSharing,
- _shortcutsEnabled,
- _whiteboardEnabled
- } = this.props;
-
- const microphone = {
- key: 'microphone',
- Content: AudioSettingsButton,
- group: 0
- };
-
- const camera = {
- key: 'camera',
- Content: VideoSettingsButton,
- group: 0
- };
-
- const profile = this._isProfileVisible() && {
- key: 'profile',
- Content: ProfileButton,
- group: 1
- };
-
- const chat = {
- key: 'chat',
- Content: ChatButton,
- handleClick: this._onToolbarToggleChat,
- group: 2
- };
-
- const desktop = this._showDesktopSharingButton() && {
- key: 'desktop',
- Content: ShareDesktopButton,
- handleClick: this._onToolbarToggleScreenshare,
- group: 2
- };
-
- const raisehand = (!_reactionsEnabled || (!_isNarrowLayout && !_isMobile)) && {
- key: 'raisehand',
- Content: ReactionsMenuButton,
- handleClick: this._onToolbarToggleRaiseHand,
- group: 2
- };
-
- const participants = {
- key: 'participants-pane',
- Content: ParticipantsPaneButton,
- handleClick: this._onToolbarToggleParticipantsPane,
- group: 2
- };
-
- const invite = {
- key: 'invite',
- Content: InviteButton,
- group: 2
- };
-
- const tileview = {
- key: 'tileview',
- Content: TileViewButton,
- group: 2
- };
-
- const toggleCamera = {
- key: 'toggle-camera',
- Content: ToggleCameraButton,
- group: 2
- };
-
- const videoQuality = {
- key: 'videoquality',
- Content: VideoQualityButton,
- handleClick: this._onToolbarOpenVideoQuality,
- group: 2
- };
-
- const fullscreen = !_isIosMobile && {
- key: 'fullscreen',
- Content: FullscreenButton,
- handleClick: this._onToolbarToggleFullScreen,
- group: 2
- };
-
- const security = {
- key: 'security',
- alias: 'info',
- Content: SecurityDialogButton,
- group: 2
- };
-
- const cc = {
- key: 'closedcaptions',
- Content: ClosedCaptionButton,
- group: 2
- };
-
- const recording = {
- key: 'recording',
- Content: RecordButton,
- group: 2
- };
-
- const livestreaming = {
- key: 'livestreaming',
- Content: LiveStreamButton,
- group: 2
- };
-
- const linkToSalesforce = _hasSalesforce && {
- key: 'linktosalesforce',
- Content: LinkToSalesforceButton,
- group: 2
- };
-
- const shareVideo = {
- key: 'sharedvideo',
- Content: SharedVideoButton,
- group: 3
- };
-
- const shareAudio = this._showAudioSharingButton() && {
- key: 'shareaudio',
- Content: ShareAudioButton,
- group: 3
- };
-
- const noiseSuppression = {
- key: 'noisesuppression',
- Content: NoiseSuppressionButton,
- group: 3
- };
-
-
- const whiteboard = _whiteboardEnabled && {
- key: 'whiteboard',
- Content: WhiteboardButton,
- group: 3
- };
-
- const etherpad = {
- key: 'etherpad',
- Content: SharedDocumentButton,
- group: 3
- };
-
- const virtualBackground = (_multiStreamModeEnabled || !_screenSharing) && {
- key: 'select-background',
- Content: VideoBackgroundButton,
- group: 3
- };
-
- const speakerStats = !_isSpeakerStatsDisabled && {
- key: 'stats',
- Content: SpeakerStatsButton,
- group: 3
- };
-
- const settings = {
- key: 'settings',
- Content: SettingsButton,
- group: 4
- };
-
- const shortcuts = !_isMobile && _shortcutsEnabled && {
- key: 'shortcuts',
- Content: KeyboardShortcutsButton,
- group: 4
- };
-
- const embed = this._isEmbedMeetingVisible() && {
- key: 'embedmeeting',
- Content: EmbedMeetingButton,
- group: 4
- };
-
- const feedback = _feedbackConfigured && {
- key: 'feedback',
- Content: FeedbackButton,
- group: 4
- };
-
- const download = {
- key: 'download',
- Content: DownloadButton,
- group: 4
- };
-
- const help = {
- key: 'help',
- Content: HelpButton,
- group: 4
- };
-
- const customButtons = _customToolbarButtons?.reduce((prev, { icon, id, text }) => {
- return {
- ...prev,
- [id]: {
- key: id,
- Content: CustomOptionButton,
- group: 4,
- icon,
- text
- }
- };
- }, {});
-
- return {
- microphone,
- camera,
- profile,
- desktop,
- chat,
- raisehand,
- participants,
- invite,
- tileview,
- toggleCamera,
- videoQuality,
- fullscreen,
- security,
- cc,
- recording,
- livestreaming,
- linkToSalesforce,
- shareVideo,
- shareAudio,
- noiseSuppression,
- whiteboard,
- etherpad,
- virtualBackground,
- speakerStats,
- settings,
- shortcuts,
- embed,
- feedback,
- download,
- help,
- ...customButtons
- };
- }
-
-
- /**
- * Returns the notify mode of the given toolbox button.
- *
- * @param {string} btnName - The toolbar button's name.
- * @returns {string|undefined} - The button's notify mode.
- */
- _getButtonNotifyMode(btnName: string) {
- const notify = this.props._buttonsWithNotifyClick?.find(
- btn =>
- (typeof btn === 'string' && btn === btnName)
- || (typeof btn === 'object' && btn.key === btnName)
- );
-
- if (notify) {
- return typeof notify === 'string' || notify.preventExecution
- ? NOTIFY_CLICK_MODE.PREVENT_AND_NOTIFY
- : NOTIFY_CLICK_MODE.ONLY_NOTIFY;
- }
- }
-
- /**
- * Sets the notify click mode for the buttons.
- *
- * @param {Object} buttons - The list of toolbar buttons.
- * @returns {void}
- */
- _setButtonsNotifyClickMode(buttons: Object) {
- if (typeof APP === 'undefined' || !this.props._buttonsWithNotifyClick?.length) {
- return;
- }
-
- Object.values(buttons).forEach((button: any) => {
- if (typeof button === 'object') {
- button.notifyMode = this._getButtonNotifyMode(button.key);
- }
- });
- }
-
- /**
- * Returns all buttons that need to be rendered.
- *
- * @param {Object} state - The redux state.
- * @returns {Object} The visible buttons arrays .
- */
- _getVisibleButtons() {
- const {
- _clientWidth,
- _toolbarButtons,
- _jwtDisabledButons
- } = this.props;
-
- const buttons = this._getAllButtons();
-
- this._setButtonsNotifyClickMode(buttons);
- const isHangupVisible = isToolbarButtonEnabled('hangup', _toolbarButtons);
- const { order } = THRESHOLDS.find(({ width }) => _clientWidth > width)
- || THRESHOLDS[THRESHOLDS.length - 1];
- let sliceIndex = order.length + 2;
-
- const keys = Object.keys(buttons);
-
- const filtered = [
- ...order.map(key => buttons[key as keyof typeof buttons]),
- ...Object.values(buttons).filter((button, index) => !order.includes(keys[index]))
- ].filter(Boolean).filter(({ key, alias = NOT_APPLICABLE }) =>
- !_jwtDisabledButons.includes(key)
- && (isToolbarButtonEnabled(key, _toolbarButtons) || isToolbarButtonEnabled(alias, _toolbarButtons))
- );
-
- if (isHangupVisible) {
- sliceIndex -= 1;
- }
-
- // This implies that the overflow button will be displayed, so save some space for it.
- if (sliceIndex < filtered.length) {
- sliceIndex -= 1;
- }
-
- return {
- mainMenuButtons: filtered.slice(0, sliceIndex),
- overflowMenuButtons: filtered.slice(sliceIndex)
- };
- }
-
- /**
- * Dispatches an action signaling the toolbar is not being hovered.
- *
- * @private
- * @returns {void}
- */
- _onMouseOut() {
- const { _overflowMenuVisible, dispatch } = this.props;
-
- !_overflowMenuVisible && dispatch(setToolbarHovered(false));
- }
-
- /**
- * Dispatches an action signaling the toolbar is being hovered.
- *
- * @private
- * @returns {void}
- */
- _onMouseOver() {
- this.props.dispatch(setToolbarHovered(true));
- }
-
- /**
- * Sets the visibility of the hangup menu.
- *
- * @param {boolean} visible - Whether or not the hangup menu should be
- * displayed.
- * @private
- * @returns {void}
- */
- _onSetHangupVisible(visible: boolean) {
- this.props.dispatch(setHangupMenuVisible(visible));
- this.props.dispatch(setToolbarHovered(visible));
- }
-
- /**
- * Sets the visibility of the overflow menu.
- *
- * @param {boolean} visible - Whether or not the overflow menu should be
- * displayed.
- * @private
- * @returns {void}
- */
- _onSetOverflowVisible(visible: boolean) {
- this.props.dispatch(setOverflowMenuVisible(visible));
- this.props.dispatch(setToolbarHovered(visible));
- }
-
- /**
- * Creates an analytics keyboard shortcut event and dispatches an action for
- * toggling the display of chat.
- *
- * @private
- * @returns {void}
- */
- _onShortcutToggleChat() {
- sendAnalytics(createShortcutEvent(
- 'toggle.chat',
- ACTION_SHORTCUT_TRIGGERED,
- {
- enable: !this.props._chatOpen
- }));
-
- // Checks if there was any text selected by the user.
- // Used for when we press simultaneously keys for copying
- // text messages from the chat board
- if (window.getSelection()?.toString() !== '') {
- return false;
- }
-
- this._doToggleChat();
- }
-
- /**
- * Creates an analytics keyboard shortcut event and dispatches an action for
- * toggling the display of the participants pane.
- *
- * @private
- * @returns {void}
- */
- _onShortcutToggleParticipantsPane() {
- sendAnalytics(createShortcutEvent(
- 'toggle.participants-pane',
- ACTION_SHORTCUT_TRIGGERED,
- {
- enable: !this.props._participantsPaneOpen
- }));
-
- this._onToolbarToggleParticipantsPane();
- }
-
- /**
- * Creates an analytics keyboard shortcut event and dispatches an action for
- * toggling the display of Video Quality.
- *
- * @private
- * @returns {void}
- */
- _onShortcutToggleVideoQuality() {
- sendAnalytics(createShortcutEvent('video.quality'));
-
- this._doToggleVideoQuality();
- }
-
- /**
- * Dispatches an action for toggling the tile view.
- *
- * @private
- * @returns {void}
- */
- _onShortcutToggleTileView() {
- sendAnalytics(createShortcutEvent(
- 'toggle.tileview',
- ACTION_SHORTCUT_TRIGGERED,
- {
- enable: !this.props._tileViewEnabled
- }));
-
- this._doToggleTileView();
- }
-
- /**
- * Creates an analytics keyboard shortcut event and dispatches an action for
- * toggling full screen mode.
- *
- * @private
- * @returns {void}
- */
- _onShortcutToggleFullScreen() {
- sendAnalytics(createShortcutEvent(
- 'toggle.fullscreen',
- ACTION_SHORTCUT_TRIGGERED,
- {
- enable: !this.props._fullScreen
- }));
-
- this._doToggleFullScreen();
- }
-
- /**
- * Creates an analytics keyboard shortcut event and dispatches an action for
- * toggling raise hand.
- *
- * @private
- * @returns {void}
- */
- _onShortcutToggleRaiseHand() {
- sendAnalytics(createShortcutEvent(
- 'toggle.raise.hand',
- ACTION_SHORTCUT_TRIGGERED,
- { enable: !this.props._raisedHand }));
-
- this._doToggleRaiseHand();
- }
-
- /**
- * Creates an analytics keyboard shortcut event and dispatches an action for
- * toggling screensharing.
- *
- * @private
- * @returns {void}
- */
- _onShortcutToggleScreenshare() {
- // Ignore the shortcut if the button is disabled.
- if (this.props._desktopSharingButtonDisabled) {
- return;
- }
- sendAnalytics(createShortcutEvent(
- 'toggle.screen.sharing',
- ACTION_SHORTCUT_TRIGGERED,
- {
- enable: !this.props._screenSharing
- }));
-
- this._doToggleScreenshare();
- }
-
- /**
- * Creates an analytics keyboard shortcut event and dispatches an action for
- * toggling speaker stats.
- *
- * @private
- * @returns {void}
- */
- _onShortcutSpeakerStats() {
- sendAnalytics(createShortcutEvent(
- 'speaker.stats'
- ));
-
- this._doToggleSpekearStats();
- }
-
- /**
- * Dispatches an action to toggle speakerStats.
- *
- * @private
- * @returns {void}
- */
- _doToggleSpekearStats() {
- const { dispatch } = this.props;
-
- dispatch(toggleDialog(SpeakerStats, {
- conference: APP.conference
- }));
- }
-
- /**
- * Toggle the toolbar visibility when tabbing into it.
- *
- * @returns {void}
- */
- _onTabIn() {
- if (!this.props._visible) {
- this.props.dispatch(showToolbox());
- }
- }
-
- /**
- * Dispatches an action for toggling the participants pane.
- *
- * @private
- * @returns {void}
- */
- _onToolbarToggleParticipantsPane() {
- const { dispatch, _participantsPaneOpen } = this.props;
-
- if (_participantsPaneOpen) {
- dispatch(closeParticipantsPane());
- } else {
- dispatch(openParticipantsPane());
- }
- }
-
- /**
- * Creates an analytics toolbar event and dispatches an action for toggling
- * open the video quality dialog.
- *
- * @private
- * @returns {void}
- */
- _onToolbarOpenVideoQuality() {
- sendAnalytics(createToolbarEvent('video.quality'));
-
- this._doOpenVideoQuality();
- }
-
- /**
- * Creates an analytics toolbar event and dispatches an action for toggling
- * the display of chat.
- *
- * @private
- * @returns {void}
- */
- _onToolbarToggleChat() {
- sendAnalytics(createToolbarEvent(
- 'toggle.chat',
- {
- enable: !this.props._chatOpen
- }));
- this._closeOverflowMenuIfOpen();
- this._doToggleChat();
- }
-
- /**
- * Creates an analytics toolbar event and dispatches an action for toggling
- * full screen mode.
- *
- * @private
- * @returns {void}
- */
- _onToolbarToggleFullScreen() {
- sendAnalytics(createToolbarEvent(
- 'toggle.fullscreen',
- {
- enable: !this.props._fullScreen
- }));
- this._closeOverflowMenuIfOpen();
- this._doToggleFullScreen();
- }
-
- /**
- * Creates an analytics toolbar event and dispatches an action for toggling
- * raise hand.
- *
- * @private
- * @returns {void}
- */
- _onToolbarToggleRaiseHand() {
- sendAnalytics(createToolbarEvent(
- 'raise.hand',
- { enable: !this.props._raisedHand }));
-
- this._doToggleRaiseHand();
- }
-
- /**
- * Creates an analytics toolbar event and dispatches an action for toggling
- * screensharing.
- *
- * @private
- * @returns {void}
- */
- _onToolbarToggleScreenshare() {
- sendAnalytics(createToolbarEvent(
- 'toggle.screen.sharing',
- { enable: !this.props._screenSharing }));
-
- this._closeOverflowMenuIfOpen();
- this._doToggleScreenshare();
- }
-
- /**
- * Returns true if the audio sharing button should be visible and
- * false otherwise.
- *
- * @returns {boolean}
- */
- _showAudioSharingButton() {
- const {
- _desktopSharingEnabled
- } = this.props;
-
- return _desktopSharingEnabled && isScreenAudioSupported();
- }
-
- /**
- * Returns true if the desktop sharing button should be visible and
- * false otherwise.
- *
- * @returns {boolean}
- */
- _showDesktopSharingButton() {
- return this.props._desktopSharingEnabled;
- }
-
- /**
- * Returns true if the embed meeting button is visible and false otherwise.
- *
- * @returns {boolean}
- */
- _isEmbedMeetingVisible() {
- return !this.props._isVpaasMeeting
- && !this.props._isMobile;
- }
-
- /**
- * Returns true if the profile button is visible and false otherwise.
- *
- * @returns {boolean}
- */
- _isProfileVisible() {
- return !this.props._isProfileDisabled;
- }
-
- /**
- * Renders the toolbox content.
- *
- * @returns {ReactElement}
- */
- _renderToolboxContent() {
- const {
- _endConferenceSupported,
- _hangupMenuVisible,
- _isMobile,
- _isNarrowLayout,
- _overflowDrawer,
- _overflowMenuVisible,
- _reactionsEnabled,
- _toolbarButtons,
- classes,
- t
- } = this.props;
-
- const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
- const containerClassName = `toolbox-content${_isMobile || _isNarrowLayout ? ' toolbox-content-mobile' : ''}`;
-
- const { mainMenuButtons, overflowMenuButtons } = this._getVisibleButtons();
-
- return (
- <div className = { containerClassName }>
- <div
- className = 'toolbox-content-wrapper'
- onFocus = { this._onTabIn }
- { ...(_isMobile ? {} : {
- onMouseOut: this._onMouseOut,
- onMouseOver: this._onMouseOver
- }) }>
-
- <div
- className = 'toolbox-content-items'
- ref = { this._toolboxRef }>
- {mainMenuButtons.map(({ Content, key, ...rest }) => Content !== Separator && (
- <Content
- { ...rest }
- buttonKey = { key }
- key = { key } />))}
-
- {Boolean(overflowMenuButtons.length) && (
- <OverflowMenuButton
- ariaControls = 'overflow-menu'
- isOpen = { _overflowMenuVisible }
- key = 'overflow-menu'
- onVisibilityChange = { this._onSetOverflowVisible }
- showMobileReactions = {
- _reactionsEnabled && (_isMobile || _isNarrowLayout)
- }>
- <ContextMenu
- accessibilityLabel = { t(toolbarAccLabel) }
- className = { classes.contextMenu }
- hidden = { false }
- id = 'overflow-context-menu'
- inDrawer = { _overflowDrawer }
- onKeyDown = { this._onEscKey }>
- {overflowMenuButtons.reduce((acc, val) => {
- if (acc.length) {
- const prev = acc[acc.length - 1];
- const group = prev[prev.length - 1].group;
-
- if (group === val.group) {
- prev.push(val);
- } else {
- acc.push([ val ]);
- }
- } else {
- acc.push([ val ]);
- }
-
- return acc;
- }, []).map((buttonGroup: any) => (
- <ContextMenuItemGroup key = { `group-${buttonGroup[0].group}` }>
- {buttonGroup.map(({ key, Content, ...rest }: any) => (
- key !== 'raisehand' || !_reactionsEnabled)
- && <Content
- { ...rest }
- buttonKey = { key }
- contextMenu = { true }
- key = { key }
- showLabel = { true } />)}
- </ContextMenuItemGroup>))}
- </ContextMenu>
- </OverflowMenuButton>
- )}
-
- { isToolbarButtonEnabled('hangup', _toolbarButtons) && (
- _endConferenceSupported
- ? <HangupMenuButton
- ariaControls = 'hangup-menu'
- isOpen = { _hangupMenuVisible }
- key = 'hangup-menu'
- notifyMode = { this._getButtonNotifyMode('hangup-menu') }
- onVisibilityChange = { this._onSetHangupVisible }>
- <ContextMenu
- accessibilityLabel = { t(toolbarAccLabel) }
- className = { classes.hangupMenu }
- hidden = { false }
- inDrawer = { _overflowDrawer }
- onKeyDown = { this._onEscKey }>
- <EndConferenceButton
- buttonKey = 'end-meeting'
- notifyMode = { this._getButtonNotifyMode('end-meeting') } />
- <LeaveConferenceButton
- buttonKey = 'hangup'
- notifyMode = { this._getButtonNotifyMode('hangup') } />
- </ContextMenu>
- </HangupMenuButton>
- : <HangupButton
- buttonKey = 'hangup'
- customClass = 'hangup-button'
- key = 'hangup-button'
- notifyMode = { this._getButtonNotifyMode('hangup') }
- visible = { isToolbarButtonEnabled('hangup', _toolbarButtons) } />
- )}
- </div>
- </div>
- </div>
- );
- }
- }
-
- /**
- * Maps (parts of) the redux state to {@link Toolbox}'s React {@code Component}
- * props.
- *
- * @param {Object} state - The redux store/state.
- * @param {Object} ownProps - The props explicitly passed.
- * @private
- * @returns {{}}
- */
- function _mapStateToProps(state: IReduxState, ownProps: any) {
- const { conference } = state['features/base/conference'];
- const { isNarrowLayout } = state['features/base/responsive-ui'];
- const endConferenceSupported = conference?.isEndConferenceSupported() && isLocalParticipantModerator(state);
-
- const {
- callStatsID,
- customToolbarButtons,
- disableProfile,
- iAmRecorder,
- iAmSipGateway
- } = state['features/base/config'];
- const {
- fullScreen,
- hangupMenuVisible,
- overflowMenuVisible,
- overflowDrawer
- } = state['features/toolbox'];
- const localParticipant = getLocalParticipant(state);
- const localVideo = getLocalVideoTrack(state['features/base/tracks']);
- const { clientWidth } = state['features/base/responsive-ui'];
- let toolbarButtons = ownProps.toolbarButtons || getToolbarButtons(state);
-
- if (iAmVisitor(state)) {
- toolbarButtons = VISITORS_MODE_BUTTONS.filter(e => toolbarButtons.indexOf(e) > -1);
- }
-
- return {
- _backgroundType: state['features/virtual-background'].backgroundType ?? '',
- _buttonsWithNotifyClick: getButtonsWithNotifyClick(state),
- _chatOpen: state['features/chat'].isOpen,
- _clientWidth: clientWidth,
- _conference: conference,
- _customToolbarButtons: customToolbarButtons,
- _desktopSharingEnabled: JitsiMeetJS.isDesktopSharingEnabled(),
- _desktopSharingButtonDisabled: isDesktopShareButtonDisabled(state),
- _dialog: Boolean(state['features/base/dialog'].component),
- _disabled: Boolean(iAmRecorder || iAmSipGateway),
- _endConferenceSupported: Boolean(endConferenceSupported),
- _feedbackConfigured: Boolean(callStatsID),
- _fullScreen: fullScreen,
- _gifsEnabled: isGifEnabled(state),
- _isProfileDisabled: Boolean(disableProfile),
- _isIosMobile: isIosMobileBrowser(),
- _isMobile: isMobileBrowser(),
- _isSpeakerStatsDisabled: isSpeakerStatsDisabled(state),
- _isVpaasMeeting: isVpaasMeeting(state),
- _jwtDisabledButons: getJwtDisabledButtons(state),
- _hasSalesforce: isSalesforceEnabled(state),
- _hangupMenuVisible: hangupMenuVisible,
- _isNarrowLayout: isNarrowLayout,
- _localParticipantID: localParticipant?.id,
- _localVideo: localVideo,
- _multiStreamModeEnabled: getMultipleVideoSendingSupportFeatureFlag(state),
- _overflowMenuVisible: overflowMenuVisible,
- _overflowDrawer: overflowDrawer,
- _participantsPaneOpen: getParticipantsPaneOpen(state),
- _raisedHand: hasRaisedHand(localParticipant),
- _reactionsEnabled: isReactionsEnabled(state),
- _screenSharing: isScreenVideoShared(state),
- _shortcutsEnabled: areKeyboardShortcutsEnabled(state),
- _tileViewEnabled: shouldDisplayTileView(state),
- _toolbarButtons: toolbarButtons,
- _virtualSource: state['features/virtual-background'].virtualSource,
- _visible: isToolboxVisible(state),
- _whiteboardEnabled: isWhiteboardButtonVisible(state)
- };
- }
-
- export default translate(connect(_mapStateToProps)(withStyles(styles)(Toolbox)));
|