From 1dc1bc68dbab8e0cd193167a99ee9de7b149fdcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 26 Dec 2020 08:40:58 +0100 Subject: [PATCH] Clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/CallHandler.tsx | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 83af34c165..3958420329 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -482,22 +482,14 @@ export default class CallHandler { return; } - const selectDesktopCapturerSource = async ( - sources: Array, - ): Promise => { - console.log(DesktopCapturerSourcePicker); - const params = { - sources: sources, - }; - - const {finished} = Modal.createDialog(DesktopCapturerSourcePicker, params); - - const [source] = await finished; - console.log("Dialog closed with", source); - return source; - }; - - call.placeScreenSharingCall(remoteElement, localElement, selectDesktopCapturerSource); + call.placeScreenSharingCall( + remoteElement, + localElement, + async (sources: Array) : Promise => { + const {finished} = Modal.createDialog(DesktopCapturerSourcePicker, {sources}); + const [source] = await finished; + return source; + }); } else { console.error("Unknown conf call type: %s", type); }