Use Sensor API to automatically detect orientation
... or equivalent. Research to do:
https://web.dev/generic-sensor/ https://w3c.github.io/gyroscope/#gyroscope-interface https://developer.mozilla.org/en-US/docs/Web/API/AbsoluteOrientationSensor#permissions_example https://caniuse.com/?search=sensor%20api
A quick test shows that AbsoluteOrientationSensor does not exist on a Macbook Pro. I may be the only human on the planet that reads comics on a laptop in portrait mode, but I'd still want to support this feature on desktop, if possible.
https://stackoverflow.com/questions/73346042/is-it-possible-to-get-the-orientation-of-a-macbook-pro
More research:
- https://sensor-js.xyz/demo.html
- https://developer.mozilla.org/en-US/docs/Web/API/Window/deviceorientation_event
Chrome doesn't surface this on a Macbook Pro. I have one question out there so far:
https://stackoverflow.com/questions/73346042/is-it-possible-to-get-the-orientation-of-a-macbook-pro?noredirect=1#comment129528992_73346042