@flashphoner/websdk 2.0.269 → 2.0.271

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.269",
3
+ "version": "2.0.271",
4
4
  "description": "Official Flashphoner WebCallServer WebSDK package",
5
5
  "main": "./src/flashphoner-core.js",
6
6
  "types": "./src/flashphoner-core.d.ts",
@@ -182,7 +182,7 @@ const StreamStatsCollector = function(description, id, mediaConnection, wsConnec
182
182
  let metrics = metricsString.split(",");
183
183
  metrics.forEach((metric) => {
184
184
  for (const key of Object.keys(report)) {
185
- if (metric === key) {
185
+ if (metric === key && report[key]) {
186
186
  currentHeaders = util.addFieldToCsvString(currentHeaders, report.type + "." + report.id + "." + metric, ",");
187
187
  break;
188
188
  }
@@ -269,10 +269,10 @@ const StreamStatsCollector = function(description, id, mediaConnection, wsConnec
269
269
  }
270
270
  }
271
271
  }
272
- if (value === null) {
273
- lostMetrics.push(descriptor);
274
- } else {
272
+ if (value) {
275
273
  metrics.push(value);
274
+ } else {
275
+ lostMetrics.push(descriptor);
276
276
  }
277
277
  });
278
278
  } else {
@@ -514,4 +514,4 @@ const addSlash = function(value) {
514
514
 
515
515
  module.exports = {
516
516
  StreamStatsCollector: StreamStatsCollector
517
- }
517
+ }