Picture in picture icon overlay overlaps mute tab
Categories
(Firefox :: Tabbed Browser, defect, P2)
Tracking
()
People
(Reporter: mail, Assigned: baumga91)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(3 files)
84.35 KB,
image/png
|
Details | |
4.81 KB,
image/png
|
Details | |
Bug 1612648 - Picture in Picture tab mute options moved to overlay on tab image icon. r?mconley,Gijs
47 bytes,
text/x-phabricator-request
|
Details | Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
Open a tab with a site that has a video that can be played using picture in picture.
Convert the video into a picture in picture overlay.
Note that the close button of the tab is preceded by the picture in picture icon.
Hover over the picture in picture icon on the tab (see screenshot)
Actual results:
The tooltip displays Mute tab
The icon displayed is not for muting tab but picture in picture icon
Clicking on the picture in picture icon mutes the tab
Expected results:
The icon on tab should be Mute icon.
The picture in picture icon on tab shouldn't overlap the Mute icon.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
regression-window |
- Bug 1528459 introduced the tab PIP icon replacing the audio icon
- At some point, it started working as a mute/unmute button as well
- Bug 1582391 will add a muted state for it
- Bug 1595788 proposes replacing the site icon with the audio indicator
I don't know why "yet another icon" on the tab is something to avoid at all costs. The current state is very awkward and so is the proposed solution.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Hey Niklas,
So something you may or may not be familiar with is the muting capability in Firefox tabs. To see this in action, check out this video: https://vimeo.com/415176232?ref=tw-share
And then play the video (it's a music video). A speaker icon should appear in the tab. If you click on that icon, all sound from the tab is muted. Click it again, and the sound comes back.
Now use the Picture-in-Picture toggle to PiP the video. Now the speaker icon has been replaced with the PiP icon. Clicking it still lets you mute the tab, but it's really not clear that this is what it does.
Now, pin the same tab. You can do that by right-clicking on the tab, and choosing "Pin Tab". The tab gets pinned to the left size of the tab strip, and shrinks to its minimal size. If you hover the tab now, notice how the speaker icon exists now - it's over top of the favicon for the page.
What we'd like to do is put the speaker toggle over top of the favicon if the user has a video in that tab in Picture-in-Picture. That way, they have obvious access to the mute toggle, and they know that the tab is PiP'ing something.
I'll attach a screenshot of what it should hopefully look like next.
Comment 4•4 years ago
|
||
Comment 5•4 years ago
|
||
So the good news is that there's actually not a lot of functionality to re-implement here in Javascript - the logic is already wired up for muting the tab. What we need to do is update the CSS that shows and hides the toggle.
This is the sort of bug where the Browser Toolbox inspector is going to come in really really handy, because you can inspect the tab element, and see the rules that are applied to them.
What we first probably want to do is make it so that the favicon mute tab can know whether we're in PiP. You can do that by adding "pictureinpicture" to this list in here: https://searchfox.org/mozilla-central/rev/5d45da52f2fa423c9f4505ede5d1a5c7d48163fc/browser/base/content/tabbrowser-tab.js#88-89
this way, the "pictureinpicture" tab attribute will be inherited by the .tab-icon-overlay child element (.tab-icon-overlay is the mute toggle over the favicon), which makes our CSS rule writing easier.
Next, you probably want to update this rule:
that applies the display: -moz-box
rule if the tab is showing something in PiP. By default, the .tab-icon-overlay
is display: none
unless the tab is pinned. We want to set it to display: -moz-box
if it has the pictureinpicture
attribute.
Hopefully that makes sense - do drop me a line in Matrix if you need assistance or clarification.
Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/98b96b7745a4 Picture in Picture tab mute options moved to overlay on tab image icon. r=mconley
Comment 8•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•