@opentok/client 2.33.0-alpha.2 → 2.33.0-alpha.3

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 f6a7a8f52
2
+ * @license OpenTok.js 2.33.0 1b06f3d2e
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: Thu, 06 Nov 2025 13:45:37 GMT
8
+ * Date: Fri, 14 Nov 2025 11:44:59 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -8564,7 +8564,7 @@ function staticConfigFactory(_temp) {
8564
8564
  _ref$axios = _ref.axios,
8565
8565
  axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
8566
8566
  _ref$properties = _ref.properties,
8567
- properties = _ref$properties === void 0 ? {"version":"v2.33.0","buildHash":"f6a7a8f52","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;
8567
+ properties = _ref$properties === void 0 ? {"version":"v2.33.0","buildHash":"1b06f3d2e","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;
8568
8568
  /** @type builtInConfig */
8569
8569
  const builtInConfig = (0, _cloneDeep.default)(properties);
8570
8570
  /**
@@ -39763,16 +39763,18 @@ function SubscriberFactory(_ref2) {
39763
39763
  callback(error);
39764
39764
  return;
39765
39765
  }
39766
-
39767
- // If sender stats are too old (10 seconds) then we don't include them
39768
- if (_senderStats && Date.now() - _senderStats.clientTimeStamp < 10000) {
39769
- const _senderStats2 = _senderStats,
39770
- maxBitrateBitsPerSecond = _senderStats2.maxBitrateBitsPerSecond,
39771
- sentEstimatedBandwidthBitsPerSecond = _senderStats2.sentEstimatedBandwidthBitsPerSecond;
39772
- stats.senderStats = {
39773
- connectionMaxAllocatedBitrate: maxBitrateBitsPerSecond,
39774
- connectionEstimatedBandwidth: sentEstimatedBandwidthBitsPerSecond
39775
- };
39766
+ if (_senderStats) {
39767
+ if (_activeSourceStreamId !== _senderStats.sourceStreamId || Date.now() - _senderStats.clientTimeStamp >= 10000) {
39768
+ _senderStats = null;
39769
+ } else {
39770
+ const _senderStats2 = _senderStats,
39771
+ maxBitrateBitsPerSecond = _senderStats2.maxBitrateBitsPerSecond,
39772
+ sentEstimatedBandwidthBitsPerSecond = _senderStats2.sentEstimatedBandwidthBitsPerSecond;
39773
+ stats.senderStats = {
39774
+ connectionMaxAllocatedBitrate: maxBitrateBitsPerSecond,
39775
+ connectionEstimatedBandwidth: sentEstimatedBandwidthBitsPerSecond
39776
+ };
39777
+ }
39776
39778
  }
39777
39779
  callback(null, stats);
39778
39780
  });
@@ -40720,7 +40722,7 @@ function SubscriberFactory(_ref2) {
40720
40722
  this._onSenderStatsReceived = content => {
40721
40723
  try {
40722
40724
  const parsedData = typeof content.data === 'string' ? JSON.parse(content.data) : content.data;
40723
- if (_activeSourceStreamId === 'P2P' && (parsedData.sourceStreamId !== 'P2P' || parsedData.subscriberId !== this.widgetId)) {
40725
+ if (_activeSourceStreamId !== parsedData.sourceStreamId || parsedData.subscriberId !== this.widgetId) {
40724
40726
  return;
40725
40727
  }
40726
40728
  _senderStats = Object.assign({}, parsedData, {