Picture-in-picture launches off screen when using multiple monitors
Categories
(Toolkit :: Video/Audio Controls, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | verified |
People
(Reporter: u642808, Assigned: mconley, NeedInfo)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Clicked the picture-in-picture button on a video when using multiple monitors.
Actual results:
The picture-in-picture window is launched mostly off the screen, and needs to be dragged to be fully visible. If I disable my secondary monitor, the picture-in-picture window is launched correctly. I've attached a screenshot to this post, notice the small window on the bottom right corner of the screenshot.
Expected results:
The picture-in-picture window should launch fully visible, and not mostly off of the screen.
Comment 3•5 years ago
|
||
What are the size/resolution and Windows (text) scaling settings for your monitors?
(In reply to :Gijs (he/him) from comment #3)
What are the size/resolution and Windows (text) scaling settings for your monitors?
Monitor 1 is 1920x1080, and monitor 2 is 1440x900 (monitor 2 is the monitor that I use Firefox on). Scaling is set to 100%.
Comment 5•5 years ago
|
||
(In reply to Peter from comment #4)
(In reply to :Gijs (he/him) from comment #3)
What are the size/resolution and Windows (text) scaling settings for your monitors?
Monitor 1 is 1920x1080, and monitor 2 is 1440x900 (monitor 2 is the monitor that I use Firefox on). Scaling is set to 100%.
So just to be really sure (because this is somewhat surprising to me) - both screens are using 100% scaling and neither are using hidpi (if you're comfortable with devtools, if you put Firefox on both screens in turn and evaluate window.devicePixelRatio
in the console for both, it reports 1
on both screens) ? In about:config, is layout.css.devPixelsPerPx
set to its default (-1.0) value?
Assignee | ||
Comment 6•5 years ago
|
||
Hey Cristian, do you think you'd have a moment to help us confirm this issue?
Comment 7•5 years ago
|
||
Hey Mike, I didn't managed to reproduce the issue reported, but I've noticed some inconsistencies with the position of the PiP window. If the browser is displayed on the entire screen (not full screen mode) on the second monitor the PiP window is displayed ok. If the browser window is resized to a smaller size, the PiP window will be displayed smaller and in a different position (more central and above the taskbar with a few centimeters).
I didn't notice any differences when the position of the second screen was lower. I've only attached the screenshot with the default position of the second screen. I didn't managed to reproduce the behavior from Comment 2.
(In reply to :Gijs (he/him) from comment #5)
(In reply to Peter from comment #4)
(In reply to :Gijs (he/him) from comment #3)
What are the size/resolution and Windows (text) scaling settings for your monitors?
Monitor 1 is 1920x1080, and monitor 2 is 1440x900 (monitor 2 is the monitor that I use Firefox on). Scaling is set to 100%.
So just to be really sure (because this is somewhat surprising to me) - both screens are using 100% scaling and neither are using hidpi (if you're comfortable with devtools, if you put Firefox on both screens in turn and evaluate
window.devicePixelRatio
in the console for both, it reports1
on both screens) ? In about:config, islayout.css.devPixelsPerPx
set to its default (-1.0) value?
Just to verify that we are talking about the same thing, when you refer to scaling, are you referring to the Windows settings in Display Settings > Scale and Layout? If so, both monitors are set to "100% (Recommended)". Neither monitor is high DPI (main monitor is 19" and the other is a 40" TV), so I've never had a need to mess with these settings.
Under Tools > Web Developer > Web Console, inputting window.devicePixelRatio returns 1 on both monitors.
In about.config, I can also confirm that layout.css.devPixelsPerPx is set to -1.0
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
I looked into this. The problem is that we're using left and top coordinates here to position the PiP player window, and this calculation's origin happens to be at the top-left of the parent window's screen. However, the openWindow method we're using here is using the total available display area when computing where the put the newly opened window.
So we've gotta adjust these calculations to be origin'd at the 0,0 of the total available display "rect".
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Try build with a potential fix cooking here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d91daacf8daee3d6b0869a934cf1d4e303c44be2
Assignee | ||
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
bugherder |
Assignee | ||
Comment 14•5 years ago
|
||
Hi Peter,
Do you have a copy of Firefox Nightly? A patch to fix this issue just landed in Firefox Nightly, and I wondered if you'd like to try it. You can download a copy of Nightly here.
Reporter | ||
Comment 15•5 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #14)
Hi MIke,
Just tried the Nightly build. and I can confirm it's working correctly now. Thanks so much!
Comment 17•5 years ago
|
||
Build ID 20190723034754
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Verified as fixed on the latest Nightly build on Windows 10.
Comment 18•5 years ago
|
||
This still happens to me. The pic-in-pic is opened on my TV which is the left screen if the Firefox window is close to the edge (maximized or not). If I move the Firefox window something like 20 pixels from the edge it opens on the right screen.
Comment 19•5 years ago
|
||
(In reply to ecke101 from comment #18)
This still happens to me. The pic-in-pic is opened on my TV which is the left screen if the Firefox window is close to the edge (maximized or not). If I move the Firefox window something like 20 pixels from the edge it opens on the right screen.
Please file a new bug. Please also clarify what OS you're using, provide some more details about the displays (resolution, positioning, which is primary) and (based on the 20px thing), mention where the taskbar/dock or similar is positioned. :-)
Description
•