ref: Uses config.deploymentInfo instead of window.jitsiDeploymentInfo.

This commit is contained in:
Boris Grozev 2017-07-05 16:07:16 -05:00
parent 2a3c4cfb82
commit b09613b943
1 changed files with 7 additions and 11 deletions

View File

@ -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,11 @@ 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 (var key in config.deploymentInfo) {
permanentProperties[key] = config.deploymentInfo[key];
}
}