Open Bug 1642218 Opened 3 years ago Updated 4 months ago

PiP volume icon does not reflect tab mute

Categories

(Toolkit :: Picture-in-Picture, enhancement, P3)

enhancement
Points:
3

Tracking

()

People

(Reporter: freaktechnik, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-MR1-2022])

Attachments

(1 file)

STR:

  • Mute tab
  • Start PiP
  • Hover over PiP to check audio volume

Expected result:
The PiP player shows that the video is muted, since the tab is muted.

Actual result:
The PiP player shows that the video audio should be audible, however due to the origin tab being muted it can no be heard.

Component: Video/Audio Controls → Picture-in-Picture
Version: unspecified → Trunk

The Proton re-theme that shipped earlier in this year no longer shows a Picture-in-Picture icon in the tab. Instead, a "Picture-in-Picture" string appears beneath the tab title. The mute button for the tab appears upon hovering a tab, regardless of whether or not it's PiP'ing a video.

So closing this one out as INVALID now.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID

This was about the mute control offered in the PiP player, not the icon on the tab.

Ah, I apologize!

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---

Setting a low severity. This is unfortunately a "layers of mute" problem, but for now, the PiP player mute button is only enabled in Nightly, so shouldn't affect the larger release population.

Severity: -- → S4
Priority: -- → P3

Let's please estimate this since it's likely we'll be working on volume controls

Whiteboard: [fidefe-MR1-2022]

I suspect we can check the soundplaying attribute on the PiP tab when the window is opened.

Hm. I wonder then if the PiP mute toggle should actually then just be a proxy for the tab's mute state.

(In reply to Mike Conley (:mconley) (:⚙️) from comment #7)

Hm. I wonder then if the PiP mute toggle should actually then just be a proxy for the tab's mute state.

Meaning that muting PiP also mutes the tab?

I think that'd be a great and expected behavior (albeit, a nice-to-have one).

I realized that even if the tab is muted it doesn't necessarily mean the source video's UI controls will reflect that, and I think it would show an inconsistency for PiP's mute button's state if the tab were muted but the source video is not. You can see this when muting a tab on YouTube.

Perhaps this is also related to :mconley's "layers of mute" problem he mentioned in comment 4.

Assignee: nobody → rhopkinsdev
Status: REOPENED → ASSIGNED

Hi Ania, Rashelle and I had a bit of discussion around when the PiP mute button should reflect the tab's muted state. The patch in comment 10 does the following:

  • The tab's muted state controls the state of PiP's mute/unmute button. For example: if the tab is already muted when PiP is opened, then the PiP button will also show as muted (regardless of what the state of the originating video's mute/unmute button is).
  • Muting the tab while PiP is opened will change the state of the mute/unmute button in the PiP window.
  • Umuting/muting from the PiP window does not change the muted state of the originating tab.

Does this sound alright?

Flags: needinfo?(amininkova)

Micah, Rashelle, thank you very much for collaborating on this.

I think all three behaviors make perfect sense.

Just to reiterate our earlier discussion, we are settling for:

  • Umuting/muting from the PiP window does not change the muted state of the originating tab

since we might not be able to manipulate the tab video controls to reflect the muted state.
As a result, the tab can control its PiP window behavior, but the PiP window can't control the tab's behavior.
We should take this logic into account when making similar decisions in the future (this is mostly a note to self :)

Flags: needinfo?(amininkova)
Points: --- → 3
Pushed by mtigley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12ab8e6c1362
Make PiP reflect tab mute r=mtigley

Backed out changeset 12ab8e6c1362 (bug 1642218) for causing browser-chrome failures in browser_tabMuteAffectsPiP

Backout link: https://hg.mozilla.org/integration/autoland/rev/1561820d698d1c6a144248420fdeea6347980fcc

Push with failures

Failure log

INFO - Buffered messages finished
[task 2022-01-14T17:11:07.167Z] 17:11:07     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/pictureinpicture/tests/browser_tabMuteAffectsPiP.js | Uncaught exception - undefined - timed out after 50 tries.
[task 2022-01-14T17:11:07.167Z] 17:11:07     INFO - Leaving test bound
Flags: needinfo?(rhopkinsdev)
Flags: needinfo?(rhopkinsdev) → needinfo?(mtigley)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:rhopkinsdev, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(rhopkinsdev)
Flags: needinfo?(mtigley)

There's a few issues with the existing patch that I'm still trying to debug.

Flags: needinfo?(rhopkinsdev)
Flags: needinfo?(mtigley)
No longer blocks: 1742457

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: rhopkinsdev → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.