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

RESOLVED DUPLICATE of bug 1347791

Status

()

P1
normal
RESOLVED DUPLICATE of bug 1347791
a year ago
a year ago

People

(Reporter: mossop, Assigned: alwu)

Tracking

({regression})

unspecified
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 disabled, firefox54+ disabled, firefox55+ fix-optional)

Details

(Reporter)

Description

a year ago
I keep seeing the blocked media icon on tabs that I've used before. This happens for irccloud and hangouts at least
(Reporter)

Comment 1

a year ago
One thing that might be going on here is tabs being marked as background-only after a restart that restores the session.
(Reporter)

Comment 2

a year ago
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)
(Assignee)

Comment 3

a year ago
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)
(Reporter)

Comment 4

a year ago
(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)

Comment 5

a year ago
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.
(Assignee)

Comment 6

a year ago
I'll investigate this issue later.
Assignee: nobody → alwu
(Assignee)

Comment 7

a year ago
(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.

Comment 8

a year ago
[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?
status-firefox53: --- → disabled
status-firefox54: --- → affected
status-firefox55: --- → affected
tracking-firefox54: --- → ?
tracking-firefox55: --- → ?
Keywords: regression
(Assignee)

Comment 9

a year ago
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)
(Assignee)

Comment 10

a year ago
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)

Comment 12

a year ago
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.
tracking-firefox54: ? → +
tracking-firefox55: ? → +
(Assignee)

Comment 14

a year ago
I've filed bug1347791 for Benjamin's request, and this bug is used to track the issue mentioned in comment2.
(Reporter)

Comment 15

a year ago
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.
(Reporter)

Comment 16

a year ago
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.
(Assignee)

Comment 17

a year ago
(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.
(Assignee)

Comment 18

a year ago
After investigating, this issue can be solved by bug1347758.
The icon would disappear after the tab becomes foreground.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1347758
(Reporter)

Comment 19

a year ago
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 → ---
(Assignee)

Comment 20

a year ago
(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!
(Assignee)

Updated

a year ago
Flags: needinfo?(dtownsend)
(Reporter)

Comment 21

a year ago
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)
(Assignee)

Comment 22

a year ago
(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.
(Assignee)

Comment 23

a year ago
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)
(Assignee)

Comment 25

a year ago
No, we would enable the feature on 55 or above.
status-firefox54: affected → disabled
Flags: needinfo?(alwu)
Priority: -- → P1
(Assignee)

Comment 26

a year ago
It would be solved by bug1347791.
Status: REOPENED → RESOLVED
Last Resolved: a year agoa year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1347791
status-firefox55: affected → fix-optional
You need to log in before you can comment on or make changes to this bug.