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 43KB

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