diff --git a/src/hub.js b/src/hub.js index 3f636339bb4bf47c2628ec9849367f66500e317a..e3f759cfd5d8a0c1627d8b85c54933de961acd3b 100644 --- a/src/hub.js +++ b/src/hub.js @@ -389,14 +389,12 @@ document.addEventListener("DOMContentLoaded", async () => { if (availableVREntryTypes.isInHMD) { remountUI({ availableVREntryTypes, forcedVREntryType: "vr" }); - if (AFRAME.utils.device.getVRDisplay().displayName.indexOf("Cardboard") >= 0) { - // HACK - The polyfill reports Cardboard as the primary VR display on startup - // 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 vrDisplay = displays.length && displays[0]; - AFRAME.utils.device.getVRDisplay = () => vrDisplay; - } + // HACK - The polyfill reports Cardboard as the primary VR display on startup + // 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 vrDisplay = displays.length && displays[0]; + AFRAME.utils.device.getVRDisplay = () => vrDisplay; } else { remountUI({ availableVREntryTypes }); }