[sensor]RelativeOrientationSensor is inactive on Windows
Reported by
canx....@intel.com,
Jun 7 2017
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Steps to reproduce the problem: 1.Enter the test case: https://test-dot-genericsensors.appspot.com/ 2.Click the button at the top right corner 3.A popup shows, and choose the "RelativeOrientation" Sensor type, click "ADD" button 4.Turn on the switch button 5.Rotate the device What is the expected behavior? The sensor is activated. What went wrong? Sensor is inactive, no reading. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 61.0.3122.0 Channel: canary OS Version: Windows 10, Windows 8.1 Flash Version: Shockwave Flash 25.0 r0
,
Jun 8 2017
canx.cao@ I'm not sure it is a bug. It is not supported on Windows. GenericSensor API reports 'NotSupported' error correctly. I will change this bug to feature-request.
,
Jun 8 2017
,
Jun 8 2017
OK, thanks. BTW, may I know if OrientationSensor will be implemented on Mac and Linux?
,
Jun 8 2017
Mac - no plans at the moment. Windows and Linux - we need to implement generic fusion algorithm that will provide data for Absolute and Relative orientation sensors.
,
Jun 8 2017
juncai@ started a RELATIVE_ORIENTATION implementation for macOS based on its accelerometer: https://codereview.chromium.org/2929603003/ It would be nice to see this algorithm made generic (and support a fusion of multiple sensors if they are available).
,
Jun 8 2017
reilly@ that is great! canx.cao@ maybe you can follow https://codereview.chromium.org/2929603003/ and test when it lands. I think you will need HW with sudden motion sensor.
,
Jun 9 2017
alexander.shalamov@, I found a note in https://support.apple.com/en-us/HT201666 Computers with Solid State Drives (SSD) or Flash Storage do not use SMS as the drives have no moving parts. And I also chated with apple supporter, he told me that all the macbooks have gone to flash storage, so none of them would have it any longer.It would likly not be on any MacBook moad in at least the last 5 years. We don't have any macbooks support the Sudden Motion Sensor.
,
Aug 18 2017
reilly@ juncai@ Do we need to add fusion for RelativeOrientation on Windows? I think there was CL but it was abandoned.
,
Aug 18 2017
The abandoned CL is: https://chromium-review.googlesource.com/c/592108 The argument for this is that in the current device orientation event implementation on Windows, RelativeOrientation falls back on AbsoluteOrientation: https://cs.chromium.org/chromium/src/device/sensors/data_fetcher_shared_memory_win.cc?l=231-261 So to match this, the RelativeOrientation is not implemented on Windows.
,
Aug 18 2017
It's a very simple change to make this work. The question is whether it makes more sense for the API to encourage applications to implement their own fallback to the AbsoluteOrientationSensor or if this is something the platform should do for them. What do the spec authors think?
,
Aug 18 2017
Another thought I had looking at the spec is that it requires an extra permission token ("magnetometer") to request the AbsoluteOrientationSensor. Chrome is not currently distinguishing between these permissions but it does seem unexpected to silently upgrade a request to a sensor with more privilege.
,
Mar 23 2018
,
Mar 23 2018
Hi, reilly@, Juncai@ and Alexander@, WebVR/XR is now using RelativeOrientationSensor for MagicWindow feature which is blocked(#820308) on Windows by this issue, while works well on Android. As the RelativeOrientationSensor interface is shipping, would it be better to have implementation for all platforms.
,
Mar 23 2018
Looking at the Windows API there doesn't appear to be a relative orientation sensor available on the platform. The right answer is either for the application to fall back to using an AbsoluteOrientationSensor or to fake it on this platform and return data from the absolute sensor ourselves.
,
Mar 26 2018
,
May 8 2018
Given the permissions issues associated with falling back to the absolute orientation sensor I think we should deploy our fusion relative orientation sensor on Windows.
,
May 8 2018
I'll start working on that soon.
,
May 8 2018
,
Jun 1 2018
juncai@ started a change to fix this issue (https://crrev.com/c/1053414/) but it highlighted a problem in that on Windows we cannot synchronously determine whether a sensor is supported by the platform. In issue 224849 I fixed a simple case where this was possible but the general solution is to move all of our sensor fusion fallback logic into a single place that sits on top of all the platform-specific PlatformSensorProvider implementations and can asynchronously traverse the graph of possible fallbacks.
,
Jun 4 2018
,
Oct 4
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by ligim...@chromium.org
, Jun 7 2017