From 57fabafb162eaae99c5c64b879a21f3d2ad4357c Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 23 Nov 2022 11:52:02 +0000 Subject: [PATCH 1/2] Fix screensharing in 1:1 calls Interface got changed in the group call branch and the modals don't have enough typing to catch it. Fixes https://github.com/vector-im/element-web/issues/23808 --- src/components/views/voip/LegacyCallView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/views/voip/LegacyCallView.tsx b/src/components/views/voip/LegacyCallView.tsx index 6d37d0339c6..cabc127ba50 100644 --- a/src/components/views/voip/LegacyCallView.tsx +++ b/src/components/views/voip/LegacyCallView.tsx @@ -297,7 +297,9 @@ export default class LegacyCallView extends React.Component { const [source] = await finished; if (!source) return; - isScreensharing = await this.props.call.setScreensharingEnabled(true, source); + isScreensharing = await this.props.call.setScreensharingEnabled(true, { + desktopCapturerSourceId: source, + }); } else { isScreensharing = await this.props.call.setScreensharingEnabled(true); } From 6c9a4563a72177ed51699e63c1755e2b5bf5e317 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Mon, 28 Nov 2022 16:45:16 -0500 Subject: [PATCH 2/2] Specify dialog return type --- src/components/views/voip/LegacyCallView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/voip/LegacyCallView.tsx b/src/components/views/voip/LegacyCallView.tsx index cabc127ba50..b956a271e0a 100644 --- a/src/components/views/voip/LegacyCallView.tsx +++ b/src/components/views/voip/LegacyCallView.tsx @@ -293,7 +293,7 @@ export default class LegacyCallView extends React.Component { isScreensharing = await this.props.call.setScreensharingEnabled(false); } else { if (PlatformPeg.get().supportsDesktopCapturer()) { - const { finished } = Modal.createDialog(DesktopCapturerSourcePicker); + const { finished } = Modal.createDialog<[string]>(DesktopCapturerSourcePicker); const [source] = await finished; if (!source) return;