-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Feature Request: Use Document Picture-in-Picture Web API #8108
Comments
Nice! My immediate thought is how best to manage the container element - whether we have Video.js insert another div around itself so existing embeds would work, or leave that to the site implementor to put in place. |
I've had a chance to play with it for https://document-picture-in-picture-api.glitch.me/ |
I've seen the example, and it works great. Most current implementations won't have a parent node like your `#videoContainer that would maintain the player's aspect ratio when in PIP mode to avoid layout shift. Inserting a new element with the same classes as the player will work in many cases, but it should be an opt-in as there are bound to be edge cases. |
You're right. In Shaka Player, I'm currently exploring the idea of inserting a non visible cloned placeholder. See https://github.com/shaka-project/shaka-player/pull/4969/files#diff-975b8add50f4c4585c3e592176f485922f0cd128e7aa0c47d1c750448328fcd6R171 |
Out of curiosity, when will this be available to developers? I guess this will be in a specific release. |
There should be a release today |
@mister-ben Are you going to add an origin trial token in https://videojs.com/ so that users can get a sense of the Document Picture-in-Picture API when supported in their browser? |
Users should be able to use the Video.js Player in a Picture-in-Picture window, not just the HTML video inside the web player.
Before the Document Picture-in-Picture API, it was only possible to put an HTML
<video>
element into a Picture-in-Picture window. This new API makes it possible to open an always-on-top window that can be populated with arbitrary HTML content. It is available as an origin trial starting in Chrome 111 on desktop.Documentation:
The text was updated successfully, but these errors were encountered: