-
Notifications
You must be signed in to change notification settings - Fork 43
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
Exiting full screen should unlock screen orientation #202
Comments
And presumably it should restore the orientation the device had before going fullscreen? I guess that's a thing we need to store somewhere as part of requesting. |
I'm naive of mobile development patterns, but storing pre-fullscreen orientation (and locks) does seem significant. Say a web application manifest's default orientation is portrait, then it uses screen.orientation.lock("landscape") for gameplay. During the game, a video cutscene/tutorial/ad is shown fullscreen (with or without changing the orientation). Exiting video element fullscreen to resume gameplay should probably not unlock orientation, but restore that pre-fullscreen orientation. |
Right, it would revert to the default orientation. However, in case where a developer manually request full screen on a That would allow everything to work seamlessly with web manifest setting the default orientation, and the document changing the orientation. |
Did some testing and it (Chrome at least) actually doesn't. It "unlocks" and always retains the current orientation. So, if you exit fullscreen in What's interesting with "portrait-secondary" is that is unlocks, and then allows the user to change to "portrait-primary", but then the user can't manually go back to "portrait-secondary". I guess this is due to platform conventions on this particular phone. I don't imagine a tablet would exhibit such behavior. |
It retains the orientation even if you rotate the device? How is it unlocked in that case? (It does seem good to just unlock and let any additional rotation depend on the device orientation.) |
Sorry, I was not clear. Imagine:
Precisely. The OS takes over - or OS conventions are followed. |
When exiting full screen, FS API should unlock screen orientation.
Otherwise, things can get strange as seen here.
See also w3c/screen-orientation#209
Cc @michaelwasserman
The text was updated successfully, but these errors were encountered: