Chrome 67 to Support the Generic Sensor API for Accelerometers, Gyroscopes, and Fusion Sensors

Once upon a time, web browsers were used to… well, browse the web, but overtime, features and API have been added to run apps with the ability to control hardware like webcams using the Media Capture API, GPIOs using JavaScript (e.g. node.js), or handle Bluetooth  connectivity though the Web Bluetooth API.

The W3C Generic Sensor API is one of the latest proposed API, and defines a framework for exposing sensor data to the Open Web Platform in a consistent way. Google has just announced Chrome 67 beta supports the new API.

Four types of sensors are supported for now: accelerometer, gyroscope, orientation sensor combining accelerometer and gyroscope data, and motion sensor, another fusion sensor leveraging data from a magnetometer as well as the accelerometer and the gyroscope for example to act as a virtual compass.

You can test the Sensor API on your phone or other device with sensors running Chrome 67 beta or later using samples from Intel, or even customize them by editing the source code. The demo will require you to enable Generic Sensor and Generic Sensor Extra Classes in chrome://flags.

Such sensor API will be useful for extended / virtual reality applications, for example using the WebXR Device API enabling the creation of virtual and augmented reality experiences on mobile devices and desktops, and also implemented in Chrome 67 and up.

Firefox has a bug listed to implement the Generic Sensor API, but so far nobody has been assigned. However, it’s possible Firefox Reality browser will support it, as it’s been specifically designed for mixed reality applications.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

Radxa ROCK 5C (Lite) SBC with Rockchip RK3588 / RK3582 SoC
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
Khadas VIM4 SBC