W3C home > Mailing lists > Public > public-device-apis@w3.org > October 2014

[sensors] Ambient Light and the generic sensor API design

From: Kostiainen, Anssi <anssi.kostiainen@intel.com>
Date: Fri, 3 Oct 2014 08:13:02 +0000
To: W3C Device APIs WG <public-device-apis@w3.org>
CC: Anne van Kesteren <annevk@annevk.nl>
Message-ID: <7D176001-8619-4523-88C2-329CFDDA5AC6@intel.com>
Hi All,

We’ve now experimentally implemented the LCWD version of the Ambient Light Events spec [1] in Chromium. It is in Chrome Canary channel behind the chrome://flags/#enable-experimental-web-platform-features flag.

We plan to keep the feature behind the flag until we've reshaped the API surface in this group to address the two issues raised (both capture in ISSUE-170):

1) Value not retrievable until a change causes the event to fire, raised by Mozilla [2].

We’ve worked around this in the experimental Chromium implementation by firing the event when an event listener is added. However, relying on such a side-effect has known issues, and we understand the hesitation of other implementers to proliferate this pattern.

2) Establish a common pattern for sensor APIs and apply the design to the Ambient Light spec.

Rick Waldron who recently joined the group has been experimenting with a generic sensor API design [3]. The proposed design would fix the above issue 1) too.

To make it easier for interested parties to collaborate on the redesign, I've migrated the Ambient Light Events Editor’s Draft [4] to GitHub [5] (from Hg).

All - your thoughts? Volunteers to help drive this forward?



[1] http://www.w3.org/TR/2014/WD-ambient-light-20140619/
[2] http://lists.w3.org/Archives/Public/public-device-apis/2014Aug/0058.html
[3] https://github.com/rwaldron/sensors
[4] http://w3c.github.io/ambient-light/
[5] https://github.com/w3c/ambient-light/
Received on Friday, 3 October 2014 08:13:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:04 UTC