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

ScreenOrientation: lock() method #738

Open
shalanah opened this issue Sep 20, 2024 · 1 comment
Open

ScreenOrientation: lock() method #738

shalanah opened this issue Sep 20, 2024 · 1 comment
Labels
focus-area-proposal Focus Area Proposal

Comments

@shalanah
Copy link

shalanah commented Sep 20, 2024

Description

Video, interactive, and gaming mobile sites are often optimized for vertical or horizontal viewing. Orientation lock is important to give the user the best experience, avoid wasting development time, and to avoid bad app state by accidental rotations.

Missing from iOS/iPadOS. Good support on Android (2013-2015 implemented approximately 10 years ago) with the exception of Firefox for Android.

Missing from Desktop devices (understandably), would be best if also available on tablet touch devices.

Screenshot 2024-09-20 at 10 56 32 AM

MDN Screen Orientation Lock

Related Fullscreen API: #732

Web Apps

With the advent of PWAs a future discussion point could be removing the fullscreen prerequisite.

Specification

https://w3c.github.io/screen-orientation/#dom-screenorientation-lock

Additional Signals

https://stackoverflow.com/questions/5298467/prevent-orientation-change-in-ios-safari

@AshleyScirra
Copy link

This is also useful for web games made in Construct so we support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: No status
Development

No branches or pull requests

2 participants