Twitch - Toggle Video Quality

Adds a customizable button to toggle stream quality (lowest <-> preferred) with optional auto-mute

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Autor
Vikindor
Installationen heute
1
Installationen gesamt
3
Bewertungen
0 0 0
Version
1.0.0
Erstellt am
14.02.2026
Letzte Aktualisierung
14.02.2026
Größe
7,54 KB
Lizenz
MIT
Wird angewandt auf

Twitch - Toggle Video Quality

Userscript that adds a configurable button to Twitch for quickly switching stream quality between the lowest available (with optional automatic muting) and a preferred resolution (e.g., 1080p).

Designed for users who want fast quality control without opening the player settings menu.

✨ Features

  • Toggle between lowest available quality and your preferred resolution.
  • Automatically falls back to the highest available resolution if the preferred one is not present.
  • Optional auto-mute when switching to lowest quality.
  • Optional persistent selection (quality and mute status survive page reload).
  • Two UI modes:
    • Minimal -- small Q button inside player controls.
    • Header -- purple "Quality" button in the channel header (next to "Subscribe").
  • Uses Twitch's internal player API (no UI clicking).
  • Fully client-side. No external dependencies.

🖼 Screenshots

Header button

Header button screenshot

Minimal button

Minimal button screenshot

🔧 Configuration

Inside the script:

const PREFERRED_HIGH = 1080;      // Preferred resolution (e.g., 1080). Falls back if unavailable.
const MUTE_ON_LOW = true;         // Automatically mute when switching to lowest quality.
const PERSIST_SELECTION = true;   // Persist quality + mute across page reload.
const VISUAL_MODE = 'header';     // 'minimal' or 'header'

⚙ How it works (High-Level)

  • Accesses Twitch's internal React player instance.
  • Uses native methods:
    • setQuality()
    • getQualities()
    • setMuted()
  • Selects lowest quality by bitrate.
  • Selects preferred resolution by matching height (e.g., 1080).
  • Synchronizes state with Twitch's own localStorage keys:
    • video-quality
    • video-muted
  • Restores mute state after player initialization.

No UI automation. No simulated clicks.