Merge pull request #1740 from bgrozev/refactor-deployment-info
Refactor deployment info
This commit is contained in:
commit
5c199e2195
|
@ -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"
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue