Originally forked from pixeltris/TwitchAdSolutions (archived).
This repo aims to provide multiple solutions for blocking Twitch ads.
Don't combine Twitch specific ad blockers.
Proxies are the most reliable way of avoiding ads (buffering / downtime info).
Alternatively:
Twitch Turbo- https://www.twitch.tv/turboAlternate Player for Twitch.tv- chrome / firefoxPurple AdBlock- chrome / firefox / userscript / codeAdGuard Extra- chrome / firefox / userscriptvaft- see belowTTV Ad Mute- firefox / code
Read this for a full list and descriptions.
Also see this list maintained by @zGato.
There are better / easier to use methods in the above recommendations.
- vaft - userscript / ublock / ublock (permalink)
- Attempts to get a clean stream as fast as it can
- If it fails to get a clean stream it removes ad segments (no playback until ad-free stream is found)
- video-swap-new - userscript / ublock / ublock (permalink)
- Attempts to get a clean stream
- If it fails to get a clean stream it removes ad segments (no playback until ad-free stream is found)
- Not recommended,
vaftis a better script
- Navigate to the uBlock Origin Dashboard (the extension options)
- Under the
My filterstab addtwitch.tv##+js(twitch-videoad). - Under the
Settingstab, enableI am an advanced user, then click the cog that appears. Modify the value ofuserResourcesLocationfromunsetto the full url of the solution you wish to use (if a url is already in use, add a space after the existing url). e.g.userResourcesLocation https://raw.githubusercontent.com/ryanbr/TwitchAdSolutions/master/vaft/vaft-ublock-origin.js - To ensure uBlock Origin loads the script I recommend that you disable/enable the uBlock Origin extension (or restart your browser).
To stop using a script remove the filter and make the url unset.
For the sake of security it's recommended to use a permalink when using uBlock Origin (permalinks do not auto update).
The scripts may randomly stop being applied by uBlock Origin for unknown reasons (#200). It's recommended to use the userscript versions instead.
Viewing one of the userscript files should prompt the given script to be added when you have a userscript manager installed.
Userscript managers:
- https://violentmonkey.github.io/
- https://www.tampermonkey.net/
- https://apps.apple.com/us/app/userscripts/id1463298887
Greasemonkey doesn't work with the scripts.
The scripts support runtime configuration via localStorage. Set values in the browser console and refresh the page.
twitchAdSolutions_reloadPlayerAfterAd (default: true)
true- full player reload after ads (slower, more reliable)false- pause/play after ads (faster, less reliable)- Not set - uses default (
true)
twitchAdSolutions_playerType (default: popout)
- Changes the player type used for access token requests
popout- popout player context, tends to receive fewer ads (default)embed- embedded player context, used for third-party sitessite- normal site player, standard Twitch experience (most ads)autoplay- autoplay context, lower quality (360p)- Not set - uses default (
popout)
twitchAdSolutions_hideAdOverlay (default: not set)
true- hide the "Blocking ads" banner overlay on the video player- Not set - banner is visible during ad blocking (default)
// Faster post-ad transition
localStorage.setItem('twitchAdSolutions_reloadPlayerAfterAd', 'false');
// Change player type
localStorage.setItem('twitchAdSolutions_playerType', 'embed');
// Hide ad blocking banner
localStorage.setItem('twitchAdSolutions_hideAdOverlay', 'true');
// Restore defaults
localStorage.removeItem('twitchAdSolutions_reloadPlayerAfterAd');
localStorage.removeItem('twitchAdSolutions_playerType');
localStorage.removeItem('twitchAdSolutions_hideAdOverlay');If the script doesn't work or you're experiencing freezing / buffering issues see issues.md