immersive-web / webvr

Archival repository for the legacy WebVR Specification.
Other
13 stars 14 forks source link

API user UX problem: oculus/steam popup #1

Closed Kuranes closed 6 years ago

Kuranes commented 6 years ago

Currently, when we just want to know if user has a headset, current implementation does load oculus/steam ... freezing for several seconds the user computer. ( navigator.getVRDisplays )

And we do that just to know if user can do VR (idea is to display an icon only if user can do VR)

We tried postponing the check to when user wants to go in VR, but then you hit the "user interaction" problem being lost between navigator.getVRDisplays() and requestPresent().

1 - are the steam/oculus popup mandatory each time ? 2 - can requestPresent from a getVRDisplays Promise(s) chain(s) still be flagged as "user interaction"

toji commented 6 years ago

This is an unfortunate side effect of the way the API was designed, because we need poses as soon as the VRDisplay is returned or magic window content doesn't work, you can't get poses unless the services are started, and starting the services launches the various trays or storefronts of the respective companies. 😛

It's not going to be something that we can fix in WebVR but it was a big focus when designing the WebXR API, which will replace WebVR once it's been finished and released. In that API you can query for the existence of a headset (called an XRDevice in that spec) without spinning up tracking (you have to explicitly request an XRSession for that.)

Kuranes commented 6 years ago

Thanks a lot for the detailed answer.