Why videos pause when you switch tabs, and how to stop it
On this page
A video pauses when you switch tabs for one of four reasons. The site itself pauses it because the browser told the page it is no longer visible or focused. The browser put the tab to sleep to save memory. The video was muted, and Chrome treats a silent background video differently. Or the browser slowed the tab's timers and frames so much that the player stalls.
Each cause has a different fix, so start by working out which one you have.
Find out which cause you have
Start the video, then try these in order:
- Switch to another tab for ten seconds and come back. If the video paused at the moment you left, and resumes or waits exactly where you left it, the site paused it on purpose. That is cause 1.
- Click into another app window, but keep the video tab visible on screen. If it pauses now too, the site is listening for focus loss, not just visibility. Still cause 1.
- Leave the tab in the background for a long time. If the tab reloads from scratch when you return, and the video starts from the beginning or the page shows a fresh load, the browser discarded it. That is cause 2.
- Check the player's volume. If the video is muted inside the player and it stalls or shows a frozen frame when you return, it is probably cause 3.
- The video keeps playing but the page around it (chat, progress, a timer) freezes or lags. That is usually cause 4.
The live tab-switch detection test also logs every signal a page receives when you leave.
Cause 1: the site pauses on visibilitychange or blur
This is the most common cause. Browsers give every page two ways to know you have looked away.
The Page Visibility API sets document.hidden to true and document.visibilityState to "hidden", and fires a visibilitychange event, when you switch tabs or minimize the window. MDN's own example for the API is a player that pauses when the page is hidden. Many real players do exactly that:
document.addEventListener("visibilitychange", () => {
if (document.hidden) video.pause();
});
The second signal is the window blur event, along with document.hasFocus() returning false. These fire when you click into a different window or app, even if the video is still in plain view. Course players and some short-video sites use this, which is why a video can pause the moment you click into a notes app beside it.
Some players also watch requestAnimationFrame. Browsers stop sending animation frames to hidden tabs, so a player that counts frames notices you left even without listening to the events above. We cover that in requestAnimationFrame in background tabs.
Fixes for cause 1
- Check the site's settings first. A few players have a keep-playing option.
- Use picture-in-picture. In Chrome, Edge and Brave, right-click the video. If the site shows its own menu, right-click again to get the browser's menu, then choose Picture in picture. The video floats above your other windows. Some players still pause in picture-in-picture because the tab is hidden underneath, so try it before relying on it.
- Put the video in its own window and keep part of it visible. Drag the tab out into a separate window. A window that is still partly on screen stays "visible", so
visibilitychangedoesn't fire. This doesn't help with sites that pause onblur, because clicking into another window still moves focus. - Use an extension that hides the signals. Focus Spoofer (which we make) is a free Chrome, Edge and Brave extension that does this on the tabs you choose. It keeps
document.hiddenfalse andvisibilityState"visible", blocksvisibilitychange,pagehideand window-levelblur, keepsdocument.hasFocus()true, and keepsrequestAnimationFrameandrequestVideoFrameCallbackfiring in hidden tabs. To the player, the tab never stopped being in front of you. It needs no account, and your browsing data never leaves the browser.
If you prefer a do-it-yourself route, how to disable the Page Visibility API covers uBlock Origin and userscript options and where they fall short.
Cause 2: the browser discards or sleeps the tab
Chrome's Memory Saver and Edge's sleeping tabs free memory by unloading tabs you haven't used for a while. Google's help page says Chrome "deactivates tabs that you aren't currently using" and reloads them when you come back (Chrome Help). The same page notes that active audio or video playback is one of the things that can prevent deactivation, so a tab that is actually playing sound is usually safe. A paused or muted video tab is not.
The sign of this cause is a reload. You come back and the page starts over.
Fixes for cause 2
- Chrome: go to Settings > Performance, and next to Always keep these sites active click Add to exclude the video site. You can also turn Memory Saver off or pick the Moderate level. Details in Chrome Memory Saver: on or off.
- Edge: go to Settings > System and performance and add the site under Never put these sites to sleep (the label varies a little between Edge versions). See Edge sleeping tabs.
- Brave and others: the full list is in how to prevent a tab from sleeping.
An extension that changes what the page sees can't stop this. The browser makes the discard decision on its own, so Focus Spoofer doesn't prevent Memory Saver or sleeping tabs from unloading a tab. Use the exclusion lists above.
Cause 3: the video is muted
People regularly report that Chrome pauses muted video in a background tab, or stops drawing its frames so it shows a frozen picture when they return. A video with sound counts as audible playback, which browsers treat as something you are actively using. A silent one looks like a background animation that is safe to stop.
Fix for cause 3
Unmute the video in the player, then mute the tab instead. Right-click the tab and choose Mute site. The page still sees an audible video, but you hear nothing. If you want silence while it plays, this is the setup that works most often. The same trick helps with streams; see Twitch pauses when you switch tabs.
Cause 4: background throttling
Chrome slows hidden tabs on purpose. Timers in a background tab are checked about once a second, and after a page has been hidden and silent for five minutes, chained timers can drop to about once a minute (Chrome for Developers). Animation frames stop entirely in hidden tabs.
The video element itself usually keeps decoding, but everything the site built around it in JavaScript can lag: progress tracking, chat, a "next video" countdown, or a player that drives playback through its own timer loop. Energy Saver on a laptop running on battery also stops some CPU-heavy background tabs, though Google says tabs playing audio are not affected.
Fixes for cause 4
- Keep the tab audible (unmuted in the player, muted at the tab if needed). Pages that have made sound recently are exempt from the heavier timer throttling.
- Turn Energy Saver off under Settings > Performance if you are on battery and see the problem only then.
- If the site depends on animation frames, Focus Spoofer keeps
requestAnimationFrameandrequestVideoFrameCallbackfiring in hidden tabs. It does not lift Chrome's timer throttling.
Background tab throttling in Chrome explains the rules and which old flags no longer do anything.
Site by site
The same causes show up differently on each platform:
- Twitch pauses when you switch tabs: fixes for Chrome, Brave, muted streams and alt-tab.
- YouTube stops playing when you switch tabs: the desktop causes and fixes.
- TikTok pauses when you switch tabs: keeping the desktop site playing.
- Udemy, Coursera or LinkedIn Learning pauses: what to do when you take notes in another window.
- Audio stops when you switch tabs: music, podcasts and audio-only players.
- Keep a video playing while you work: picture-in-picture, a second window and extensions compared.
FAQ
Why does my video pause when I switch tabs but not when I switch windows?
The site listens for visibilitychange, which fires when the tab is hidden, but not for window blur. Switching windows while the video stays visible on screen doesn't change visibility, so the player keeps going.
Is there a Chrome setting to stop videos pausing in background tabs?
No. Chrome has settings for Memory Saver and Energy Saver, which control discards and some background work, but no setting stops a site from pausing its own player when it sees the tab is hidden. That takes picture-in-picture, a visible second window or an extension.
Will an extension stop "are you still watching?" prompts?
No. Focus Spoofer only changes what a page learns about visibility and focus, and those prompts can be triggered by other things, such as how long you have gone without interacting with the page.
Does Focus Spoofer work on my phone?
No. It is a desktop extension for Chrome, Edge and Brave. It doesn't run on mobile browsers, Firefox or Safari.
How do I check what a site sees when I leave?
Open the tab-switch detection test, switch away for a few seconds and come back. It shows each event the page received. Run it again with Focus Spoofer turned on for that tab and the log stays empty.