New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 730440 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature

Blocked on:
issue 849313

Blocking:
issue 820308



Sign in to add a comment

[sensor]RelativeOrientationSensor is inactive on Windows

Reported by canx....@intel.com, Jun 7 2017

Issue description

UserAgent: 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
 
Labels: Needs-Triage-M61
Cc: reillyg@chromium.org alexande...@intel.com mikhail....@intel.com
Components: Blink>Sensor
Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
Status: Available (was: Unconfirmed)
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.
Labels: -Needs-Triage-M61

Comment 4 by canx....@intel.com, Jun 8 2017

OK, thanks.
BTW, may I know if OrientationSensor will be implemented on Mac and Linux?
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.
Cc: juncai@chromium.org
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).
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.

Comment 8 Deleted

Comment 9 by canx....@intel.com, 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.
reilly@ juncai@ Do we need to add fusion for RelativeOrientation on Windows? I think there was CL but it was abandoned.
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.

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?
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.

Comment 14 by donna...@intel.com, Mar 23 2018

Blocking: 820308

Comment 15 by donna...@intel.com, 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.
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.

Comment 17 by donna...@intel.com, Mar 26 2018

Cc: donna...@intel.com
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. 
Cc: -juncai@chromium.org
Owner: juncai@chromium.org
Status: Assigned (was: Available)
I'll start working on that soon.
Status: Started (was: Assigned)
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.
Blockedon: 849313
Cc: juncai@chromium.org
Owner: ----
Status: Available (was: Started)

Sign in to add a comment