Merge pull request #6782 from SimonBrandner/fix/screensharing-dialog

Don't show screensharing dialog on web
This commit is contained in:
Travis Ralston
2021-09-14 13:36:35 -06:00
committed by GitHub
+7 -3
View File
@@ -277,9 +277,13 @@ export default class CallView extends React.Component<IProps, IState> {
if (this.state.screensharing) { if (this.state.screensharing) {
isScreensharing = await this.props.call.setScreensharingEnabled(false); isScreensharing = await this.props.call.setScreensharingEnabled(false);
} else { } else {
const { finished } = Modal.createDialog(DesktopCapturerSourcePicker); if (window.electron?.getDesktopCapturerSources) {
const [source] = await finished; const { finished } = Modal.createDialog(DesktopCapturerSourcePicker);
isScreensharing = await this.props.call.setScreensharingEnabled(true, source); const [source] = await finished;
isScreensharing = await this.props.call.setScreensharingEnabled(true, source);
} else {
isScreensharing = await this.props.call.setScreensharingEnabled(true);
}
} }
this.setState({ this.setState({