From e2dc9e75d162c54f20cf4a5d717d9688d125b482 Mon Sep 17 00:00:00 2001 From: kaitlynkitty <87152313+kaitlynkittyy@users.noreply.github.com> Date: Tue, 7 May 2024 21:17:42 -0400 Subject: [PATCH] new plugin WebScreenShareFixes: remove low stream bitrate limit (#2405) --- src/plugins/webScreenShareFixes.web/index.ts | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/plugins/webScreenShareFixes.web/index.ts diff --git a/src/plugins/webScreenShareFixes.web/index.ts b/src/plugins/webScreenShareFixes.web/index.ts new file mode 100644 index 000000000..8d1ab5821 --- /dev/null +++ b/src/plugins/webScreenShareFixes.web/index.ts @@ -0,0 +1,30 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "WebScreenShareFixes", + authors: [Devs.Kaitlyn], + description: "Removes 2500kbps bitrate cap on chromium and vesktop clients.", + enabledByDefault: true, + patches: [ + { + find: "x-google-max-bitrate", + replacement: [ + { + match: /"x-google-max-bitrate=".concat\(\i\)/, + replace: '"x-google-max-bitrate=".concat("80_000")' + }, + { + match: /;level-asymmetry-allowed=1/, + replace: ";b=AS:800000;level-asymmetry-allowed=1" + } + ] + } + ] +});