@webex/plugin-meetings 3.3.1-next.29 → 3.3.1-next.30

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.
@@ -209,7 +209,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
209
209
  sessionId: this.sessionId
210
210
  });
211
211
  },
212
- version: "3.3.1-next.29"
212
+ version: "3.3.1-next.30"
213
213
  });
214
214
  var _default = exports.default = Breakout;
215
215
  //# sourceMappingURL=breakout.js.map
@@ -1046,7 +1046,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1046
1046
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1047
1047
  }
1048
1048
  },
1049
- version: "3.3.1-next.29"
1049
+ version: "3.3.1-next.30"
1050
1050
  });
1051
1051
  var _default = exports.default = Breakouts;
1052
1052
  //# sourceMappingURL=index.js.map
@@ -373,7 +373,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
373
373
  throw error;
374
374
  });
375
375
  },
376
- version: "3.3.1-next.29"
376
+ version: "3.3.1-next.30"
377
377
  });
378
378
  var _default = exports.default = SimultaneousInterpretation;
379
379
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.3.1-next.29"
21
+ version: "3.3.1-next.30"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -3605,6 +3605,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3605
3605
  correlation_id: _this19.correlationId,
3606
3606
  locus_id: _this19.locusId
3607
3607
  });
3608
+ _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoSelfListener --> MEDIA_INACTIVITY received, reconnecting...');
3608
3609
  _this19.reconnect();
3609
3610
  });
3610
3611
 
@@ -4674,7 +4675,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4674
4675
  }, {
4675
4676
  key: "closePeerConnections",
4676
4677
  value: function closePeerConnections() {
4677
- this.locusMediaRequest = undefined;
4678
4678
  if (this.mediaProperties.webrtcMediaConnection) {
4679
4679
  if (this.remoteMediaManager) {
4680
4680
  this.remoteMediaManager.stop();
@@ -4979,6 +4979,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4979
4979
  joinResponse,
4980
4980
  turnServerInfo,
4981
4981
  turnDiscoverySkippedReason,
4982
+ forceTurnDiscovery,
4982
4983
  turnDiscoveryRequest,
4983
4984
  _yield$this$roap$hand,
4984
4985
  mediaResponse,
@@ -5004,34 +5005,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5004
5005
  joined = false;
5005
5006
  joinResponse = prevJoinResponse;
5006
5007
  _context15.prev = 9;
5007
- _context15.next = 12;
5008
+ forceTurnDiscovery = false;
5009
+ if (joinResponse) {
5010
+ _context15.next = 36;
5011
+ break;
5012
+ }
5013
+ _context15.next = 14;
5008
5014
  return this.webex.meetings.reachability.getReachabilityResults();
5009
- case 12:
5015
+ case 14:
5010
5016
  joinOptions.reachability = _context15.sent;
5011
- _context15.next = 15;
5017
+ _context15.next = 17;
5012
5018
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
5013
- case 15:
5019
+ case 17:
5014
5020
  turnDiscoveryRequest = _context15.sent;
5015
5021
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
5016
5022
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
5017
- if (joinResponse) {
5018
- _context15.next = 23;
5019
- break;
5020
- }
5021
5023
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
5022
- _context15.next = 22;
5024
+ _context15.next = 23;
5023
5025
  return this.join(joinOptions);
5024
- case 22:
5025
- joinResponse = _context15.sent;
5026
5026
  case 23:
5027
+ joinResponse = _context15.sent;
5027
5028
  joined = true;
5029
+
5030
+ // if we sent out TURN discovery Roap message with join, process the TURN discovery response
5028
5031
  if (!joinOptions.roapMessage) {
5029
- _context15.next = 33;
5032
+ _context15.next = 34;
5030
5033
  break;
5031
5034
  }
5032
- _context15.next = 27;
5035
+ _context15.next = 28;
5033
5036
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
5034
- case 27:
5037
+ case 28:
5035
5038
  _yield$this$roap$hand = _context15.sent;
5036
5039
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
5037
5040
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
@@ -5040,10 +5043,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5040
5043
  if (turnServerInfo === undefined) {
5041
5044
  this.roap.abortTurnDiscovery();
5042
5045
  }
5043
- case 33:
5044
- _context15.next = 35;
5045
- return this.addMedia(mediaOptions, turnServerInfo);
5046
- case 35:
5046
+ case 34:
5047
+ _context15.next = 38;
5048
+ break;
5049
+ case 36:
5050
+ // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
5051
+ // but we need to ensure that it also does a new TURN discovery
5052
+ forceTurnDiscovery = true;
5053
+ joined = true;
5054
+ case 38:
5055
+ _context15.next = 40;
5056
+ return this.addMedia(mediaOptions, turnServerInfo, forceTurnDiscovery);
5057
+ case 40:
5047
5058
  mediaResponse = _context15.sent;
5048
5059
  this.joinWithMediaRetryInfo = {
5049
5060
  isRetry: false,
@@ -5053,30 +5064,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5053
5064
  join: joinResponse,
5054
5065
  media: mediaResponse
5055
5066
  });
5056
- case 40:
5057
- _context15.prev = 40;
5067
+ case 45:
5068
+ _context15.prev = 45;
5058
5069
  _context15.t0 = _context15["catch"](9);
5059
5070
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context15.t0);
5060
5071
  this.roap.abortTurnDiscovery();
5061
5072
  if (!(joined && isRetry)) {
5062
- _context15.next = 54;
5073
+ _context15.next = 59;
5063
5074
  break;
5064
5075
  }
5065
- _context15.prev = 45;
5066
- _context15.next = 48;
5076
+ _context15.prev = 50;
5077
+ _context15.next = 53;
5067
5078
  return this.leave({
5068
5079
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
5069
5080
  reason: 'joinWithMedia failure'
5070
5081
  });
5071
- case 48:
5072
- _context15.next = 54;
5082
+ case 53:
5083
+ _context15.next = 59;
5073
5084
  break;
5074
- case 50:
5075
- _context15.prev = 50;
5076
- _context15.t1 = _context15["catch"](45);
5085
+ case 55:
5086
+ _context15.prev = 55;
5087
+ _context15.t1 = _context15["catch"](50);
5077
5088
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context15.t1);
5078
5089
  leaveError = _context15.t1;
5079
- case 54:
5090
+ case 59:
5080
5091
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
5081
5092
  correlation_id: this.correlationId,
5082
5093
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
@@ -5097,24 +5108,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5097
5108
  shouldRetry = false;
5098
5109
  }
