GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Vikindor/twitch-toggle-video-quality: Userscript for browsers that toggles Twitch stream quality between the lowest available and a preferred resolution

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
media
media
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Twitch_-_Toggle_Video_Quality.js
Twitch_-_Toggle_Video_Quality.js
 
 

Repository files navigation

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.


💥 New: This userscript is also available as part of Twitch Enhancer, a browser extension for Chrome and Firefox that combines it with other Twitch quality-of-life improvements.
Learn more: Twitch Enhancer


✨ 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 icon button inside player controls.
    • Header -- purple "Quality" button in the channel header (next to "Subscribe").
  • Localized button label — automatically matches the Twitch interface language.
  • RTL-aware layout — spacing adapts correctly for right-to-left interface (Arabic).
  • 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

🚀 Installation

  1. Install Tampermonkey (or another userscript manager).
  2. Install the script from one of the mirrors:
    • GreasyFork
    • OpenUserJS
    • Or install directly from this repository.

🔧 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.

About

Userscript for browsers that toggles Twitch stream quality between the lowest available and a preferred resolution

Topics

greasyforkmedia-controlopenuserjsreactstreaming-videotampermonkeytwitchuserscript

Resources

Readme
GPL-3.0 license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.