瀏覽代碼

Do not send event to callstats when no audiooutput devices are available.

Fix non-ASCII letter in Statistics.sendActiveDeviceListEvent() method
dev1
tsareg 9 年之前
父節點
當前提交
dd7b70d939
共有 4 個文件被更改,包括 11 次插入8 次删除
  1. 1
    1
      JitsiConference.js
  2. 4
    2
      JitsiMediaDevices.js
  3. 1
    1
      modules/statistics/CallStats.js
  4. 5
    4
      modules/statistics/statistics.js

+ 1
- 1
JitsiConference.js 查看文件

340
                 && d.label === track.getTrack().label;
340
                 && d.label === track.getTrack().label;
341
         });
341
         });
342
         if(device)
342
         if(device)
343
-            Statistics.sendАctiveDeviceListEvent(
343
+            Statistics.sendActiveDeviceListEvent(
344
                 RTC.getEventDataForActiveDevice(device));
344
                 RTC.getEventDataForActiveDevice(device));
345
     }
345
     }
346
     return new Promise(function (resolve, reject) {
346
     return new Promise(function (resolve, reject) {

+ 4
- 2
JitsiMediaDevices.js 查看文件

30
         return d.kind === 'audiooutput' && d.deviceId === deviceID;
30
         return d.kind === 'audiooutput' && d.deviceId === deviceID;
31
     });
31
     });
32
 
32
 
33
-    Statistics.sendАctiveDeviceListEvent(
34
-        RTC.getEventDataForActiveDevice(device));
33
+    if (device) {
34
+        Statistics.sendActiveDeviceListEvent(
35
+            RTC.getEventDataForActiveDevice(device));
36
+    }
35
 }
37
 }
36
 
38
 
37
 var JitsiMediaDevices = {
39
 var JitsiMediaDevices = {

+ 1
- 1
modules/statistics/CallStats.js 查看文件

293
  * @param {{deviceList: {String:String}}} list of devices with their data
293
  * @param {{deviceList: {String:String}}} list of devices with their data
294
  * @param {CallStats} cs callstats instance related to the event
294
  * @param {CallStats} cs callstats instance related to the event
295
  */
295
  */
296
-CallStats.sendАctiveDeviceListEvent = _try_catch(function (devicesData, cs) {
296
+CallStats.sendActiveDeviceListEvent = _try_catch(function (devicesData, cs) {
297
 
297
 
298
     CallStats._reportEvent.call(cs, fabricEvent.activeDeviceList, devicesData);
298
     CallStats._reportEvent.call(cs, fabricEvent.activeDeviceList, devicesData);
299
 });
299
 });

+ 5
- 4
modules/statistics/statistics.js 查看文件

253
 
253
 
254
 /**
254
 /**
255
  * Notifies about active device.
255
  * Notifies about active device.
256
- * @param {{deviceList: {String:String}}} list of devices with their data
256
+ * @param {{deviceList: {String:String}}} devicesData - list of devices with
257
+ *      their data
257
  */
258
  */
258
-Statistics.sendАctiveDeviceListEvent = function (devicesData) {
259
+Statistics.sendActiveDeviceListEvent = function (devicesData) {
259
     if (Statistics.callsStatsInstances.length) {
260
     if (Statistics.callsStatsInstances.length) {
260
         Statistics.callsStatsInstances.forEach(function (cs) {
261
         Statistics.callsStatsInstances.forEach(function (cs) {
261
-            CallStats.sendАctiveDeviceListEvent(devicesData, cs);
262
+            CallStats.sendActiveDeviceListEvent(devicesData, cs);
262
         });
263
         });
263
     } else {
264
     } else {
264
-        CallStats.sendАctiveDeviceListEvent(devicesData, null);
265
+        CallStats.sendActiveDeviceListEvent(devicesData, null);
265
     }
266
     }
266
 };
267
 };
267
 
268
 

Loading…
取消
儲存