-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add x
and y
to DocumentPictureInPictureOptions
#34
Comments
Chrome currently disables this API on purpose and the spec mentions the website being unable to set the position of the PiP window (as a way to help prevent spoofing). It is something we're considering revisiting (along with the ability to resize the PiP window). |
For context though, would your use case be solved if we allowed the website to specify an initial position, even if we didn't also enable moveTo()? |
(I searched the spec for "move", but didn't find anything. The relevant search term would have been "position".) For people following this, the relevant spec section is this:
A non-normative comment is this:
My use case could be perfectly solved by allowing an |
Window.moveTo()
work on a PiP window?x
and y
to DocumentPictureInPictureOptions
Dynamically positioning the window would be a useful feature to have. If there's interactive content in a browser, it would be nice to be able to move the PiP window relative to the mouse position over the browser. I understand concerns about spoofing, though. An alternative could be a cat paw/laser pointer mode where the PiP window transitions away on one side of the screen to transition into position on the opposite side of the screen. This is essentially the capability I'd implement if I had x and y positioning properties. Have it be a feature/mode of the PiP window itself would lend itself to a more ergonomic/natural feeling transition vs setting the position and having it flicker to the other side of the screen. |
Since
DocumentPictureInPicture.requestWindow()
returns aWindow
which exposesmoveTo()
, I expected it to work, but in practice it doesn't. My use case is that I have a PiP dashboard that I like to move to a particular area of the screen, which of course is different from the default position in the lower right. Should this work? I was unsure whether to file a Chromium bug or a spec Issue, similar to #33. Sorry if it's more of an implementation problem.The text was updated successfully, but these errors were encountered: