Skip to content

Commit

Permalink
Merge pull request #3408 from mozilla/UseQsVREntryType
Browse files Browse the repository at this point in the history
Use qsVREntryType as forcedVREntryType when remounting UI for mobileVR if it is available
  • Loading branch information
robertlong authored Feb 20, 2021
2 parents 38adde2 + f217fd5 commit 56c0906
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,11 @@ document.addEventListener("DOMContentLoaded", async () => {

availableVREntryTypesPromise.then(async availableVREntryTypes => {
if (isMobileVR) {
remountUI({ availableVREntryTypes, forcedVREntryType: "vr", checkingForDeviceAvailability: false });
remountUI({
availableVREntryTypes,
forcedVREntryType: qsVREntryType || "vr",
checkingForDeviceAvailability: false
});

if (/Oculus/.test(navigator.userAgent) && "getVRDisplays" in navigator) {
// HACK - The polyfill reports Cardboard as the primary VR display on startup out ahead of
Expand Down

0 comments on commit 56c0906

Please sign in to comment.