facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.22k forks source link

View in VR button not working in Chrome v75 #718

Open ibenarobeno opened 5 years ago

ibenarobeno commented 5 years ago

For some reason after Chrome update View in VR button is no longer working. Trying to run application on Windows + Chrome + Oculus Rift. Have you got any ideas why it has happened and how to fix?

zyf970617 commented 5 years ago

I have the same problem. When using React 360, Window Chrome v76 and oculus rift, the "View in VR" button doesn't work. Does anyone have a solution

kevinsimper commented 5 years ago

I guess the detection if the browser supports VR is broken

JackPu commented 5 years ago

@zyf970617 Did you enable WebVR in chrome://flags

arryanggaputra commented 5 years ago

Same here, not working

JackPu commented 5 years ago

Chrome (inclue canary)75+ ·· navigator.getVRDisplays() return [];

So you cannot see the VR button.

UvaPrakash commented 5 years ago

View in VR button not working. It's being displayed but nothing happens on clicking view in VR button. Have enabled WebVR in Chrome flags.

Chrome version - 78.0.3904.62

irajneeshgupta commented 4 years ago

Facing similar issue. Anyone please help !! how to enable this VR button ,is it need to view in VR device to view the button @UvaPrakash I am unable to switch the view in VR mode.

UvaPrakash commented 4 years ago

@irajneeshgupta Nothing happens on clicking view in VR button. No, you should be able to see without VR Device

irajneeshgupta commented 4 years ago

@UvaPrakash

I ran some tests and find that for some devices , after enabling webVR from chrome://flags it runs very well in chrome also it enabled the gyro sensor , now it works in chrome with samsung note 9 and it works good in firefox also but unfortunately , it is not working in my device oneplus 5T with chrome (79.0.39) not sure what is blocking to switch in VR mode in my device. you should install webvr-polyfill before using it.

`import WebVRPolyfill from 'webvr-polyfill'; const polyfill = new WebVRPolyfill();

polyfill.getVRDisplays().then(displays => { console.log(displays.length); if (displays.length) { vrDisplay = displays[0]; controls = new THREE.VRControls(camera); vrDisplay.requestAnimationFrame(animate); } else { // If we don't have a VRDisplay, we're probably on // a desktop environment, so set up desktop-oriented controls controls = new THREE.OrbitControls(camera); requestAnimationFrame(animate); } });`

I also checked console while clicking button on my device by remote debugging but still no error and nothing happening.

Please help anyone. @JackPu

Thanks.