Pārlūkot izejas kodu

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

Fix non-ASCII letter in Statistics.sendActiveDeviceListEvent() method
dev1
tsareg 9 gadus atpakaļ
vecāks
revīzija
dd7b70d939

+ 1
- 1
JitsiConference.js Parādīt failu

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

+ 4
- 2
JitsiMediaDevices.js Parādīt failu

@@ -30,8 +30,10 @@ function logOutputDevice (deviceID, devices) {
30 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 39
 var JitsiMediaDevices = {

+ 1
- 1
modules/statistics/CallStats.js Parādīt failu

@@ -293,7 +293,7 @@ CallStats.sendDominantSpeakerEvent = _try_catch(function (cs) {
293 293
  * @param {{deviceList: {String:String}}} list of devices with their data
294 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 298
     CallStats._reportEvent.call(cs, fabricEvent.activeDeviceList, devicesData);
299 299
 });

+ 5
- 4
modules/statistics/statistics.js Parādīt failu

@@ -253,15 +253,16 @@ Statistics.prototype.sendDominantSpeakerEvent = function () {
253 253
 
254 254
 /**
255 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 260
     if (Statistics.callsStatsInstances.length) {
260 261
         Statistics.callsStatsInstances.forEach(function (cs) {
261
-            CallStats.sendАctiveDeviceListEvent(devicesData, cs);
262
+            CallStats.sendActiveDeviceListEvent(devicesData, cs);
262 263
         });
263 264
     } else {
264
-        CallStats.sendАctiveDeviceListEvent(devicesData, null);
265
+        CallStats.sendActiveDeviceListEvent(devicesData, null);
265 266
     }
266 267
 };
267 268
 

Notiek ielāde…
Atcelt
Saglabāt