Open Bug 1446862 Opened 7 years ago Updated 3 years ago

Treat restored session tabs as background tabs so that they are not affected by autoplay when you start-up Firefox.

Categories

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

59 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: luyuching99, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180315233128 Steps to reproduce: Have one or more video tabs in your previous Firefox session. Exit/kill Firefox and restart it with Firefox set to "Show you windows and tabs from last time." Actual results: All of the videos will start playing if browser.sessionstore.restore_on_demand is true, regardless of what media.block-autplay-until-in-foreground is set to. Expected results: Videos should not start playing all at once until you select them, unless browser.sessionstore.restore_on_demand is set to false.
Given that the corresponding setting on Android isn't called exactly "Show you windows and tabs from last time." (Android doesn't have any windows) and that browser.sessionstore.restore_on_demand isn't used there (we always restore only on demand), I assume you meant to file this bug for desktop Firefox? In any case I can't reproduce this with the current Nightly on Windows. With browser.sessionstore.restore_on_demand set to true any background tabs aren't even loaded and therefore can't play any media, either and with browser.sessionstore.restore_on_demand set to false they're loaded, but playback is blocked until you select a tab. In case it matters, I tested by directly opening some media files in tabs, *not* with pages with <audio>/<video> elements.
Product: Firefox for Android → Firefox
Version: Firefox 59 → 59 Branch
Component: Session Restore → Audio/Video: Playback
Product: Firefox → Core
Someone should test this with simple <video> elements, and with fancy sites like Youtube.
Priority: -- → P3
(In reply to Jan Henning [:JanH] from comment #1) > Given that the corresponding setting on Android isn't called exactly "Show > you windows and tabs from last time." (Android doesn't have any windows) and > that browser.sessionstore.restore_on_demand isn't used there (we always > restore only on demand), I assume you meant to file this bug for desktop > Firefox? > > In any case I can't reproduce this with the current Nightly on Windows. With > browser.sessionstore.restore_on_demand set to true any background tabs > aren't even loaded and therefore can't play any media, either and with > browser.sessionstore.restore_on_demand set to false they're loaded, but > playback is blocked until you select a tab. > In case it matters, I tested by directly opening some media files in tabs, > *not* with pages with <audio>/<video> elements. (In reply to Maire Reavy [:mreavy] Plz needinfo? from comment #2) > Someone should test this with simple <video> elements, and with fancy sites > like Youtube. Wow. It's been so long that I almost forgot about this bug. Sorry for the late reply, but yeah, I'm talking specifically about the desktop version of Firefox. It's for pretty much any video site like YouTube that supports autoplay. Just open a YouTube tab, close Firefox and have Firefox restore the session on start-up; even if you didn't specifically bring the tab up into the foreground, it will still automatically start playing the video. So I was thinking if session restore could treat the tab as a background tab, since those will not play even with autoplay enabled unless you bring them to the foreground.
Nevermind, the bug seems to be fixed. Doesn't happen anymore after migrating over to the latest Nightly.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.