|
@@ -77,7 +77,7 @@ import {
|
77
|
77
|
showToolbox
|
78
|
78
|
} from '../../actions';
|
79
|
79
|
import { THRESHOLDS, NOT_APPLICABLE, DRAWER_MAX_HEIGHT, NOTIFY_CLICK_MODE } from '../../constants';
|
80
|
|
-import { isToolboxVisible } from '../../functions';
|
|
80
|
+import { isDesktopShareButtonDisabled, isToolboxVisible } from '../../functions';
|
81
|
81
|
import DownloadButton from '../DownloadButton';
|
82
|
82
|
import HangupButton from '../HangupButton';
|
83
|
83
|
import HelpButton from '../HelpButton';
|
|
@@ -123,6 +123,11 @@ type Props = {
|
123
|
123
|
*/
|
124
|
124
|
_conference: Object,
|
125
|
125
|
|
|
126
|
+ /**
|
|
127
|
+ * Whether or not screensharing button is disabled.
|
|
128
|
+ */
|
|
129
|
+ _desktopSharingButtonDisabled: boolean,
|
|
130
|
+
|
126
|
131
|
/**
|
127
|
132
|
* The tooltip key to use when screensharing is disabled. Or undefined
|
128
|
133
|
* if non to be shown and the button to be hidden.
|
|
@@ -537,6 +542,7 @@ class Toolbox extends Component<Props> {
|
537
|
542
|
_doToggleScreenshare() {
|
538
|
543
|
const {
|
539
|
544
|
_backgroundType,
|
|
545
|
+ _desktopSharingButtonDisabled,
|
540
|
546
|
_desktopSharingEnabled,
|
541
|
547
|
_localVideo,
|
542
|
548
|
_virtualSource,
|
|
@@ -558,7 +564,7 @@ class Toolbox extends Component<Props> {
|
558
|
564
|
return;
|
559
|
565
|
}
|
560
|
566
|
|
561
|
|
- if (_desktopSharingEnabled) {
|
|
567
|
+ if (_desktopSharingEnabled && !_desktopSharingButtonDisabled) {
|
562
|
568
|
dispatch(startScreenShareFlow());
|
563
|
569
|
}
|
564
|
570
|
}
|
|
@@ -1059,6 +1065,10 @@ class Toolbox extends Component<Props> {
|
1059
|
1065
|
* @returns {void}
|
1060
|
1066
|
*/
|
1061
|
1067
|
_onShortcutToggleScreenshare() {
|
|
1068
|
+ // Ignore the shortcut if the button is disabled.
|
|
1069
|
+ if (this.props._desktopSharingButtonDisabled) {
|
|
1070
|
+ return;
|
|
1071
|
+ }
|
1062
|
1072
|
sendAnalytics(createShortcutEvent(
|
1063
|
1073
|
'toggle.screen.sharing',
|
1064
|
1074
|
ACTION_SHORTCUT_TRIGGERED,
|
|
@@ -1377,6 +1387,7 @@ function _mapStateToProps(state, ownProps) {
|
1377
|
1387
|
_clientWidth: clientWidth,
|
1378
|
1388
|
_conference: conference,
|
1379
|
1389
|
_desktopSharingEnabled: desktopSharingEnabled,
|
|
1390
|
+ _desktopSharingButtonDisabled: isDesktopShareButtonDisabled(state),
|
1380
|
1391
|
_desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey,
|
1381
|
1392
|
_dialog: Boolean(state['features/base/dialog'].component),
|
1382
|
1393
|
_feedbackConfigured: Boolean(callStatsID),
|