samples
samples copied to clipboard
Is there a working autopictureinpicture sample?
There's a Auto Picture-in-Picture Sample page but it's not currently working (I'm on Chrome 81.0.4044.129 (Official Build) (64-bit)
). Was this feature removed or am I missing something?
Tried on Chromium 96.0.4661.0. Still not working.
@guest271314 Did you enable chrome://flags/#enable-experimental-web-platform-features
?
Yes. That flag is always used when launching Chromium, here.
And you installed it as a PWA?
Yes. Even included the new id
that was warned about at console
. The PiP window does not automatically launch. I tried pictureInPicture
as the specification uses and the pictureinpicture
attribute already in this repository. Does the code do what it is supposed to on your machine? If so, can you create a screen capture video of it working as intended?
It works great for me on macOS. I've installed the PWA, launched it, saw my camera feed, minimized the PWA window, and the PiP window auto magically opened. See https://developer.chrome.com/blog/media-updates-in-chrome-73/#auto-pip
Not working on Linux. Even when
minimized the PWA window
happens.
I've just tried it on Linux and it worked for me. Can you create a screen capture video and share it?
Full code used and screen capture video autopip.zip
Can you reproduce with https://googlechrome.github.io/samples/auto-picture-in-picture/?
Same result. PiP window does not auto launch. This warning appears at DevTools
manifest.json:1 Manifest: property 'scope' ignored. Start url should be within scope of scope URL.
It looks like your PWA window is not minimized from the screen capture you've shared. Can you try again?
I am not sure what you mean by
minimized the PWA window
and
It looks like your PWA window is not minimized
?
I tried that, too, on my own.
How is a minimized window relevant to PiP window launching automatically?
Minimized window, no PiP.
Clicking the minimize [_]
window button forces the page visibility event to fire. That's what's PiP autopicture uses.
In your screenshot, the window is not minimized. It is small ;)
Click the [_]
button on the left of the [+]
button.
Clicking the minimize
[_]
window button forces the page visibility event to fire. That's what's PiP autopicture uses.In your screenshot, the window is not minimized. It is small ;) Click the
[_]
button on the left of the[+]
button.
Well, that is not "automatic". That is in response to user action. What you wrote needs to be in the specification and instructions here. And, again, there is nothing "automatic" about that, just substituting one click for another. I might as well just click the PiP control.
I suspect this is a Linux specific issue as it works great on macOS for me. Maybe the "screen occlusion" feature did not launch on Linux. I'm not sure.
See the video on https://developer.chrome.com/blog/media-updates-in-chrome-73/#auto-pip It still works like that for me. Alt-tab, screen occlusion, minimized windows are actions that force page visibility to change.
Spec says: https://www.w3.org/TR/picture-in-picture/#auto-pip
Some pages may want to automatically enter and leave Picture-in-Picture for a video element; for example, video meeting web apps would benefit from some automatic Picture-in-Picture behavior when the user switches back and forth between the web app and other applications/tabs.
I think we're good don't you think?
I think we're good don't you think?
No.
You supplied specific instructions for user action, where without those instructions I would not have learned that on my own without testing hundreds if not thousands of times.
And as I said, that is by no means "automatic". That attribute name needs to be changed or actually be automatic, without user action, to avoid false advertising.
You supplied specific instructions for user action, where without those instructions I would not have learned that on my own without testing hundreds if not thousands of times.
Like I said, this issue seems specific to Linux. On working platforms, it works out of the box, without minimizing the window. Window simply has to be occluded.
And as I said, that is by no means "automatic". That attribute name needs to be changed or actually be automatic, without user action, to avoid false advertising.
How would you call it?
On working platforms, it works out of the box, without minimizing the window. Window simply has to be occluded.
All of those details need to be clearly documented in the specification.
How would you call it?
From my perspective it is definitely not "automatic" by any stretch. I is no different from clicking the PiP control on the media element or calling requestPictureInPicture()
based on user action.
I expected literal "automatic", not conditional changes based on further user gestures.
The procedure needs to be explained, preferably in the specification, definitely here, else there is no way for users to divine the specific instructions you posted.
On working platforms, it works out of the box, without minimizing the window. Window simply has to be occluded.
All of those details need to be clearly documented in the specification.
I kindly disagree. Specification text looks good to me. It uses page visibility API events.
How would you call it?
From my perspective it is definitely not "automatic" by any stretch. I is no different from clicking the PiP control on the media element or calling
requestPictureInPicture()
based on user action.
It's not true. Switching from a PWA window to another app may is not a user gesture in the spec world.
Do you mind filing a bug at crbug.com/new to explain that page visibility event is not fired when page becomes hidden?
Well, you asked, and I gave my perspective.
It is definitely not "automatic".
What I expect by the naming convention is very simple: I get link to a site where PiP window is literally automatically launched, without any further action.
Do you mind filing a bug at crbug.com/new to explain that page visibility event is not fired when page becomes hidden?
I have filed issues re PiP in the past and been banned from the specification issue, re maximum PiP window size, which is certainly Chromium-specific.
I will file the issue anyway explaining what I consider should occur.
This is not "automatic", no matter how it is trying to be massaged or colored as such.
I suggest you include the exact steps necessary you posted (evidently on Linux) to get the PiP window - which is not "automatic" in this samples repository.
User gesture meaning what you advised for PiP to happen, minimize the PWA window. I am not sure how you can color that "automatic"?
Once again, how would you call it then?
It is not special or even needed. It does not do anything requestPictureInPicture()
does not do, so I am not sure why it is even being specified - since it is not "automatic". If you actually make it automatic then keep the name. Else, it can actually be removed from the specification, again, to avoid false advertising.
Perhaps 'minimizedPictureInPicture'?
Or 'minimizedWindowPictureInPicture', 'occludedWindowPictureInPicture'. 'automatic' on its own is not what is occurring and should cease and desist being advertised as such.
@beaufortfrancois https://bugs.chromium.org/p/chromium/issues/detail?id=1256603
Thank you really much @guest271314! I've pinged some folks at https://bugs.chromium.org/p/chromium/issues/detail?id=1256603#c3 and was able to reproduce with a small test case.