Closed Bug 1738561 Opened 3 years ago Closed 3 years ago

video/audio continues playback from multiple same-tab elements

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 93
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: skyhook, Unassigned)

References

Details

(Keywords: perf)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0

https://lifehacker.com/35-movies-that-scarred-us-for-life-as-kids-according-t-1847964047/slides/2

  1. visit given page at first "slide"
  2. play video using element control
  3. during playback, navigate to another slide using "Next" button
  4. play alternative video
  5. repeat
  • performs similarly in reverse or random slide selection, and no obvious limit to the number of playbacks; I had five going before I stopped testing

While intermittent, the effect is also found on youtube channel pages that autoplay a featured video. If you select a youtube menu item that reorders the channel's video elements, you can play another video that flushes and redraws the tab but continues presenting autoplay audio. I haven't found this case repeatable but it's annoying because the autoplay cant be disabled so only an anecdote of support, but notable because both cases utilize a single tab.

Actual results:

Audio and video continue playing concurrently for every video enabled. Returning to previously-enabled slide videos shows they have continued video as well, just not visible beyond one slide at a time.

Expected results:

Every video but the currently viewed should stop without using video controls, similar to closing tabs while I would expect still-open tabs to continue playback. This has been happening for a couple of versions but I'm here because:

  • I finally found the link above that is repeatable
  • there are many similar bug reports, some very old, many abandoned, none I found with a current example
  • my current FF install is stable and application relaunch doesn't affect the issue at this link

Workaround is tab reload, then all playback but the foremost will be abandoned, while foremost playback is also stopped as expected.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

I observe the same behavior in Chrome and Safari as well. I don't think there's any prohibition against multiple videos playing at once (and my guess is this is issue with the way the slideshow is implemented as a logically single page by selectively hiding elements). Is there a standard somewhere that indicates it should behave otherwise? Otherwise, I think we'll have to close this issue as invalid, though I think it would be a good one to take up with the site.

Flags: needinfo?(skyhook)

(In reply to Jon Bauman [:jbauman:] from comment #2)

Is there a standard somewhere that indicates it should behave otherwise?
I also see the same in Chrome. Simply, it's annoying.

More concerning is that it happens in other forms; I would expect a popup or picture-in-picture to continue, but not if the video has been abandoned. My looser youtube example continues playing the entire length of the audio unless I reload the tab, with nothing on screen at all, sometimes not even starting until after the desired video has begun. I wondered if it might have something to do with abandoning only a pop-up playback when I found it repeatable in the slide show. In that regard, I assume similar code is running between the pop-ups and the single-tab slides.

Do or do not is the standards conversation I've read in several bugs, and the conclusion seemed to be that it shouldn't happen but with no obvious action following. Maybe it isn't crashworthy therefore will never be picked up as a project. My lay executive summary, while not necessarily correct, is that unseen should mean not heard or consuming CPU. For all I know this is already being worked on but I can't parse so many linked reports, so I'm hoping the right person will find this and confirm if a decision has been made, acted on or not.

Flags: needinfo?(skyhook)

(In reply to Optional from comment #3)

(In reply to Jon Bauman [:jbauman:] from comment #2)

Is there a standard somewhere that indicates it should behave otherwise?

Also, note that the youtube example has no affordance to go back and turn it off. The slide show was unique because I can jump around and continue to manipulate video controls for any video still playing. Nifty put pointless.

This really is a bug in the mentioned websites and should be reported to the websites as such.

It is a feature and not a bug that multiple media element can play concurrently on a page on a desktop browser, and it is very easy for authors to detect when that happens to implement a user experience that is expected, like the various scenarios that you describe.

I'll note that most other website implement this correctly.

There are browsers, on mobile, that prevent concurrent playback, in line with the platform guidelines of (e.g.) the Android OS for Firefox for Android. There, while you don't have the exact same layout (no slide per se, just multiple YouTube video embedded), you'll find that playing a video pauses all other media going on the phone (including, say, playing music on another app that isn't a web app).

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.