@opentok/client 2.33.0-alpha.22 → 2.33.0-alpha.24

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.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license OpenTok.js 2.33.0 a2a5318be
2
+ * @license OpenTok.js 2.33.0 f70cfd382
3
3
  *
4
4
  * Copyright (c) 2010-2025 TokBox, Inc.
5
5
  * Subject to the applicable Software Development Kit (SDK) License Agreement:
6
6
  * https://www.vonage.com/legal/communications-apis/terms-of-use/
7
7
  *
8
- * Date: Mon, 22 Dec 2025 11:15:07 GMT
8
+ * Date: Mon, 22 Dec 2025 14:29:37 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -8531,7 +8531,7 @@ function staticConfigFactory(_temp) {
8531
8531
  _ref$axios = _ref.axios,
8532
8532
  axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
8533
8533
  _ref$properties = _ref.properties,
8534
- properties = _ref$properties === void 0 ? {"version":"v2.33.0","buildHash":"a2a5318be","minimumVersion":{"firefox":52,"chrome":49},"debug":false,"websiteURL":"http://www.tokbox.com","configURL":"https://config.opentok.com","ipWhitelistConfigURL":"","cdnURL":"","loggingURL":"https://hlg.tokbox.com/prod","apiURL":"https://anvil.opentok.com","vonageApiURL":""} : _ref$properties;
8534
+ properties = _ref$properties === void 0 ? {"version":"v2.33.0","buildHash":"f70cfd382","minimumVersion":{"firefox":52,"chrome":49},"debug":false,"websiteURL":"http://www.tokbox.com","configURL":"https://config.opentok.com","ipWhitelistConfigURL":"","cdnURL":"","loggingURL":"https://hlg.tokbox.com/prod","apiURL":"https://anvil.opentok.com","vonageApiURL":""} : _ref$properties;
8535
8535
  /** @type builtInConfig */
8536
8536
  const builtInConfig = (0, _cloneDeep.default)(properties);
8537
8537
  /**
@@ -16818,7 +16818,7 @@ function getLinkedTrack(stat, allStats) {
16818
16818
  }
16819
16819
  function totalPacketsLostReducer(totalPacketsLost, stat) {
16820
16820
  if ('packetsLost' in stat) {
16821
- return totalPacketsLost + stat.packetsLost;
16821
+ return totalPacketsLost + Math.max(stat.packetsLost, 0);
16822
16822
  }
16823
16823
  return totalPacketsLost;
16824
16824
  }
@@ -16890,11 +16890,13 @@ const getStatsHelpers = () => {
16890
16890
  };
16891
16891
  }
16892
16892
  const frameRate = getFrameRate(stat, startTime);
16893
- const bitrate = calcBitRate(stat[bytesKey], prevBytes, stat.timestamp, prevTimestamp);
16894
- const totalBitrate = calcBitRate(stat[bytesKey] + stat[headerBytesKey], prevBytes + prevHeaderBytes, stat.timestamp, prevTimestamp);
16893
+ const bytes = Math.max(stat[bytesKey], prevBytes);
16894
+ const headerBytes = Math.max(stat[headerBytesKey], prevHeaderBytes);
16895
+ const bitrate = calcBitRate(bytes, prevBytes, stat.timestamp, prevTimestamp);
16896
+ const totalBitrate = calcBitRate(bytes + headerBytes, prevBytes + prevHeaderBytes, stat.timestamp, prevTimestamp);
16895
16897
  prevRateTrackers[stat.id] = Object.assign({}, prevRateTrackers[stat.id], {
16896
- bytes: stat[bytesKey],
16897
- headerBytes: stat[headerBytesKey],
16898
+ bytes,
16899
+ headerBytes,
16898
16900
  timestamp: stat.timestamp,
16899
16901
  frameRate,
16900
16902
  bitrate,
@@ -16963,13 +16965,13 @@ const getStatsHelpers = () => {
16963
16965
  };
16964
16966
 
16965
16967
  if ('packetsReceived' in stat) {
16966
- statCategory.packetsReceived = parseInt(stat.packetsReceived, 10);
16968
+ statCategory.packetsReceived = Math.max(parseInt(stat.packetsReceived, 10), 0);
16967
16969
  }
16968
16970
  if ('packetsLost' in stat) {
16969
- statCategory.packetsLost = parseInt(stat.packetsLost, 10);
16971
+ statCategory.packetsLost = Math.max(parseInt(stat.packetsLost, 10), 0);
16970
16972
  }
16971
16973
  if ('bytesReceived' in stat) {
16972
- statCategory.bytesReceived = parseInt(stat.bytesReceived, 10);
16974
+ statCategory.bytesReceived = Math.max(parseInt(stat.bytesReceived, 10), 0);
16973
16975
  }
16974
16976
  if (isVideoStat) {
16975
16977
  statCategory.width = stat.frameWidth;