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 to trigger full screen mode after a screen orientation change #17

Closed
StarNeit opened this issue Mar 15, 2019 · 1 comment
Closed

Comments

@StarNeit
Copy link

#hello.
I want my website to trigger full screen mode after a screen orientation change.
But, it says that it requires user gesture.

can you please let me know how to trigger full screen when a device orientation change?
thank you.

@RonnyO
Copy link

RonnyO commented Jun 10, 2019

Hey,
for modern browsers, you can use the screen.orientation.addEventListener('change', goFullScreenHere); and from that handler you could go fullscreen and it's considered a user gesture.

For iOS and specifically iPhones you don't have that API, but it does work from the regular orientationchange event if you want to go fullscreen from a video tag.

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

No branches or pull requests

3 participants