-
Notifications
You must be signed in to change notification settings - Fork 4k
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 prop to force fullscreen preview for videos. #20436
Conversation
By default the force fullscreen is active on Android to allow users to watch videos using outside players. On iOS is disable to allow display inline or fullscreen depending of the user actions.
Size Change: 0 B Total Size: 842 kB ℹ️ View Unchanged
|
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.
Thanks @SergioEstevao for this PR 🎉
I noticed one difference on iOS:
When I tap on the unselected video block to select it, the video will automatically start playing. As far as I remember, we needed to select the block first and then tap again to play the video if we wanted to.
Is this change intentional?
One other interesting thing that happened on Android is that when the external browser opens, it will ask me to download the video instead of playing it.
This happened with Chrome and DuckDuckGo. Testing with Firefox it properly played it without the need to download it.
I was able to reproduce this same problem on develop so probably is not part of this PR.
Still worth checking it out
packages/block-editor/src/components/video-player/index.native.js
Outdated
Show resolved
Hide resolved
@etoledom That's correct. The first tap should select the block, then a second tap to play the media. Same thing w/ an image block — first tap selects the block, second tap views the image. |
@etoledom I fixed the issue you detected and simplified the code, do you mind giving it another look? |
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.
Thanks for the updates @SergioEstevao !
I still see the behaviour described previously.
When the video block is not selected and I tap on the Play button, the block gets selected and the video starts playing automatically. It doesn't happen if I tap outside of the Play button.
Adding this prop to the VideoPlayer
component fixed it for me:
pointerEvents={ isSelected ? undefined : "none" }
@etoledom I followed your suggestion for tapping on the play button. Can you please give this another check? |
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.
Working great now! 🎉
Thank you for the update
This reverts commit e19b804.
Description
Added a prop to force fullscreen preview for videos.
On Android, by default, we force fullscreen mode to allow usersto watch videos using outside players.
On iOS the fullscreen is not forced by default to allow videos to displayed inline or fullscreen depending of the user actions.
How has this been tested?
This can be tested using the GB-mobile PR here: wordpress-mobile/gutenberg-mobile#1952
Screenshots
Types of changes
Checklist: