From 03ae7c504565047e9031919f5b9254124691b902 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:10:25 +0800 Subject: [PATCH] fixes --- src/renderer/components/ScreenSharePicker.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx index a470d1fc4..86c85ed88 100644 --- a/src/renderer/components/ScreenSharePicker.tsx +++ b/src/renderer/components/ScreenSharePicker.tsx @@ -115,13 +115,8 @@ export function openScreenSharePicker(screens: Source[], skipPicker: boolean) { modalProps={props} submit={async v => { didSubmit = true; - if (v.audioSource && v.audioSource !== "None") { - patchDisplayMedia({ - audioId: v.audioDevice, - venmic: !!v.audioSource && v.audioSource !== "None", - videoId: v.cameraId - }); + if (v.audioSource && v.audioSource !== "None") { if (!v.audioDevice && v.audioSource && v.audioSource !== "None") { if (v.audioSource === "Entire System") { await VesktopNative.virtmic.startSystem(v.workaround); @@ -130,7 +125,11 @@ export function openScreenSharePicker(screens: Source[], skipPicker: boolean) { } } - patchAudioWithDevice(v.audioDevice); + patchDisplayMedia({ + audioId: v.audioDevice, + venmic: !!v.audioSource && v.audioSource !== "None", + videoId: v.cameraId + }); resolve(v); } @@ -328,7 +327,6 @@ function AudioSourceAnyDevice({ return (
Audio - {loading && Loading audio devices...} {sources.length > 0 && (