@opentok/client 2.35.0-alpha.32 → 2.35.0-alpha.33

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.35.0 2989cd58d
2
+ * @license OpenTok.js 2.35.0 e9e5d6696
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: Tue, 26 May 2026 07:31:08 GMT
8
+ * Date: Tue, 26 May 2026 08:35:02 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -6643,6 +6643,7 @@ function PublisherPeerConnectionFactory(deps) {
6643
6643
  (_peerConnection2 = _peerConnection) == null ? void 0 : _peerConnection2.iceRestart(reason, forcedRestart);
6644
6644
  };
6645
6645
  this.hasRelayCandidates = () => _peerConnection.hasRelayCandidates();
6646
+ this.hasTrack = track => _peerConnection.hasTrack(track);
6646
6647
  this.iceConnectionStateIsConnected = function () {
6647
6648
  return _peerConnection.iceConnectionStateIsConnected();
6648
6649
  };
@@ -41919,7 +41920,7 @@ function staticConfigFactory(_temp) {
41919
41920
  _ref$axios = _ref.axios,
41920
41921
  axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
41921
41922
  _ref$properties = _ref.properties,
41922
- properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"2989cd58d","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;
41923
+ properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"e9e5d6696","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;
41923
41924
  /** @type builtInConfig */
41924
41925
  const builtInConfig = (0, _cloneDeep.default)(properties);
41925
41926
  /**
@@ -81022,6 +81023,7 @@ let _default = function _default(deps) {
81022
81023
  }
81023
81024
  return _context.abrupt("return");
81024
81025
  case 2:
81026
+ _this.amrAudioMuted = true;
81025
81027
  // If it is not muted, the ID is not present, or the PC does not have the cloned track,
81026
81028
  // we clone the track, disable it, and replace it.
81027
81029
  newClonedTrack = newTrack.clone();
@@ -81030,27 +81032,29 @@ let _default = function _default(deps) {
81030
81032
  // When a track is cloned, the ID changes but is otherwise identical. Thus,
81031
81033
  // we need to find the old cloned track by the (original, pre-cloned) ID,
81032
81034
  // since we cannot use strict equality to find it, and replace it with a new cloned track.
81033
- oldClonedTrack = _this.mutedMantisAudioTracksInAMR[oldTrack.id];
81034
- _context.prev = 5;
81035
- _context.next = 8;
81035
+ // Also, if the old track was not muted, we will not find it in the map, and in that case
81036
+ // we will try to replace the original track.
81037
+ oldClonedTrack = _this.mutedMantisAudioTracksInAMR[oldTrack.id] || oldTrack;
81038
+ _context.prev = 6;
81039
+ _context.next = 9;
81036
81040
  return peerConnection.findAndReplaceTrack(oldClonedTrack, newClonedTrack);
81037
- case 8:
81038
- _context.next = 14;
81041
+ case 9:
81042
+ _context.next = 15;
81039
81043
  break;
81040
- case 10:
81041
- _context.prev = 10;
81042
- _context.t0 = _context["catch"](5);
81044
+ case 11:
81045
+ _context.prev = 11;
81046
+ _context.t0 = _context["catch"](6);
81043
81047
  _this.logging.error(`Error swapping AMR audio track: ${_context.t0}`);
81044
81048
  return _context.abrupt("return");
81045
- case 14:
81049
+ case 15:
81046
81050
  // Save it, so it can be restored once unmuted.
81047
81051
  _this.mutedMantisAudioTracksInAMR[newTrack.id] = newClonedTrack;
81048
81052
  delete _this.mutedMantisAudioTracksInAMR[oldTrack.id];
81049
- case 16:
81053
+ case 17:
81050
81054
  case "end":
81051
81055
  return _context.stop();
81052
81056
  }
81053
- }, _callee, null, [[5, 10]]);
81057
+ }, _callee, null, [[6, 11]]);
81054
81058
  }));
81055
81059
  return function (_x, _x2, _x3) {
81056
81060
  return _ref.apply(this, arguments);