diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx index acdc593..ef0c942 100644 --- a/src/renderer/components/ScreenSharePicker.tsx +++ b/src/renderer/components/ScreenSharePicker.tsx @@ -23,11 +23,13 @@ import { Node } from "@vencord/venmic"; import type { Dispatch, SetStateAction } from "react"; import { addPatch } from "renderer/patches/shared"; import { useSettings } from "renderer/settings"; -import { isLinux, isWindows } from "renderer/utils"; +import { classNameFactory, isLinux, isWindows } from "renderer/utils"; const StreamResolutions = ["480", "720", "1080", "1440", "2160"] as const; const StreamFps = ["15", "30", "60"] as const; +const cl = classNameFactory("vcd-screen-picker-"); + const MediaEngineStore = findStoreLazy("MediaEngineStore"); export type StreamResolution = (typeof StreamResolutions)[number]; @@ -161,13 +163,21 @@ export function openScreenSharePicker(screens: Source[], skipPicker: boolean) { function ScreenPicker({ screens, chooseScreen }: { screens: Source[]; chooseScreen: (id: string) => void }) { return ( -
+
{screens.map(({ id, name, url }) => ( -
@@ -187,11 +197,13 @@ function AudioSettingsModal({ return ( - - Venmic Settings + + + Venmic Settings + - + (Settings.audio = { ...Settings.audio, workaround: v })} @@ -295,7 +307,7 @@ function AudioSettingsModal({ Device Selection - + @@ -304,6 +316,34 @@ function AudioSettingsModal({ ); } +function OptionRadio(props: { + options: Array | ReadonlyArray; + labels?: Array; + settingsKey: string; + settings: StreamSettings; + setSettings: Dispatch>; +}) { + const { options, setSettings, settings, settingsKey, labels } = props; + + return ( +
+ {(options as string[]).map((option, idx) => ( + + ))} +
+ ); +} + function StreamSettings({ source, settings, @@ -340,88 +380,47 @@ function StreamSettings({ return (
What you're streaming - - + + {source.name} Stream Settings - -
-
+ +
+
Resolution -
- {StreamResolutions.map(res => ( - - ))} -
+
-
+
Frame Rate -
- {StreamFps.map(fps => ( - - ))} -
+
-
-
+
+
Content Type
-
- - -
-
+ +

Choosing "Prefer Clarity" will result in a significantly lower framerate in exchange for a much sharper and clearer image. @@ -433,7 +432,7 @@ function StreamSettings({ value={settings.audio} onChange={checked => setSettings(s => ({ ...s, audio: checked }))} hideBorder - className="vcd-screen-picker-audio" + className={cl("audio")} > Stream With Audio @@ -639,7 +638,7 @@ function AudioSourcePickerLinux({ return ( <> -

+
{loading ? "Loading Sources..." : "Audio Sources"}