Skip to content
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

How do I make the video automatically switch to full-screen mode when I rotate the screen on a mobile device? #769

Closed
timomedia opened this issue Jun 8, 2024 · 6 comments

Comments

@timomedia
Copy link

Hello!
I have searched through your documentation; however, everything doesn't quite work as I want it to. What I need is that when users access a page with a video on their phone, if they rotate the screen, the video will automatically go full screen. I noticed in your documentation that due to the browser's security mechanism, it requires interaction with the browser to intervene in fullscreen mode. However, even when I swipe the screen (without clicking), the video doesn't go fullscreen. If I understand correctly, swiping or rotating the screen should inherently be an interaction with the browser. Because it either changes the browser's size or interacts with the browser's scroll bar. Please guide me on how to achieve this.
Thank you very much!

@zhw2590582
Copy link
Owner

Do you want the video to go into full screen and rotate when you rotate the screen? like:
1

@timomedia
Copy link
Author

Do you want the video to go into full screen and rotate when you rotate the screen? like: 1

Yes! Like youtube or vimeo. Pls help me! Thank you

@zhw2590582
Copy link
Owner

Like this? demo

@timomedia
Copy link
Author

Hi @zhw2590582 !
It is possible to replace fullscreenWeb with fullscreen. I have tried replacing it, but without a tap or click interaction with the website frame, it cannot be executed. I receive a notification that permission is denied to perform this action. I don't know how to make it work. For example, when I access YouTube on mobile, if I rotate the screen, the video automatically goes fullscreen and vice versa.

@zhw2590582
Copy link
Owner

Cannot use fullscreen directly

@timomedia
Copy link
Author

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants