When playing some youtube video in a frame/embedded (from an external site, not directly on youtube.com), playing pauses when I switch to another tab (make the playing tab inactive).

Is there any way to turn this off? So that when I switch to some other tab, video will keep playing in it.

A good example is playing some track on https://www.shazam.com/myshazam

P.S This behavior is shared between various browsers - checked and replicated on Chrome & IE.

  • Tried turning off javascript? – Xen2050 Apr 28 '17 at 11:39
  • 5
    @Xen2050 Turning off JS globally?! How can you browse the web in 2017 with JS turned off?! That's definitely not an option. – diman82 May 4 '17 at 16:35
  • As a test at least, if it works then you can investigate further. Keeping javascript off at least with NoScript would be a lot safer too, but an infection & identity theft could be fun & exciting if you're into that sort of thing (I'm not) – Xen2050 May 5 '17 at 3:27

try to go in chrome://flags (in the address bar) and change pause-background-tabs to disabled. I think it is working for me.

|improve this answer|||||
  • 3
    This option doesn't seem to exist anymore. I set #disable-background-video-track and #stop-in-background to 'disabled' but the problem persists. – glaed Apr 25 '18 at 11:13
  • 1
    btw. my workaround is to use Firefox for non-stop Youtube playback. – glaed May 30 '18 at 8:18
  • Neither of those exist in 80.0.3987.149. Any update in 2020? – x0a Mar 30 at 19:12

On Google Chrome Version 71.x

Disable expensive-background-timer-throttling

|improve this answer|||||
  • 1
    Welcome to Super User. Please improve your post by explaining how this will solve the problem and provide a bit more detail on what to actually do. – I say Reinstate Monica Dec 20 '18 at 11:41
  • 1
    This flag worked for me. To clarify, it is a flag on the chrome://flags called expensive-background-timer-throttling and I set it to "disabled." – kendsnyder Jan 7 '19 at 18:17

You can disable it with this flag: chrome://flags/#enable-audio-focus-enforcement

|improve this answer|||||

If you happen to have a music enhancer (extention) in your browser it might also be affecting it. That was basically my case as it overwrites the flags.

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.