GoogleChromeLabs / pwa-wp

WordPress feature plugin to bring Progressive Web Apps (PWA) to Core
https://wordpress.org/plugins/pwa/
GNU General Public License v2.0
605 stars 96 forks source link

How to disable App rotation? #1117

Open NicoHood opened 3 months ago

NicoHood commented 3 months ago

I want to refer to the same issue on bubblewrap: https://github.com/GoogleChromeLabs/bubblewrap/issues/678

What I want to achieve is:

If I set orientation to any it will always rotate, no matter if the phone is locked or not. If I set it to natural it will never rotate at all.

Is there any way to fix this?

westonruter commented 3 months ago

Maybe you're looking for the Screen Orientation API: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Managing_screen_orientation