Closed Bug 1378105 Opened 8 years ago Closed 5 months ago

Media is not blocked for previously unfocused closed tabs after restoring them from the History menu

Categories

(Firefox :: Session Restore, defect, P3)

56 Branch
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox56 --- affected
firefox68 --- affected
firefox102 --- affected

People

(Reporter: emilghitta, Unassigned)

References

Details

Attachments

(1 file)

[Affected versions]: Firefox 56.0a1 (Build Id:20170703030203) [Affected platforms]: Windows 10 64bit Mac 10.11.6 Ubuntu 16.04 64bit [Steps to reproduce]: 1. Launch Firefox with a clean profile 2. Access the https://www.youtube.com/ webpage. 3. Open 2 random videos in new tabs without focusing them. 4. Close the previously 2 opened tabs without focusing them. 5. Restore the previously 2 closed tabs via History->Recently Closed tabs. [Expected result]: The first closed tab is focused and the media is played back. The second tab has the media blocked. [Actual result]: The second tab has the media unblocked as well. [Regression range]: I don't think that this is a regression but I will look into this if time permits. [Additional Information] Observe the attached video for more information regarding this issue.
Hi Alastor! Can you please have look ? Thanks !
Flags: needinfo?(alwu)
Will take a look later, thanks!
Assignee: nobody → alwu
The page should be invisible after restore, but it seem the last tab would get the wrong visible status. Media is resumed from [1], it should only be called when the tab goes to foreground. But we got this after restore, even the tab is on the background. Therefore, I think there might be something wrong during the session restore. [1] http://searchfox.org/mozilla-central/rev/e5b13e6224dbe3182050cf442608c4cb6a8c5c55/dom/base/nsDocument.cpp#12371
Assignee: alwu → nobody
Component: Audio/Video: Playback → Session Restore
Flags: needinfo?(alwu)
Product: Core → Firefox
Alastar, what you're saying in comment 3 means that this is something you'll own, right?
Blocks: 1274919
Flags: needinfo?(alwu)
I could work on it, but I need some help from session restore team, because I have no idea why the visibility of second tab was wrong via "Recently Closed tabs". Thanks!
Flags: needinfo?(alwu) → needinfo?(mdeboer)
Alastor, I can help with this (the Sessionstore team is just me), but since time is quite limited on my end I can help mostly with issues/ explain how things work when you're stuck. I hope you don't mind...
Flags: needinfo?(mdeboer)
This is fixed now. We're not playing media in background tabs that are restored.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0 Build ID: 20180718220144 I can reproduce this issue on Windows 10 x64 on the latest Nightly 63.0a1(2018-07-18) using the STR from the description. Chris, should we reopen this bug or log a new one? Thanks
Flags: needinfo?(cpearce)
Thanks, we should re-open. I don't think this needs to block shipping block-autoplay v2, but we should fix it.
Status: RESOLVED → REOPENED
Flags: needinfo?(cpearce)
Resolution: WORKSFORME → ---

Reproduced on latest Nightly 68.0a1 (2019-03-31) (64-bit) on Ubuntu 16.04 x64

Hi, This issue no longer occurs since all media with sound is Blocked by Default, This issue can be reproduced only with Block Autoplay preference off.

When testing this issue make sure the media.autoplay.default = 0

Chris can you confirm this scenario ?

Thanks.

Flags: needinfo?(cpearce)

What I see in Nightly is that every tab restored is foregrounded. Even with autoplay blocking disabled, we delay starting playback until the tab has been foregrounded. So if autoplay blocking is disabled, all restored YouTube tabs start playing immediately. So we can't avoid playback starting when restoring as long as we have the behaviour of restored tabs being foregrounded.

Basically, the issue as filed doesn't exist anymore, since I don't think it's possible to re-open tabs without foregrounding them.

Flags: needinfo?(cpearce)

Just reproduced in Beta v102.0b4 on Window 7 using steps:

  1. Open: https://www.youtube.com/ and open two random videos in new tabs, without focusing them.
  2. Open another (blank) tab and close the tabs with the videos.
  3. Restore the tabs with the videos via History → Recently Closed Tabs -> All tabs.
    Result: 2nd tab had its media unblocked as well
Severity: normal → S3

I can no longer reproduce this issue with latest Nightly 132.0a1 under macOS 14. I've also checked the STR from Daniel's comment, but I could not reproduce the issue with Win 7 x64 on Esr 115.15.0. I'm going to close this as WFM.

Status: REOPENED → RESOLVED
Closed: 7 years ago5 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: