Automatic PiP does not trigger if the button is disabled
Categories
(Toolkit :: Picture-in-Picture, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox142 | --- | fixed |
People
(Reporter: aestheticrice, Assigned: jp, Mentored)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0
Steps to reproduce:
Enable PiP when switching tabs
media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled
= true
Disable PiP button in-video
media.videocontrols.picture-in-picture.video-toggle.enabled
= false
Restart browser
Actual results:
PiP no longer shows up when switching tabs. I can trigger PiP through the context menu, but it still does not switch automatically.
Expected results:
PiP window opens when switching tabs regardless of the button's visibility.
Comment 1•4 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Toolkit::Picture-in-Picture' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Thanks for the bug report. So I can confirm the issue, but looking at where we dispatch and listen for events to make auto-pip work, I'm not sure that we can easily ditch the dependency on the toggle.
Mike, am I understanding correctly that we're relying on the toggle to track a video's visibility state? Do you think there's anything we can do here to avoid it?
Comment 3•4 months ago
|
||
It looks like the toggle enabled pref is used to determine whether or not we register videos for consideration for PiP: https://searchfox.org/mozilla-central/rev/4c065f1df299065c305fb48b36cdae571a43d97c/toolkit/actors/PictureInPictureChild.sys.mjs#316-318
This also means that if the toggle is enabled, after a restart, the URL bar toggle will also not be available.
Fixing this might be as simple as:
- Removing this part of the conditional so that we always register videos
- Get rid of this handler for registering videos if the pref is flipped to true: https://searchfox.org/mozilla-central/rev/4c065f1df299065c305fb48b36cdae571a43d97c/toolkit/actors/PictureInPictureChild.sys.mjs#395-404
Updated•3 months ago
|
Updated•3 months ago
|
Comment 6•2 months ago
|
||
bugherder |
Updated•1 month ago
|
Description
•