Hi, I’m trying to run a simple example of WebXR locally.
I know that WebXR requires https but it is supposed to run with HTTP if you run from localhost.
I tried with Firefox and Firefox Nightly but navigator.xr is undefined when running from localhost
Is there any workaround?
Is there a simple way to setup HTTPS on a local server?
You should be able to set up a simple express server (node.js) with ssl. Just generate a local certificate using OpenSSL. Here’s a simple article that shows you how to do it.
When using an Oculus Quests, you can host a local server (HTTPS is not required), enable the developer options in the Oculus app and then connect the Quest via USB to your computer. You can then start remote debugging with Oculus Browser or Firefox Reality. Calling apps from
localhost should also work.
Great, I’m using Rift right now, but I’ll need to test in Quest soon.