5099
5110
  if (!shouldRetry) {
5100
- _context15.next = 62;
5111
+ _context15.next = 67;
5101
5112
  break;
5102
5113
  }
5103
5114
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
5104
5115
  this.joinWithMediaRetryInfo.isRetry = true;
5105
5116
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
5106
5117
  return _context15.abrupt("return", this.joinWithMedia(options));
5107
- case 62:
5118
+ case 67:
5108
5119
  this.joinWithMediaRetryInfo = {
5109
5120
  isRetry: false,
5110
5121
  prevJoinResponse: undefined
5111
5122
  };
5112
5123
  throw _context15.t0;
5113
- case 64:
5124
+ case 69:
5114
5125
  case "end":
5115
5126
  return _context15.stop();
5116
5127
  }
5117
- }, _callee15, this, [[9, 40], [45, 50]]);
5128
+ }, _callee15, this, [[9, 45], [50, 55]]);
5118
5129
  }));
5119
5130
  function joinWithMedia() {
5120
5131
  return _joinWithMedia.apply(this, arguments);
@@ -5545,6 +5556,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5545
5556
  case 51:
5546
5557
  return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
5547
5558
  _this31.meetingFiniteStateMachine.join();
5559
+ _this31.setupLocusMediaRequest();
5548
5560
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
5549
5561
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
5550
5562
  correlation_id: _this31.correlationId
@@ -6510,12 +6522,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6510
6522
  key: "establishMediaConnection",
6511
6523
  value: (function () {
6512
6524
  var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
6525
+ var _this$locusMediaReque;
6513
6526
  var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc;
6514
6527
  return _regenerator.default.wrap(function _callee29$(_context29) {
6515
6528
  while (1) switch (_context29.prev = _context29.next) {
6516
6529
  case 0:
6517
6530
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
6518
- isReconnecting = this.isMoveToInProgress || this.retriedWithTurnServer; // We are forcing turn discovery if the case is moveTo and a turn server was used already
6531
+ isReconnecting = this.isMoveToInProgress || !!((_this$locusMediaReque = this.locusMediaRequest) !== null && _this$locusMediaReque !== void 0 && _this$locusMediaReque.isConfluenceCreated()); // We are forcing turn discovery if the case is moveTo and a turn server was used already
6519
6532
  if (this.isMoveToInProgress && this.turnServerUsed) {
6520
6533
  isForced = true;
6521
6534
  }
@@ -6673,23 +6686,53 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6673
6686
  }
6674
6687
  return cleanUpBeforeRetryWithTurnServer;
6675
6688
  }()
6689
+ /**
6690
+ * Creates an instance of LocusMediaRequest for this meeting - it is needed for doing any calls
6691
+ * to Locus /media API (these are used for sending Roap messages and updating audio/video mute status).
6692
+ *
6693
+ * @returns {void}
6694
+ */
6695
+ )
6696
+ }, {
6697
+ key: "setupLocusMediaRequest",
6698
+ value: function setupLocusMediaRequest() {
6699
+ var _this$webex$meetings$2, _this$webex$meetings$3;
6700
+ this.locusMediaRequest = new _locusMediaRequest.LocusMediaRequest({
6701
+ correlationId: this.correlationId,
6702
+ meetingId: this.id,
6703
+ device: {
6704
+ url: this.deviceUrl,
6705
+ // @ts-ignore
6706
+ deviceType: this.config.deviceType,
6707
+ // @ts-ignore
6708
+ countryCode: (_this$webex$meetings$2 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$2 === void 0 ? void 0 : _this$webex$meetings$2.countryCode,
6709
+ // @ts-ignore
6710
+ regionCode: (_this$webex$meetings$3 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$3 === void 0 ? void 0 : _this$webex$meetings$3.regionCode
6711
+ },
6712
+ preferTranscoding: !this.isMultistream
6713
+ }, {
6714
+ // @ts-ignore
6715
+ parent: this.webex
6716
+ });
6717
+ }
6718
+
6676
6719
  /**
6677
6720
  * Creates a media connection to the server. Media connection is required for sending or receiving any audio/video.
6678
6721
  *
6679
6722
  * @param {AddMediaOptions} options
6680
6723
  * @param {TurnServerInfo} turnServerInfo - TURN server information (used only internally by the SDK)
6724
+ * @param {boolean} forceTurnDiscovery - if true, TURN discovery will be done (used only internally by the SDK)
6681
6725
  * @returns {Promise<void>}
6682
6726
  * @public
6683
6727
  * @memberof Meeting
6684
6728
  */
6685
- )
6686
6729
  }, {
6687
6730
  key: "addMedia",
6688
6731
  value: (function () {
6689
6732
  var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
6690
- var _this$webex$meetings$2, _this$webex$meetings$3;
6691
6733
  var options,
6692
6734
  turnServerInfo,
6735
+ forceTurnDiscovery,
6693
6736
  LOG_HEADER,
6694
6737
  localStreams,
6695
6738
  _options$audioEnabled,
@@ -6740,33 +6783,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6740
6783
  case 0:
6741
6784
  options = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {};
6742
6785
  turnServerInfo = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : undefined;
6786
+ forceTurnDiscovery = _args32.length > 2 && _args32[2] !== undefined ? _args32[2] : false;
6743
6787
  this.retriedWithTurnServer = false;
6744
6788
  this.hasMediaConnectionConnectedAtLeastOnce = false;
6745
6789
  LOG_HEADER = 'Meeting:index#addMedia -->';
6746
- _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options), ", ").concat((0, _stringify.default)(turnServerInfo)));
6790
+ _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
6747
6791
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
6748
- _context32.next = 8;
6792
+ _context32.next = 9;
6749
6793
  break;
6750
6794
  }
6751
6795
  throw new _webexErrors.MeetingNotActiveError();
6752
- case 8:
6796
+ case 9:
6753
6797
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
6754
- _context32.next = 10;
6798
+ _context32.next = 11;
6755
6799
  break;
6756
6800
  }
6757
6801
  throw new _webexErrors.UserNotJoinedError();
6758
- case 10:
6802
+ case 11:
6759
6803
  localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, bundlePolicy = options.bundlePolicy;
6760
6804
  this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
6761
6805
 
6762
6806
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
6763
6807
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
6764
6808
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
6765
- _context32.next = 14;
6809
+ _context32.next = 15;
6766
6810
  break;
6767
6811
  }
