You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Toolbox.js 44KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434
  1. // @flow
  2. import React, { Component } from 'react';
  3. import {
  4. ACTION_SHORTCUT_TRIGGERED,
  5. createShortcutEvent,
  6. createToolbarEvent,
  7. sendAnalytics
  8. } from '../../../analytics';
  9. import { openDialog, toggleDialog } from '../../../base/dialog';
  10. import { translate } from '../../../base/i18n';
  11. import {
  12. IconChat,
  13. IconCodeBlock,
  14. IconExitFullScreen,
  15. IconFeedback,
  16. IconFullScreen,
  17. IconInviteMore,
  18. IconOpenInNew,
  19. IconPresentation,
  20. IconRaisedHand,
  21. IconRec,
  22. IconShareDesktop,
  23. IconShareVideo
  24. } from '../../../base/icons';
  25. import {
  26. getLocalParticipant,
  27. getParticipants,
  28. participantUpdated
  29. } from '../../../base/participants';
  30. import { connect, equals } from '../../../base/redux';
  31. import { OverflowMenuItem } from '../../../base/toolbox';
  32. import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
  33. import { VideoBlurButton } from '../../../blur';
  34. import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
  35. import { EmbedMeetingDialog } from '../../../embed-meeting';
  36. import { SharedDocumentButton } from '../../../etherpad';
  37. import { openFeedbackDialog } from '../../../feedback';
  38. import { beginAddPeople } from '../../../invite';
  39. import { openKeyboardShortcutsDialog } from '../../../keyboard-shortcuts';
  40. import {
  41. LocalRecordingButton,
  42. LocalRecordingInfoDialog
  43. } from '../../../local-recording';
  44. import {
  45. LiveStreamButton,
  46. RecordButton
  47. } from '../../../recording';
  48. import { SecurityDialogButton } from '../../../security';
  49. import {
  50. SETTINGS_TABS,
  51. SettingsButton,
  52. openSettingsDialog
  53. } from '../../../settings';
  54. import { toggleSharedVideo } from '../../../shared-video';
  55. import { SpeakerStats } from '../../../speaker-stats';
  56. import {
  57. ClosedCaptionButton
  58. } from '../../../subtitles';
  59. import {
  60. TileViewButton,
  61. toggleTileView
  62. } from '../../../video-layout';
  63. import {
  64. OverflowMenuVideoQualityItem,
  65. VideoQualityDialog
  66. } from '../../../video-quality';
  67. import {
  68. setFullScreen,
  69. setOverflowMenuVisible,
  70. setToolbarHovered
  71. } from '../../actions';
  72. import { isToolboxVisible } from '../../functions';
  73. import DownloadButton from '../DownloadButton';
  74. import HangupButton from '../HangupButton';
  75. import HelpButton from '../HelpButton';
  76. import AudioSettingsButton from './AudioSettingsButton';
  77. import MuteEveryoneButton from './MuteEveryoneButton';
  78. import OverflowMenuButton from './OverflowMenuButton';
  79. import OverflowMenuProfileItem from './OverflowMenuProfileItem';
  80. import ToolbarButton from './ToolbarButton';
  81. import VideoSettingsButton from './VideoSettingsButton';
  82. /**
  83. * The type of the React {@code Component} props of {@link Toolbox}.
  84. */
  85. type Props = {
  86. /**
  87. * Whether or not the chat feature is currently displayed.
  88. */
  89. _chatOpen: boolean,
  90. /**
  91. * The {@code JitsiConference} for the current conference.
  92. */
  93. _conference: Object,
  94. /**
  95. * The tooltip key to use when screensharing is disabled. Or undefined
  96. * if non to be shown and the button to be hidden.
  97. */
  98. _desktopSharingDisabledTooltipKey: boolean,
  99. /**
  100. * Whether or not screensharing is initialized.
  101. */
  102. _desktopSharingEnabled: boolean,
  103. /**
  104. * Whether or not a dialog is displayed.
  105. */
  106. _dialog: boolean,
  107. /**
  108. * Whether or not call feedback can be sent.
  109. */
  110. _feedbackConfigured: boolean,
  111. /**
  112. * Whether or not the app is currently in full screen.
  113. */
  114. _fullScreen: boolean,
  115. /**
  116. * Whether or not the tile view is enabled.
  117. */
  118. _tileViewEnabled: boolean,
  119. /**
  120. * Whether or not the current user is logged in through a JWT.
  121. */
  122. _isGuest: boolean,
  123. /**
  124. * The ID of the local participant.
  125. */
  126. _localParticipantID: String,
  127. /**
  128. * The subsection of Redux state for local recording
  129. */
  130. _localRecState: Object,
  131. /**
  132. * The value for how the conference is locked (or undefined if not locked)
  133. * as defined by room-lock constants.
  134. */
  135. _locked: boolean,
  136. /**
  137. * Whether or not the overflow menu is visible.
  138. */
  139. _overflowMenuVisible: boolean,
  140. /**
  141. * Whether or not the local participant's hand is raised.
  142. */
  143. _raisedHand: boolean,
  144. /**
  145. * Whether or not the local participant is screensharing.
  146. */
  147. _screensharing: boolean,
  148. /**
  149. * Whether or not the local participant is sharing a YouTube video.
  150. */
  151. _sharingVideo: boolean,
  152. /**
  153. * Flag showing whether toolbar is visible.
  154. */
  155. _visible: boolean,
  156. /**
  157. * Set with the buttons which this Toolbox should display.
  158. */
  159. _visibleButtons: Set<string>,
  160. /**
  161. * Invoked to active other features of the app.
  162. */
  163. dispatch: Function,
  164. /**
  165. * Invoked to obtain translated strings.
  166. */
  167. t: Function
  168. };
  169. /**
  170. * The type of the React {@code Component} state of {@link Toolbox}.
  171. */
  172. type State = {
  173. /**
  174. * The width of the browser's window.
  175. */
  176. windowWidth: number
  177. };
  178. declare var APP: Object;
  179. declare var interfaceConfig: Object;
  180. // XXX: We are not currently using state here, but in the future, when
  181. // interfaceConfig is part of redux we will. This will have to be retrieved from the store.
  182. const visibleButtons = new Set(interfaceConfig.TOOLBAR_BUTTONS);
  183. /**
  184. * Implements the conference toolbox on React/Web.
  185. *
  186. * @extends Component
  187. */
  188. class Toolbox extends Component<Props, State> {
  189. /**
  190. * Initializes a new {@code Toolbox} instance.
  191. *
  192. * @param {Props} props - The read-only React {@code Component} props with
  193. * which the new instance is to be initialized.
  194. */
  195. constructor(props: Props) {
  196. super(props);
  197. // Bind event handlers so they are only bound once per instance.
  198. this._onMouseOut = this._onMouseOut.bind(this);
  199. this._onMouseOver = this._onMouseOver.bind(this);
  200. this._onResize = this._onResize.bind(this);
  201. this._onSetOverflowVisible = this._onSetOverflowVisible.bind(this);
  202. this._onShortcutToggleChat = this._onShortcutToggleChat.bind(this);
  203. this._onShortcutToggleFullScreen = this._onShortcutToggleFullScreen.bind(this);
  204. this._onShortcutToggleRaiseHand = this._onShortcutToggleRaiseHand.bind(this);
  205. this._onShortcutToggleScreenshare = this._onShortcutToggleScreenshare.bind(this);
  206. this._onShortcutToggleVideoQuality = this._onShortcutToggleVideoQuality.bind(this);
  207. this._onToolbarOpenFeedback = this._onToolbarOpenFeedback.bind(this);
  208. this._onToolbarOpenInvite = this._onToolbarOpenInvite.bind(this);
  209. this._onToolbarOpenKeyboardShortcuts = this._onToolbarOpenKeyboardShortcuts.bind(this);
  210. this._onToolbarOpenSpeakerStats = this._onToolbarOpenSpeakerStats.bind(this);
  211. this._onToolbarOpenEmbedMeeting = this._onToolbarOpenEmbedMeeting.bind(this);
  212. this._onToolbarOpenVideoQuality = this._onToolbarOpenVideoQuality.bind(this);
  213. this._onToolbarToggleChat = this._onToolbarToggleChat.bind(this);
  214. this._onToolbarToggleFullScreen = this._onToolbarToggleFullScreen.bind(this);
  215. this._onToolbarToggleProfile = this._onToolbarToggleProfile.bind(this);
  216. this._onToolbarToggleRaiseHand = this._onToolbarToggleRaiseHand.bind(this);
  217. this._onToolbarToggleScreenshare = this._onToolbarToggleScreenshare.bind(this);
  218. this._onToolbarToggleSharedVideo = this._onToolbarToggleSharedVideo.bind(this);
  219. this._onToolbarOpenLocalRecordingInfoDialog = this._onToolbarOpenLocalRecordingInfoDialog.bind(this);
  220. this._onShortcutToggleTileView = this._onShortcutToggleTileView.bind(this);
  221. this.state = {
  222. windowWidth: window.innerWidth
  223. };
  224. }
  225. /**
  226. * Sets keyboard shortcuts for to trigger ToolbarButtons actions.
  227. *
  228. * @inheritdoc
  229. * @returns {void}
  230. */
  231. componentDidMount() {
  232. const KEYBOARD_SHORTCUTS = [
  233. this._shouldShowButton('videoquality') && {
  234. character: 'A',
  235. exec: this._onShortcutToggleVideoQuality,
  236. helpDescription: 'keyboardShortcuts.videoQuality'
  237. },
  238. this._shouldShowButton('chat') && {
  239. character: 'C',
  240. exec: this._onShortcutToggleChat,
  241. helpDescription: 'keyboardShortcuts.toggleChat'
  242. },
  243. this._shouldShowButton('desktop') && {
  244. character: 'D',
  245. exec: this._onShortcutToggleScreenshare,
  246. helpDescription: 'keyboardShortcuts.toggleScreensharing'
  247. },
  248. this._shouldShowButton('raisehand') && {
  249. character: 'R',
  250. exec: this._onShortcutToggleRaiseHand,
  251. helpDescription: 'keyboardShortcuts.raiseHand'
  252. },
  253. this._shouldShowButton('fullscreen') && {
  254. character: 'S',
  255. exec: this._onShortcutToggleFullScreen,
  256. helpDescription: 'keyboardShortcuts.fullScreen'
  257. },
  258. this._shouldShowButton('tileview') && {
  259. character: 'W',
  260. exec: this._onShortcutToggleTileView,
  261. helpDescription: 'toolbar.tileViewToggle'
  262. }
  263. ];
  264. KEYBOARD_SHORTCUTS.forEach(shortcut => {
  265. if (typeof shortcut === 'object') {
  266. APP.keyboardshortcut.registerShortcut(
  267. shortcut.character,
  268. null,
  269. shortcut.exec,
  270. shortcut.helpDescription);
  271. }
  272. });
  273. window.addEventListener('resize', this._onResize);
  274. }
  275. /**
  276. * Update the visibility of the {@code OverflowMenuButton}.
  277. *
  278. * @inheritdoc
  279. */
  280. componentDidUpdate(prevProps) {
  281. // Ensure the dialog is closed when the toolbox becomes hidden.
  282. if (prevProps._overflowMenuVisible && !this.props._visible) {
  283. this._onSetOverflowVisible(false);
  284. }
  285. if (prevProps._overflowMenuVisible
  286. && !prevProps._dialog
  287. && this.props._dialog) {
  288. this._onSetOverflowVisible(false);
  289. this.props.dispatch(setToolbarHovered(false));
  290. }
  291. if (this.props._chatOpen !== prevProps._chatOpen) {
  292. this._onResize();
  293. }
  294. }
  295. /**
  296. * Removes keyboard shortcuts registered by this component.
  297. *
  298. * @inheritdoc
  299. * @returns {void}
  300. */
  301. componentWillUnmount() {
  302. [ 'A', 'C', 'D', 'R', 'S' ].forEach(letter =>
  303. APP.keyboardshortcut.unregisterShortcut(letter));
  304. window.removeEventListener('resize', this._onResize);
  305. }
  306. /**
  307. * Implements React's {@link Component#render()}.
  308. *
  309. * @inheritdoc
  310. * @returns {ReactElement}
  311. */
  312. render() {
  313. const { _chatOpen, _visible, _visibleButtons } = this.props;
  314. const rootClassNames = `new-toolbox ${_visible ? 'visible' : ''} ${
  315. _visibleButtons.size ? '' : 'no-buttons'} ${_chatOpen ? 'shift-right' : ''}`;
  316. return (
  317. <div
  318. className = { rootClassNames }
  319. id = 'new-toolbox'
  320. onMouseOut = { this._onMouseOut }
  321. onMouseOver = { this._onMouseOver }>
  322. <div className = 'toolbox-background' />
  323. { this._renderToolboxContent() }
  324. </div>
  325. );
  326. }
  327. /**
  328. * Callback invoked to display {@code FeedbackDialog}.
  329. *
  330. * @private
  331. * @returns {void}
  332. */
  333. _doOpenFeedback() {
  334. const { _conference } = this.props;
  335. this.props.dispatch(openFeedbackDialog(_conference));
  336. }
  337. /**
  338. * Callback invoked to display {@code FeedbackDialog}.
  339. *
  340. * @private
  341. * @returns {void}
  342. */
  343. _doOpenEmbedMeeting() {
  344. this.props.dispatch(openDialog(EmbedMeetingDialog));
  345. }
  346. /**
  347. * Dispatches an action to display {@code KeyboardShortcuts}.
  348. *
  349. * @private
  350. * @returns {void}
  351. */
  352. _doOpenKeyboardShorcuts() {
  353. this.props.dispatch(openKeyboardShortcutsDialog());
  354. }
  355. /**
  356. * Callback invoked to display {@code SpeakerStats}.
  357. *
  358. * @private
  359. * @returns {void}
  360. */
  361. _doOpenSpeakerStats() {
  362. this.props.dispatch(openDialog(SpeakerStats, {
  363. conference: this.props._conference
  364. }));
  365. }
  366. /**
  367. * Dispatches an action to open the video quality dialog.
  368. *
  369. * @private
  370. * @returns {void}
  371. */
  372. _doOpenVideoQuality() {
  373. this.props.dispatch(openDialog(VideoQualityDialog));
  374. }
  375. /**
  376. * Dispatches an action to toggle the display of chat.
  377. *
  378. * @private
  379. * @returns {void}
  380. */
  381. _doToggleChat() {
  382. this.props.dispatch(toggleChat());
  383. }
  384. /**
  385. * Dispatches an action to toggle screensharing.
  386. *
  387. * @private
  388. * @returns {void}
  389. */
  390. _doToggleFullScreen() {
  391. const fullScreen = !this.props._fullScreen;
  392. this.props.dispatch(setFullScreen(fullScreen));
  393. }
  394. /**
  395. * Dispatches an action to show or hide the profile edit panel.
  396. *
  397. * @private
  398. * @returns {void}
  399. */
  400. _doToggleProfile() {
  401. this.props.dispatch(openSettingsDialog(SETTINGS_TABS.PROFILE));
  402. }
  403. /**
  404. * Dispatches an action to toggle the local participant's raised hand state.
  405. *
  406. * @private
  407. * @returns {void}
  408. */
  409. _doToggleRaiseHand() {
  410. const { _localParticipantID, _raisedHand } = this.props;
  411. this.props.dispatch(participantUpdated({
  412. // XXX Only the local participant is allowed to update without
  413. // stating the JitsiConference instance (i.e. participant property
  414. // `conference` for a remote participant) because the local
  415. // participant is uniquely identified by the very fact that there is
  416. // only one local participant.
  417. id: _localParticipantID,
  418. local: true,
  419. raisedHand: !_raisedHand
  420. }));
  421. }
  422. /**
  423. * Dispatches an action to toggle screensharing.
  424. *
  425. * @private
  426. * @returns {void}
  427. */
  428. _doToggleScreenshare() {
  429. if (this.props._desktopSharingEnabled) {
  430. this.props.dispatch(toggleScreensharing());
  431. }
  432. }
  433. /**
  434. * Dispatches an action to toggle YouTube video sharing.
  435. *
  436. * @private
  437. * @returns {void}
  438. */
  439. _doToggleSharedVideo() {
  440. this.props.dispatch(toggleSharedVideo());
  441. }
  442. /**
  443. * Dispatches an action to toggle the video quality dialog.
  444. *
  445. * @private
  446. * @returns {void}
  447. */
  448. _doToggleVideoQuality() {
  449. this.props.dispatch(toggleDialog(VideoQualityDialog));
  450. }
  451. /**
  452. * Dispaches an action to toggle tile view.
  453. *
  454. * @private
  455. * @returns {void}
  456. */
  457. _doToggleTileView() {
  458. this.props.dispatch(toggleTileView());
  459. }
  460. _onMouseOut: () => void;
  461. /**
  462. * Dispatches an action signaling the toolbar is not being hovered.
  463. *
  464. * @private
  465. * @returns {void}
  466. */
  467. _onMouseOut() {
  468. this.props.dispatch(setToolbarHovered(false));
  469. }
  470. _onMouseOver: () => void;
  471. /**
  472. * Dispatches an action signaling the toolbar is being hovered.
  473. *
  474. * @private
  475. * @returns {void}
  476. */
  477. _onMouseOver() {
  478. this.props.dispatch(setToolbarHovered(true));
  479. }
  480. _onResize: () => void;
  481. /**
  482. * A window resize handler used to calculate the number of buttons we can
  483. * fit in the toolbar.
  484. *
  485. * @private
  486. * @returns {void}
  487. */
  488. _onResize() {
  489. let widthToUse = window.innerWidth;
  490. // Take chat size into account when resizing toolbox.
  491. if (this.props._chatOpen) {
  492. widthToUse -= CHAT_SIZE;
  493. }
  494. if (this.state.windowWidth !== widthToUse) {
  495. this.setState({ windowWidth: widthToUse });
  496. }
  497. }
  498. _onSetOverflowVisible: (boolean) => void;
  499. /**
  500. * Sets the visibility of the overflow menu.
  501. *
  502. * @param {boolean} visible - Whether or not the overflow menu should be
  503. * displayed.
  504. * @private
  505. * @returns {void}
  506. */
  507. _onSetOverflowVisible(visible) {
  508. this.props.dispatch(setOverflowMenuVisible(visible));
  509. }
  510. _onShortcutToggleChat: () => void;
  511. /**
  512. * Creates an analytics keyboard shortcut event and dispatches an action for
  513. * toggling the display of chat.
  514. *
  515. * @private
  516. * @returns {void}
  517. */
  518. _onShortcutToggleChat() {
  519. sendAnalytics(createShortcutEvent(
  520. 'toggle.chat',
  521. {
  522. enable: !this.props._chatOpen
  523. }));
  524. this._doToggleChat();
  525. }
  526. _onShortcutToggleVideoQuality: () => void;
  527. /**
  528. * Creates an analytics keyboard shortcut event and dispatches an action for
  529. * toggling the display of Video Quality.
  530. *
  531. * @private
  532. * @returns {void}
  533. */
  534. _onShortcutToggleVideoQuality() {
  535. sendAnalytics(createShortcutEvent('video.quality'));
  536. this._doToggleVideoQuality();
  537. }
  538. _onShortcutToggleTileView: () => void;
  539. /**
  540. * Dispatches an action for toggling the tile view.
  541. *
  542. * @private
  543. * @returns {void}
  544. */
  545. _onShortcutToggleTileView() {
  546. sendAnalytics(createShortcutEvent(
  547. 'toggle.tileview',
  548. {
  549. enable: !this.props._tileViewEnabled
  550. }));
  551. this._doToggleTileView();
  552. }
  553. _onShortcutToggleFullScreen: () => void;
  554. /**
  555. * Creates an analytics keyboard shortcut event and dispatches an action for
  556. * toggling full screen mode.
  557. *
  558. * @private
  559. * @returns {void}
  560. */
  561. _onShortcutToggleFullScreen() {
  562. sendAnalytics(createShortcutEvent(
  563. 'toggle.fullscreen',
  564. {
  565. enable: !this.props._fullScreen
  566. }));
  567. this._doToggleFullScreen();
  568. }
  569. _onShortcutToggleRaiseHand: () => void;
  570. /**
  571. * Creates an analytics keyboard shortcut event and dispatches an action for
  572. * toggling raise hand.
  573. *
  574. * @private
  575. * @returns {void}
  576. */
  577. _onShortcutToggleRaiseHand() {
  578. sendAnalytics(createShortcutEvent(
  579. 'toggle.raise.hand',
  580. ACTION_SHORTCUT_TRIGGERED,
  581. { enable: !this.props._raisedHand }));
  582. this._doToggleRaiseHand();
  583. }
  584. _onShortcutToggleScreenshare: () => void;
  585. /**
  586. * Creates an analytics keyboard shortcut event and dispatches an action for
  587. * toggling screensharing.
  588. *
  589. * @private
  590. * @returns {void}
  591. */
  592. _onShortcutToggleScreenshare() {
  593. sendAnalytics(createToolbarEvent(
  594. 'screen.sharing',
  595. {
  596. enable: !this.props._screensharing
  597. }));
  598. this._doToggleScreenshare();
  599. }
  600. _onToolbarOpenFeedback: () => void;
  601. /**
  602. * Creates an analytics toolbar event and dispatches an action for toggling
  603. * display of feedback.
  604. *
  605. * @private
  606. * @returns {void}
  607. */
  608. _onToolbarOpenFeedback() {
  609. sendAnalytics(createToolbarEvent('feedback'));
  610. this._doOpenFeedback();
  611. }
  612. _onToolbarOpenInvite: () => void;
  613. /**
  614. * Creates an analytics toolbar event and dispatches an action for opening
  615. * the modal for inviting people directly into the conference.
  616. *
  617. * @private
  618. * @returns {void}
  619. */
  620. _onToolbarOpenInvite() {
  621. sendAnalytics(createToolbarEvent('invite'));
  622. this.props.dispatch(beginAddPeople());
  623. }
  624. _onToolbarOpenKeyboardShortcuts: () => void;
  625. /**
  626. * Creates an analytics toolbar event and dispatches an action for opening
  627. * the modal for showing available keyboard shortcuts.
  628. *
  629. * @private
  630. * @returns {void}
  631. */
  632. _onToolbarOpenKeyboardShortcuts() {
  633. sendAnalytics(createToolbarEvent('shortcuts'));
  634. this._doOpenKeyboardShorcuts();
  635. }
  636. _onToolbarOpenEmbedMeeting: () => void;
  637. /**
  638. * Creates an analytics toolbar event and dispatches an action for opening
  639. * the embed meeting modal.
  640. *
  641. * @private
  642. * @returns {void}
  643. */
  644. _onToolbarOpenEmbedMeeting() {
  645. sendAnalytics(createToolbarEvent('embed.meeting'));
  646. this._doOpenEmbedMeeting();
  647. }
  648. _onToolbarOpenSpeakerStats: () => void;
  649. /**
  650. * Creates an analytics toolbar event and dispatches an action for opening
  651. * the speaker stats modal.
  652. *
  653. * @private
  654. * @returns {void}
  655. */
  656. _onToolbarOpenSpeakerStats() {
  657. sendAnalytics(createToolbarEvent('speaker.stats'));
  658. this._doOpenSpeakerStats();
  659. }
  660. _onToolbarOpenVideoQuality: () => void;
  661. /**
  662. * Creates an analytics toolbar event and dispatches an action for toggling
  663. * open the video quality dialog.
  664. *
  665. * @private
  666. * @returns {void}
  667. */
  668. _onToolbarOpenVideoQuality() {
  669. sendAnalytics(createToolbarEvent('video.quality'));
  670. this._doOpenVideoQuality();
  671. }
  672. _onToolbarToggleChat: () => void;
  673. /**
  674. * Creates an analytics toolbar event and dispatches an action for toggling
  675. * the display of chat.
  676. *
  677. * @private
  678. * @returns {void}
  679. */
  680. _onToolbarToggleChat() {
  681. sendAnalytics(createToolbarEvent(
  682. 'toggle.chat',
  683. {
  684. enable: !this.props._chatOpen
  685. }));
  686. this._doToggleChat();
  687. }
  688. _onToolbarToggleFullScreen: () => void;
  689. /**
  690. * Creates an analytics toolbar event and dispatches an action for toggling
  691. * full screen mode.
  692. *
  693. * @private
  694. * @returns {void}
  695. */
  696. _onToolbarToggleFullScreen() {
  697. sendAnalytics(createToolbarEvent(
  698. 'toggle.fullscreen',
  699. {
  700. enable: !this.props._fullScreen
  701. }));
  702. this._doToggleFullScreen();
  703. }
  704. _onToolbarToggleProfile: () => void;
  705. /**
  706. * Creates an analytics toolbar event and dispatches an action for showing
  707. * or hiding the profile edit panel.
  708. *
  709. * @private
  710. * @returns {void}
  711. */
  712. _onToolbarToggleProfile() {
  713. sendAnalytics(createToolbarEvent('profile'));
  714. this._doToggleProfile();
  715. }
  716. _onToolbarToggleRaiseHand: () => void;
  717. /**
  718. * Creates an analytics toolbar event and dispatches an action for toggling
  719. * raise hand.
  720. *
  721. * @private
  722. * @returns {void}
  723. */
  724. _onToolbarToggleRaiseHand() {
  725. sendAnalytics(createToolbarEvent(
  726. 'raise.hand',
  727. { enable: !this.props._raisedHand }));
  728. this._doToggleRaiseHand();
  729. }
  730. _onToolbarToggleScreenshare: () => void;
  731. /**
  732. * Creates an analytics toolbar event and dispatches an action for toggling
  733. * screensharing.
  734. *
  735. * @private
  736. * @returns {void}
  737. */
  738. _onToolbarToggleScreenshare() {
  739. if (!this.props._desktopSharingEnabled) {
  740. return;
  741. }
  742. sendAnalytics(createShortcutEvent(
  743. 'toggle.screen.sharing',
  744. ACTION_SHORTCUT_TRIGGERED,
  745. { enable: !this.props._screensharing }));
  746. this._doToggleScreenshare();
  747. }
  748. _onToolbarToggleSharedVideo: () => void;
  749. /**
  750. * Creates an analytics toolbar event and dispatches an action for toggling
  751. * the sharing of a YouTube video.
  752. *
  753. * @private
  754. * @returns {void}
  755. */
  756. _onToolbarToggleSharedVideo() {
  757. sendAnalytics(createToolbarEvent('shared.video.toggled',
  758. {
  759. enable: !this.props._sharingVideo
  760. }));
  761. this._doToggleSharedVideo();
  762. }
  763. _onToolbarOpenLocalRecordingInfoDialog: () => void;
  764. /**
  765. * Opens the {@code LocalRecordingInfoDialog}.
  766. *
  767. * @private
  768. * @returns {void}
  769. */
  770. _onToolbarOpenLocalRecordingInfoDialog() {
  771. sendAnalytics(createToolbarEvent('local.recording'));
  772. this.props.dispatch(openDialog(LocalRecordingInfoDialog));
  773. }
  774. /**
  775. * Returns true if the the desktop sharing button should be visible and
  776. * false otherwise.
  777. *
  778. * @returns {boolean}
  779. */
  780. _isDesktopSharingButtonVisible() {
  781. const {
  782. _desktopSharingEnabled,
  783. _desktopSharingDisabledTooltipKey
  784. } = this.props;
  785. return _desktopSharingEnabled || _desktopSharingDisabledTooltipKey;
  786. }
  787. /**
  788. * Renders a button for toggleing screen sharing.
  789. *
  790. * @private
  791. * @param {boolean} isInOverflowMenu - True if the button is moved to the
  792. * overflow menu.
  793. * @returns {ReactElement|null}
  794. */
  795. _renderDesktopSharingButton(isInOverflowMenu = false) {
  796. const {
  797. _desktopSharingEnabled,
  798. _desktopSharingDisabledTooltipKey,
  799. _screensharing,
  800. t
  801. } = this.props;
  802. if (!this._isDesktopSharingButtonVisible()) {
  803. return null;
  804. }
  805. if (isInOverflowMenu) {
  806. return (
  807. <OverflowMenuItem
  808. accessibilityLabel
  809. = { t('toolbar.accessibilityLabel.shareYourScreen') }
  810. disabled = { _desktopSharingEnabled }
  811. icon = { IconShareDesktop }
  812. iconId = 'share-desktop'
  813. key = 'desktop'
  814. onClick = { this._onToolbarToggleScreenshare }
  815. text = {
  816. t(`toolbar.${
  817. _screensharing
  818. ? 'stopScreenSharing' : 'startScreenSharing'}`
  819. )
  820. } />
  821. );
  822. }
  823. const tooltip = t(
  824. _desktopSharingEnabled
  825. ? 'dialog.shareYourScreen' : _desktopSharingDisabledTooltipKey);
  826. return (
  827. <ToolbarButton
  828. accessibilityLabel
  829. = { t('toolbar.accessibilityLabel.shareYourScreen') }
  830. disabled = { !_desktopSharingEnabled }
  831. icon = { IconShareDesktop }
  832. onClick = { this._onToolbarToggleScreenshare }
  833. toggled = { _screensharing }
  834. tooltip = { tooltip } />
  835. );
  836. }
  837. /**
  838. * Returns true if the profile button is visible and false otherwise.
  839. *
  840. * @returns {boolean}
  841. */
  842. _isProfileVisible() {
  843. return this.props._isGuest && this._shouldShowButton('profile');
  844. }
  845. /**
  846. * Renders the list elements of the overflow menu.
  847. *
  848. * @private
  849. * @returns {Array<ReactElement>}
  850. */
  851. _renderOverflowMenuContent() {
  852. const {
  853. _feedbackConfigured,
  854. _fullScreen,
  855. _screensharing,
  856. _sharingVideo,
  857. t
  858. } = this.props;
  859. return [
  860. this._isProfileVisible()
  861. && <OverflowMenuProfileItem
  862. key = 'profile'
  863. onClick = { this._onToolbarToggleProfile } />,
  864. this._shouldShowButton('videoquality')
  865. && <OverflowMenuVideoQualityItem
  866. key = 'videoquality'
  867. onClick = { this._onToolbarOpenVideoQuality } />,
  868. this._shouldShowButton('fullscreen')
  869. && <OverflowMenuItem
  870. accessibilityLabel = { t('toolbar.accessibilityLabel.fullScreen') }
  871. icon = { _fullScreen ? IconExitFullScreen : IconFullScreen }
  872. key = 'fullscreen'
  873. onClick = { this._onToolbarToggleFullScreen }
  874. text = { _fullScreen ? t('toolbar.exitFullScreen') : t('toolbar.enterFullScreen') } />,
  875. <LiveStreamButton
  876. key = 'livestreaming'
  877. showLabel = { true } />,
  878. <RecordButton
  879. key = 'record'
  880. showLabel = { true } />,
  881. this._shouldShowButton('sharedvideo')
  882. && <OverflowMenuItem
  883. accessibilityLabel = { t('toolbar.accessibilityLabel.sharedvideo') }
  884. icon = { IconShareVideo }
  885. key = 'sharedvideo'
  886. onClick = { this._onToolbarToggleSharedVideo }
  887. text = { _sharingVideo ? t('toolbar.stopSharedVideo') : t('toolbar.sharedvideo') } />,
  888. this._shouldShowButton('etherpad')
  889. && <SharedDocumentButton
  890. key = 'etherpad'
  891. showLabel = { true } />,
  892. <VideoBlurButton
  893. key = 'videobackgroundblur'
  894. showLabel = { true }
  895. visible = { this._shouldShowButton('videobackgroundblur') && !_screensharing } />,
  896. <SettingsButton
  897. key = 'settings'
  898. showLabel = { true }
  899. visible = { this._shouldShowButton('settings') } />,
  900. <MuteEveryoneButton
  901. key = 'mute-everyone'
  902. showLabel = { true }
  903. visible = { this._shouldShowButton('mute-everyone') } />,
  904. this._shouldShowButton('stats')
  905. && <OverflowMenuItem
  906. accessibilityLabel = { t('toolbar.accessibilityLabel.speakerStats') }
  907. icon = { IconPresentation }
  908. key = 'stats'
  909. onClick = { this._onToolbarOpenSpeakerStats }
  910. text = { t('toolbar.speakerStats') } />,
  911. this._shouldShowButton('embedmeeting')
  912. && <OverflowMenuItem
  913. accessibilityLabel = { t('toolbar.accessibilityLabel.embedMeeting') }
  914. icon = { IconCodeBlock }
  915. key = 'embed'
  916. onClick = { this._onToolbarOpenEmbedMeeting }
  917. text = { t('toolbar.embedMeeting') } />,
  918. this._shouldShowButton('feedback')
  919. && _feedbackConfigured
  920. && <OverflowMenuItem
  921. accessibilityLabel = { t('toolbar.accessibilityLabel.feedback') }
  922. icon = { IconFeedback }
  923. key = 'feedback'
  924. onClick = { this._onToolbarOpenFeedback }
  925. text = { t('toolbar.feedback') } />,
  926. this._shouldShowButton('shortcuts')
  927. && <OverflowMenuItem
  928. accessibilityLabel = { t('toolbar.accessibilityLabel.shortcuts') }
  929. icon = { IconOpenInNew }
  930. key = 'shortcuts'
  931. onClick = { this._onToolbarOpenKeyboardShortcuts }
  932. text = { t('toolbar.shortcuts') } />,
  933. this._shouldShowButton('download')
  934. && <DownloadButton
  935. key = 'download'
  936. showLabel = { true } />,
  937. this._shouldShowButton('help')
  938. && <HelpButton
  939. key = 'help'
  940. showLabel = { true } />
  941. ];
  942. }
  943. /**
  944. * Renders a list of buttons that are moved to the overflow menu.
  945. *
  946. * @private
  947. * @param {Array<string>} movedButtons - The names of the buttons to be
  948. * moved.
  949. * @returns {Array<ReactElement>}
  950. */
  951. _renderMovedButtons(movedButtons) {
  952. const {
  953. _chatOpen,
  954. _raisedHand,
  955. t
  956. } = this.props;
  957. return movedButtons.map(buttonName => {
  958. switch (buttonName) {
  959. case 'desktop':
  960. return this._renderDesktopSharingButton(true);
  961. case 'raisehand':
  962. return (
  963. <OverflowMenuItem
  964. accessibilityLabel =
  965. { t('toolbar.accessibilityLabel.raiseHand') }
  966. icon = { IconRaisedHand }
  967. key = 'raisedHand'
  968. onClick = { this._onToolbarToggleRaiseHand }
  969. text = {
  970. t(`toolbar.${
  971. _raisedHand
  972. ? 'lowerYourHand' : 'raiseYourHand'}`
  973. )
  974. } />
  975. );
  976. case 'chat':
  977. return (
  978. <OverflowMenuItem
  979. accessibilityLabel =
  980. { t('toolbar.accessibilityLabel.chat') }
  981. icon = { IconChat }
  982. key = 'chat'
  983. onClick = { this._onToolbarToggleChat }
  984. text = {
  985. t(`toolbar.${
  986. _chatOpen ? 'closeChat' : 'openChat'}`
  987. )
  988. } />
  989. );
  990. case 'closedcaptions':
  991. return (
  992. <ClosedCaptionButton
  993. key = 'closed-captions'
  994. showLabel = { true } />
  995. );
  996. case 'security':
  997. return (
  998. <SecurityDialogButton
  999. key = 'security'
  1000. showLabel = { true } />
  1001. );
  1002. case 'invite':
  1003. return (
  1004. <OverflowMenuItem
  1005. accessibilityLabel = { t('toolbar.accessibilityLabel.invite') }
  1006. icon = { IconInviteMore }
  1007. key = 'invite'
  1008. onClick = { this._onToolbarOpenInvite }
  1009. text = { t('toolbar.invite') } />
  1010. );
  1011. case 'tileview':
  1012. return <TileViewButton showLabel = { true } />;
  1013. case 'localrecording':
  1014. return (
  1015. <OverflowMenuItem
  1016. accessibilityLabel = { t('toolbar.accessibilityLabel.localRecording') }
  1017. icon = { IconRec }
  1018. key = 'localrecording'
  1019. onClick = { this._onToolbarOpenLocalRecordingInfoDialog }
  1020. text = { t('localRecording.dialogTitle') } />
  1021. );
  1022. default:
  1023. return null;
  1024. }
  1025. });
  1026. }
  1027. /**
  1028. * Renders the Audio controlling button.
  1029. *
  1030. * @returns {ReactElement}
  1031. */
  1032. _renderAudioButton() {
  1033. return this._shouldShowButton('microphone')
  1034. ? <AudioSettingsButton
  1035. key = 'asb'
  1036. visible = { true } />
  1037. : null;
  1038. }
  1039. /**
  1040. * Renders the Video controlling button.
  1041. *
  1042. * @returns {ReactElement}
  1043. */
  1044. _renderVideoButton() {
  1045. return this._shouldShowButton('camera')
  1046. ? <VideoSettingsButton
  1047. key = 'vsb'
  1048. visible = { true } />
  1049. : null;
  1050. }
  1051. /**
  1052. * Renders the toolbox content.
  1053. *
  1054. * @returns {Array<ReactElement>}
  1055. */
  1056. _renderToolboxContent() {
  1057. const {
  1058. _chatOpen,
  1059. _overflowMenuVisible,
  1060. _raisedHand,
  1061. t
  1062. } = this.props;
  1063. const overflowMenuContent = this._renderOverflowMenuContent();
  1064. const overflowHasItems = Boolean(overflowMenuContent.filter(child => child).length);
  1065. const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
  1066. const buttonsLeft = [];
  1067. const buttonsRight = [];
  1068. const maxNumberOfButtonsPerGroup = Math.floor(
  1069. (
  1070. this.state.windowWidth
  1071. - 168 // the width of the central group by design
  1072. - 48 // the minimum space between the button groups
  1073. )
  1074. / 56 // the width + padding of a button
  1075. / 2 // divide by the number of groups(left and right group)
  1076. );
  1077. if (this._shouldShowButton('chat')) {
  1078. buttonsLeft.push('chat');
  1079. }
  1080. if (this._shouldShowButton('desktop')
  1081. && this._isDesktopSharingButtonVisible()) {
  1082. buttonsLeft.push('desktop');
  1083. }
  1084. if (this._shouldShowButton('raisehand')) {
  1085. buttonsLeft.push('raisehand');
  1086. }
  1087. if (this._shouldShowButton('closedcaptions')) {
  1088. buttonsLeft.push('closedcaptions');
  1089. }
  1090. if (overflowHasItems) {
  1091. buttonsRight.push('overflowmenu');
  1092. }
  1093. if (this._shouldShowButton('invite')) {
  1094. buttonsRight.push('invite');
  1095. }
  1096. if (this._shouldShowButton('security') || this._shouldShowButton('info')) {
  1097. buttonsRight.push('security');
  1098. }
  1099. if (this._shouldShowButton('tileview')) {
  1100. buttonsRight.push('tileview');
  1101. }
  1102. if (this._shouldShowButton('localrecording')) {
  1103. buttonsRight.push('localrecording');
  1104. }
  1105. const movedButtons = [];
  1106. if (buttonsLeft.length > maxNumberOfButtonsPerGroup) {
  1107. movedButtons.push(...buttonsLeft.splice(
  1108. maxNumberOfButtonsPerGroup,
  1109. buttonsLeft.length - maxNumberOfButtonsPerGroup));
  1110. if (buttonsRight.indexOf('overflowmenu') === -1) {
  1111. buttonsRight.unshift('overflowmenu');
  1112. }
  1113. }
  1114. if (buttonsRight.length > maxNumberOfButtonsPerGroup) {
  1115. if (buttonsRight.indexOf('overflowmenu') === -1) {
  1116. buttonsRight.unshift('overflowmenu');
  1117. }
  1118. let numberOfButtons = maxNumberOfButtonsPerGroup;
  1119. // make sure the more button will be displayed when we move buttons.
  1120. if (numberOfButtons === 0) {
  1121. numberOfButtons++;
  1122. }
  1123. movedButtons.push(...buttonsRight.splice(
  1124. numberOfButtons,
  1125. buttonsRight.length - numberOfButtons));
  1126. }
  1127. overflowMenuContent.splice(
  1128. 1, 0, ...this._renderMovedButtons(movedButtons));
  1129. return (
  1130. <div className = 'toolbox-content'>
  1131. <div className = 'button-group-left'>
  1132. { buttonsLeft.indexOf('chat') !== -1
  1133. && <div className = 'toolbar-button-with-badge'>
  1134. <ToolbarButton
  1135. accessibilityLabel = { t('toolbar.accessibilityLabel.chat') }
  1136. icon = { IconChat }
  1137. onClick = { this._onToolbarToggleChat }
  1138. toggled = { _chatOpen }
  1139. tooltip = { t('toolbar.chat') } />
  1140. <ChatCounter />
  1141. </div> }
  1142. { buttonsLeft.indexOf('desktop') !== -1
  1143. && this._renderDesktopSharingButton() }
  1144. { buttonsLeft.indexOf('raisehand') !== -1
  1145. && <ToolbarButton
  1146. accessibilityLabel = { t('toolbar.accessibilityLabel.raiseHand') }
  1147. icon = { IconRaisedHand }
  1148. onClick = { this._onToolbarToggleRaiseHand }
  1149. toggled = { _raisedHand }
  1150. tooltip = { t('toolbar.raiseHand') } /> }
  1151. {
  1152. buttonsLeft.indexOf('closedcaptions') !== -1
  1153. && <ClosedCaptionButton />
  1154. }
  1155. </div>
  1156. <div className = 'button-group-center'>
  1157. { this._renderAudioButton() }
  1158. <HangupButton
  1159. visible = { this._shouldShowButton('hangup') } />
  1160. { this._renderVideoButton() }
  1161. </div>
  1162. <div className = 'button-group-right'>
  1163. { buttonsRight.indexOf('localrecording') !== -1
  1164. && <LocalRecordingButton
  1165. onClick = {
  1166. this._onToolbarOpenLocalRecordingInfoDialog
  1167. } />
  1168. }
  1169. { buttonsRight.indexOf('tileview') !== -1
  1170. && <TileViewButton /> }
  1171. { buttonsRight.indexOf('invite') !== -1
  1172. && <ToolbarButton
  1173. accessibilityLabel =
  1174. { t('toolbar.accessibilityLabel.invite') }
  1175. icon = { IconInviteMore }
  1176. onClick = { this._onToolbarOpenInvite }
  1177. tooltip = { t('toolbar.invite') } /> }
  1178. { buttonsRight.indexOf('security') !== -1
  1179. && <SecurityDialogButton customClass = 'security-toolbar-button' /> }
  1180. { buttonsRight.indexOf('overflowmenu') !== -1
  1181. && <OverflowMenuButton
  1182. isOpen = { _overflowMenuVisible }
  1183. onVisibilityChange = { this._onSetOverflowVisible }>
  1184. <ul
  1185. aria-label = { t(toolbarAccLabel) }
  1186. className = 'overflow-menu'>
  1187. { overflowMenuContent }
  1188. </ul>
  1189. </OverflowMenuButton> }
  1190. </div>
  1191. </div>);
  1192. }
  1193. _shouldShowButton: (string) => boolean;
  1194. /**
  1195. * Returns if a button name has been explicitly configured to be displayed.
  1196. *
  1197. * @param {string} buttonName - The name of the button, as expected in
  1198. * {@link interfaceConfig}.
  1199. * @private
  1200. * @returns {boolean} True if the button should be displayed.
  1201. */
  1202. _shouldShowButton(buttonName) {
  1203. return this.props._visibleButtons.has(buttonName);
  1204. }
  1205. }
  1206. /**
  1207. * Maps (parts of) the redux state to {@link Toolbox}'s React {@code Component}
  1208. * props.
  1209. *
  1210. * @param {Object} state - The redux store/state.
  1211. * @private
  1212. * @returns {{}}
  1213. */
  1214. function _mapStateToProps(state) {
  1215. const { conference, locked } = state['features/base/conference'];
  1216. let { desktopSharingEnabled } = state['features/base/conference'];
  1217. const {
  1218. callStatsID,
  1219. enableFeaturesBasedOnToken
  1220. } = state['features/base/config'];
  1221. const sharedVideoStatus = state['features/shared-video'].status;
  1222. const {
  1223. fullScreen,
  1224. overflowMenuVisible
  1225. } = state['features/toolbox'];
  1226. const localParticipant = getLocalParticipant(state);
  1227. const localRecordingStates = state['features/local-recording'];
  1228. const localVideo = getLocalVideoTrack(state['features/base/tracks']);
  1229. let desktopSharingDisabledTooltipKey;
  1230. if (enableFeaturesBasedOnToken) {
  1231. // we enable desktop sharing if any participant already have this
  1232. // feature enabled
  1233. desktopSharingEnabled = getParticipants(state)
  1234. .find(({ features = {} }) =>
  1235. String(features['screen-sharing']) === 'true') !== undefined;
  1236. // we want to show button and tooltip
  1237. if (state['features/base/jwt'].isGuest) {
  1238. desktopSharingDisabledTooltipKey
  1239. = 'dialog.shareYourScreenDisabledForGuest';
  1240. } else {
  1241. desktopSharingDisabledTooltipKey
  1242. = 'dialog.shareYourScreenDisabled';
  1243. }
  1244. }
  1245. // NB: We compute the buttons again here because if URL parameters were used to
  1246. // override them we'd miss it.
  1247. const buttons = new Set(interfaceConfig.TOOLBAR_BUTTONS);
  1248. return {
  1249. _chatOpen: state['features/chat'].isOpen,
  1250. _conference: conference,
  1251. _desktopSharingEnabled: desktopSharingEnabled,
  1252. _desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey,
  1253. _dialog: Boolean(state['features/base/dialog'].component),
  1254. _feedbackConfigured: Boolean(callStatsID),
  1255. _isGuest: state['features/base/jwt'].isGuest,
  1256. _fullScreen: fullScreen,
  1257. _tileViewEnabled: state['features/video-layout'].tileViewEnabled,
  1258. _localParticipantID: localParticipant.id,
  1259. _localRecState: localRecordingStates,
  1260. _locked: locked,
  1261. _overflowMenuVisible: overflowMenuVisible,
  1262. _raisedHand: localParticipant.raisedHand,
  1263. _screensharing: localVideo && localVideo.videoType === 'desktop',
  1264. _sharingVideo: sharedVideoStatus === 'playing'
  1265. || sharedVideoStatus === 'start'
  1266. || sharedVideoStatus === 'pause',
  1267. _visible: isToolboxVisible(state),
  1268. _visibleButtons: equals(visibleButtons, buttons) ? visibleButtons : buttons
  1269. };
  1270. }
  1271. export default translate(connect(_mapStateToProps)(Toolbox));