diff --git a/src/assets/translations.data.json b/src/assets/translations.data.json index fc2157bf2d75b87c1fd2887e571d0a443ea82d4d..c326deb1b1555bbd246c1e33ffb050af23ef1811 100644 --- a/src/assets/translations.data.json +++ b/src/assets/translations.data.json @@ -4,16 +4,16 @@ "entry.desktop-screen": "Screen", "entry.mobile-screen": "Phone", "entry.mobile-safari": "Safari", - "entry.generic-prefix": "Enter in ", - "entry.generic-medium": "VR", + "entry.generic-prefix": "Enter with ", + "entry.generic-medium": "PC VR", "entry.generic-subtitle-desktop": "Oculus or SteamVR", "entry.gearvr-prefix": "Enter on ", "entry.gearvr-medium": "Gear VR", - "entry.device-prefix-desktop": "Send to ", - "entry.device-prefix-mobile": "Enter on ", - "entry.device-medium": "Device", - "entry.device-subtitle-desktop": "Standalone Headset or Phone", - "entry.device-subtitle-mobile": "Mobile Headset or PC", + "entry.device-prefix-desktop": "Use a ", + "entry.device-prefix-mobile": "Use a ", + "entry.device-medium": "Mobile Headset", + "entry.device-subtitle-desktop": "Standalone or Phone Clip-in", + "entry.device-subtitle-mobile": "Standalone or Phone Clip-in", "entry.device-subtitle-vr": "Phone or PC", "entry.cardboard": "Enter on Google Cardboard", "entry.daydream-prefix": "Enter on ", @@ -65,7 +65,7 @@ "home.have_entry_code": "have a link code?", "mailing_list.privacy_label": "I'm okay with Mozilla handling my info as explained in", "mailing_list.privacy_link": "this Privacy Notice", - "link.in_your_browser": "In your device's browser, go to:", + "link.in_your_browser": "In your headset's browser, go to:", "link.enter_code": "Then, enter this link code:", "link.do_not_close": "Keep this dialog open to use this code.", "link.link_page_header": "Enter your code:", diff --git a/src/react-components/info-dialog.js b/src/react-components/info-dialog.js index aab0abc4820972c8938102282bd55f7858b92398..83c7d219d8b907798871a68efd63c1709a8c1125 100644 --- a/src/react-components/info-dialog.js +++ b/src/react-components/info-dialog.js @@ -355,7 +355,7 @@ class InfoDialog extends Component { ); break; case InfoDialog.dialogTypes.link: - dialogTitle = "Send Link to Device"; + dialogTitle = "Open on Headset"; dialogBody = <LinkDialog linkCode={this.props.linkCode} />; break; } diff --git a/src/utils/vr-caps-detect.js b/src/utils/vr-caps-detect.js index 3cea1c2e3029fa3354eaa3d07ecaba82b0438580..3294820125788e0343eb5f70277eefc48b75a2c2 100644 --- a/src/utils/vr-caps-detect.js +++ b/src/utils/vr-caps-detect.js @@ -50,8 +50,6 @@ export async function getAvailableVREntryTypes() { // This needs to be kept up-to-date with the latest browsers that can support VR and Hubs. // Checking for navigator.getVRDisplays always passes b/c of polyfill. const isWebVRCapableBrowser = window.hasNativeWebVRImplementation; - const isFirefoxReality = window.orientation === 0 && "buildID" in navigator && isWebVRCapableBrowser; - const isInHMD = isOculusBrowser || isFirefoxReality; const isDaydreamCapableBrowser = !!(isWebVRCapableBrowser && browser.name === "chrome" && !isSamsungBrowser); const isIDevice = AFRAME.utils.device.isIOS(); @@ -64,13 +62,23 @@ export async function getAvailableVREntryTypes() { : VR_DEVICE_AVAILABILITY.maybe : VR_DEVICE_AVAILABILITY.no; + const displays = isWebVRCapableBrowser ? await navigator.getVRDisplays() : []; + const isFirefoxReality = window.orientation === 0 && "buildID" in navigator && displays.length > 0; + const isInHMD = isOculusBrowser || isFirefoxReality; + const screen = isInHMD ? VR_DEVICE_AVAILABILITY.no : isIDevice && isUIWebView ? VR_DEVICE_AVAILABILITY.maybe : VR_DEVICE_AVAILABILITY.yes; - let generic = AFRAME.utils.device.isMobile() ? VR_DEVICE_AVAILABILITY.no : VR_DEVICE_AVAILABILITY.maybe; + // HACK -- we prompt the user to install firefox if they click the VR button on a non-WebVR compatible + // browser. once we change this (ie when Chrome has VR support) then this check can be removed. Without this + // check if you have FF on Mac/Linux you'll get the confusing flow of having a VR button but then + // being asked to download FF. + const isNonWebVRFirefox = !isWebVRCapableBrowser && isFirefoxBrowser; + let generic = + AFRAME.utils.device.isMobile() || isNonWebVRFirefox ? VR_DEVICE_AVAILABILITY.no : VR_DEVICE_AVAILABILITY.maybe; let cardboard = VR_DEVICE_AVAILABILITY.no; // We only consider GearVR support as "maybe" and never "yes". The only browser @@ -89,8 +97,6 @@ export async function getAvailableVREntryTypes() { isMaybeDaydreamCompatibleDevice(ua) && !isInHMD ? VR_DEVICE_AVAILABILITY.maybe : VR_DEVICE_AVAILABILITY.no; if (isWebVRCapableBrowser) { - const displays = await navigator.getVRDisplays(); - // Generic is supported for non-blacklisted devices and presentable HMDs. generic = displays.find( d => d.capabilities.canPresent && !GENERIC_ENTRY_TYPE_DEVICE_BLACKLIST.find(r => r.test(d.displayName))