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.
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.
MDN Screen Orientation Lock
Related Fullscreen API: https://github.com/web-platform-tests/interop/issues/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