Twitch - Keep Tab Active

Prevents Twitch from auto-pausing or throttling video when the tab is inactive

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Vikindor
今日安裝
1
安裝總數
20
評價
0 0 0
版本
0.3.0
建立日期
2025-10-27
更新日期
2025-10-27
尺寸
4.9 KB
授權條款
MIT
腳本執行於

Twitch - Keep Tab Active

Userscript for browsers that prevents Twitch from auto-pausing/muting or throttling playback when the tab is inactive.
It fakes visibility/focus, guards programmatic pauses (only user-initiated pauses are allowed), keeps the player “in view” for observers, and sends light activity pings so streams keep playing.

Particularly useful for those who like to farm Twitch Drops or keep streams running in the background without interruptions.

✨ Features

  • Keeps Twitch streams playing in background tabs
  • Prevents auto-pause and auto-mute when switching tabs
  • Fakes visibility and focus so Twitch thinks the tab is active
  • Sends light activity signals to avoid idle timeouts

⚙ How it works (high-level)

  • Pretends the tab never goes background by spoofing visibility/focus APIs.
  • Blocks Twitch’s internal events that detect when you switch tabs.
  • Allows only real user gestures to pause playback — everything else is auto-resumed.
  • Keeps the player “visible” to page observers.
  • Periodically sends harmless activity signals to prevent idle triggers.
  • Tries to use navigator.wakeLock('screen') when supported.

⚠️ Notes & Limitations

  • This script is still in version 0.3, and while it works reliably for most cases, it may not yet cover all edge situations or browser variations. If you encounter a specific case where it doesn’t behave as expected — feel free to contact me and share the details.
  • Focuses purely on client-side behavior — it doesn’t bypass server-side throttling or ad systems.
  • May behave differently with extensions that modify Twitch’s player or tab activity.
  • Twitch frequently updates their SPA — if something breaks, please report it.