display correct steam resolution

This commit is contained in:
Malte Jürgens 2022-09-21 17:32:41 +02:00
parent 758ffa8cb5
commit c4f6c33f9d
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3

View file

@ -112,6 +112,7 @@ setInterval(() => {
const initialDisplay = el.style.display;
window.discordScreenaudioStartStream = (width, height, frameRate) => {
window.discordScreenaudioResolutionString = `${height}p ${frameRate}FPS`;
setGetDisplayMedia({
audio: true,
video: { width, height, frameRate },
@ -147,6 +148,14 @@ setInterval(() => {
// Remove stream settings if stream is active
document.getElementById("manage-streams-change-windows")?.remove();
document.querySelector(`[aria-label="Stream Settings"]`)?.remove();
if (window.discordScreenaudioResolutionString) {
for (const el of document.getElementsByClassName(
"qualityIndicator-39wQDy"
)) {
el.innerHTML = window.discordScreenaudioResolutionString;
}
}
}, 500);
// Fix for broken discord notifications after restart