Bug 30335 - add support for accelerometer / orientation events
Summary: add support for accelerometer / orientation events
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL: http://dev.w3.org/geo/api/spec-source...
Depends on: 47670 39210 39479 39588 39589 39590 41618 41685 42304 42865 43025 43181 43785 43848 45460 45891 47257 47408 51742
  Show dependency treegraph
Reported: 2009-10-13 09:17 PDT by Patrick Mueller
Modified: 2024-05-19 19:34 PDT (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Mueller 2009-10-13 09:17:07 PDT
Firefox has added some accelerometer / orientation JavaScript events in their nightlies.  It would be nice to have this for WebKit as well.


- Doug Turner's blog posts (Moz developer):

- demo movie

- Mozilla's IDL for the event: 

- for reference, iPhone OS doc on accelerometer APIs:

- Android doc on Sensor events, that can track acceleration and orientation as separate things

Unfortunately, there's no "API" apparently for desktop macs, though accessing accelerometer data is described in "Mac OS X Internals: A Systems Approach" by Amit Singh (section 10.7.5).  Accelerometers are available for some PC laptops as well, though the usage on a laptop seems a bit of a stretch.
Comment 1 Steve Block 2010-05-12 08:27:14 PDT
There's now a draft spec for both orientation and accelerometer events. It's being developed by the Geolocation working group of which Doug is an active member. See http://dev.w3.org/geo/api/spec-source-orientation.html.

We plan to implement this in Android soon.
Comment 2 Steve Block 2010-05-12 08:34:10 PDT
> We plan to implement this in Android soon.
By which I mean we'll contribute both the WebCore common code and the specifics for the Android port.

Patches coming soon ...
Comment 3 Steve Block 2010-05-17 02:09:27 PDT
I'll implement DeviceOrientation in stages, with separate bugs to track each stage.

I've filed Bug 39210 to tack the addition of the bindings.
Comment 4 Hans Wennborg 2010-05-18 04:41:10 PDT
Adding myself to the CC list.
Comment 5 Steve Block 2010-05-20 09:36:21 PDT
Added spec link to bug's URL field
Comment 6 Marcos Caceres 2024-05-19 19:34:23 PDT
WebKit implements the Device Orientation and Motion spec.