Closed
Bug 716173
Opened 13 years ago
Closed 13 years ago
device orientation does not work appropriately on http://www.html5rocks.com/en/tutorials/device/orientation/deviceorientationsample.html
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: nhirata, Assigned: dougt)
References
()
Details
(Keywords: dev-doc-complete, Whiteboard: regression)
Attachments
(2 files)
1. go to http://www.html5rocks.com/en/tutorials/device/orientation/deviceorientationsample.html on Firefox
2. tilt the macbook pro
Expected: the html5 logo will move in some fashion
Actual: doesn't move
Note:
1. Nightly 12.0a1 (2012-01-04), Mac 10.6.8
2. I tried it on mobile, it only detects landscape/portrait, it doesn't tilt the logo. (Android Aurora 20120106, Nexus S, 2.3.1)
3. On chrome (16.0.912.75) it works as expected on the macbook pro
Comment 1•13 years ago
|
||
The page does some capability sniffing and whatnot....
In our case, it adds a listener for the "deviceorientation" event, but I don't see the listener ever fire. Should it fire?
As far as mobile goes, the page doesn't use a 3d transform for Gecko, unlike WebKit, so you won't get any logo-tilting there; the best you can hope for is logo rotation.
Comment 2•13 years ago
|
||
(http://www.html5rocks.com is in general Chrome only demo site.)
I don't know on which devices we support deviceorientation. Dougt?
Comment 4•13 years ago
|
||
As noted in the dupe bug: On a mac book pro the MDN docs (https://developer.mozilla.org/en/detecting_device_orientation) fail to describe how to properly use the api. An online demo (http://sandbox.juurlink.org/accelerometer/) seem to fail while being supported on current gen Chrome. The website claims to work on firefox 3.6+ but it is failing on aurora (12). I am using a mac book pro which seems to have traditionally supported this feature.
Comment 5•13 years ago
|
||
This looks like a regression from bug 615597, based on bisecting on nightlies. That bug changed the callee (nsAccelerometer::AccelerationChanged) and the android callers but not the other callers. So the callee is getting values in a totally different coordinate system than the one it expects, and just ignoring them...
Then there was a further change in bug 662678, I think (it's mis-attributed to bug 615597) which made Macs file devicemotion but not deviceorientation. Is that actually correct?
Oh, and that last change is still dev-doc-needed... :(
Alon, Doug, Olli, could you take a look at this please?
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
do we have automated testing for this?
Comment 8•13 years ago
|
||
Can Marionette help with testing that?
Assignee | ||
Comment 9•13 years ago
|
||
brad - no.
olli - most android devcies, most mbp, some windows laptops, fewer linux laptops.
I'll take a look.
Assignee: nobody → doug.turner
Assignee | ||
Comment 10•13 years ago
|
||
The Mac device motion data is generated from the "SMC" Motion Sensor. This sensor's purpose is to detect sudden acceleration changes and inform the storage system to avoid damaging spinning hard drive platters.
Mac Book's have no other known sensors that detect orientation data.
Although you can roughly determine orientation changes based on acceleration, we are not doing that.
Many Android devices support both acceleration and orientation sensors. This is why the demo works fine on Android devices (although the axis is incorrect in the demo).
The demo can be fixed to support both devices that have no orientation sensors.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 11•13 years ago
|
||
Assignee | ||
Comment 12•13 years ago
|
||
oh, and when I said you could determine orientation based on acceleration -- i meant it in the loosest way possible. accelerometers do not measure pitch. you really need a gyro.
Comment 13•13 years ago
|
||
Ah, ok. We really really really need to fix our docs, then. And get Chrome to drop support for this event on this hardware.... or do whatever they do.
Assignee | ||
Comment 14•13 years ago
|
||
i'll work on the chrome bit.
Comment 15•13 years ago
|
||
Added dev-doc-needed so we can track this for documentation (see Comment 13)
Keywords: dev-doc-needed
Comment 16•12 years ago
|
||
The https://developer.mozilla.org/en-US/docs/WebAPI/Detecting_device_orientation article has been updated.
It provides a live example for the deviceorientation event but Firefox and Chrome does not handle the angle the same ways on some axis.
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•