googlearchive / vrview

Library for embedding immersive media into traditional websites.
http://developers.google.com/cardboard/vrview
Apache License 2.0
1.71k stars 1.09k forks source link

[Android] Accelerometer tracking broken on latest Chrome update #274

Open computerjazz opened 6 years ago

computerjazz commented 6 years ago

Steps to reproduce: update chrome on android device and go to https://developers.google.com/vr/concepts/vrview Example does not respond to phone orientation changes.

Hoping that upcoming Chromium release fixes the issue: https://bugs.chromium.org/p/chromium/issues/detail?id=779443#c39

jsantell commented 6 years ago

Is this Chrome 62.0? Related: https://github.com/googlevr/webvr-polyfill/issues/291

jsantell commented 6 years ago

And is this specifically for webview?

computerjazz commented 6 years ago

It is definitely an issue for webview, but I also see the issue when navigating to the above link in android chrome 62.0.3202.84.

When I open up the remote device Chrome developer tools for that link I see:

THREE.WebGLRenderer 81
embed.min.js:8 No DPDB device match.
Dpdb.calcDeviceParams_ @ embed.min.js:8
embed.min.js:8 Failed to recalculate device parameters.
Dpdb.recalculateDeviceParams_ @ embed.min.js:8
embed.min.js:7 Using fallback Android device measurements.
DeviceInfo.determineDevice_ @ embed.min.js:7
embed.min.js:8 No DPDB device match.
Dpdb.calcDeviceParams_ @ embed.min.js:8
embed.min.js:8 Failed to recalculate device parameters.
Dpdb.recalculateDeviceParams_ @ embed.min.js:8
3index.html:1 Uncaught (in promise) DOMException: Access to the feature "vr" is disallowed by feature policy.
embed.min.js:6 Uncaught (in promise) TypeError: Cannot read property 'isPolyfilled' of null
    at WebVRManager.<anonymous> (embed.min.js:6)
    at <anonymous>
2vrview.min.js:1 Received message with no type.

Here's what I see -- image does not move with phone movement: screen shot 2017-11-13 at 10 32 12 am

I have been able to successfully view some 360 content in chrome, so I can't pinpoint the exact issue.

aerialglasgow commented 6 years ago

Hi Daniel

I am experiencing this issue with the same mobile version of Android Chrome (62.0.3202.84) and not when using the Samsung Internet browser, save device, which is rendering 360 vrview content as expected.

62.0.3202.84 seems to the very latest stable version available.

Neill

*Aerial Digital Ltd*
Tel 0141 416 5010 | neill@aerialdigital.co.uk
Studio 407, South Block, 60 Osborne Street, Glasgow, G1 5QH
appdeveloperscotland.co.uk | Twitter <https://twitter.com/appscotland>

| LinkedIn http://uk.linkedin.com/in/neillritchie

On 13 November 2017 at 18:30, Daniel Merrill notifications@github.com wrote:

It is definitely an issue for webview, but I also see the issue when navigating to the above link in android chrome 62.0.3202.84.

I have been able to successfully view some 360 content in chrome, so I can't pinpoint the exact issue.

When I open up the remote device Chrome developer tools I see:

THREE.WebGLRenderer 81 embed.min.js:8 No DPDB device match. Dpdb.calcDeviceParams @ embed.min.js:8 embed.min.js:8 Failed to recalculate device parameters. Dpdb.recalculateDeviceParams @ embed.min.js:8 embed.min.js:7 Using fallback Android device measurements. DeviceInfo.determineDevice @ embed.min.js:7 embed.min.js:8 No DPDB device match. Dpdb.calcDeviceParams @ embed.min.js:8 embed.min.js:8 Failed to recalculate device parameters. Dpdb.recalculateDeviceParams_ @ embed.min.js:8 3index.html:1 Uncaught (in promise) DOMException: Access to the feature "vr" is disallowed by feature policy. embed.min.js:6 Uncaught (in promise) TypeError: Cannot read property 'isPolyfilled' of null at WebVRManager. (embed.min.js:6) at 2vrview.min.js:1 Received message with no type.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/googlevr/vrview/issues/274#issuecomment-344013093, or mute the thread https://github.com/notifications/unsubscribe-auth/AOpzkgWVAbj7oAZC1z9CLM2Nd6R198Sxks5s2IrLgaJpZM4QcMK2 .

ademarre commented 6 years ago

I see the same issues on Android after updating to Chrome 62. It is only a problem when running VR View through a cross-domain iframe, and it is solved by adding allow="vr" Feature Policy attribute to the <iframe>.

In addition to the accelerometer, these issues present as well:

Perhaps coincidentally, Firefox on Android is broken with the same symptoms, but allow="vr" does not resolve it.

aerialglasgow commented 6 years ago

Thanks for the advice. But I didn't see this resolved by adding the allow=vr attribute to vrview.js, line 513, when the iframe is created

iframe.setAttribute('allow', 'vr');

Is this the route to add the attribute? The only one I could see within the code.

*Aerial Digital Ltd*
Tel 0141 416 5010 | neill@aerialdigital.co.uk
Studio 407, South Block, 60 Osborne Street, Glasgow, G1 5QH
appdeveloperscotland.co.uk | Twitter <https://twitter.com/appscotland>

| LinkedIn http://uk.linkedin.com/in/neillritchie

On 16 November 2017 at 19:33, Andre DeMarre notifications@github.com wrote:

I see the same issues on Android after updating to Chrome 62. It is only a problem when running VR View through a cross-domain iframe, and it is solved by adding allow="vr" Feature Policy attribute to the