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

COmment

parent 9295157c
No related branches found
No related tags found
No related merge requests found
...@@ -390,8 +390,9 @@ document.addEventListener("DOMContentLoaded", async () => { ...@@ -390,8 +390,9 @@ document.addEventListener("DOMContentLoaded", async () => {
remountUI({ availableVREntryTypes, forcedVREntryType: "vr" }); remountUI({ availableVREntryTypes, forcedVREntryType: "vr" });
if (AFRAME.utils.device.getVRDisplay().displayName.indexOf("Cardboard") >= 0) { if (AFRAME.utils.device.getVRDisplay().displayName.indexOf("Cardboard") >= 0) {
// HACK - Oculus Go sometimes reports Cardboard as the primary VR display on startup // HACK - The polyfill reports Cardboard as the primary VR display on startup
// and that is cached by A-Frame, so we need to resolve that before entering as well. // out ahead of Oculus Go on Oculus Browser 5.5.0. This display is cached by A-Frame,
// so we need to resolve that and get the real VRDisplay before entering as well.
const displays = await navigator.getVRDisplays(); const displays = await navigator.getVRDisplays();
const vrDisplay = displays.length && displays[0]; const vrDisplay = displays.length && displays[0];
AFRAME.utils.device.getVRDisplay = () => vrDisplay; AFRAME.utils.device.getVRDisplay = () => vrDisplay;
......
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