@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashphoner/websdk",
3
- "version": "2.0.271",
3
+ "version": "2.0.272",
4
4
  "description": "Official Flashphoner WebCallServer WebSDK package",
5
5
  "main": "./src/flashphoner-core.js",
6
6
  "types": "./src/flashphoner-core.d.ts",
@@ -240,6 +240,9 @@ const StreamStatsCollector = function(description, id, mediaConnection, wsConnec
240
240
  statCollector.metricsBatch = null;
241
241
  }
242
242
  },
243
+ isMetricValid: function(value) {
244
+ return value != null && value !== "" && value !== "undefined" && value !== "null";
245
+ },
243
246
  collectMetrics: async function() {
244
247
  if (statCollector.timer && !statCollector.timerBusy) {
245
248
  // Unfortunately there are no real atomics in JS unless SharedArrayBuffer is used
@@ -269,7 +272,7 @@ const StreamStatsCollector = function(description, id, mediaConnection, wsConnec
269
272
  }
270
273
  }
271
274
  }
272
- if (value) {
275
+ if (statCollector.isMetricValid(value)) {
273
276
  metrics.push(value);
274
277
  } else {
275
278
  lostMetrics.push(descriptor);