WebScreenShareFixes: fix Discord bug causing high CPU usage (#4390)

This commit is contained in:
Dave 2026-08-27 09:45:23 -06:00 • committed by GitHub
parent bc680139be
commit be77396be8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ import definePlugin from "@utils/types";
export default definePlugin({
name: "WebScreenShareFixes",
authors: [Devs.Kaitlyn],
description: "Removes 2500kbps bitrate cap on chromium and vesktop clients.",
description: "Removes 2500kbps bitrate cap on chromium and vesktop clients and fixes CPU usage growing endlessly while screensharing.",
tags: ["Voice"],
enabledByDefault: true,
@ -27,6 +27,13 @@ export default definePlugin({
replace: '$&${$1?";stereo=1;sprop-stereo=1":""}'
},
]
},
{
find: "ApplicationStreamPreviewUploadManager",
replacement: {
match: /(\i)\.removeAttribute\("srcObject"\)/,
replace: "$1.pause(),$1.srcObject=null"
}
}
]
});