One new feature that we’re including as part of Firefox 3.6 is support for web pages to access machine orientation information if it’s available. As you can see from the demo above you can use it to figure out if the machine is moving and what direction it’s facing.
Using the API is very simple. All you have to do is add a simple event listener:
window.addEventListener("MozOrientation", function(e) { /* 3 values: e.x, e.y, e.z */ }, true); |
Originally built as something that we would include for our upcoming mobile browser release, we’ve made it available on desktop systems as well. Many modern Macbooks and Thinkpads contain devices and drivers that expose this information. We’ve added support for Linux, Macs and some Thinkpads where drivers and devices are available. (Note, on some Macbooks detect the orientation information backwards – we’re working on that.)
You can find more information on two posts by Doug Turner and an update on documentation for orientation from Eric Shepherd.
Paul Rouget has this and some other demos up in one of his posts.
Pingback from Firefox 3.6 çıktı / Fatih Hayrioğlu'nun not defteri on January 21st, 2010 at 3:11 pm:
Pingback from » Излезе Firefox 3.6 Мозила на македонски on January 21st, 2010 at 3:18 pm:
Pingback from Pune and Mumbai » arunerblog on March 11th, 2010 at 3:59 am:
Pingback from Mozilla Standards Blog » Blog Archive » Web Standards In the Device Era on March 12th, 2010 at 11:50 am:
Pingback from Firefox 3.6 new device API: Orientation on May 28th, 2011 at 1:45 pm: