Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
WiP(invite-ui): Initial move of invite UI to invite button (#1950)
yanas86fcfcc5352a
diff --git a/conference.js b/conference.jsindex f097c1199e..6cd0442e26 100644--- a/conference.js+++ b/conference.js@@ -895,13 +895,6 @@ export default {let user = room.getParticipantById(id);return user && user.isModerator();},- /**- * Check if SIP is supported.- * @returns {boolean}- */- sipGatewayEnabled() {- return room.isSIPCallingSupported();- },get membersCount() {return room.getParticipants().length + 1;},diff --git a/css/_filmstrip.scss b/css/_filmstrip.scssindex e225c57b3b..fdd7f36a96 100644--- a/css/_filmstrip.scss+++ b/css/_filmstrip.scss@@ -48,21 +48,66 @@&__videos {@extend %align-right;position:relative;- height:196px;padding: 0;/* The filmstrip should not be covered by the left toolbar. */bottom: 0;width:auto;transition: bottom 2s;overflow: visible !important;- /*!!! Removes the gap between the local video container and the remote- videos. */- font-size: 0pt;&#remoteVideos {border: $thumbnailsBorder solid transparent;padding-left: $defaultToolbarSize + 5;- }+ }++ /**+ * The local video identifier.+ */+ &#filmstripLocalVideo {+ bottom: 32px;+ flex-direction: column;++ /**+ * The invite button style.+ */+ .filmstrip__invite {+ padding-bottom: 5px;+ margin-left: 2px;+ }++ /**+ * The invite button group style.+ * TOFIX: use AtlasKit.ButtonGroup if it starts supporting different+ * flex grow options for the buttons.+ */+ .invite-button-group {+ display: inline-flex;+ justify-content: space-between;+ width: 100%;++ & button {+ background: $toolbarBackground;+ flex-grow: 1;+ flex-shrink: 1;+ overflow: hidden;+ }++ & > * {+ color: $toolbarButtonColor;+ flex-grow: 0;+ flex-shrink: 0;+ margin-left: 2px;+ }++ /**+ * Making sure any svg-s in an invite button group will be+ * colored the way we want.+ */+ & path {+ fill: $toolbarButtonColor;+ }+ }+ }&.hidden {bottom: -196px;diff --git a/css/_vertical_filmstrip_overrides.scss b/css/_vertical_filmstrip_overrides.scssindex 2a936b5819..a3c45287f6 100644--- a/css/_vertical_filmstrip_overrides.scss+++ b/css/_vertical_filmstrip_overrides.scss@@ -24,10 +24,6 @@*/z-index: #{$tooltipsZ + 1};- &.hide-videos {- z-index: #{$tooltipsZ - 1};- }-/*** Hide videos by making them slight to the right.*/@@ -50,9 +46,21 @@}}+ /**+ * Re-styles the local Video and invite button to better fit the+ * vertical filmstrip layout.+ */#filmstripLocalVideo {+ bottom: 5px;+ flex-direction: column-reverse;height: auto;- justify-content: flex-end;+ justify-content: flex-start;++ .filmstrip__invite {+ padding-bottom: 0px;+ padding-top: 5px;+ z-index: $dropdownZ;+ }}/**@@ -69,10 +77,11 @@flex: 1;flex-direction: column;height: auto;- overflow-x: hidden !important;+ justify-content: flex-end;- .remote-videos-container {- flex-direction: column;+ #filmstripRemoteVideosContainer {+ flex-direction: column-reverse;+ overflow-x: hidden;}}@@ -101,7 +110,7 @@}#remoteVideos {- flex-direction: column-reverse;+ flex-direction: column;flex-grow: 1;}@@ -153,15 +162,11 @@* be hidden.* The class opening is for when the filmstrip is transitioning from hidden* to visible.- * The class with-remote-videos is for when the filmstrip has remote videos- * displayed, as opposed to 1-on-1 mode where they might be hidden.- * The class without-remote-videos is for when the filmstrip is visible- * but it has no videos to display.*/.video-state-indicator.moveToCorner {transition: right 0.5s;- &.with-filmstrip.with-remote-videos {+ &.with-filmstrip {&#recordingLabel {right: 200px;}@@ -171,11 +176,7 @@}}- &.with-filmstrip.without-remote-videos {- transition-delay: 0.5s;- }-- &.with-filmstrip.with-remote-videos.opening {+ &.with-filmstrip.opening {transition: 0.9s;transition-timing-function: ease-in-out;}diff --git a/interface_config.js b/interface_config.jsindex a46247f626..72e89469d9 100644--- a/interface_config.js+++ b/interface_config.js@@ -35,13 +35,14 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars//main toolbar'microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'fodeviceselection', 'hangup', // jshint ignore:line//extended toolbar- 'profile', 'addtocall', 'contacts', 'info', 'chat', 'recording', 'etherpad', 'sharedvideo', 'dialout', 'settings', 'raisehand', 'videoquality', 'filmstrip'], // jshint ignore:line+ 'profile', 'contacts', 'info', 'chat', 'recording', 'etherpad', 'sharedvideo', 'settings', 'raisehand', 'videoquality', 'filmstrip'], // jshint ignore:line/*** Main Toolbar Buttons* All of them should be in TOOLBAR_BUTTONS*/MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'fodeviceselection', 'hangup'], // jshint ignore:lineSETTINGS_SECTIONS: ['language', 'devices', 'moderator'],+ INVITE_OPTIONS: ['invite', 'dialout', 'addtocall'],// Determines how the video would fit the screen. 'both' would fit the whole// screen, 'height' would fit the original video height to the height of the// screen, 'width' would fit the original video width to the width of the@@ -124,4 +125,9 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars* @type {number}*/CONNECTION_INDICATOR_AUTO_HIDE_TIMEOUT: 5000++ /**+ * The name of the application connected to the "Add people" search service.+ */+ // ADD_PEOPLE_APP_NAME: ""};diff --git a/lang/main.json b/lang/main.jsonindex 55824d73c3..9b8eae87bd 100644--- a/lang/main.json+++ b/lang/main.json@@ -446,6 +446,7 @@"hidePassword": "Hide password","inviteTo": "Invite people to __conferenceName__","invitedYouTo": "__userName__ has invited you to the __inviteURL__ conference",+ "invitePeople": "Invite people","locked": "This call is locked. New callers must have the link and enter the password to join.","showPassword": "Show password","unlocked": "This call is unlocked. Any new caller with the link may join the call."@@ -467,7 +468,7 @@},"dialOut": {"dial": "Dial",- "dialOut": "Call a phone number",+ "dialOut": "Call a #","statusMessage": "is now __status__","enterPhone": "Enter phone number","phoneNotAllowed": "Oh, we don't support that destination yet! Sorry!"diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex 5cc5385f0f..32bf0c33a1 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -37,7 +37,6 @@ import {showDialPadButton,showEtherpadButton,showSharedVideoButton,- showDialOutButton,showToolbox} from '../../react/features/toolbox';import {@@ -474,7 +473,6 @@ UI.onPeerVideoTypeChangedUI.updateLocalRole = isModerator => {VideoLayout.showModeratorIndicator();- APP.store.dispatch(showDialOutButton(isModerator));APP.store.dispatch(showSharedVideoButton());Recording.showRecordingButton(isModerator);diff --git a/modules/UI/videolayout/Filmstrip.js b/modules/UI/videolayout/Filmstrip.jsindex c5d5ae55bf..4dac9e00e1 100644--- a/modules/UI/videolayout/Filmstrip.js+++ b/modules/UI/videolayout/Filmstrip.js@@ -193,16 +193,6 @@ const Filmstrip = {}},- /**- * Returns the width of filmstip- * @returns {number} width- */- getFilmstripWidth() {- return this.filmstrip.innerWidth()- - parseInt(this.filmstrip.css('paddingLeft'), 10)- - parseInt(this.filmstrip.css('paddingRight'), 10);- },-/*** Calculates the size for thumbnails: local and remote one* @returns {*|{localVideo, remoteVideo}}@@ -433,11 +423,14 @@ const Filmstrip = {promises.push(new Promise((resolve) => {// Let CSS take care of height in vertical filmstrip mode.if (interfaceConfig.VERTICAL_FILMSTRIP) {- resolve();+ $('#filmstripLocalVideo').animate({+ // adds 4 px because of small video 2px border+ width: local.thumbWidth + 4+ }, this._getAnimateOptions(animate, resolve));} else {this.filmstrip.animate({- // adds 2 px because of small video 1px border- height: remote.thumbHeight + 2+ // adds 4 px because of small video 2px border+ height: remote.thumbHeight + 4}, this._getAnimateOptions(animate, resolve));}}));diff --git a/modules/UI/videolayout/LocalVideo.js b/modules/UI/videolayout/LocalVideo.jsindex 1b49334606..feb3cbae72 100644--- a/modules/UI/videolayout/LocalVideo.js+++ b/modules/UI/videolayout/LocalVideo.js@@ -29,7 +29,7 @@ function LocalVideo(VideoLayout, emitter) {this.isLocal = true;this.emitter = emitter;this.statsPopoverLocation = interfaceConfig.VERTICAL_FILMSTRIP- ? 'left bottom' : 'top center';+ ? 'left top' : 'top center';Object.defineProperty(this, 'id', {get: function () {diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.jsindex fe74139065..3889fcfe50 100644--- a/modules/UI/videolayout/RemoteVideo.js+++ b/modules/UI/videolayout/RemoteVideo.js@@ -43,7 +43,7 @@ function RemoteVideo(user, VideoLayout, emitter) {this.hasRemoteVideoMenu = false;this._supportsRemoteControl = false;this.statsPopoverLocation = interfaceConfig.VERTICAL_FILMSTRIP- ? 'left top' : 'top center';+ ? 'left bottom' : 'top center';this.addRemoteVideoContainer();this.updateIndicators();this.setDisplayName();diff --git a/react/features/base/conference/actionTypes.js b/react/features/base/conference/actionTypes.jsindex c571aa2df9..f1336be305 100644--- a/react/features/base/conference/actionTypes.js+++ b/react/features/base/conference/actionTypes.js@@ -151,3 +151,14 @@ export const SET_RECEIVE_VIDEO_QUALITY = Symbol('SET_RECEIVE_VIDEO_QUALITY');* }*/export const SET_ROOM = Symbol('SET_ROOM');++/**+ * The type of (redux) action, which indicates if a SIP gateway is enabled on+ * the server.+ *+ * {+ * type: SET_SIP_GATEWAY_ENABLED+ * isSIPGatewayEnabled: boolean+ * }+ */+export const SET_SIP_GATEWAY_ENABLED = Symbol('SET_SIP_GATEWAY_ENABLED');diff --git a/react/features/base/conference/reducer.js b/react/features/base/conference/reducer.jsindex 41e8d85ce6..1a4191c4b5 100644--- a/react/features/base/conference/reducer.js+++ b/react/features/base/conference/reducer.js@@ -14,7 +14,8 @@ import {SET_AUDIO_ONLY,SET_PASSWORD,SET_RECEIVE_VIDEO_QUALITY,- SET_ROOM+ SET_ROOM,+ SET_SIP_GATEWAY_ENABLED} from './actionTypes';import { VIDEO_QUALITY_LEVELS } from './constants';import { isRoomValid } from './functions';@@ -60,6 +61,9 @@ ReducerRegistry.register('features/base/conference', (state = {}, action) => {case SET_ROOM:return _setRoom(state, action);++ case SET_SIP_GATEWAY_ENABLED:+ return _setSIPGatewayEnabled(state, action);}return state;@@ -363,3 +367,17 @@ function _setRoom(state, action) {*/return set(state, 'room', room);}++/**+ * Reduces a specific Redux action SET_SIP_GATEWAY_ENABLED of the feature+ * base/conference.+ *+ * @param {Object} state - The Redux state of the feature base/conference.+ * @param {Action} action - The Redux action SET_SIP_GATEWAY_ENABLED to reduce.+ * @private+ * @returns {Object} The new state of the feature base/conference after the+ * reduction of the specified action.+ */+function _setSIPGatewayEnabled(state, action) {+ return set(state, 'isSIPGatewayEnabled', action.isSIPGatewayEnabled);+}diff --git a/react/features/conference/components/Conference.web.js b/react/features/conference/components/Conference.web.jsindex 4f9609b25f..befc6be19d 100644--- a/react/features/conference/components/Conference.web.js+++ b/react/features/conference/components/Conference.web.js@@ -74,7 +74,7 @@ class Conference extends Component {<div id = 'videoconference_page'><div id = 'videospace'><LargeVideo />- <Filmstrip displayToolbox = { filmStripOnly } />+ <Filmstrip filmstripOnly = { filmStripOnly } /></div>{ filmStripOnly ? null : <Toolbox /> }diff --git a/react/features/dial-out/actions.js b/react/features/dial-out/actions.jsindex e00dae5cdc..e359509efb 100644--- a/react/features/dial-out/actions.js+++ b/react/features/dial-out/actions.js@@ -1,5 +1,3 @@-import { openDialog } from '../../features/base/dialog';-import {DIAL_OUT_CANCELED,DIAL_OUT_CODES_UPDATED,@@ -7,8 +5,6 @@ import {PHONE_NUMBER_CHECKED} from './actionTypes';-import { DialOutDialog } from './components';-declare var $: Function;declare var config: Object;@@ -76,16 +72,6 @@ export function checkDialNumber(dialNumber) {};}--/**- * Opens the dial-out dialog.- *- * @returns {Function}- */-export function openDialOutDialog() {- return openDialog(DialOutDialog);-}-/*** Sends an ajax request for dial-out country codes.*diff --git a/react/features/filmstrip/components/Filmstrip.web.js b/react/features/filmstrip/components/Filmstrip.web.jsindex 7cf4365c27..c42f1d1c5f 100644--- a/react/features/filmstrip/components/Filmstrip.web.js+++ b/react/features/filmstrip/components/Filmstrip.web.js@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';import React, { Component } from 'react';import { connect } from 'react-redux';+import { InviteButton } from '../../invite';import { Toolbox } from '../../toolbox';import { setFilmstripHovered } from '../actions';@@ -48,9 +49,9 @@ class Filmstrip extends Component {dispatch: PropTypes.func,/**- * Whether or not the toolbox should be displayed within the filmstrip.+ * Whether or not the conference is in filmstripOnly mode.*/- displayToolbox: PropTypes.bool+ filmstripOnly: PropTypes.bool};/**@@ -100,7 +101,7 @@ class Filmstrip extends Component {return (<div className = { filmstripClassNames }>- { this.props.displayToolbox ? <Toolbox /> : null }+ { this.props.filmstripOnly ? <Toolbox /> : null }<divclassName = 'filmstrip__videos'id = 'remoteVideos'>@@ -108,7 +109,9 @@ class Filmstrip extends Component {className = 'filmstrip__videos'id = 'filmstripLocalVideo'onMouseOut = { this._onMouseOut }- onMouseOver = { this._onMouseOver } />+ onMouseOver = { this._onMouseOver }>+ { this.props.filmstripOnly ? null : <InviteButton /> }+ </div><divclassName = 'filmstrip__videos'id = 'filmstripRemoteVideos'>diff --git a/react/features/invite/actions.js b/react/features/invite/actions.jsindex 889a121e02..59a4ee0d1b 100644--- a/react/features/invite/actions.js+++ b/react/features/invite/actions.js@@ -5,7 +5,7 @@ import {UPDATE_DIAL_IN_NUMBERS_FAILED,UPDATE_DIAL_IN_NUMBERS_SUCCESS} from './actionTypes';-import { AddPeopleDialog, InviteDialog } from './components';+import { InviteDialog } from './components';declare var $: Function;@@ -18,15 +18,6 @@ export function openInviteDialog() {return openDialog(InviteDialog);}-/**- * Opens the Add People Dialog.- *- * @returns {Function}- */-export function openAddPeopleDialog() {- return openDialog(AddPeopleDialog);-}-/*** Opens the inline conference info dialog.*diff --git a/react/features/invite/components/InviteButton.native.js b/react/features/invite/components/InviteButton.native.jsnew file mode 100644index 0000000000..8b13789179--- /dev/null+++ b/react/features/invite/components/InviteButton.native.js@@ -0,0 +1 @@+diff --git a/react/features/invite/components/InviteButton.web.js b/react/features/invite/components/InviteButton.web.jsnew file mode 100644index 0000000000..f83e7bc839--- /dev/null+++ b/react/features/invite/components/InviteButton.web.js@@ -0,0 +1,231 @@+import PropTypes from 'prop-types';+import React, { Component } from 'react';+import { connect } from 'react-redux';+import Button from '@atlaskit/button';+import DropdownMenu from '@atlaskit/dropdown-menu';++import { translate } from '../../base/i18n';+import { getLocalParticipant, PARTICIPANT_ROLE } from '../../base/participants';++import { openDialog } from '../../base/dialog';+import { AddPeopleDialog, InviteDialog } from '.';+import { DialOutDialog } from '../../dial-out';+import { isInviteOptionEnabled, getInviteOptionPosition } from '../functions';++declare var interfaceConfig: Object;++const SHARE_LINK_OPTION = 'invite';+const DIAL_OUT_OPTION = 'dialout';+const ADD_TO_CALL_OPTION = 'addtocall';++/**+ * The button that provides different invite options.+ */+class InviteButton extends Component {+ /**+ * {@code InviteButton}'s property types.+ *+ * @static+ */+ static propTypes = {+ /**+ * Indicates if the "Add to call" feature is available.+ */+ _isAddToCallAvailable: PropTypes.bool,++ /**+ * Indicates if the "Dial out" feature is available.+ */+ _isDialOutAvailable: PropTypes.bool,++ /**+ * The function opening the dialog.+ */+ openDialog: PropTypes.func,++ /**+ * Invoked to obtain translated strings.+ */+ t: PropTypes.func+ };++ /**+ * Initializes a new {@code InviteButton} instance.+ *+ * @param {Object} props - The read-only properties with which the new+ * instance is to be initialized.+ */+ constructor(props) {+ super(props);++ this._onInviteClick = this._onInviteClick.bind(this);+ this._onInviteOptionSelected = this._onInviteOptionSelected.bind(this);+ this._updateInviteItems = this._updateInviteItems.bind(this);++ this._updateInviteItems(this.props);+ }++ /**+ * Implements React's {@link Component#componentWillReceiveProps()}.+ *+ * @inheritdoc+ * @param {Object} nextProps - The read-only props which this Component will+ * receive.+ * @returns {void}+ */+ componentWillReceiveProps(nextProps) {+ if (this.props._isDialOutAvailable !== nextProps._isDialOutAvailable+ || this.props._isAddToCallAvailable+ !== nextProps._isAddToCallAvailable) {+ this._updateInviteItems(nextProps);+ }+ }++ /**+ * Renders the content of this component.+ *+ * @returns {ReactElement}+ */+ render() {+ const { t } = this.props;++ const { VERTICAL_FILMSTRIP } = interfaceConfig;++ return (+ <div className = 'filmstrip__invite'>+ <div className = 'invite-button-group'>+ <Button+ onClick = { this._onInviteClick }+ shouldFitContainer = { true }>+ { t('invite.invitePeople') }+ </Button>+ { this.props._isDialOutAvailable+ || this.props._isAddToCallAvailable+ ? <DropdownMenu+ items = { this.state.inviteOptions }+ onItemActivated = { this._onInviteOptionSelected }+ position = { VERTICAL_FILMSTRIP+ ? 'bottom right'+ : 'top right' }+ shouldFlip = { true }+ triggerType = 'button' />+ : null }+ </div>+ </div>+ );+ }++ /**+ * Handles the click of the invite button.+ *+ * @private+ * @returns {void}+ */+ _onInviteClick() {+ this.props.openDialog(InviteDialog);+ }++ /**+ * Handles selection of the invite options.+ *+ * @param { Object } option - The invite option that has been selected from+ * the dropdown menu.+ * @private+ * @returns {void}+ */+ _onInviteOptionSelected(option) {+ this.state.inviteOptions[0].items.forEach(item => {+ if (item.content === option.item.content) {+ item.action();+ }+ });+ }++ /**+ * Updates the invite items list depending on the availability of the+ * features.+ *+ * @param {Object} props - The read-only properties of the component.+ * @private+ * @returns {void}+ */+ _updateInviteItems(props) {+ const { t } = this.props;++ const inviteItems = [];++ inviteItems.splice(+ getInviteOptionPosition(SHARE_LINK_OPTION),+ 0,+ {+ content: t('toolbar.invite'),+ action: () => this.props.openDialog(InviteDialog)+ }+ );++ if (props._isDialOutAvailable) {+ inviteItems.splice(+ getInviteOptionPosition(DIAL_OUT_OPTION),+ 0,+ {+ content: t('dialOut.dialOut'),+ action: () => this.props.openDialog(DialOutDialog)+ }+ );+ }++ if (props._isAddToCallAvailable) {+ inviteItems.splice(+ getInviteOptionPosition(ADD_TO_CALL_OPTION),+ 0,+ {+ content: interfaceConfig.ADD_PEOPLE_APP_NAME,+ action: () => this.props.openDialog(AddPeopleDialog)+ }+ );+ }++ this.state = {+ /**+ * The list of invite options.+ */+ inviteOptions: [+ {+ items: inviteItems+ }+ ]+ };+ }+}++/**+ * Maps (parts of) the Redux state to the associated {@code InviteButton}'s+ * props.+ *+ * @param {Object} state - The Redux state.+ * @private+ * @returns {{+ * _isAddToCallAvailable: boolean,+ * _isDialOutAvailable: boolean+ * }}+ */+function _mapStateToProps(state) {+ const { enableUserRolesBasedOnToken } = state['features/base/config'];++ const { conference } = state['features/base/conference'];++ const { isGuest } = state['features/jwt'];++ return {+ _isAddToCallAvailable: !isGuest+ && isInviteOptionEnabled(ADD_TO_CALL_OPTION),+ _isDialOutAvailable:+ getLocalParticipant(state).role === PARTICIPANT_ROLE.MODERATOR+ && conference && conference.isSIPCallingSupported()+ && isInviteOptionEnabled(DIAL_OUT_OPTION)+ && (!enableUserRolesBasedOnToken || !isGuest)+ };+}++export default translate(connect(+ _mapStateToProps, { openDialog })(InviteButton));diff --git a/react/features/invite/components/index.js b/react/features/invite/components/index.jsindex 241ca25ac0..86fa2cd646 100644--- a/react/features/invite/components/index.js+++ b/react/features/invite/components/index.js@@ -1,3 +1,4 @@export { default as AddPeopleDialog } from './AddPeopleDialog';export { default as InfoDialogButton } from './InfoDialogButton';+export { default as InviteButton } from './InviteButton';export { default as InviteDialog } from './InviteDialog';diff --git a/react/features/invite/functions.js b/react/features/invite/functions.jsindex 6637dc4594..78a87c380f 100644--- a/react/features/invite/functions.js+++ b/react/features/invite/functions.js@@ -1,4 +1,5 @@declare var $: Function;+declare var interfaceConfig: Object;/*** Sends an ajax request to a directory service.@@ -76,3 +77,27 @@ export function inviteRooms(conference, rooms) {}}}++/**+ * Indicates if an invite option is enabled in the configuration.+ *+ * @param {string} name - The name of the option defined in+ * interfaceConfig.INVITE_OPTIONS.+ * @returns {boolean} - True to indicate that the given invite option is+ * enabled, false - otherwise.+ */+export function isInviteOptionEnabled(name) {+ return interfaceConfig.INVITE_OPTIONS.indexOf(name) !== -1;+}++/**+ * Get the position of the invite option in the interfaceConfig.INVITE_OPTIONS+ * list.+ *+ * @param {string} optionName - The invite option name.+ * @private+ * @returns {number} - The position of the option in the list.+ */+export function getInviteOptionPosition(optionName) {+ return interfaceConfig.INVITE_OPTIONS.indexOf(optionName);+}diff --git a/react/features/recording/components/RecordingLabel.web.js b/react/features/recording/components/RecordingLabel.web.jsindex bd07256713..dc3905d5b1 100644--- a/react/features/recording/components/RecordingLabel.web.js+++ b/react/features/recording/components/RecordingLabel.web.js@@ -3,7 +3,6 @@ import React, { Component } from 'react';import { connect } from 'react-redux';import { translate } from '../../base/i18n';-import { shouldRemoteVideosBeVisible } from '../../filmstrip';/*** Implements a React {@link Component} which displays the current state of@@ -38,14 +37,6 @@ class RecordingLabel extends Component {*/_labelDisplayConfiguration: PropTypes.object,- /**- * Whether or not remote videos within the filmstrip are currently- * visible. Depending on the visibility state, coupled with filmstrip- * visibility, CSS classes will be set to allow for adjusting of- * {@code RecordingLabel} positioning.- */- _remoteVideosVisible: PropTypes.bool,-/*** Invoked to obtain translated string.*/@@ -106,9 +97,7 @@ class RecordingLabel extends Component {centered ? '' : 'moveToCorner',this.state.filmstripBecomingVisible ? 'opening' : '',this.props._filmstripVisible- ? 'with-filmstrip' : 'without-filmstrip',- this.props._remoteVideosVisible- ? 'with-remote-videos' : 'without-remote-videos'+ ? 'with-filmstrip' : 'without-filmstrip'].join(' ');return (@@ -137,8 +126,7 @@ class RecordingLabel extends Component {* @private* @returns {{* _filmstripVisible: boolean,- * _labelDisplayConfiguration: Object,- * _remoteVideosVisible: boolean,+ * _labelDisplayConfiguration: Object* }}*/function _mapStateToProps(state) {@@ -159,14 +147,7 @@ function _mapStateToProps(state) {** @type {Object}*/- _labelDisplayConfiguration: labelDisplayConfiguration,-- /**- * Whether or not remote videos are displayed in the filmstrip.- *- * @type {boolean}- */- _remoteVideosVisible: shouldRemoteVideosBeVisible(state)+ _labelDisplayConfiguration: labelDisplayConfiguration};}diff --git a/react/features/remote-video-menu/components/RemoteVideoMenuTriggerButton.js b/react/features/remote-video-menu/components/RemoteVideoMenuTriggerButton.jsindex 9e15f2887b..1e6b65f637 100644--- a/react/features/remote-video-menu/components/RemoteVideoMenuTriggerButton.js+++ b/react/features/remote-video-menu/components/RemoteVideoMenuTriggerButton.js@@ -107,7 +107,7 @@ class RemoteVideoMenuTriggerButton extends Component {content = { content }onPopoverOpen = { this._onShowRemoteMenu }position = { interfaceConfig.VERTICAL_FILMSTRIP- ? 'left middle' : 'top center' }>+ ? 'left bottom' : 'top center' }><spanclassName = 'popover-trigger remote-video-menu-trigger'><idiff --git a/react/features/toolbox/actions.web.js b/react/features/toolbox/actions.web.jsindex dcbc413b35..1a83c28391 100644--- a/react/features/toolbox/actions.web.js+++ b/react/features/toolbox/actions.web.js@@ -324,29 +324,6 @@ export function showSharedVideoButton(): Function {};}-/**- * Shows the dial out button if it's required and appropriate- * flag is passed.- *- * @param {boolean} show - Flag showing whether to show button or not.- * @returns {Function}- */-export function showDialOutButton(show: boolean): Function {- return (dispatch: Dispatch<*>, getState: Function) => {- const buttonName = 'dialout';-- if (show- && APP.conference.sipGatewayEnabled()- && isButtonEnabled(buttonName)- && (!config.enableUserRolesBasedOnToken- || !getState()['features/jwt'].isGuest)) {- dispatch(setToolbarButton(buttonName, {- hidden: false- }));- }- };-}-/*** Shows the toolbox for specified timeout.*diff --git a/react/features/toolbox/defaultToolbarButtons.web.js b/react/features/toolbox/defaultToolbarButtons.web.jsindex 0133ac51b9..0a47d9d3e3 100644--- a/react/features/toolbox/defaultToolbarButtons.web.js+++ b/react/features/toolbox/defaultToolbarButtons.web.js@@ -1,16 +1,16 @@/* @flow */import React from 'react';+import _ from 'lodash';import { ParticipantCounter } from '../contact-list';import { openDeviceSelectionDialog } from '../device-selection';-import { openDialOutDialog } from '../dial-out';import {InfoDialogButton,- openAddPeopleDialog,openInviteDialog} from '../invite';+import { VideoQualityButton } from '../video-quality';import UIEvents from '../../../service/UI/UIEvents';@@ -21,412 +21,394 @@ declare var APP: Object;declare var interfaceConfig: Object;declare var JitsiMeetJS: Object;+let buttons: Object = {};+/**- * All toolbar buttons' descriptors.+ * Returns a map of all button descriptors and according properties.+ *+ * @returns {*} - The maps of default button descriptors.*/-const buttons: Object = {- addtocall: {- classNames: [ 'button', 'icon-add' ],- enabled: true,- id: 'toolbar_button_add',- isDisplayed: () => !APP.store.getState()['features/jwt'].isGuest,- onClick(dispatch) {- JitsiMeetJS.analytics.sendEvent('toolbar.add.clicked');-- dispatch(openAddPeopleDialog());- },- tooltipKey: 'toolbar.addPeople'- },-- /**- * The descriptor of the camera toolbar button.- */- camera: {- classNames: [ 'button', 'icon-camera' ],- enabled: true,- isDisplayed: () => true,- id: 'toolbar_button_camera',- onClick() {- const newVideoMutedState = !APP.conference.isLocalVideoMuted();-- if (newVideoMutedState) {- JitsiMeetJS.analytics.sendEvent('toolbar.video.enabled');- } else {- JitsiMeetJS.analytics.sendEvent('toolbar.video.disabled');- }- APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState);- },- popups: [- {- dataAttr: 'audioOnly.featureToggleDisabled',- dataInterpolate: { feature: 'video mute' },- id: 'unmuteWhileAudioOnly'- }- ],- shortcut: 'V',- shortcutAttr: 'toggleVideoPopover',- shortcutFunc() {- if (APP.conference.isAudioOnly()) {- APP.UI.emitEvent(UIEvents.VIDEO_UNMUTING_WHILE_AUDIO_ONLY);-- return;- }-- JitsiMeetJS.analytics.sendEvent('shortcut.videomute.toggled');- APP.conference.toggleVideoMuted();- },- shortcutDescription: 'keyboardShortcuts.videoMute',- tooltipKey: 'toolbar.videomute'- },-- /**- * The descriptor of the chat toolbar button.- */- chat: {- classNames: [ 'button', 'icon-chat' ],- enabled: true,- html: <span className = 'badge-round'>- <span id = 'unreadMessages' />- </span>,- id: 'toolbar_button_chat',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.chat.toggled');- APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);- },- shortcut: 'C',- shortcutAttr: 'toggleChatPopover',- shortcutFunc() {- JitsiMeetJS.analytics.sendEvent('shortcut.chat.toggled');- APP.UI.toggleChat();- },- shortcutDescription: 'keyboardShortcuts.toggleChat',- sideContainerId: 'chat_container',- tooltipKey: 'toolbar.chat'- },-- /**- * The descriptor of the contact list toolbar button.- */- contacts: {- childComponent: ParticipantCounter,- classNames: [ 'button', 'icon-contactList' ],- enabled: true,- id: 'toolbar_contact_list',- onClick() {- JitsiMeetJS.analytics.sendEvent(- 'toolbar.contacts.toggled');- APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST);- },- sideContainerId: 'contacts_container',- tooltipKey: 'bottomtoolbar.contactlist'- },-- /**- * The descriptor of the desktop sharing toolbar button.- */- desktop: {- classNames: [ 'button', 'icon-share-desktop' ],- enabled: true,- id: 'toolbar_button_desktopsharing',- onClick() {- if (APP.conference.isSharingScreen) {- JitsiMeetJS.analytics.sendEvent('toolbar.screen.disabled');- } else {- JitsiMeetJS.analytics.sendEvent('toolbar.screen.enabled');- }- APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);+function getDefaultButtons() {+ if (!_.isEmpty(buttons)) {+ return buttons;+ }++ buttons = {+ /**+ * The descriptor of the camera toolbar button.+ */+ camera: {+ classNames: [ 'button', 'icon-camera' ],+ enabled: true,+ isDisplayed: () => true,+ id: 'toolbar_button_camera',+ onClick() {+ const newVideoMutedState = !APP.conference.isLocalVideoMuted();++ if (newVideoMutedState) {+ JitsiMeetJS.analytics.sendEvent('toolbar.video.enabled');+ } else {+ JitsiMeetJS.analytics.sendEvent('toolbar.video.disabled');+ }+ APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState);+ },+ popups: [+ {+ dataAttr: 'audioOnly.featureToggleDisabled',+ dataInterpolate: { feature: 'video mute' },+ id: 'unmuteWhileAudioOnly'+ }+ ],+ shortcut: 'V',+ shortcutAttr: 'toggleVideoPopover',+ shortcutFunc() {+ if (APP.conference.isAudioOnly()) {+ APP.UI.emitEvent(UIEvents.VIDEO_UNMUTING_WHILE_AUDIO_ONLY);++ return;+ }++ JitsiMeetJS.analytics.sendEvent('shortcut.videomute.toggled');+ APP.conference.toggleVideoMuted();+ },+ shortcutDescription: 'keyboardShortcuts.videoMute',+ tooltipKey: 'toolbar.videomute'},- popups: [- {- dataAttr: 'audioOnly.featureToggleDisabled',- dataInterpolate: { feature: 'screen sharing' },- id: 'screenshareWhileAudioOnly'- }- ],- shortcut: 'D',- shortcutAttr: 'toggleDesktopSharingPopover',- shortcutFunc() {- JitsiMeetJS.analytics.sendEvent('shortcut.screen.toggled');-- // eslint-disable-next-line no-empty-function- APP.conference.toggleScreenSharing().catch(() => {});++ /**+ * The descriptor of the chat toolbar button.+ */+ chat: {+ classNames: [ 'button', 'icon-chat' ],+ enabled: true,+ html: <span className = 'badge-round'>+ <span id = 'unreadMessages' /></span>,+ id: 'toolbar_button_chat',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.chat.toggled');+ APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);+ },+ shortcut: 'C',+ shortcutAttr: 'toggleChatPopover',+ shortcutFunc() {+ JitsiMeetJS.analytics.sendEvent('shortcut.chat.toggled');+ APP.UI.toggleChat();+ },+ shortcutDescription: 'keyboardShortcuts.toggleChat',+ sideContainerId: 'chat_container',+ tooltipKey: 'toolbar.chat'},- shortcutDescription: 'keyboardShortcuts.toggleScreensharing',- tooltipKey: 'toolbar.sharescreen'- },-- /**- * The descriptor of the dial out toolbar button.- */- dialout: {- classNames: [ 'button', 'icon-telephone' ],- enabled: true,-- // Will be displayed once the SIP calls functionality is detected.- hidden: true,- id: 'toolbar_button_dial_out',- onClick(dispatch) {- JitsiMeetJS.analytics.sendEvent('toolbar.sip.clicked');-- dispatch(openDialOutDialog());++ /**+ * The descriptor of the contact list toolbar button.+ */+ contacts: {+ childComponent: ParticipantCounter,+ classNames: [ 'button', 'icon-contactList' ],+ enabled: true,+ id: 'toolbar_contact_list',+ onClick() {+ JitsiMeetJS.analytics.sendEvent(+ 'toolbar.contacts.toggled');+ APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST);+ },+ sideContainerId: 'contacts_container',+ tooltipKey: 'bottomtoolbar.contactlist'},- tooltipKey: 'dialOut.dialOut'- },-- /**- * The descriptor of the device selection toolbar button.- */- fodeviceselection: {- classNames: [ 'button', 'icon-settings' ],- enabled: true,- isDisplayed() {- return interfaceConfig.filmStripOnly;++ /**+ * The descriptor of the desktop sharing toolbar button.+ */+ desktop: {+ classNames: [ 'button', 'icon-share-desktop' ],+ enabled: true,+ id: 'toolbar_button_desktopsharing',+ onClick() {+ if (APP.conference.isSharingScreen) {+ JitsiMeetJS.analytics.sendEvent('toolbar.screen.disabled');+ } else {+ JitsiMeetJS.analytics.sendEvent('toolbar.screen.enabled');+ }+ APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);+ },+ popups: [+ {+ dataAttr: 'audioOnly.featureToggleDisabled',+ dataInterpolate: { feature: 'screen sharing' },+ id: 'screenshareWhileAudioOnly'+ }+ ],+ shortcut: 'D',+ shortcutAttr: 'toggleDesktopSharingPopover',+ shortcutFunc() {+ JitsiMeetJS.analytics.sendEvent('shortcut.screen.toggled');++ // eslint-disable-next-line no-empty-function+ APP.conference.toggleScreenSharing().catch(() => {});+ },+ shortcutDescription: 'keyboardShortcuts.toggleScreensharing',+ tooltipKey: 'toolbar.sharescreen'},- id: 'toolbar_button_fodeviceselection',- onClick(dispatch) {- JitsiMeetJS.analytics.sendEvent(- 'toolbar.fodeviceselection.toggled');- dispatch(openDeviceSelectionDialog());+ /**+ * The descriptor of the device selection toolbar button.+ */+ fodeviceselection: {+ classNames: [ 'button', 'icon-settings' ],+ enabled: true,+ isDisplayed() {+ return interfaceConfig.filmStripOnly;+ },+ id: 'toolbar_button_fodeviceselection',+ onClick(dispatch: Function) {+ JitsiMeetJS.analytics.sendEvent(+ 'toolbar.fodeviceselection.toggled');++ dispatch(openDeviceSelectionDialog());+ },+ sideContainerId: 'settings_container',+ tooltipKey: 'toolbar.Settings'},- sideContainerId: 'settings_container',- tooltipKey: 'toolbar.Settings'- },-- /**- * The descriptor of the dialpad toolbar button.- */- dialpad: {- classNames: [ 'button', 'icon-dialpad' ],- enabled: true,-- // TODO: remove it after UI.updateDTMFSupport fix- hidden: true,- id: 'toolbar_button_dialpad',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.sip.dialpad.clicked');++ /**+ * The descriptor of the dialpad toolbar button.+ */+ dialpad: {+ classNames: [ 'button', 'icon-dialpad' ],+ enabled: true,++ // TODO: remove it after UI.updateDTMFSupport fix+ hidden: true,+ id: 'toolbar_button_dialpad',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.sip.dialpad.clicked');+ },+ tooltipKey: 'toolbar.dialpad'},- tooltipKey: 'toolbar.dialpad'- },-- /**- * The descriptor of the etherpad toolbar button.- */- etherpad: {- classNames: [ 'button', 'icon-share-doc' ],- enabled: true,- hidden: true,- id: 'toolbar_button_etherpad',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.etherpad.clicked');- APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED);++ /**+ * The descriptor of the etherpad toolbar button.+ */+ etherpad: {+ classNames: [ 'button', 'icon-share-doc' ],+ enabled: true,+ hidden: true,+ id: 'toolbar_button_etherpad',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.etherpad.clicked');+ APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED);+ },+ tooltipKey: 'toolbar.etherpad'},- tooltipKey: 'toolbar.etherpad'- },-- /**- * The descriptor of the toolbar button which toggles full-screen mode.- */- fullscreen: {- classNames: [ 'button', 'icon-full-screen' ],- enabled: true,- id: 'toolbar_button_fullScreen',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.fullscreen.enabled');-- APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN);++ /**+ * The descriptor of the toolbar button which toggles full-screen mode.+ */+ fullscreen: {+ classNames: [ 'button', 'icon-full-screen' ],+ enabled: true,+ id: 'toolbar_button_fullScreen',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.fullscreen.enabled');++ APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN);+ },+ shortcut: 'S',+ shortcutAttr: 'toggleFullscreenPopover',+ shortcutDescription: 'keyboardShortcuts.fullScreen',+ shortcutFunc() {+ JitsiMeetJS.analytics.sendEvent('shortcut.fullscreen.toggled');+ APP.UI.toggleFullScreen();+ },+ tooltipKey: 'toolbar.fullscreen'},- shortcut: 'S',- shortcutAttr: 'toggleFullscreenPopover',- shortcutDescription: 'keyboardShortcuts.fullScreen',- shortcutFunc() {- JitsiMeetJS.analytics.sendEvent('shortcut.fullscreen.toggled');- APP.UI.toggleFullScreen();++ /**+ * The descriptor of the toolbar button which hangs up the+ * call/conference.+ */+ hangup: {+ classNames: [ 'button', 'icon-hangup', 'button_hangup' ],+ enabled: true,+ isDisplayed: () => true,+ id: 'toolbar_button_hangup',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.hangup');+ APP.UI.emitEvent(UIEvents.HANGUP);+ },+ tooltipKey: 'toolbar.hangup'},- tooltipKey: 'toolbar.fullscreen'- },-- /**- * The descriptor of the toolbar button which hangs up the call/conference.- */- hangup: {- classNames: [ 'button', 'icon-hangup', 'button_hangup' ],- enabled: true,- isDisplayed: () => true,- id: 'toolbar_button_hangup',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.hangup');- APP.UI.emitEvent(UIEvents.HANGUP);++ /**+ * The descriptor of the toolbar button which opens a dialog for the+ * conference URL and inviting others.+ */+ info: {+ component: InfoDialogButton},- tooltipKey: 'toolbar.hangup'- },-- /**- * The descriptor of the toolbar button which opens a dialog for the- * conference URL and inviting others.- */- info: {- component: InfoDialogButton- },-- /**- * The descriptor of the toolbar button which shows the invite user dialog.- */- invite: {- classNames: [ 'button', 'icon-link' ],- enabled: true,- id: 'toolbar_button_link',- onClick(dispatch) {- JitsiMeetJS.analytics.sendEvent('toolbar.invite.clicked');-- dispatch(openInviteDialog());++ /**+ * The descriptor of the toolbar button which shows the invite user+ * dialog.+ */+ invite: {+ classNames: [ 'button', 'icon-link' ],+ enabled: true,+ id: 'toolbar_button_link',+ onClick(dispatch: Function) {+ JitsiMeetJS.analytics.sendEvent('toolbar.invite.clicked');++ dispatch(openInviteDialog());+ },+ tooltipKey: 'toolbar.invite'},- tooltipKey: 'toolbar.invite'- },-- /**- * The descriptor of the microphone toolbar button.- */- microphone: {- classNames: [ 'button', 'icon-microphone' ],- enabled: true,- isDisplayed: () => true,- id: 'toolbar_button_mute',- onClick() {- const sharedVideoManager = APP.UI.getSharedVideoManager();-- if (APP.conference.isLocalAudioMuted()) {- // If there's a shared video with the volume "on" and we aren't- // the video owner, we warn the user- // that currently it's not possible to unmute.- if (sharedVideoManager- && sharedVideoManager.isSharedVideoVolumeOn()- && !sharedVideoManager.isSharedVideoOwner()) {- APP.UI.showCustomToolbarPopup(- '#unableToUnmutePopup', true, 5000);++ /**+ * The descriptor of the microphone toolbar button.+ */+ microphone: {+ classNames: [ 'button', 'icon-microphone' ],+ enabled: true,+ isDisplayed: () => true,+ id: 'toolbar_button_mute',+ onClick() {+ const sharedVideoManager = APP.UI.getSharedVideoManager();++ if (APP.conference.isLocalAudioMuted()) {+ // If there's a shared video with the volume "on" and we+ // aren't the video owner, we warn the user+ // that currently it's not possible to unmute.+ if (sharedVideoManager+ && sharedVideoManager.isSharedVideoVolumeOn()+ && !sharedVideoManager.isSharedVideoOwner()) {+ APP.UI.showCustomToolbarPopup(+ '#unableToUnmutePopup', true, 5000);+ } else {+ JitsiMeetJS.analytics+ .sendEvent('toolbar.audio.unmuted');+ APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true);+ }} else {- JitsiMeetJS.analytics.sendEvent('toolbar.audio.unmuted');- APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true);+ JitsiMeetJS.analytics.sendEvent('toolbar.audio.muted');+ APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true);}- } else {- JitsiMeetJS.analytics.sendEvent('toolbar.audio.muted');- APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true);- }- },- popups: [- {- dataAttr: 'toolbar.micMutedPopup',- id: 'micMutedPopup'},- {- dataAttr: 'toolbar.unableToUnmutePopup',- id: 'unableToUnmutePopup'+ popups: [+ {+ dataAttr: 'toolbar.micMutedPopup',+ id: 'micMutedPopup'+ },+ {+ dataAttr: 'toolbar.unableToUnmutePopup',+ id: 'unableToUnmutePopup'+ },+ {+ dataAttr: 'toolbar.talkWhileMutedPopup',+ id: 'talkWhileMutedPopup'+ }+ ],+ shortcut: 'M',+ shortcutAttr: 'mutePopover',+ shortcutFunc() {+ JitsiMeetJS.analytics.sendEvent('shortcut.audiomute.toggled');+ APP.conference.toggleAudioMuted();},- {- dataAttr: 'toolbar.talkWhileMutedPopup',- id: 'talkWhileMutedPopup'- }- ],- shortcut: 'M',- shortcutAttr: 'mutePopover',- shortcutFunc() {- JitsiMeetJS.analytics.sendEvent('shortcut.audiomute.toggled');- APP.conference.toggleAudioMuted();+ shortcutDescription: 'keyboardShortcuts.mute',+ tooltipKey: 'toolbar.mute'},- shortcutDescription: 'keyboardShortcuts.mute',- tooltipKey: 'toolbar.mute'- },-- /**- * The descriptor of the profile toolbar button.- */- profile: {- component: ProfileButton,- sideContainerId: 'profile_container'- },-- /**- * The descriptor of the "Raise hand" toolbar button.- */- raisehand: {- classNames: [ 'button', 'icon-raised-hand' ],- enabled: true,- id: 'toolbar_button_raisehand',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.raiseHand.clicked');- APP.conference.maybeToggleRaisedHand();++ /**+ * The descriptor of the profile toolbar button.+ */+ profile: {+ component: ProfileButton,+ sideContainerId: 'profile_container'},- shortcut: 'R',- shortcutAttr: 'raiseHandPopover',- shortcutDescription: 'keyboardShortcuts.raiseHand',- shortcutFunc() {- JitsiMeetJS.analytics.sendEvent('shortcut.raisehand.clicked');- APP.conference.maybeToggleRaisedHand();++ /**+ * The descriptor of the "Raise hand" toolbar button.+ */+ raisehand: {+ classNames: [ 'button', 'icon-raised-hand' ],+ enabled: true,+ id: 'toolbar_button_raisehand',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.raiseHand.clicked');+ APP.conference.maybeToggleRaisedHand();+ },+ shortcut: 'R',+ shortcutAttr: 'raiseHandPopover',+ shortcutDescription: 'keyboardShortcuts.raiseHand',+ shortcutFunc() {+ JitsiMeetJS.analytics.sendEvent('shortcut.raisehand.clicked');+ APP.conference.maybeToggleRaisedHand();+ },+ tooltipKey: 'toolbar.raiseHand'},- tooltipKey: 'toolbar.raiseHand'- },-- /**- * The descriptor of the recording toolbar button. Requires additional- * initialization in the recording module.- */- recording: {- classNames: [ 'button' ],- enabled: true,-- // will be displayed once the recording functionality is detected- hidden: true,- id: 'toolbar_button_record',- tooltipKey: 'liveStreaming.buttonTooltip'- },-- /**- * The descriptor of the settings toolbar button.- */- settings: {- classNames: [ 'button', 'icon-settings' ],- enabled: true,- id: 'toolbar_button_settings',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.settings.toggled');- APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS);++ /**+ * The descriptor of the recording toolbar button. Requires additional+ * initialization in the recording module.+ */+ recording: {+ classNames: [ 'button' ],+ enabled: true,++ // will be displayed once the recording functionality is detected+ hidden: true,+ id: 'toolbar_button_record',+ tooltipKey: 'liveStreaming.buttonTooltip'},- sideContainerId: 'settings_container',- tooltipKey: 'toolbar.Settings'- },-- /**- * The descriptor of the "Share YouTube video" toolbar button.- */- sharedvideo: {- classNames: [ 'button', 'icon-shared-video' ],- enabled: true,- id: 'toolbar_button_sharedvideo',- onClick() {- JitsiMeetJS.analytics.sendEvent('toolbar.sharedvideo.clicked');- APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED);++ /**+ * The descriptor of the settings toolbar button.+ */+ settings: {+ classNames: [ 'button', 'icon-settings' ],+ enabled: true,+ id: 'toolbar_button_settings',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.settings.toggled');+ APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS);+ },+ sideContainerId: 'settings_container',+ tooltipKey: 'toolbar.Settings'},- popups: [- {- dataAttr: 'toolbar.sharedVideoMutedPopup',- id: 'sharedVideoMutedPopup'- }- ],- tooltipKey: 'toolbar.sharedvideo'- },-- videoquality: {- component: VideoQualityButton- }-};+ /**+ * The descriptor of the "Share YouTube video" toolbar button.+ */+ sharedvideo: {+ classNames: [ 'button', 'icon-shared-video' ],+ enabled: true,+ id: 'toolbar_button_sharedvideo',+ onClick() {+ JitsiMeetJS.analytics.sendEvent('toolbar.sharedvideo.clicked');+ APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED);+ },+ popups: [+ {+ dataAttr: 'toolbar.sharedVideoMutedPopup',+ id: 'sharedVideoMutedPopup'+ }+ ],+ tooltipKey: 'toolbar.sharedvideo'+ },-Object.keys(buttons).forEach(name => {- const button = buttons[name];+ videoquality: {+ component: VideoQualityButton+ }+ };- if (!button.isDisplayed) {- button.isDisplayed = () => !interfaceConfig.filmStripOnly;- }-});+ Object.keys(buttons).forEach(name => {+ const button = buttons[name];++ if (!button.isDisplayed) {+ button.isDisplayed = () => !interfaceConfig.filmStripOnly;+ }+ });++ return buttons;+}-export default buttons;+export default getDefaultButtons;diff --git a/react/features/toolbox/functions.web.js b/react/features/toolbox/functions.web.jsindex 2dc5cfded3..784c0a1418 100644--- a/react/features/toolbox/functions.web.js+++ b/react/features/toolbox/functions.web.js@@ -1,7 +1,7 @@import SideContainerTogglerfrom '../../../modules/UI/side_pannels/SideContainerToggler';-import defaultToolbarButtons from './defaultToolbarButtons';+import getDefaultButtons from './defaultToolbarButtons';declare var interfaceConfig: Object;@@ -27,7 +27,8 @@ export function getDefaultToolboxButtons(buttonHandlers: Object): Object {toolbarButtons= interfaceConfig.TOOLBAR_BUTTONS.reduce((acc, buttonName) => {- let button = defaultToolbarButtons[buttonName];+ const buttons = getDefaultButtons();+ let button = buttons ? buttons[buttonName] : null;const currentButtonHandlers = buttonHandlers[buttonName];if (button) {diff --git a/react/features/toolbox/reducer.js b/react/features/toolbox/reducer.jsindex 475d48c010..8e69f2c1ad 100644--- a/react/features/toolbox/reducer.js+++ b/react/features/toolbox/reducer.js@@ -15,7 +15,7 @@ import {SET_TOOLBOX_TIMEOUT_MS,SET_TOOLBOX_VISIBLE} from './actionTypes';-import defaultToolbarButtons from './defaultToolbarButtons';+import getDefaultButtons from './defaultToolbarButtons';declare var interfaceConfig: Object;@@ -209,7 +209,8 @@ ReducerRegistry.register(* @returns {Object}*/function _setButton(state, { button, buttonName }): Object {- const buttonDefinition = defaultToolbarButtons[buttonName];+ const buttons = getDefaultButtons();+ const buttonDefinition = buttons ? buttons[buttonName] : null;// We don't need to update if the button shouldn't be displayedif (!buttonDefinition || !buttonDefinition.isDisplayed()) {diff --git a/react/features/video-quality/components/VideoQualityLabel.web.js b/react/features/video-quality/components/VideoQualityLabel.web.jsindex 157e3fe554..55ea650c1a 100644--- a/react/features/video-quality/components/VideoQualityLabel.web.js+++ b/react/features/video-quality/components/VideoQualityLabel.web.js@@ -5,7 +5,6 @@ import { connect } from 'react-redux';import { VIDEO_QUALITY_LEVELS } from '../../base/conference';import { translate } from '../../base/i18n';-import { shouldRemoteVideosBeVisible } from '../../filmstrip';const { HIGH, STANDARD, LOW } = VIDEO_QUALITY_LEVELS;@@ -59,12 +58,6 @@ export class VideoQualityLabel extends Component {*/_filmstripVisible: PropTypes.bool,- /**- * Whether or note remote videos are visible in the filmstrip,- * regardless of count. Used to determine display classes to set.- */- _remoteVideosVisible: PropTypes.bool,-/*** The current video resolution (height) to display a label for.*/@@ -123,7 +116,6 @@ export class VideoQualityLabel extends Component {_audioOnly,_conferenceStarted,_filmstripVisible,- _remoteVideosVisible,_resolution,t} = this.props;@@ -140,12 +132,9 @@ export class VideoQualityLabel extends Component {const baseClasses = 'video-state-indicator moveToCorner';const filmstrip= _filmstripVisible ? 'with-filmstrip' : 'without-filmstrip';- const remoteVideosVisible = _remoteVideosVisible- ? 'with-remote-videos'- : 'without-remote-videos';const opening = this.state.togglingToVisible ? 'opening' : '';const classNames- = `${baseClasses} ${filmstrip} ${remoteVideosVisible} ${opening}`;+ = `${baseClasses} ${filmstrip} ${opening}`;const tooltipKey= `videoStatus.labelTooltip${_audioOnly ? 'AudioOnly' : 'Video'}`;@@ -206,7 +195,6 @@ export class VideoQualityLabel extends Component {* _audioOnly: boolean,* _conferenceStarted: boolean,* _filmstripVisible: true,- * _remoteVideosVisible: boolean,* _resolution: number* }}*/@@ -219,7 +207,6 @@ function _mapStateToProps(state) {_audioOnly: audioOnly,_conferenceStarted: Boolean(conference),_filmstripVisible: visible,- _remoteVideosVisible: shouldRemoteVideosBeVisible(state),_resolution: resolution};}