Procházet zdrojové kódy

Sends applicationVersion to callstats.

dev1
damencho před 8 roky
rodič
revize
6e2c250adf

+ 2
- 1
JitsiConference.js Zobrazit soubor

@@ -270,7 +270,8 @@ JitsiConference.prototype._init = function(options = {}) {
270 270
             callStatsID: config.callStatsID,
271 271
             callStatsSecret: config.callStatsSecret,
272 272
             roomName: this.options.name,
273
-            swapUserNameAndAlias: config.enableStatsID
273
+            swapUserNameAndAlias: config.enableStatsID,
274
+            applicationName: config.applicationName
274 275
         });
275 276
     }
276 277
 

+ 13
- 1
modules/statistics/CallStats.js Zobrazit soubor

@@ -359,12 +359,24 @@ export default class CallStats {
359 359
             CallStats.callStatsID = options.callStatsID;
360 360
             CallStats.callStatsSecret = options.callStatsSecret;
361 361
 
362
+            let configParams;
363
+
364
+            if (options.applicationName) {
365
+                configParams = {
366
+                    applicationVersion:
367
+                        `${options.applicationName} (${
368
+                            RTCBrowserType.getBrowserName()})`
369
+                };
370
+            }
371
+
362 372
             // userID is generated or given by the origin server
363 373
             CallStats.backend.initialize(
364 374
                 CallStats.callStatsID,
365 375
                 CallStats.callStatsSecret,
366 376
                 CallStats.userID,
367
-                CallStats._initCallback);
377
+                CallStats._initCallback,
378
+                undefined,
379
+                configParams);
368 380
 
369 381
             return true;
370 382
         } catch (e) {

+ 2
- 1
modules/statistics/statistics.js Zobrazit soubor

@@ -321,7 +321,8 @@ Statistics.prototype.startCallStats = function(tpc, remoteUserID) {
321 321
             userName: this.options.swapUserNameAndAlias
322 322
                 ? this.options.callStatsAliasName : userName,
323 323
             aliasName: this.options.swapUserNameAndAlias
324
-                ? userName : this.options.callStatsAliasName
324
+                ? userName : this.options.callStatsAliasName,
325
+            applicationName: this.options.applicationName
325 326
         })) {
326 327
 
327 328
             // Backend initialization failed bad

Načítá se…
Zrušit
Uložit