Well-deployed technologies

The Geolocation API provides a common interface for locating the device, independently of the underlying technology (GPS, Wi-Fi networks identification, triangulation in cellular networks, etc.).

The DeviceOrientation Event Specification defines several DOM events that provide information about the physical orientation and motion of a hosting device. Most browsers support this specification, although various interoperability issues have arised. The work on the specification itself has been discontinued when the Geolocation Working Group was closed. It may fall in scope of the Device and Sensors Working Group when the group recharters, with a view to reducing inconsistencies across implementations and finalizing the specification accordingly, while the group develops the more powerful Orientation Sensor specification in parallel.

FeatureSpecificationMaturityCurrent implementations
GeolocationGeolocation API SpecificationREC

Shipped
shipped in firefoxshipped in chromeshipped in edgeshipped in safari

Motion sensorsDeviceOrientation Event SpecificationRetired

Under consideration
consideration in edge

Shipped
shipped in firefoxshipped in chrome

Technologies in progress

The Generic Sensor API defines a framework for exposing sensor data to the Web platform in a consistent way. In particular, the specification defines a blueprint for writing specifications of concrete sensors along with an abstract Sensor interface that can be extended to accommodate different sensor types.

A number of sensor APIs are being built on top of the Generic Sensor API. The Proximity Sensor specification defines an API to monitor the presence of nearby objects without physical contact. The Ambient Light Sensor specification defines an API to monitor the ambient light level or illuminance of the device's environment. The Battery Status API exposes information about the battery status of the hosting service (however, note the future of this last specification is uncertain due to identified potential privacy-invasive usage of the API).

The detection of motion is made possible by a combination of low-level and high-level motion sensor specifications, also built on top of the Generic Sensor API:

  • the Accelerometer to obtain information about acceleration applied to the device's local three primary axes;
  • the Gyroscope to monitor the rate of rotation around the device's local three primary axes;
  • the Magnetometer to measure magnetic field around the device's local three primary axes;
  • the Orientation Sensor to monitor the device's physical orientation in relation to a stationary 3D Cartesian coordinate system.
FeatureSpecificationMaturityCurrent implementations
Generic SensorsGeneric Sensor APIWD

N/A

Proximity sensorsProximity SensorWD

Shipped
shipped in firefox

Ambient Light sensorAmbient Light SensorWD

Experimental
experimental in chrome

Shipped
shipped in firefoxshipped in edge

Battery StatusBattery Status APICR

Shipped
shipped in chrome

Motion sensorsAccelerometerWD

In development
indevelopment in chrome

Polyfills

GyroscopeWD

In development
indevelopment in chrome

Polyfills

MagnetometerWD

In development
indevelopment in chrome

Orientation SensorWD

In development
indevelopment in chrome

Polyfills

Exploratory work

The Geolocation Sensor is an API for obtaining geolocation reading from the hosting device. The feature set of the Geolocation Sensor is similar to that of the Geolocation API, but it is surfaced through the Generic Sensor API, improves security and privacy, and is extensible.

As detailed in the Media part of this document, there is ongoing work on APIs to open up access to camera and microphone streams.

Work on a Web Near-Field Communications (NFC) API to enable wireless communication between two devices at close proximity has started in the Web NFC Community Group.

Similarly, the Web Bluetooth specification, developed by the Web Bluetooth Community Group, describes an API to discover and communicate with devices over the Bluetooth Low Energy (BLE) mode.

The proposed Ambient Humidity Events would allow mobile Web applications to receive events that correspond to changes in ambient humidity.

FeatureSpecificationGroupImplementation intents
GeolocationGeolocation SensorWeb Platform Incubator Community Group

N/A

Camera & Microphone streamsMedia Capture and StreamsWebRTC Working Group

Shipped
shipped in firefoxshipped in chromeshipped in edgeshipped in safari

NFCWeb NFC APIWeb NFC Community Group

Under consideration
consideration in edgeconsideration in firefox

In development
indevelopment in chrome

BluetoothWeb BluetoothWeb Bluetooth Community Group

Under consideration
consideration in edge

Shipped
shipped in chrome

Humidity sensorAmbient Humidity EventsDevice and Sensors Working Group

N/A

Discontinued features

Geofencing API
The ability to detect when a device enters a given geographical area would enable interactions and notifications based on the user's physical presence in a given place. The Geolocation Working Group started to work on a geofencing API to that effect. This work has been discontinued, partly out of struggles to find a good approach to permission needs that such an API triggers to protect users against privacy issues, and because the API depended on the Service Workers, which was not yet stable at the time. Work on this specification could resume in the future depending on interest from would-be implementers.