|
|
|
@ -77,7 +77,7 @@ import { |
|
|
|
|
showToolbox |
|
|
|
|
} from '../../actions'; |
|
|
|
|
import { THRESHOLDS, NOT_APPLICABLE, DRAWER_MAX_HEIGHT, NOTIFY_CLICK_MODE } from '../../constants'; |
|
|
|
|
import { isToolboxVisible } from '../../functions'; |
|
|
|
|
import { isDesktopShareButtonDisabled, isToolboxVisible } from '../../functions'; |
|
|
|
|
import DownloadButton from '../DownloadButton'; |
|
|
|
|
import HangupButton from '../HangupButton'; |
|
|
|
|
import HelpButton from '../HelpButton'; |
|
|
|
@ -123,6 +123,11 @@ type Props = { |
|
|
|
|
*/ |
|
|
|
|
_conference: Object, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Whether or not screensharing button is disabled. |
|
|
|
|
*/ |
|
|
|
|
_desktopSharingButtonDisabled: boolean, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* The tooltip key to use when screensharing is disabled. Or undefined |
|
|
|
|
* if non to be shown and the button to be hidden. |
|
|
|
@ -537,6 +542,7 @@ class Toolbox extends Component<Props> { |
|
|
|
|
_doToggleScreenshare() { |
|
|
|
|
const { |
|
|
|
|
_backgroundType, |
|
|
|
|
_desktopSharingButtonDisabled, |
|
|
|
|
_desktopSharingEnabled, |
|
|
|
|
_localVideo, |
|
|
|
|
_virtualSource, |
|
|
|
@ -558,7 +564,7 @@ class Toolbox extends Component<Props> { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_desktopSharingEnabled) { |
|
|
|
|
if (_desktopSharingEnabled && !_desktopSharingButtonDisabled) { |
|
|
|
|
dispatch(startScreenShareFlow()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1059,6 +1065,10 @@ class Toolbox extends Component<Props> { |
|
|
|
|
* @returns {void} |
|
|
|
|
*/ |
|
|
|
|
_onShortcutToggleScreenshare() { |
|
|
|
|
// Ignore the shortcut if the button is disabled.
|
|
|
|
|
if (this.props._desktopSharingButtonDisabled) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
sendAnalytics(createShortcutEvent( |
|
|
|
|
'toggle.screen.sharing', |
|
|
|
|
ACTION_SHORTCUT_TRIGGERED, |
|
|
|
@ -1377,6 +1387,7 @@ function _mapStateToProps(state, ownProps) { |
|
|
|
|
_clientWidth: clientWidth, |
|
|
|
|
_conference: conference, |
|
|
|
|
_desktopSharingEnabled: desktopSharingEnabled, |
|
|
|
|
_desktopSharingButtonDisabled: isDesktopShareButtonDisabled(state), |
|
|
|
|
_desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey, |
|
|
|
|
_dialog: Boolean(state['features/base/dialog'].component), |
|
|
|
|
_feedbackConfigured: Boolean(callStatsID), |
|
|
|
|