@flashphoner/websdk 2.0.271 → 2.0.272

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13373,6 +13373,9 @@ const StreamStatsCollector = function(description, id, mediaConnection, wsConnec
13373
13373
  statCollector.metricsBatch = null;
13374
13374
  }
13375
13375
  },
13376
+ isMetricValid: function(value) {
13377
+ return value != null && value !== "" && value !== "undefined" && value !== "null";
13378
+ },
13376
13379
  collectMetrics: async function() {
13377
13380
  if (statCollector.timer && !statCollector.timerBusy) {
13378
13381
  // Unfortunately there are no real atomics in JS unless SharedArrayBuffer is used
@@ -13402,7 +13405,7 @@ const StreamStatsCollector = function(description, id, mediaConnection, wsConnec
13402
13405
  }
13403
13406
  }
13404
13407
  }
13405
- if (value) {
13408
+ if (statCollector.isMetricValid(value)) {
13406
13409
  metrics.push(value);
13407
13410
  } else {
13408
13411
  lostMetrics.push(descriptor);