|
@@ -21,10 +21,11 @@ var JitsiTrackError = require("../../JitsiTrackError");
|
21
|
21
|
// allow it to prevent people from joining a conference) to (1) start
|
22
|
22
|
// downloading their API as soon as possible and (2) do the downloading
|
23
|
23
|
// asynchronously.
|
24
|
|
-function loadCallStatsAPI() {
|
|
24
|
+function loadCallStatsAPI(customScriptUrl) {
|
25
|
25
|
if(!isCallstatsLoaded) {
|
26
|
26
|
ScriptUtil.loadScript(
|
27
|
|
- 'https://api.callstats.io/static/callstats.min.js',
|
|
27
|
+ customScriptUrl ? customScriptUrl :
|
|
28
|
+ 'https://api.callstats.io/static/callstats.min.js',
|
28
|
29
|
/* async */ true,
|
29
|
30
|
/* prepend */ true);
|
30
|
31
|
isCallstatsLoaded = true;
|
|
@@ -122,7 +123,7 @@ function Statistics(xmpp, options) {
|
122
|
123
|
// requests to any third parties.
|
123
|
124
|
&& (Statistics.disableThirdPartyRequests !== true);
|
124
|
125
|
if(this.callStatsIntegrationEnabled)
|
125
|
|
- loadCallStatsAPI();
|
|
126
|
+ loadCallStatsAPI(this.options.callStatsCustomScriptUrl);
|
126
|
127
|
this.callStats = null;
|
127
|
128
|
// Flag indicates whether or not the CallStats have been started for this
|
128
|
129
|
// Statistics instance
|