Re: [deviceorientation] Add integration with Permissions Policy (#64)

> My proposal is to standardize Blink's behavior (i.e. require "accelerometer"+"gyroscope" for ondevicemotion and ondeviceorientation, and "accelerometer"+"gyroscope"+"magnetometer" for ondeviceorientationabsolute) instead.

The current text in the spec does give some leeway to implementations to use a magnetometer for ondeviceorientation:

> The [deviceorientation](https://w3c.github.io/deviceorientation/#def-deviceorientation) event tries to provide relative values for the three angles (relative to some arbitrary orientation), based on just the accelerometer and the gyroscope. The implementation can still decide to provide [absolute](https://w3c.github.io/deviceorientation/#dom-deviceorientationevent-absolute) orientation if relative is not available or the resulting data is more accurate. In either case, the absolute property must be set accordingly to reflect the choice.

The Gecko implementation seems to do this on e.g. Android: https://searchfox.org/mozilla-central/rev/8acfbe4ba09b46b91c862dc2fbc064d4fc1bac9a/dom/events/EventListenerManager.cpp#710

In order for the spec to be airtight, we'd need to either require "magnetometer" or stop allowing implementations to fall back to absolute orientation.

-- 
GitHub Notification of comment by rakuco
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/64#issuecomment-1792107836 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 3 November 2023 09:23:30 UTC