diff --git a/assets/userscript.js b/assets/userscript.js index 1227c5d..c7d2246 100644 --- a/assets/userscript.js +++ b/assets/userscript.js @@ -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