Skip to content
Snippets Groups Projects
Commit 68479c76 authored by Greg Fodor's avatar Greg Fodor
Browse files

Add proper FxR check

parent ef3c4387
No related branches found
No related tags found
No related merge requests found
......@@ -46,12 +46,12 @@ export async function getAvailableVREntryTypes() {
const ua = navigator.userAgent;
const isSamsungBrowser = browser.name === "chrome" && /SamsungBrowser/.test(ua);
const isOculusBrowser = /Oculus/.test(ua);
const isFirefoxReality = /Firefox Reality/.test(ua);
const isInHMD = isOculusBrowser || isFirefoxReality;
// This needs to be kept up-to-date with the latest browsers that can support VR and Hubs.
// Checking for navigator.getVRDisplays always passes b/c of polyfill.
const isWebVRCapableBrowser = window.hasNativeWebVRImplementation;
const isFirefoxReality = /Firefox for Android/.test(ua) && isWebVRCapableBrowser;
const isInHMD = isOculusBrowser || isFirefoxReality;
const isDaydreamCapableBrowser = !!(isWebVRCapableBrowser && browser.name === "chrome" && !isSamsungBrowser);
const isIDevice = AFRAME.utils.device.isIOS();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment