0

I need to detect if the user opens a site in the Firefox Reality browser.

Is this possible with JavaScript?

I need to show a VR image when the user is using VR goggles.

Sebastian Simon
  • 18,263
  • 7
  • 55
  • 75
  • 2
    See [WebVR API](//developer.mozilla.org/en/docs/Web/API/WebVR_API) and [WebXR Device API](//developer.mozilla.org/en/docs/Web/API/WebXR_Device_API). Use feature detection, not browser detection. – Sebastian Simon Mar 23 '22 at 12:41
  • For browser detection use User Agent. https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser – Justinas Mar 23 '22 at 12:43
  • 1
    @Justinas that is not a good idea. As noted in the other comment, it is much better to test for the availability of VR APIs and consult them for details. – Pointy Mar 23 '22 at 12:47

0 Answers0