From 0defc4b14bf9108d482e570da275fc55c4b71201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 11 Sep 2021 09:03:04 +0200 Subject: [PATCH] Don't show screensharing dialog on web MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallView.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index cec67499ae..17fda93921 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -277,9 +277,13 @@ export default class CallView extends React.Component { if (this.state.screensharing) { isScreensharing = await this.props.call.setScreensharingEnabled(false); } else { - const { finished } = Modal.createDialog(DesktopCapturerSourcePicker); - const [source] = await finished; - isScreensharing = await this.props.call.setScreensharingEnabled(true, source); + if (window.electron?.getDesktopCapturerSources) { + const { finished } = Modal.createDialog(DesktopCapturerSourcePicker); + const [source] = await finished; + isScreensharing = await this.props.call.setScreensharingEnabled(true, source); + } else { + isScreensharing = await this.props.call.setScreensharingEnabled(true); + } } this.setState({