Ready for Trial: GravitySensor API

27 views
Skip to first unread message

Mandy, Arnaud

unread,
Feb 26, 2021, 11:37:10 AMFeb 26
to Abridged recipients
Contact emails

API spec

Yes

Summary

Expose the GravitySensor API, which provides a 3-axis reading of the gravity force, to users.



Blink component


Search tags


TAG review


TAG review status

Issues addressed

Risks



Interoperability and Compatibility

Generic Sensor APIs, as well as other hardware-related APIs, can be controversial when it comes to interoperability because other browser engine developers have voiced privacy-related concerns. We believe the Chromium implementation addresses those concerns. Additionally, all the data exposed by this API can already be read by users in JavaScript by calculating gravity from the Accelerometer and LinearAccelerometer readings we already provide.



Gecko: Negative Mozilla has not been asked about this specific API, but have raised concerns about the Generic Sensor APIs, including Accelerometer.

WebKit: Negative (https://webkit.org/tracking-prevention/) Although Apple has not been specifically asked about this API, they are not part of the Devices & Sensors WG, and have generally been contrary to the Generic Sensor APIs.

Web developers: Positive (https://crbug.com/1163993)


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Yes, except for Mac. The readings are obtained directly from the platform on Android when possible, and implemented as a fusion sensor on top of the Accelerometer implementation otherwise (and in other OSes except for macOS). There is support for gravity sensors in the Linux kernel as well, but we need to write some extra logic to handle falling back to a fusion sensor if they are not present". Per https://groups.google.com/a/chromium.org/g/blink-dev/c/_IReUkNKF6o/m/Ed0eFyP5CAAJ, only older Mac laptops seem to ship with accelerometers. We currently only ship the Accelerometer interface on Macs, but not LinearAccelerometer, in order to support the older Device Orientation/Motion APIs. As such, there does not seem to make much sense to ship this API on Macs either.



Is this feature fully tested by web-platform-tests?

Yes

Tracking bug


Link to entry on the Chrome Platform Status


Link to previous Intent discussions


This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages