@opentok/client 2.33.0-alpha.34 → 2.33.0-alpha.35

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 f05350e1a
2
+ * @license OpenTok.js 2.33.0 aa102eded
3
3
  *
4
4
  * Copyright (c) 2010-2026 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: Fri, 16 Jan 2026 07:29:03 GMT
8
+ * Date: Tue, 20 Jan 2026 07:12:47 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":"f05350e1a","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":"aa102eded","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
  /**
@@ -24309,7 +24309,7 @@ function PublisherFactory(_ref) {
24309
24309
  };
24310
24310
 
24311
24311
  /**
24312
- * @brief Sets the preferred video resolution.
24312
+ * Sets the preferred video resolution.
24313
24313
  *
24314
24314
  * This function sets the preferred resolution for the video publisher.
24315
24315
  * It validates that the input is an object with positive integer width and height properties,
@@ -24320,10 +24320,12 @@ function PublisherFactory(_ref) {
24320
24320
  * @param {number} preferredResolution.width - Preferred video width (pixels).
24321
24321
  * @param {number} preferredResolution.height - Preferred video height (pixels).
24322
24322
  *
24323
- * @throws {Error} If not called on a video publisher, if the dimensions are invalid,
24324
- * or if the resolution exceeds the initial resolution.
24323
+ * @return {Promise} Resolves when video constraints are successfully applied.
24324
+ * Otherwise, it throws an error—for example, if the publisher is not publishing video,
24325
+ * the dimensions are invalid, or the resolution exceeds the initial resolution.
24325
24326
  *
24326
- * @returns {Promise} Resolves when video constraints are successfully applied.
24327
+ * @method #setPreferredResolution
24328
+ * @memberOf Publisher
24327
24329
  */
24328
24330
  this.setPreferredResolution = /*#__PURE__*/function () {
24329
24331
  var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(preferredResolution) {
@@ -24403,7 +24405,7 @@ function PublisherFactory(_ref) {
24403
24405
  }();
24404
24406
 
24405
24407
  /**
24406
- * @brief Sets the preferred video frame rate.
24408
+ * Sets the preferred video frame rate.
24407
24409
  *
24408
24410
  * This function sets the desired frame rate for video publishing.
24409
24411
  * The frame rate must be an integer ≥ 1.
@@ -24411,9 +24413,12 @@ function PublisherFactory(_ref) {
24411
24413
  *
24412
24414
  * @param {number} frameRate - The preferred video frame rate.
24413
24415
  *
24414
- * @throws {Error} If not called on a video publisher or if frameRate is invalid.
24416
+ * @return {Promise} Resolves when video constraints are successfully applied.
24417
+ * Otherwise, it throws an error—for example, if the publisher is not publishing video,
24418
+ * the frame rate is invalid, or applying the constraints fails.
24415
24419
  *
24416
- * @returns {Promise} Resolves when video constraints are successfully applied.
24420
+ * @method #setPreferredFrameRate
24421
+ * @memberOf Publisher
24417
24422
  */
24418
24423
  this.setPreferredFrameRate = /*#__PURE__*/function () {
24419
24424
  var _ref67 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60(frameRate) {
@@ -38469,15 +38474,18 @@ function SubscriberFactory(_ref2) {
38469
38474
  }
38470
38475
  }
38471
38476
  });
38472
- // If sender stats are too old (10 seconds) then we don't include them
38473
- if (_senderStats && Date.now() - _senderStats.clientTimeStamp < 10000) {
38474
- const _senderStats2 = _senderStats,
38475
- maxBitrateBitsPerSecond = _senderStats2.maxBitrateBitsPerSecond,
38476
- sentEstimatedBandwidthBitsPerSecond = _senderStats2.sentEstimatedBandwidthBitsPerSecond;
38477
- otStats.senderStats = {
38478
- connectionMaxAllocatedBitrate: maxBitrateBitsPerSecond,
38479
- connectionEstimatedBandwidth: sentEstimatedBandwidthBitsPerSecond
38480
- };
38477
+ if (_senderStats) {
38478
+ if (_activeSourceStreamId !== _senderStats.sourceStreamId || Date.now() - _senderStats.clientTimeStamp >= 10000) {
38479
+ _senderStats = null;
38480
+ } else {
38481
+ const _senderStats2 = _senderStats,
38482
+ maxBitrateBitsPerSecond = _senderStats2.maxBitrateBitsPerSecond,
38483
+ sentEstimatedBandwidthBitsPerSecond = _senderStats2.sentEstimatedBandwidthBitsPerSecond;
38484
+ otStats.senderStats = {
38485
+ connectionMaxAllocatedBitrate: maxBitrateBitsPerSecond,
38486
+ connectionEstimatedBandwidth: sentEstimatedBandwidthBitsPerSecond
38487
+ };
38488
+ }
38481
38489
  }
38482
38490
  return otStats;
38483
38491
  });