diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx index 9842afe..4531943 100644 --- a/src/renderer/components/ScreenSharePicker.tsx +++ b/src/renderer/components/ScreenSharePicker.tsx @@ -20,6 +20,7 @@ import { useState } from "@vencord/types/webpack/common"; import type { Dispatch, SetStateAction } from "react"; +import { patchAudioWithDevice } from "renderer/patches/screenShareAudio"; import { addPatch } from "renderer/patches/shared"; import { isLinux, isWindows } from "renderer/utils"; @@ -37,6 +38,7 @@ interface StreamSettings { audio: boolean; audioSource?: string; workaround?: boolean; + audioDevice?: string; } export interface StreamPick extends StreamSettings { @@ -113,6 +115,9 @@ export function openScreenSharePicker(screens: Source[], skipPicker: boolean) { await VesktopNative.virtmic.start([v.audioSource], v.workaround); } } + + patchAudioWithDevice(v.audioDevice); + resolve(v); }} close={() => { @@ -215,6 +220,11 @@ function StreamSettings({ + setSettings(s => ({ ...s, audioDevice: source }))} + /> + {isWindows && ( + navigator.mediaDevices + .enumerateDevices() + .then(devices => devices.filter(device => device.kind === "audioinput")), + { fallbackValue: [] } + ); + + return ( +
+ Audio + {loading && Loading audio devices...} + + {sources.length > 0 && ( +