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

Refactor

parent 6045c100
No related branches found
No related tags found
No related merge requests found
......@@ -62,12 +62,7 @@ export async function getAvailableVREntryTypes() {
: VR_DEVICE_AVAILABILITY.maybe
: VR_DEVICE_AVAILABILITY.no;
let displays = [];
if (isWebVRCapableBrowser) {
displays = await navigator.getVRDisplays();
}
const displays = isWebVRCapableBrowser ? await navigator.getVRDisplays() : [];
const isFirefoxReality = window.orientation === 0 && "buildID" in navigator && displays.length > 0;
const isInHMD = isOculusBrowser || isFirefoxReality;
......
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