Webvr Plugin doesn't work with 1.1 of the spec when published

Hi,
The PlayCanvas WebVr plugin when used on published projects has been broken for the last 3 versions of Chromium. The latest version of chromium is the most incompatible yet (you cannot even click to enterVR). However on the positive side the error messages are getting better :slight_smile:

Current situation for my HTC Vive WebVr plugin projects are:

Launching from the editor is fine

Launching published versions don’t work. Previous chromium (september) versions simply resulted in the controllers not being recognised. The latest version will not event go into VR mode and outputs the following to the console.

Uncaught (in promise) DOMException: Access to VR devices is not allowed in this context.

So at the moment I am still unable to publish any working projects on PlayCanvas for the HTC Vive and its controllers and have been in that situation for over a month.

ps. on a general note The WebVR plugin for playcanvas hasn’t moved on for about 3 months., I can build working apps in aFrame that work with the latest specs, aFrame’s editor is getting better every day and currently they are blogging about a shooter they are building to show of the power of their platform. I cannot help but feel that the PlayCanvas platform is falling behind in the race to bring VR to the web.

Why does it work from the launch page and not from the published page? Does it work for the embed link? Add /e/ in front of the path for the published page. e.g. https://playcanv.as/e/p/123456

Possibly this is due to a new attribute allowvr which is required on iframes. Have you tried running outside of an iframe?


WebVR is one of a very many priorities we have here at PlayCanvas and whilst it is hugely exciting and will no doubt be a big part of our future at the moment it is still pre-release and changing rapidly (as you can see). We have to balance our development time on WebVR (a feature usable on a handful of development builds of browsers) with other features that benefit our community of 100,000 WebGL developers. I realise that it is important to you, but obviously we can only work on so many things at a time.

To help us make the best WebVR experiences we always welcome:

  • clear bug reports which are verified problems with PlayCanvas
  • contributions to the WebVR plugin
  • discussion of improvements to our WebVR plugin API as the main plugin changes.

I’ve updated the published app page to include the allowvr flag on the iframe. Let me know if this fixes the error.

Thanks,

Good news and bad news,

Good News: The published version displays in the HMD,
Bad News: The previous issue of the gamepads not working still remains. If I use the editor launch or if I copy the published version locally it will work. But publishing on the playcanvas site always results in the navigator.getGamepads() returning nulls for HTC vive controllers.

Have you tried running a published build using the embed link (/e/) and test the gamepads?

Putting in the /e/ option didn’t effect the gamepads, it did seem to cause the applications to become unstable. I encountered lots of chrome snap situations when trying the /e/ option but eventually got it working long enough to test.

Running with /e/ almost certainly won’t effect stability. All it does it run the page without the iframe.

The other thing I noticed on webvr.info is you have to explicitly enable gamepads in the chrome settings now.

Yes i know about enabling the gamepads, like I said it works fine from the editor or locally , just the published versions are effected.