remember stream resolution & fps settings

This commit is contained in:
Vendicated
2025-02-06 04:51:20 +01:00
parent 9b0503f49d
commit b620e07445
4 changed files with 69 additions and 27 deletions

View File

@@ -6,6 +6,7 @@
import { Logger } from "@vencord/types/utils";
import { currentSettings } from "renderer/components/ScreenSharePicker";
import { State } from "renderer/settings";
import { isLinux } from "renderer/utils";
const logger = new Logger("VesktopStreamFixes");
@@ -27,8 +28,8 @@ if (isLinux) {
const stream = await original.call(this, opts);
const id = await getVirtmic();
const frameRate = Number(currentSettings?.fps);
const height = Number(currentSettings?.resolution);
const frameRate = Number(State.store.screenshareQuality?.frameRate ?? 30);
const height = Number(State.store.screenshareQuality?.resolution ?? 720);
const width = Math.round(height * (16 / 9));
const track = stream.getVideoTracks()[0];