Closed Bug 1345947 Opened 8 years ago Closed 7 years ago

The blocked autoplay media icon appears for tabs that I've seen before

Categories

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

defect

Tracking

()

RESOLVED DUPLICATE of bug 1347791
Tracking Status
firefox53 --- disabled
firefox54 + disabled
firefox55 + fix-optional

People

(Reporter: mossop, Assigned: alwu)

References

Details

(Keywords: regression)

I keep seeing the blocked media icon on tabs that I've used before. This happens for irccloud and hangouts at least
One thing that might be going on here is tabs being marked as background-only after a restart that restores the session.
But it's not just that as I had the blocked icon show up for a slack tab that I had definitely visited just a few minutes before, no restart in between.
Flags: needinfo?(alwu)
Hi, Dave, Do you have reproduce steps? Thanks. -- This icon would be displayed for the background tab which prepares to being audible, but it only shows before the tab goes foreground first time. After restart or restore the session, all tabs would be regard as first time loading, so it's reasonable to show the icon.
Flags: needinfo?(alwu) → needinfo?(dtownsend)
(In reply to Alastor Wu [:alwu] from comment #3) > Hi, Dave, > Do you have reproduce steps? > Thanks. Unfortunately not, but multiple people have been reporting seeing this over IRC. > This icon would be displayed for the background tab which prepares to being > audible, but it only shows before the tab goes foreground first time. After > restart or restore the session, all tabs would be regard as first time > loading, so it's reasonable to show the icon. I disagree on that point but it's somewhat immaterial since I see this without a restart being necessary.
Flags: needinfo?(dtownsend)
I see this with google calendar daily. It's quite possible that session restore is related. Here are my STR: * Have gcal in a pinned tab * Restart the browser for updates * Wait for a scheduled event alert EXPECTED: The site sounds a chime to warn me about the upcoming event. I can see that perhaps it makes sense to pause this the first time. But after I've chosen to play this once, it should remember my choice forever (across restarts). ACTUAL: A play button shows up in the pinned tab. The chime plays when I click this button, but repeating the STR causes the same bug.
I'll investigate this issue later.
Assignee: nobody → alwu
(In reply to Benjamin Smedberg [:bsmedberg] from comment #5) > The site sounds a chime to warn me about the upcoming event. I can see that > perhaps it makes sense to pause this the first time. But after I've chosen > to play this once, it should remember my choice forever (across restarts). No, we didn't implement that point, the tab won't remember this behavior. It would be annoying if multiple tabs suddenly become audible after restarts.
[Tracking Requested - why for this release]: Regression in notifications from application-type tabs such as slack/calendar/mail apps. It would only be annoying if those tabs were autoplay videos. OTOH this is a serious regression for slack, calendars, mail apps with periodic audio notifications. I don't think this is the right tradeoff. Since this is scheduled to ride the 54 trains, I'm setting the relevant tracking flags. Who is the product manager for this feature?
Hi, Benjamin, Do you also get the situation mentioned in comment2? The play tab icon was show on the tab you've visited, instead of on the tab you've never visited before (in this session). Since the situation mention in comment5 isn't a bug, it's our feature. The play tab icon is used to notice user the tab was blocked but it was tried to produce some sound. If the website doesn't stop its sound, you can immediately hear the sound after pressing the play tab icon. But if the website stop its sound, there is nothing happen after pressing icon, but the website won't be blocked anymore. ex. short notification from calendar. Thanks!
Flags: needinfo?(benjamin)
Also ni Mark for checking the situation on comment5, how do you think about this situation? Chrome also do the same thing, it would also block auto media for all tabs after restart, but the difference is we show the extra icon in the tab.
Flags: needinfo?(mliang)
(In reply to Alastor Wu [:alwu] from comment #10) > Also ni Mark for checking the situation on comment5, how do you think about > this situation? > Chrome also do the same thing, it would also block auto media for all tabs > after restart, but the difference is we show the extra icon in the tab. I think if a user restores the last session after restart the browser, it kind of makes sense to remember the tabs that are already unblocked during the last session. But if a user restarts the browser and opens a gcalander in a new tab, that tab's media should still be blocked because it's a new tab. Does that make sense?
Flags: needinfo?(mliang)
No, I have not noticed comment 2. I am happy to file a separate bug about the feature being broken (apparently by design), if you want to keep this bug about comment #2. My issue is with the design of the feature itself; I believe that in general, once I tell the browser that I want google calendar to play sounds (or slack, or any other similar app) that it should keep doing that without my having to tell the browser that every time I load the site.
Flags: needinfo?(benjamin)
Tracking 54/55+ based on Comment 8.
I've filed bug1347791 for Benjamin's request, and this bug is used to track the issue mentioned in comment2.
I wonder about this code: https://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#12223 I bet irccloud and slack dynamically create audio elements to play stuff in which case mMediaContent would be empty and we'll never set mEverInForeground to true when visiting their tabs until after they've tried to play something.
Steps to reproduce: 1. Set firefox to restore tabs on startup. 2. Load IRCcloud 3. Restart Firefox 4. Activate the IRCcloud tab then activate a different tab. After this when I get pinged the background play button appears though it shouldn't.
(In reply to Dave Townsend [:mossop] from comment #15) > I wonder about this code: > https://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#12223 > > I bet irccloud and slack dynamically create audio elements to play stuff in > which case mMediaContent would be empty and we'll never set > mEverInForeground to true when visiting their tabs until after they've tried > to play something. Yes, this code has some problem, and I'll solve it in bug1347758. After fixing that bug, the icon would disappear after the tab becomes foreground.
After investigating, this issue can be solved by bug1347758. The icon would disappear after the tab becomes foreground.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
I'm reopening this because it still isn't fixed, I just got the blocked media icon for the facebook tab that I had previously visited.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(In reply to Dave Townsend [:mossop] from comment #19) > I'm reopening this because it still isn't fixed, I just got the blocked > media icon for the facebook tab that I had previously visited. Do you have reproduce steps? What's happen on you facebook tab when the icon appear? And does it disappear after you visited the tab? Thanks!
Flags: needinfo?(dtownsend)
Here's what I just did: 1. Open a tab and load facebook.com 2. Send someone a message on messenger 3. Switch to a different tab After this they responded and I see the play icon in the tab. Switching to the tab made the icon go away.
Flags: needinfo?(dtownsend)
(In reply to Dave Townsend [:mossop] from comment #21) > Here's what I just did: > > 1. Open a tab and load facebook.com > 2. Send someone a message on messenger > 3. Switch to a different tab > > > After this they responded and I see the play icon in the tab. Switching to > the tab made the icon go away. OK, thanks! I'll investigate what's happened.
I think the problem might be solved after landing bug1347791. But now I won't set this bug as duplicated, and I'll keep it open until we can ensure this issue is solved.
Hi Alastor, We disabled block autoplay in 54, will this issue still happen in 54?
Flags: needinfo?(alwu)
No, we would enable the feature on 55 or above.
Flags: needinfo?(alwu)
It would be solved by bug1347791.
Status: REOPENED → RESOLVED
Closed: 8 years ago7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.