6768
6812
  throw new _webexErrors.UserInLobbyError();
6769
- case 14:
6813
+ case 15:
6770
6814
  // @ts-ignore
6771
6815
  this.webex.internal.newMetrics.submitClientEvent({
6772
6816
  name: 'client.media.capabilities',
@@ -6803,23 +6847,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6803
6847
  receiveVideo: videoEnabled,
6804
6848
  receiveShare: shareAudioEnabled || shareVideoEnabled
6805
6849
  });
6806
- this.locusMediaRequest = new _locusMediaRequest.LocusMediaRequest({
6807
- correlationId: this.correlationId,
6808
- meetingId: this.id,
6809
- device: {
6810
- url: this.deviceUrl,
6811
- // @ts-ignore
6812
- deviceType: this.config.deviceType,
6813
- // @ts-ignore
6814
- countryCode: (_this$webex$meetings$2 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$2 === void 0 ? void 0 : _this$webex$meetings$2.countryCode,
6815
- // @ts-ignore
6816
- regionCode: (_this$webex$meetings$3 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$3 === void 0 ? void 0 : _this$webex$meetings$3.regionCode
6817
- },
6818
- preferTranscoding: !this.isMultistream
6819
- }, {
6820
- // @ts-ignore
6821
- parent: this.webex
6822
- });
6823
6850
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
6824
6851
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
6825
6852
  _context32.prev = 19;
@@ -6829,7 +6856,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6829
6856
  this.setMercuryListener();
6830
6857
  this.createStatsAnalyzer();
6831
6858
  _context32.next = 26;
6832
- return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, false, turnServerInfo);
6859
+ return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
6833
6860
  case 26:
6834
6861
  if (!(audioEnabled || videoEnabled)) {
6835
6862
  _context32.next = 31;