-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[video] add fullscreen enter and exit events #30922
[video] add fullscreen enter and exit events #30922
Conversation
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.
Looks good 😄 Thank you!
/** | ||
* Handler for an event emitted when the player enters the fullscreen mode. | ||
*/ | ||
onFullscreenEnter(): void; | ||
/** | ||
* Handler for an event emitted when the player exits the fullscreen mode. | ||
*/ | ||
onFullscreenExit(): void; |
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.
They are VideoView
events, not VideoPlayer
events 😉 You can remove this (and rebuild files).
/** | |
* Handler for an event emitted when the player enters the fullscreen mode. | |
*/ | |
onFullscreenEnter(): void; | |
/** | |
* Handler for an event emitted when the player exits the fullscreen mode. | |
*/ | |
onFullscreenExit(): void; |
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.
Hey @tsapeta , that makes sense. I believe just removing this is not enough and that it needs to be added to the VideoView.web.tsx
, like so: 59fdd57
(#30922)
I followed @behenate 's PIP implementation as seen here: https://github.com/expo/expo/pull/30524/files#diff-72705cdf87b0dfe8ecd5783a1ffd65f9e6257b81e046c967f4535b75b89c9835R74
Let me know if this looks good and whether anything else needs to changed
@fobos531 Cool!! Thanks for doing this! 🎉 |
Co-authored-by: aleqsio <mikucki@gmail.com>
This reverts commit 955631b.
Co-authored-by: Tomasz Sapeta <tomasz.sapeta@me.com>
(cherry picked from commit df90d60)
Why
Adds fullscreen enter/exit events across all platforms. Motivated by bluesky-social/social-app#4907, therefore credits to @haileyok
How
Just followed the original implementation from Hailey, with small difference being the naming of the actual event which follows the PiP event naming, as well support added on web.
Test Plan
CleanShot.2024-08-09.at.14.05.24.mp4
CleanShot.2024-08-09.at.14.06.24.mp4
Untested on web & apple TV.
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).