I was reading about Chrome being able to get device orientation inform开发者_如何学JAVAation (Engadget article, WebKit Bugzilla archive). Some questions:
Is there a demo HTML5 page that shows off the use of this device orientation info? What platforms does it work on?
Is this device orientation info available on other WebKit browsers like Safari?
How does Chrome get this information on different platforms? Does it make system calls? Where in the code branch is this done? If I want to help provide this device orientation on a new device/OS/platform, how can I contribute?
Here's Google's HTML5 SlideOrientation demo
Also, MacBooks do have a type of accelerometer, called a Sudden Motion Sensor. It's purpose is to prevent hard drive damage by protecting the hard drive in the event of sudden acceleration.
- http://web.me.com/avidrissman/deviceorientation.html, it's only available on OS X.
- It's available on iOS, but not in desktop Safari
- It reads the accelerometer. It's done in this file. See the how to contribute to chromium guide on how to contribute patches in general.
精彩评论