@opentok/client 2.32.0-alpha.12 → 2.32.0-alpha.14

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.32.0 3338040ef
2
+ * @license OpenTok.js 2.32.0 040f7a503
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: Fri, 17 Oct 2025 10:02:22 GMT
8
+ * Date: Mon, 27 Oct 2025 16:38:10 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.32.0","buildHash":"3338040ef","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.32.0","buildHash":"040f7a503","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
  /**
@@ -20778,7 +20778,8 @@ function PublisherFactory(_ref) {
20778
20778
  }();
20779
20779
  const replaceAudioTrackInPeerConnections = /*#__PURE__*/function () {
20780
20780
  var _ref42 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(oldTrack, newTrack) {
20781
- var isAdaptiveEnabled, activePeerConnection, inactivePeerConnection, pcs;
20781
+ var _this$session$session2;
20782
+ var activePeerConnection, inactivePeerConnection, pcs;
20782
20783
  return _regenerator.default.wrap(function _callee30$(_context30) {
20783
20784
  while (1) switch (_context30.prev = _context30.next) {
20784
20785
  case 0:
@@ -20788,37 +20789,34 @@ function PublisherFactory(_ref) {
20788
20789
  }
20789
20790
  return _context30.abrupt("return");
20790
20791
  case 2:
20791
- isAdaptiveEnabled = _this.session.sessionInfo.isAdaptiveEnabled; // If we are in an AMR session and a P2P PC, we need to change the track in the P2P PC
20792
- // and check the Mantis PC, if we need to add the new track to the muted Mantis audio tracks and replace it.
20793
- // activeSourceStreamId may be undefined if we haven't finished publishing yet
20794
- if (!(isAdaptiveEnabled && activeSourceStreamId === 'P2P')) {
20795
- _context30.next = 16;
20792
+ if (!((_this$session$session2 = _this.session.sessionInfo) != null && _this$session$session2.isAdaptiveEnabled && activeSourceStreamId === 'P2P')) {
20793
+ _context30.next = 15;
20796
20794
  break;
20797
20795
  }
20798
- _context30.next = 6;
20796
+ _context30.next = 5;
20799
20797
  return getPeerConnectionBySourceStreamId(activeSourceStreamId);
20800
- case 6:
20798
+ case 5:
20801
20799
  activePeerConnection = _context30.sent;
20802
- _context30.next = 9;
20800
+ _context30.next = 8;
20803
20801
  return activePeerConnection == null ? void 0 : activePeerConnection.findAndReplaceTrack(oldTrack, newTrack);
20804
- case 9:
20805
- _context30.next = 11;
20802
+ case 8:
20803
+ _context30.next = 10;
20806
20804
  return getMantisPeerConnection();
20807
- case 11:
20805
+ case 10:
20808
20806
  inactivePeerConnection = _context30.sent;
20809
- _context30.next = 14;
20807
+ _context30.next = 13;
20810
20808
  return amrAudioTrackProcessor.replaceTrackInMutedAudioTracks(inactivePeerConnection, oldTrack, newTrack);
20811
- case 14:
20812
- _context30.next = 21;
20809
+ case 13:
20810
+ _context30.next = 20;
20813
20811
  break;
20814
- case 16:
20815
- _context30.next = 18;
20812
+ case 15:
20813
+ _context30.next = 17;
20816
20814
  return getAllPeerConnections();
20817
- case 18:
20815
+ case 17:
20818
20816
  pcs = _context30.sent;
20819
- _context30.next = 21;
20817
+ _context30.next = 20;
20820
20818
  return Promise.all(pcs.map(pc => pc.findAndReplaceTrack(oldTrack, newTrack)));
20821
- case 21:
20819
+ case 20:
20822
20820
  case "end":
20823
20821
  return _context30.stop();
20824
20822
  }
@@ -43205,6 +43203,19 @@ function initPublisherFactory(deps) {
43205
43203
  * the published stream).
43206
43204
  * </li>
43207
43205
  * <li>
43206
+ * <strong>preferredVideoCodecs</strong> (<code>'automatic'</code> or Array of
43207
+ * <code>'vp8'</code>, <code>'vp9'</code>, <code>'h264'</code>) &#151;
43208
+ * Sets the preferred video codecs priority for publishing.
43209
+ * <p>
43210
+ * If omitted, the SDK uses the project's default setting.
43211
+ * Set to <code>'automatic'</code> to let the SDK select the most suitable order.
43212
+ * Or provide an explicit array to specify codec preference
43213
+ * (e.g., <code>['vp9', 'h264']</code>).
43214
+ * If invalid (such as an empty array or unsupported codec), publisher initialization fails
43215
+ * with an <code>OT_INVALID_PARAMETER</code> error.
43216
+ * </p>
43217
+ * </li>
43218
+ * <li>
43208
43219
  * <strong>publishAudio</strong> (Boolean) &#151; Whether to initially publish audio
43209
43220
  * for the stream (default: <code>true</code>). This setting applies when you pass
43210
43221
  * the Publisher object in a call to the <code>Session.publish()</code> method.