diff --git a/src/assets/translations.data.json b/src/assets/translations.data.json index 79d11599544849a83f9982617dafddd3bb6c268a..1f8ae6a1b0986b0576ad3dd567b1fc8bb96c1d86 100644 --- a/src/assets/translations.data.json +++ b/src/assets/translations.data.json @@ -40,6 +40,7 @@ "exit.subtitle.closed": "This room is no longer available.", "exit.subtitle.full": "This room is full, please try again later.", "exit.subtitle.connect_error": "Unable to connect to this room, please try again later.", + "exit.subtitle.version_mismatch": "The version you deployed is not available yet. Your browser will refresh in 5 seconds.", "autoexit.title": "Auto-ending session in ", "autoexit.title_units": " seconds", "autoexit.subtitle": "You have started another session.", diff --git a/src/hub.js b/src/hub.js index fa21149111a673f2390b7acc6b33eaeb3dbfa840..d66de1f4ffae134ee535e1bc6b38a4baf562f9e7 100644 --- a/src/hub.js +++ b/src/hub.js @@ -432,6 +432,13 @@ const onReady = async () => { return; } + if (qs.required_version && qs.required_version !== process.env.BUILD_VERSION) { + remountUI({ roomUnavailableReason: "version_mismatch" }); + setTimeout(() => document.location.reload(), 5000); + exitScene(); + return; + } + getAvailableVREntryTypes().then(availableVREntryTypes => { if (availableVREntryTypes.gearvr === VR_DEVICE_AVAILABILITY.yes) { remountUI({ availableVREntryTypes, forcedVREntryType: "gearvr" }); diff --git a/webpack.config.js b/webpack.config.js index 3c92d1b38b746d1646696d0eb93d7b3f00fadd2b..163ddf37ffe155790bf97771510187b90f9ca2ca 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -266,7 +266,8 @@ const config = { NODE_ENV: process.env.NODE_ENV, JANUS_SERVER: process.env.JANUS_SERVER, DEV_RETICULUM_SERVER: process.env.DEV_RETICULUM_SERVER, - ASSET_BUNDLE_SERVER: process.env.ASSET_BUNDLE_SERVER + ASSET_BUNDLE_SERVER: process.env.ASSET_BUNDLE_SERVER, + BUILD_VERSION: process.env.BUILD_VERSION }) }) ]