diff options
author | 2024-05-03 12:56:16 +0100 | |
---|---|---|
committer | 2024-05-03 12:56:16 +0100 | |
commit | b5943d9327d47c208b77f193af880d85b6c6b32c (patch) | |
tree | 86c79d82ce8a9d5ac87b517257297257c6a37389 /src | |
parent | 6.7.4-nightly.2 [skip ci] (diff) | |
download | ferdium-app-b5943d9327d47c208b77f193af880d85b6c6b32c.tar.gz ferdium-app-b5943d9327d47c208b77f193af880d85b6c6b32c.tar.zst ferdium-app-b5943d9327d47c208b77f193af880d85b6c6b32c.zip |
fix: screenshare not working properly (#1736)
Diffstat (limited to 'src')
-rw-r--r-- | src/components/MediaSource.tsx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/MediaSource.tsx b/src/components/MediaSource.tsx index ceb7701b9..02e617800 100644 --- a/src/components/MediaSource.tsx +++ b/src/components/MediaSource.tsx | |||
@@ -19,10 +19,14 @@ export default function MediaSource(props: IProps) { | |||
19 | }); | 19 | }); |
20 | 20 | ||
21 | useEffect(() => { | 21 | useEffect(() => { |
22 | ipcRenderer | 22 | if (show) { |
23 | .invoke('get-desktop-capturer-sources') | 23 | ipcRenderer |
24 | .then(sources => setSources(sources)); | 24 | .invoke('get-desktop-capturer-sources') |
25 | }, []); | 25 | .then(sources => setSources(sources)); |
26 | } else { | ||
27 | setSources([]); | ||
28 | } | ||
29 | }, [show]); | ||
26 | 30 | ||
27 | if (sources.length === 0 || !show) { | 31 | if (sources.length === 0 || !show) { |
28 | return null; | 32 | return null; |