diff --git a/config.js b/config.js index 209cc84e7b..10207182cd 100644 --- a/config.js +++ b/config.js @@ -107,5 +107,12 @@ var config = { // eslint-disable-line no-unused-vars // How long we're going to wait, before going back to P2P after // the 3rd participant has left the conference (to filter out page reload) //backToP2PDelay: 5 + }, + // Information about the jitsi-meet instance we are connecting to, including the + // user region as seen by the server. + deploymentInfo: { + //shard: "shard1", + //region: "europe", + //userRegion: "asia" } }; diff --git a/local.html b/local.html deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/modules/analytics/analytics.js b/modules/analytics/analytics.js index d42440a64a..25007e4102 100644 --- a/modules/analytics/analytics.js +++ b/modules/analytics/analytics.js @@ -4,7 +4,7 @@ * Load the integration of a third-party analytics API such as Google * Analytics. Since we cannot guarantee the quality of the third-party service * (e.g. their server may take noticeably long time to respond), it is in our - * best interest (in the sense that the intergration of the analytics API is + * best interest (in the sense that the integration of the analytics API is * important to us but not enough to allow it to prevent people from joining * a conference) to download the API asynchronously. Additionally, Google * Analytics will download its implementation asynchronously anyway so it makes @@ -77,7 +77,7 @@ class Analytics { Promise.all(handlersPromises).then(values => { values.forEach(el => { if(el.type === "error") { - console.log("Fialed to load " + el.url); + console.log("Failed to load " + el.url); console.error(el.error); } }); @@ -122,15 +122,14 @@ class Analytics { if (group) { permanentProperties.group = group; } - /** - * optionally include local deployment information, - * window.jitsiDeploymentInfo defined outside of application - * to use, override contents in local.html - **/ - if (window.jitsiDeploymentInfo) { - for (var key in window.jitsiDeploymentInfo) { - permanentProperties[key] - = window.jitsiDeploymentInfo[key]; + // optionally include local deployment information based on + // the contents of window.config.deploymentInfo + if (config.deploymentInfo) { + for (let key in config.deploymentInfo) { + if (config.deploymentInfo.hasOwnProperty(key)) { + permanentProperties[key] + = config.deploymentInfo[key]; + } } }