codedread / kthoom

Comic Book Reader in the Browser
MIT License
133 stars 24 forks source link

Use Sensor API to automatically detect orientation #59

Open codedread opened 1 year ago

codedread commented 1 year ago

... 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

codedread commented 1 year ago

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

codedread commented 1 year ago

More research:

codedread commented 1 year ago

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