Skip to content
Snippets Groups Projects
Commit 67814555 authored by Brian Peiris's avatar Brian Peiris
Browse files

Fix Firefox Reality detection

parent 578ac160
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,10 @@ function isMaybeDaydreamCompatibleDevice(ua) {
const GENERIC_ENTRY_TYPE_DEVICE_BLACKLIST = [/cardboard/i];
export function detectInHMD() {
const isOculusBrowser = /Oculus/.test(navigator.userAgent);
return isOculusBrowser;
const ua = navigator.userAgent;
const isFirefoxReality = /Firefox/.test(ua) && /Android/.test(ua) && window.hasNativeWebVRImplementation;
const isOculusBrowser = /Oculus/.test(ua);
return isOculusBrowser || isFirefoxReality;
}
// Tries to determine VR entry compatibility regardless of the current browser.
......
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