@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.
@@ -13354,6 +13354,9 @@ var StreamStatsCollector = function StreamStatsCollector(description, id, mediaC
13354
13354
  statCollector.metricsBatch = null;
13355
13355
  }
13356
13356
  },
13357
+ isMetricValid: function isMetricValid(value) {
13358
+ return value != null && value !== "" && value !== "undefined" && value !== "null";
13359
+ },
13357
13360
  collectMetrics: function () {
13358
13361
  var _collectMetrics = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
13359
13362
  var stats, metrics, lostMetrics, headersUpdated;
@@ -13400,7 +13403,7 @@ var StreamStatsCollector = function StreamStatsCollector(description, id, mediaC
13400
13403
  _iterator2.f();
13401
13404
  }
13402
13405
  }
13403
- if (value) {
13406
+ if (statCollector.isMetricValid(value)) {
13404
13407
  metrics.push(value);
13405
13408
  } else {
13406
13409
  lostMetrics.push(descriptor);
@@ -20109,6 +20109,9 @@ var StreamStatsCollector = function StreamStatsCollector(description, id, mediaC
20109
20109
  statCollector.metricsBatch = null;
20110
20110
  }
20111
20111
  },
20112
+ isMetricValid: function isMetricValid(value) {
20113
+ return value != null && value !== "" && value !== "undefined" && value !== "null";
20114
+ },
20112
20115
  collectMetrics: function () {
20113
20116
  var _collectMetrics = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
20114
20117
  var stats, metrics, lostMetrics, headersUpdated;
@@ -20155,7 +20158,7 @@ var StreamStatsCollector = function StreamStatsCollector(description, id, mediaC
20155
20158
  _iterator2.f();
20156
20159
  }
20157
20160
  }
20158
- if (value) {
20161
+ if (statCollector.isMetricValid(value)) {
20159
20162
  metrics.push(value);
20160
20163
  } else {
20161
20164
  lostMetrics.push(descriptor);