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 PiP(Picture in Picture) mode to the player #98
Conversation
@suhailkakar is attempting to deploy a commit to the Livepeer Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Let's resolve those two eslint failures then good to merge after Chase's review.
This is a great start! Some things I'd like to see on this:
Thanks for this PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above for details
Also, to help fix the types, we'll need to update this file with PiP functions. There's some documentation in that global types file which explains what those custom types are, but basically it's typing how historical browsers have defined a "Fullscreen request" in the past. We may not need to add the multiple definitions of "Fullscreen request", depending on what the history is of PiP (I don't know how safari or Firefox have evolved over the years to handle this) |
I think it is better to show the button by default but if the users want they can add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the lint issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome!! A few more requests please. And I'm not sure I see the reasoning for including PiP by default - it seems like a niche feature that some apps will want, but most won't. I personally don't see it on most video apps I use. It seems to me that it should default to not shown with a documented flag to enable it. Let me know your thoughts!
packages/react/src/components/media/controls/PictureInPictureButton.tsx
Outdated
Show resolved
Hide resolved
Also, can we document this somewhere in the Player docs? |
@0xcadams I just checked but non of the variables such as full screen, and volume are updating their values from stores. |
True!! Nice catch, thanks for that. Just pushed a fix for that and added old webkit and documentation. Once the CI passes we shall 🚢 🚢 🚢 |
Merging and seeing if tests pass in |
Description
Added picture in picture mode to the Player (demo below)
#51
Additional Information
Demo
Screen.Recording.2022-10-14.at.7.28.43.PM.mov