Open jordyno opened 6 years ago
Do you see any error messages on the console? Does the view not move at all, or does it move in the wrong direction, erratically, etc?
I also found this StackOverflow thread and this Chrome bug suggesting that the rotation angles are reported incorrectly on the Surface. Can you try applying the suggested fix to DeviceOrientationControlMethod.js?
The view does not move at all, no response after pressing the navigation mode button. Could be the chrome bug you linked to. Nothing on the console other than the deprecation warning mentioned above, seen in the demo, as it runs on HTTP only. Having this on my HTTPS server comes out with no error/warning, other than "the key 'target-densitydpi' is not supported", which I guess should be unrelated, even though I receive no such warning on Edge or IE11 console.
Yes, "target-densitydpi" is unrelated. I would try the fix mentioned in comment #12 on the Chrome bug (swap alpha/beta/gamma).
If you manage to get it working, please contribute the fix :)
Of course I will, no need to ask :)
Looking further into this, seems like a deviceorientation
and devicemotion
event implementation bug somewhere between Surface Pro gyro driver and windows API. Microsoft has done something differently, but they adjusted Edge and IE11 to be conform with this change, at least for the most part. I know this is bit offtopic, but I have no idea where to post this:
IE11: deviceorientation + devicemotion both work
Edge: deviceorientation works, trying to get devicemotion crashes the page
Chrome: getting null on alpha, beta, gamma, no acceleration data. Only some data on accelerationIncludingGravity and rotationRate.
Opera: getting some strange small numbers on acceleration, and accelerationIncludingGravity. Some small numbers on rotationRate. Other than that no data.
Firefox: getting null on alpha, beta, gamma and as the only browser coming out false with ondeviceorientation
. Some data on accelerationIncludingGravity, 0 on the rest.
Will try this again when I upgrade to Fall Creators Update, but that will take some time. Had it for a day or so and it was loaded with bugs.
Looks like controlling the view using DeviceOrientationControlMethod.js works on Microsoft Surface pro only on IE11 and Edge. I even tried to run it on HTTPS server to make sure the "deprecating powerful features on insecure origins" for Chrome does not apply. Any idea if this is a device-specific issue? I know MS has certain "unusual" implementations of their tech but could this be the case too?