oddworks blog

YouTube stops playing when you switch tabs? Desktop fixes

On this page
  1. First, check what "stopped" means
  2. Fix 1: Unmute the player and mute the tab instead
  3. Fix 2: Stop the browser from putting the tab to sleep
  4. Fix 3: Check your extensions
  5. Fix 4: Firefox holds background tabs until you open them
  6. Fix 5: Headphones, media keys and a second player
  7. Fix 6: Picture-in-picture or a second window
  8. When the page itself reacts to the switch
  9. FAQ

On a desktop browser, YouTube is built to keep playing when you switch tabs, so if it stops, something else is pausing it. The usual causes are a muted player (Chromium browsers are reported to pause muted video in background tabs), a memory feature that put the tab to sleep, an extension that pauses media on tab switch, or the window being minimized while you came back to a frozen frame. Work through the checks below in order.

This post is about Chrome, Edge, Brave, Firefox and Safari on a computer. On phones, playing YouTube in the background is a YouTube Premium feature, and nothing here changes that.

First, check what "stopped" means

There are three different symptoms, and they have different causes:

  • The sound stops and the video is paused when you come back. Something paused the player. Start with Fix 1.
  • The tab reloads when you click it, and the video starts from the beginning or from the saved position. The browser discarded the tab. Go to Fix 2.
  • The sound kept going, but the picture is frozen or stutters for a moment when you return. That is normal. Browsers stop drawing video frames in hidden tabs to save power and catch up when you come back. Nothing was paused.

Fix 1: Unmute the player and mute the tab instead

If you keep a muted YouTube video running in the background (for example, watching with captions only), this is the most likely cause. People report that Chrome, and Chromium browsers such as Edge and Brave, pause or stop rendering muted video once its tab is in the background.

The workaround is to unmute the player and mute the tab:

  1. Click the volume icon in the YouTube player so it is no longer muted.
  2. Right-click the YouTube tab in the tab strip.
  3. Select Mute site.

You hear nothing, but the browser sees normal playback. To undo it, right-click the tab and choose Unmute site. Mute site applies to all youtube.com tabs.

Fix 2: Stop the browser from putting the tab to sleep

Chrome's Memory Saver and Edge's sleeping tabs deactivate tabs you haven't looked at in a while. According to Google's Chrome help, active audio or video playback normally keeps a tab from being deactivated, so this mostly happens when a video was paused, finished, or sitting on the autoplay countdown. The tell is that the page reloads when you click it.

Chrome:

  1. Go to Settings > Performance.
  2. Next to Always keep these sites active, click Add.
  3. Choose Add sites manually, enter youtube.com and click Add.

Or turn Memory Saver off on the same page. Our post on Chrome Memory Saver on or off covers when each makes sense.

Edge: open edge://settings/system, find Optimize Performance, and add youtube.com to Never put these sites to sleep, or turn off Save resources with sleeping tabs. Microsoft documents this under high CPU or memory usage in Edge.

Brave: Memory Saver is under Settings > System. Brave's own help page on Memory and Energy Saver has the exception format.

For every browser in one place, including Firefox, see how to prevent a tab from sleeping.

Fix 3: Check your extensions

Some extensions pause YouTube on purpose. Productivity and "auto pause" extensions often stop a video whenever you leave its tab, and some YouTube enhancers have a "pause when tab is hidden" option buried in their settings.

To check quickly, open a private window (extensions are usually disabled there unless you allowed them), play a video, and switch tabs. If it keeps playing, one of your extensions is the cause. Turn them off one at a time at chrome://extensions (or edge://extensions, brave://extensions) until you find it.

Fix 4: Firefox holds background tabs until you open them

If the issue is that a YouTube video you opened in a background tab doesn't start until you click on it, that is Firefox's autoplay handling rather than a pause. Firefox has an about:config preference, media.block-autoplay-until-in-foreground, that holds media in a background tab until you select it. Setting it to false lets the video start right away. Mozilla's page on allowing or blocking autoplay covers the normal per-site autoplay setting, which is also worth checking.

Fix 5: Headphones, media keys and a second player

A few things outside the tab can pause YouTube and look like a tab-switch problem:

  • Bluetooth headphones disconnecting or switching to another device can pause playback.
  • Media keys on your keyboard or headset control whichever tab Chrome considers the active media session, which may not be the one you're looking at.
  • Starting another video in a different tab or app can take over the media controls.

Click the Media control icon at the top right of Chrome to see which tabs are playing and resume the right one.

Fix 6: Picture-in-picture or a second window

If you want to keep seeing the video, not just hear it, use picture-in-picture. In Chrome, click the Media control icon and select Enter picture-in-picture, as shown in Google's media controls help. YouTube also has its own miniplayer button in the player controls, but that only stays visible while you browse inside YouTube.

A second browser window works too. Drag the YouTube tab out into its own window and keep it on screen. A minimized window counts as hidden, and on Windows a window that another app covers completely can be reported as hidden too. Keep a video playing while you work compares the options.

When the page itself reacts to the switch

YouTube's own site keeps playing in the background. But YouTube videos embedded on other sites, such as course platforms, company training pages or news sites, are often wrapped in code from the host site that pauses the video when you leave. These pages use the Page Visibility API (document.hidden and the visibilitychange event) or the window blur event to notice that you switched away.

No browser setting turns that off. Focus Spoofer (which we make) is a free extension for Chrome, Edge and Brave that changes what the page sees on the tabs you choose. It keeps document.hidden false and visibilityState "visible", blocks visibilitychange, pagehide and window-level blur and mouseleave, keeps document.hasFocus() true, and keeps requestAnimationFrame and requestVideoFrameCallback firing in hidden tabs. It needs no account, and browsing data never leaves your browser.

To use it, install it from the Chrome Web Store, open the page, click the icon and turn the switch on. Tick Always protect this site to keep it on for that site.

It won't help with the earlier causes. It can't stop Memory Saver or sleeping tabs from discarding a tab, it doesn't replace the unmute-and-mute-site workaround, it doesn't stop YouTube's "Video paused. Continue watching?" prompt, and it doesn't run on phones or in Firefox or Safari.

To see what a page can detect when you leave, open the tab-switch detection test, switch away for a few seconds and come back.

FAQ

Does YouTube pause when you switch tabs on purpose?

Not on desktop. YouTube keeps playing in a background tab, so a pause usually comes from a muted player, a sleeping tab, an extension, or a disconnected audio device.

Why does my muted YouTube video stop in a background tab?

People report that Chromium browsers pause or stop rendering muted video in background tabs. Unmute the player and mute the tab with right-click > Mute site instead.

Why is the video frozen for a second when I go back to the tab?

Browsers stop drawing video frames in hidden tabs while audio keeps playing. When you return, the player catches up, which can look like a brief freeze.

Can Focus Spoofer stop the "Continue watching?" prompt?

No. It only changes what a page learns about visibility, focus and frame timing, and we don't claim it affects that prompt. Clicking the prompt is still the way to dismiss it.

More on the general problem: why videos pause when you switch tabs.

Keep reading

Start with the overview: Why videos pause when you switch tabs, and how to stop it