@webex/plugin-meetings 3.12.0-next.34 → 3.12.0-next.36

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.
@@ -5168,6 +5168,51 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5168
5168
  this.sipUri = sipUri;
5169
5169
  }
5170
5170
 
5171
+ /**
5172
+ * After initial locus setup, refreshes destination with synced locus data and optionally
5173
+ * performs deferred meeting info fetch when initial locus was incomplete.
5174
+ * @param {LocusDTO} locus
5175
+ * @returns {void}
5176
+ */
5177
+ }, {
5178
+ key: "finalizeMeetingAfterInitialLocusSetup",
5179
+ value: (function () {
5180
+ var _finalizeMeetingAfterInitialLocusSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(locus) {
5181
+ var _this$destination;
5182
+ var _t0;
5183
+ return _regenerator.default.wrap(function (_context11) {
5184
+ while (1) switch (_context11.prev = _context11.next) {
5185
+ case 0:
5186
+ if (locus && (this === null || this === void 0 ? void 0 : this.destinationType) === _constants.DESTINATION_TYPE.LOCUS_ID) {
5187
+ // destination is initialized from the initial locus snapshot in constructor,
5188
+ // so refresh it after locus sync to avoid stale partial hash-tree data.
5189
+ this.destination = locus;
5190
+ }
5191
+ if (!((!this.meetingInfo || (0, _lodash.isEmpty)(this.meetingInfo)) && (_this$destination = this.destination) !== null && _this$destination !== void 0 && _this$destination.info && !this.fetchMeetingInfoTimeoutId)) {
5192
+ _context11.next = 4;
5193
+ break;
5194
+ }
5195
+ _context11.prev = 1;
5196
+ _context11.next = 2;
5197
+ return this.fetchMeetingInfo({});
5198
+ case 2:
5199
+ _context11.next = 4;
5200
+ break;
5201
+ case 3:
5202
+ _context11.prev = 3;
5203
+ _t0 = _context11["catch"](1);
5204
+ _loggerProxy.default.logger.info("Meeting:index#finalizeMeetingAfterInitialLocusSetup --> deferred fetchMeetingInfo failed: ".concat(_t0.message));
5205
+ case 4:
5206
+ case "end":
5207
+ return _context11.stop();
5208
+ }
5209
+ }, _callee11, this, [[1, 3]]);
5210
+ }));
5211
+ function finalizeMeetingAfterInitialLocusSetup(_x1) {
5212
+ return _finalizeMeetingAfterInitialLocusSetup.apply(this, arguments);
5213
+ }
5214
+ return finalizeMeetingAfterInitialLocusSetup;
5215
+ }()
5171
5216
  /**
5172
5217
  * Set the locus info the class instance. Should be called with the parsed locus
5173
5218
  * we got in the join response.
@@ -5183,6 +5228,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5183
5228
  * @private
5184
5229
  * @memberof Meeting
5185
5230
  */
5231
+ )
5186
5232
  }, {
5187
5233
  key: "setLocus",
5188
5234
  value: function setLocus(data) {
@@ -5362,11 +5408,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5362
5408
  }, {
5363
5409
  key: "setLocalAudioStream",
5364
5410
  value: (function () {
5365
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
5411
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
5366
5412
  var _this$audio2;
5367
5413
  var oldStream;
5368
- return _regenerator.default.wrap(function (_context11) {
5369
- while (1) switch (_context11.prev = _context11.next) {
5414
+ return _regenerator.default.wrap(function (_context12) {
5415
+ while (1) switch (_context12.prev = _context12.next) {
5370
5416
  case 0:
5371
5417
  oldStream = this.mediaProperties.audioStream;
5372
5418
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -5380,21 +5426,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5380
5426
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
5381
5427
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5382
5428
  if (!(!this.isMultistream || !localStream)) {
5383
- _context11.next = 1;
5429
+ _context12.next = 1;
5384
5430
  break;
5385
5431
  }
5386
- _context11.next = 1;
5432
+ _context12.next = 1;
5387
5433
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
5388
5434
  case 1:
5389
- _context11.next = 2;
5435
+ _context12.next = 2;
5390
5436
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5391
5437
  case 2:
5392
5438
  case "end":
5393
- return _context11.stop();
5439
+ return _context12.stop();
5394
5440
  }
5395
- }, _callee11, this);
5441
+ }, _callee12, this);
5396
5442
  }));
5397
- function setLocalAudioStream(_x1) {
5443
+ function setLocalAudioStream(_x10) {
5398
5444
  return _setLocalAudioStream.apply(this, arguments);
5399
5445
  }
5400
5446
  return setLocalAudioStream;
@@ -5410,11 +5456,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5410
5456
  }, {
5411
5457
  key: "setLocalVideoStream",
5412
5458
  value: (function () {
5413
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
5459
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localStream) {
5414
5460
  var _this$video2;
5415
5461
  var oldStream;
5416
- return _regenerator.default.wrap(function (_context12) {
5417
- while (1) switch (_context12.prev = _context12.next) {
5462
+ return _regenerator.default.wrap(function (_context13) {
5463
+ while (1) switch (_context13.prev = _context13.next) {
5418
5464
  case 0:
5419
5465
  oldStream = this.mediaProperties.videoStream;
5420
5466
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -5430,21 +5476,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5430
5476
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5431
5477
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.ConstraintsChange, this.localConstraintsChangeHandler);
5432
5478
  if (!(!this.isMultistream || !localStream)) {
5433
- _context12.next = 1;
5479
+ _context13.next = 1;
5434
5480
  break;
5435
5481
  }
5436
- _context12.next = 1;
5482
+ _context13.next = 1;
5437
5483
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
5438
5484
  case 1:
5439
- _context12.next = 2;
5485
+ _context13.next = 2;
5440
5486
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5441
5487
  case 2:
5442
5488
  case "end":
5443
- return _context12.stop();
5489
+ return _context13.stop();
5444
5490
  }
5445
- }, _callee12, this);
5491
+ }, _callee13, this);
5446
5492
  }));
5447
- function setLocalVideoStream(_x10) {
5493
+ function setLocalVideoStream(_x11) {
5448
5494
  return _setLocalVideoStream.apply(this, arguments);
5449
5495
  }
5450
5496
  return setLocalVideoStream;
@@ -5461,10 +5507,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5461
5507
  }, {
5462
5508
  key: "setLocalShareVideoStream",
5463
5509
  value: (function () {
5464
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localDisplayStream) {
5510
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localDisplayStream) {
5465
5511
  var oldStream;
5466
- return _regenerator.default.wrap(function (_context13) {
5467
- while (1) switch (_context13.prev = _context13.next) {
5512
+ return _regenerator.default.wrap(function (_context14) {
5513
+ while (1) switch (_context14.prev = _context14.next) {
5468
5514
  case 0:
5469
5515
  oldStream = this.mediaProperties.shareVideoStream;
5470
5516
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -5476,21 +5522,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5476
5522
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5477
5523
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5478
5524
  if (!(!this.isMultistream || !localDisplayStream)) {
5479
- _context13.next = 1;
5525
+ _context14.next = 1;
5480
5526
  break;
5481
5527
  }
5482
- _context13.next = 1;
5528
+ _context14.next = 1;
5483
5529
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
5484
5530
  case 1:
5485
- _context13.next = 2;
5531
+ _context14.next = 2;
5486
5532
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5487
5533
  case 2:
5488
5534
  case "end":
5489
- return _context13.stop();
5535
+ return _context14.stop();
5490
5536
  }
5491
- }, _callee13, this);
5537
+ }, _callee14, this);
5492
5538
  }));
5493
- function setLocalShareVideoStream(_x11) {
5539
+ function setLocalShareVideoStream(_x12) {
5494
5540
  return _setLocalShareVideoStream.apply(this, arguments);
5495
5541
  }
5496
5542
  return setLocalShareVideoStream;
@@ -5506,10 +5552,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5506
5552
  }, {
5507
5553
  key: "setLocalShareAudioStream",
5508
5554
  value: (function () {
5509
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localSystemAudioStream) {
5555
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15(localSystemAudioStream) {
5510
5556
  var oldStream;
5511
- return _regenerator.default.wrap(function (_context14) {
5512
- while (1) switch (_context14.prev = _context14.next) {
5557
+ return _regenerator.default.wrap(function (_context15) {
5558
+ while (1) switch (_context15.prev = _context15.next) {
5513
5559
  case 0:
5514
5560
  oldStream = this.mediaProperties.shareAudioStream;
5515
5561
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -5519,21 +5565,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5519
5565
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5520
5566
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5521
5567
  if (!(!this.isMultistream || !localSystemAudioStream)) {
5522
- _context14.next = 1;
5568
+ _context15.next = 1;
5523
5569
  break;
5524
5570
  }
5525
- _context14.next = 1;
5571
+ _context15.next = 1;
5526
5572
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
5527
5573
  case 1:
5528
- _context14.next = 2;
5574
+ _context15.next = 2;
5529
5575
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5530
5576
  case 2:
5531
5577
  case "end":
5532
- return _context14.stop();
5578
+ return _context15.stop();
5533
5579
  }
5534
- }, _callee14, this);
5580
+ }, _callee15, this);
5535
5581
  }));
5536
- function setLocalShareAudioStream(_x12) {
5582
+ function setLocalShareAudioStream(_x13) {
5537
5583
  return _setLocalShareAudioStream.apply(this, arguments);
5538
5584
  }
5539
5585
  return setLocalShareAudioStream;
@@ -5972,7 +6018,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5972
6018
  }, {
5973
6019
  key: "joinWithMedia",
5974
6020
  value: (function () {
5975
- var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
6021
+ var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
5976
6022
  var _this30 = this;
5977
6023
  var options,
5978
6024
  mediaOptions,
@@ -5995,20 +6041,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5995
6041
  shouldRetry,
5996
6042
  _error2,
5997
6043
  _error3,
5998
- _args15 = arguments,
5999
- _t0,
6000
- _t1;
6001
- return _regenerator.default.wrap(function (_context15) {
6002
- while (1) switch (_context15.prev = _context15.next) {
6044
+ _args16 = arguments,
6045
+ _t1,
6046
+ _t10;
6047
+ return _regenerator.default.wrap(function (_context16) {
6048
+ while (1) switch (_context16.prev = _context16.next) {
6003
6049
  case 0:
6004
- options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
6050
+ options = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
6005
6051
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
6006
6052
  _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
6007
6053
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
6008
- _context15.next = 1;
6054
+ _context16.next = 1;
6009
6055
  break;
6010
6056
  }
6011
- return _context15.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6057
+ return _context16.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6012
6058
  case 1:
6013
6059
  this.allowMediaInLobby = true;
6014
6060
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
@@ -6020,39 +6066,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6020
6066
  in case WebRTC is not available at all.
6021
6067
  */
6022
6068
  if (!(_webCapabilities.WebCapabilities.supportsRTCPeerConnection() === _webCapabilities.CapabilityState.NOT_CAPABLE)) {
6023
- _context15.next = 2;
6069
+ _context16.next = 2;
6024
6070
  break;
6025
6071
  }
6026
6072
  throw new _internalMediaCore.Errors.WebrtcApiNotAvailableError('RTCPeerConnection API is not available in this environment');
6027
6073
  case 2:
6028
- _context15.prev = 2;
6074
+ _context16.prev = 2;
6029
6075
  forceTurnDiscovery = false;
6030
6076
  if (joinResponse) {
6031
- _context15.next = 7;
6077
+ _context16.next = 7;
6032
6078
  break;
6033
6079
  }
6034
- _context15.next = 3;
6080
+ _context16.next = 3;
6035
6081
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
6036
6082
  case 3:
6037
- turnDiscoveryRequest = _context15.sent;
6083
+ turnDiscoveryRequest = _context16.sent;
6038
6084
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
6039
6085
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
6040
6086
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
6041
- _context15.next = 4;
6087
+ _context16.next = 4;
6042
6088
  return this.join(joinOptions);
6043
6089
  case 4:
6044
- joinResponse = _context15.sent;
6090
+ joinResponse = _context16.sent;
6045
6091
  joined = true;
6046
6092
 
6047
6093
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
6048
6094
  if (!joinOptions.roapMessage) {
6049
- _context15.next = 6;
6095
+ _context16.next = 6;
6050
6096
  break;
6051
6097
  }
6052
- _context15.next = 5;
6098
+ _context16.next = 5;
6053
6099
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
6054
6100
  case 5:
6055
- _yield$this$roap$hand = _context15.sent;
6101
+ _yield$this$roap$hand = _context16.sent;
6056
6102
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
6057
6103
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
6058
6104
  this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
@@ -6061,7 +6107,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6061
6107
  this.roap.abortTurnDiscovery();
6062
6108
  }
6063
6109
  case 6:
6064
- _context15.next = 8;
6110
+ _context16.next = 8;
6065
6111
  break;
6066
6112
  case 7:
6067
6113
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
@@ -6069,43 +6115,43 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6069
6115
  forceTurnDiscovery = true;
6070
6116
  joined = true;
6071
6117
  case 8:
6072
- _context15.next = 9;
6118
+ _context16.next = 9;
6073
6119
  return this.addMediaInternal(function () {
6074
6120
  return _this30.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6075
6121
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
6076
6122
  case 9:
6077
- mediaResponse = _context15.sent;
6123
+ mediaResponse = _context16.sent;
6078
6124
  this.joinWithMediaRetryInfo = {
6079
6125
  isRetry: false,
6080
6126
  prevJoinResponse: undefined
6081
6127
  };
6082
- return _context15.abrupt("return", {
6128
+ return _context16.abrupt("return", {
6083
6129
  join: joinResponse,
6084
6130
  media: mediaResponse,
6085
6131
  multistreamEnabled: this.isMultistream
6086
6132
  });
6087
6133
  case 10:
6088
- _context15.prev = 10;
6089
- _t0 = _context15["catch"](2);
6090
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t0);
6134
+ _context16.prev = 10;
6135
+ _t1 = _context16["catch"](2);
6136
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t1);
6091
6137
  this.roap.abortTurnDiscovery();
6092
6138
 
6093
6139
  // if this was the first attempt, let's do a retry
6094
6140
  shouldRetry = !isRetry;
6095
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t0) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t0)) {
6141
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t1) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t1)) {
6096
6142
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
6097
6143
  // so there is no point doing a retry
6098
6144
  shouldRetry = false;
6099
6145
  }
6100
- if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t0)) {
6146
+ if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t1)) {
6101
6147
  shouldRetry = false;
6102
6148
  // eslint-disable-next-line no-ex-assign
6103
- _t0 = (0, _lodash.merge)({
6149
+ _t1 = (0, _lodash.merge)({
6104
6150
  error: {
6105
6151
  body: {
6106
- errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t0),
6107
- message: (_error2 = _t0) === null || _error2 === void 0 ? void 0 : _error2.message,
6108
- name: (_error3 = _t0) === null || _error3 === void 0 ? void 0 : _error3.name
6152
+ errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t1),
6153
+ message: (_error2 = _t1) === null || _error2 === void 0 ? void 0 : _error2.message,
6154
+ name: (_error3 = _t1) === null || _error3 === void 0 ? void 0 : _error3.name
6109
6155
  }
6110
6156
  }
6111
6157
  });
@@ -6113,54 +6159,54 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6113
6159
 
6114
6160
  // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
6115
6161
  if (!(joined && (isRetry || !shouldRetry))) {
6116
- _context15.next = 14;
6162
+ _context16.next = 14;
6117
6163
  break;
6118
6164
  }
6119
- _context15.prev = 11;
6120
- _context15.next = 12;
6165
+ _context16.prev = 11;
6166
+ _context16.next = 12;
6121
6167
  return this.leave({
6122
6168
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
6123
6169
  reason: 'joinWithMedia failure'
6124
6170
  });
6125
6171
  case 12:
6126
- _context15.next = 14;
6172
+ _context16.next = 14;
6127
6173
  break;
6128
6174
  case 13:
6129
- _context15.prev = 13;
6130
- _t1 = _context15["catch"](11);
6131
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t1);
6132
- leaveError = _t1;
6175
+ _context16.prev = 13;
6176
+ _t10 = _context16["catch"](11);
6177
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t10);
6178
+ leaveError = _t10;
6133
6179
  case 14:
6134
6180
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
6135
6181
  correlation_id: this.correlationId,
6136
6182
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
6137
6183
  // if join fails, we may end up with no locusUrl
6138
- reason: _t0.message,
6139
- stack: _t0.stack,
6184
+ reason: _t1.message,
6185
+ stack: _t1.stack,
6140
6186
  leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
6141
6187
  isRetry: isRetry
6142
6188
  }, {
6143
- type: _t0.name
6189
+ type: _t1.name
6144
6190
  });
6145
6191
  if (!shouldRetry) {
6146
- _context15.next = 15;
6192
+ _context16.next = 15;
6147
6193
  break;
6148
6194
  }
6149
6195
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
6150
6196
  this.joinWithMediaRetryInfo.isRetry = true;
6151
6197
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
6152
- return _context15.abrupt("return", this.joinWithMedia(options));
6198
+ return _context16.abrupt("return", this.joinWithMedia(options));
6153
6199
  case 15:
6154
6200
  this.joinWithMediaRetryInfo = {
6155
6201
  isRetry: false,
6156
6202
  prevJoinResponse: undefined
6157
6203
  };
6158
- throw _t0;
6204
+ throw _t1;
6159
6205
  case 16:
6160
6206
  case "end":
6161
- return _context15.stop();
6207
+ return _context16.stop();
6162
6208
  }
6163
- }, _callee15, this, [[2, 10], [11, 13]]);
6209
+ }, _callee16, this, [[2, 10], [11, 13]]);
6164
6210
  }));
6165
6211
  function joinWithMedia() {
6166
6212
  return _joinWithMedia.apply(this, arguments);
@@ -6190,20 +6236,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6190
6236
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
6191
6237
  }
6192
6238
  this.cleanUpBeforeReconnection();
6193
- return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
6194
- return _regenerator.default.wrap(function (_context16) {
6195
- while (1) switch (_context16.prev = _context16.next) {
6239
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
6240
+ return _regenerator.default.wrap(function (_context17) {
6241
+ while (1) switch (_context17.prev = _context17.next) {
6196
6242
  case 0:
6197
- _context16.next = 1;
6243
+ _context17.next = 1;
6198
6244
  return _this31.waitForRemoteSDPAnswer();
6199
6245
  case 1:
6200
- _context16.next = 2;
6246
+ _context17.next = 2;
6201
6247
  return _this31.waitForMediaConnectionConnected();
6202
6248
  case 2:
6203
6249
  case "end":
6204
- return _context16.stop();
6250
+ return _context17.stop();
6205
6251
  }
6206
- }, _callee16);
6252
+ }, _callee17);
6207
6253
  }))).then(function () {
6208
6254
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
6209
6255
  }).catch(function (error) {
@@ -6344,49 +6390,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6344
6390
  }, {
6345
6391
  key: "startTranscription",
6346
6392
  value: (function () {
6347
- var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17(options) {
6348
- var _t10;
6349
- return _regenerator.default.wrap(function (_context17) {
6350
- while (1) switch (_context17.prev = _context17.next) {
6393
+ var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18(options) {
6394
+ var _t11;
6395
+ return _regenerator.default.wrap(function (_context18) {
6396
+ while (1) switch (_context18.prev = _context18.next) {
6351
6397
  case 0:
6352
6398
  if (!this.isJoined()) {
6353
- _context17.next = 5;
6399
+ _context18.next = 5;
6354
6400
  break;
6355
6401
  }
6356
6402
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
6357
- _context17.prev = 1;
6403
+ _context18.prev = 1;
6358
6404
  if (!this.areVoiceaEventsSetup) {
6359
6405
  this.setUpVoiceaListeners();
6360
6406
  }
6361
6407
 
6362
6408
  // @ts-ignore
6363
- _context17.next = 2;
6409
+ _context18.next = 2;
6364
6410
  return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
6365
6411
  case 2:
6366
- _context17.next = 4;
6412
+ _context18.next = 4;
6367
6413
  break;
6368
6414
  case 3:
6369
- _context17.prev = 3;
6370
- _t10 = _context17["catch"](1);
6371
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t10));
6415
+ _context18.prev = 3;
6416
+ _t11 = _context18["catch"](1);
6417
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t11));
6372
6418
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
6373
6419
  correlation_id: this.correlationId,
6374
- reason: _t10.message,
6375
- stack: _t10.stack
6420
+ reason: _t11.message,
6421
+ stack: _t11.stack
6376
6422
  });
6377
6423
  case 4:
6378
- _context17.next = 6;
6424
+ _context18.next = 6;
6379
6425
  break;
6380
6426
  case 5:
6381
6427
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
6382
6428
  throw new Error('Meeting is not joined');
6383
6429
  case 6:
6384
6430
  case "end":
6385
- return _context17.stop();
6431
+ return _context18.stop();
6386
6432
  }
6387
- }, _callee17, this, [[1, 3]]);
6433
+ }, _callee18, this, [[1, 3]]);
6388
6434
  }));
6389
- function startTranscription(_x13) {
6435
+ function startTranscription(_x14) {
6390
6436
  return _startTranscription.apply(this, arguments);
6391
6437
  }
6392
6438
  return startTranscription;
@@ -6473,7 +6519,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6473
6519
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
6474
6520
  */
6475
6521
  function () {
6476
- var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6522
+ var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
6477
6523
  var _this34 = this;
6478
6524
  var options,
6479
6525
  errorMessage,
@@ -6484,26 +6530,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6484
6530
  _error4,
6485
6531
  _errorMessage3,
6486
6532
  _error5,
6487
- _args18 = arguments,
6488
- _t11;
6489
- return _regenerator.default.wrap(function (_context18) {
6490
- while (1) switch (_context18.prev = _context18.next) {
6533
+ _args19 = arguments,
6534
+ _t12;
6535
+ return _regenerator.default.wrap(function (_context19) {
6536
+ while (1) switch (_context19.prev = _context19.next) {
6491
6537
  case 0:
6492
- options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
6538
+ options = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
6493
6539
  if (this.webex.meetings.registered) {
6494
- _context18.next = 1;
6540
+ _context19.next = 1;
6495
6541
  break;
6496
6542
  }
6497
6543
  errorMessage = 'Meeting:index#join --> Device not registered';
6498
6544
  error = new Error(errorMessage);
6499
6545
  _loggerProxy.default.logger.error(errorMessage);
6500
- return _context18.abrupt("return", _promise.default.reject(error));
6546
+ return _context19.abrupt("return", _promise.default.reject(error));
6501
6547
  case 1:
6502
6548
  if (!this.deferJoin) {
6503
- _context18.next = 2;
6549
+ _context19.next = 2;
6504
6550
  break;
6505
6551
  }
6506
- return _context18.abrupt("return", this.deferJoin);
6552
+ return _context19.abrupt("return", this.deferJoin);
6507
6553
  case 2:
6508
6554
  // Create a deferred promise for a consistent resolve value from utils.
6509
6555
  // This also prevents redundant API calls.
@@ -6555,15 +6601,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6555
6601
  this.wirelessShare = true;
6556
6602
  }
6557
6603
  if (!options.meetingQuality) {
6558
- _context18.next = 6;
6604
+ _context19.next = 6;
6559
6605
  break;
6560
6606
  }
6561
6607
  if (!(typeof options.meetingQuality === 'string')) {
6562
- _context18.next = 4;
6608
+ _context19.next = 4;
6563
6609
  break;
6564
6610
  }
6565
6611
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
6566
- _context18.next = 3;
6612
+ _context19.next = 3;
6567
6613
  break;
6568
6614
  }
6569
6615
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -6571,16 +6617,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6571
6617
  _loggerProxy.default.logger.error(_errorMessage2);
6572
6618
  joinFailed(_error4);
6573
6619
  this.deferJoin = undefined;
6574
- return _context18.abrupt("return", _promise.default.reject(_error4));
6620
+ return _context19.abrupt("return", _promise.default.reject(_error4));
6575
6621
  case 3:
6576
6622
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
6577
6623
  case 4:
6578
6624
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
6579
- _context18.next = 6;
6625
+ _context19.next = 6;
6580
6626
  break;
6581
6627
  }
6582
6628
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
6583
- _context18.next = 5;
6629
+ _context19.next = 5;
6584
6630
  break;
6585
6631
  }
6586
6632
  _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -6588,42 +6634,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6588
6634
  _error5 = new Error(_errorMessage3);
6589
6635
  joinFailed(_error5);
6590
6636
  this.deferJoin = undefined;
6591
- return _context18.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6637
+ return _context19.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6592
6638
  case 5:
6593
6639
  if (options.meetingQuality.remote) {
6594
6640
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
6595
6641
  }
6596
6642
  case 6:
6597
6643
  this.isMultistream = !!options.enableMultistream;
6598
- _context18.prev = 7;
6599
- _context18.next = 8;
6644
+ _context19.prev = 7;
6645
+ _context19.next = 8;
6600
6646
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
6601
6647
  case 8:
6602
- _context18.next = 10;
6648
+ _context19.next = 10;
6603
6649
  break;
6604
6650
  case 9:
6605
- _context18.prev = 9;
6606
- _t11 = _context18["catch"](7);
6607
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t11);
6608
- if (!(_t11 instanceof _captchaError.default || _t11 instanceof _passwordError.default || _t11 instanceof _permission.default)) {
6609
- _context18.next = 10;
6651
+ _context19.prev = 9;
6652
+ _t12 = _context19["catch"](7);
6653
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t12);
6654
+ if (!(_t12 instanceof _captchaError.default || _t12 instanceof _passwordError.default || _t12 instanceof _permission.default)) {
6655
+ _context19.next = 10;
6610
6656
  break;
6611
6657
  }
6612
- this.meetingFiniteStateMachine.fail(_t11);
6658
+ this.meetingFiniteStateMachine.fail(_t12);
6613
6659
 
6614
6660
  // Upload logs on refreshpermissionToken refresh Failure
6615
6661
  _triggerProxy.default.trigger(this, {
6616
6662
  file: 'meeting/index',
6617
6663
  function: 'join'
6618
6664
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6619
- joinFailed(_t11);
6665
+ joinFailed(_t12);
6620
6666
  this.deferJoin = undefined;
6621
6667
 
6622
6668
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
6623
6669
  // and bubble it up to client
6624
- return _context18.abrupt("return", _promise.default.reject(_t11));
6670
+ return _context19.abrupt("return", _promise.default.reject(_t12));
6625
6671
  case 10:
6626
- return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6672
+ return _context19.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6627
6673
  _this34.meetingFiniteStateMachine.join();
6628
6674
  _this34.setupLocusMediaRequest();
6629
6675
 
@@ -6679,9 +6725,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6679
6725
  }));
6680
6726
  case 11:
6681
6727
  case "end":
6682
- return _context18.stop();
6728
+ return _context19.stop();
6683
6729
  }
6684
- }, _callee18, this, [[7, 9]]);
6730
+ }, _callee19, this, [[7, 9]]);
6685
6731
  }));
6686
6732
  function join() {
6687
6733
  return _join.apply(this, arguments);
@@ -6773,55 +6819,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6773
6819
  }, {
6774
6820
  key: "ensureDefaultDatachannelTokenAfterAdmit",
6775
6821
  value: (function () {
6776
- var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
6777
- var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t12;
6778
- return _regenerator.default.wrap(function (_context19) {
6779
- while (1) switch (_context19.prev = _context19.next) {
6822
+ var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
6823
+ var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t13;
6824
+ return _regenerator.default.wrap(function (_context20) {
6825
+ while (1) switch (_context20.prev = _context20.next) {
6780
6826
  case 0:
6781
- _context19.prev = 0;
6827
+ _context20.prev = 0;
6782
6828
  // @ts-ignore
6783
6829
  datachannelToken = this.webex.internal.llm.getDatachannelToken(); // @ts-ignore
6784
- _context19.next = 1;
6830
+ _context20.next = 1;
6785
6831
  return this.webex.internal.llm.isDataChannelTokenEnabled();
6786
6832
  case 1:
6787
- isDataChannelTokenEnabled = _context19.sent;
6833
+ isDataChannelTokenEnabled = _context20.sent;
6788
6834
  if (!(!isDataChannelTokenEnabled || datachannelToken)) {
6789
- _context19.next = 2;
6835
+ _context20.next = 2;
6790
6836
  break;
6791
6837
  }
6792
- return _context19.abrupt("return", false);
6838
+ return _context20.abrupt("return", false);
6793
6839
  case 2:
6794
- _context19.next = 3;
6840
+ _context20.next = 3;
6795
6841
  return this.meetingRequest.fetchDatachannelToken({
6796
6842
  locusUrl: this.locusUrl,
6797
6843
  requestingParticipantId: this.members.selfId,
6798
6844
  isPracticeSession: false
6799
6845
  });
6800
6846
  case 3:
6801
- response = _context19.sent;
6847
+ response = _context20.sent;
6802
6848
  fetchedDatachannelToken = response === null || response === void 0 ? void 0 : (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.datachannelToken;
6803
6849
  if (fetchedDatachannelToken) {
6804
- _context19.next = 4;
6850
+ _context20.next = 4;
6805
6851
  break;
6806
6852
  }
6807
- return _context19.abrupt("return", false);
6853
+ return _context20.abrupt("return", false);
6808
6854
  case 4:
6809
6855
  // @ts-ignore
6810
6856
  this.webex.internal.llm.setDatachannelToken(fetchedDatachannelToken, _internalPluginLlm.DataChannelTokenType.Default);
6811
- return _context19.abrupt("return", true);
6857
+ return _context20.abrupt("return", true);
6812
6858
  case 5:
6813
- _context19.prev = 5;
6814
- _t12 = _context19["catch"](0);
6815
- msg = (_t12 === null || _t12 === void 0 ? void 0 : _t12.message) || String(_t12);
6859
+ _context20.prev = 5;
6860
+ _t13 = _context20["catch"](0);
6861
+ msg = (_t13 === null || _t13 === void 0 ? void 0 : _t13.message) || String(_t13);
6816
6862
  _loggerProxy.default.logger.warn("Meeting:index#ensureDefaultDatachannelTokenAfterAdmit --> failed to proactively fetch default data channel token after admit: ".concat(msg), {
6817
- statusCode: _t12 === null || _t12 === void 0 ? void 0 : _t12.statusCode
6863
+ statusCode: _t13 === null || _t13 === void 0 ? void 0 : _t13.statusCode
6818
6864
  });
6819
- return _context19.abrupt("return", false);
6865
+ return _context20.abrupt("return", false);
6820
6866
  case 6:
6821
6867
  case "end":
6822
- return _context19.stop();
6868
+ return _context20.stop();
6823
6869
  }
6824
- }, _callee19, this, [[0, 5]]);
6870
+ }, _callee20, this, [[0, 5]]);
6825
6871
  }));
6826
6872
  function ensureDefaultDatachannelTokenAfterAdmit() {
6827
6873
  return _ensureDefaultDatachannelTokenAfterAdmit.apply(this, arguments);
@@ -6837,11 +6883,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6837
6883
  }, {
6838
6884
  key: "updateLLMConnection",
6839
6885
  value: (function () {
6840
- var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
6886
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
6841
6887
  var _this36 = this;
6842
6888
  var _ref39, _ref39$url, url, _ref39$info, _ref39$info2, _ref39$info2$datachan, datachannelUrl, isJoined, datachannelToken, dataChannelUrl;
6843
- return _regenerator.default.wrap(function (_context20) {
6844
- while (1) switch (_context20.prev = _context20.next) {
6889
+ return _regenerator.default.wrap(function (_context21) {
6890
+ while (1) switch (_context21.prev = _context21.next) {
6845
6891
  case 0:
6846
6892
  // @ts-ignore - Fix type
6847
6893
  _ref39 = this.locusInfo || {}, _ref39$url = _ref39.url, url = _ref39$url === void 0 ? undefined : _ref39$url, _ref39$info = _ref39.info, _ref39$info2 = _ref39$info === void 0 ? {} : _ref39$info, _ref39$info2$datachan = _ref39$info2.datachannelUrl, datachannelUrl = _ref39$info2$datachan === void 0 ? undefined : _ref39$info2$datachan;
@@ -6849,7 +6895,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6849
6895
  datachannelToken = this.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.Default);
6850
6896
  dataChannelUrl = datachannelUrl; // @ts-ignore - Fix type
6851
6897
  if (!this.webex.internal.llm.isConnected()) {
6852
- _context20.next = 2;
6898
+ _context21.next = 2;
6853
6899
  break;
6854
6900
  }
6855
6901
  if (!(
@@ -6857,23 +6903,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6857
6903
  url === this.webex.internal.llm.getLocusUrl() &&
6858
6904
  // @ts-ignore - Fix type
6859
6905
  dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
6860
- _context20.next = 1;
6906
+ _context21.next = 1;
6861
6907
  break;
6862
6908
  }
6863
- return _context20.abrupt("return", undefined);
6909
+ return _context21.abrupt("return", undefined);
6864
6910
  case 1:
6865
- _context20.next = 2;
6911
+ _context21.next = 2;
6866
6912
  return this.cleanupLLMConneciton({
6867
6913
  removeOnlineListener: false
6868
6914
  });
6869
6915
  case 2:
6870
6916
  if (isJoined) {
6871
- _context20.next = 3;
6917
+ _context21.next = 3;
6872
6918
  break;
6873
6919
  }
6874
- return _context20.abrupt("return", undefined);
6920
+ return _context21.abrupt("return", undefined);
6875
6921
  case 3:
6876
- return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
6922
+ return _context21.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
6877
6923
  // @ts-ignore - Fix type
6878
6924
  _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
6879
6925
  // @ts-ignore - Fix type
@@ -6888,9 +6934,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6888
6934
  }));
6889
6935
  case 4:
6890
6936
  case "end":
6891
- return _context20.stop();
6937
+ return _context21.stop();
6892
6938
  }
6893
- }, _callee20, this);
6939
+ }, _callee21, this);
6894
6940
  }));
6895
6941
  function updateLLMConnection() {
6896
6942
  return _updateLLMConnection.apply(this, arguments);
@@ -7076,17 +7122,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7076
7122
  meetingId: this.id
7077
7123
  }
7078
7124
  });
7079
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
7080
- var mediaSettings, _t13;
7081
- return _regenerator.default.wrap(function (_context21) {
7082
- while (1) switch (_context21.prev = _context21.next) {
7125
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
7126
+ var mediaSettings, _t14;
7127
+ return _regenerator.default.wrap(function (_context22) {
7128
+ while (1) switch (_context22.prev = _context22.next) {
7083
7129
  case 0:
7084
- _context21.prev = 0;
7130
+ _context22.prev = 0;
7085
7131
  if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
7086
- _context21.next = 1;
7132
+ _context22.next = 1;
7087
7133
  break;
7088
7134
  }
7089
- _context21.next = 1;
7135
+ _context22.next = 1;
7090
7136
  return _this40.releaseScreenShareFloor();
7091
7137
  case 1:
7092
7138
  mediaSettings = {
@@ -7105,23 +7151,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7105
7151
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the device answers the meeting
7106
7152
  // once the device answers we close the old connection and create new media server connection with only share enabled
7107
7153
  if (!_this40.statsAnalyzer) {
7108
- _context21.next = 2;
7154
+ _context22.next = 2;
7109
7155
  break;
7110
7156
  }
7111
- _context21.next = 2;
7157
+ _context22.next = 2;
7112
7158
  return _this40.statsAnalyzer.stopAnalyzer();
7113
7159
  case 2:
7114
- _context21.next = 3;
7160
+ _context22.next = 3;
7115
7161
  return _this40.closeRemoteStreams();
7116
7162
  case 3:
7117
- _context21.next = 4;
7163
+ _context22.next = 4;
7118
7164
  return _this40.closePeerConnections();
7119
7165
  case 4:
7120
7166
  _this40.cleanupLocalStreams();
7121
7167
  _this40.unsetRemoteStreams();
7122
7168
  _this40.unsetPeerConnections();
7123
7169
  _this40.reconnectionManager.cleanUp();
7124
- _context21.next = 5;
7170
+ _context22.next = 5;
7125
7171
  return _this40.addMedia({
7126
7172
  audioEnabled: false,
7127
7173
  videoEnabled: false,
@@ -7130,24 +7176,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7130
7176
  case 5:
7131
7177
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
7132
7178
  _this40.isMoveToInProgress = false;
7133
- _context21.next = 7;
7179
+ _context22.next = 7;
7134
7180
  break;
7135
7181
  case 6:
7136
- _context21.prev = 6;
7137
- _t13 = _context21["catch"](0);
7138
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t13);
7182
+ _context22.prev = 6;
7183
+ _t14 = _context22["catch"](0);
7184
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t14);
7139
7185
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
7140
7186
  correlation_id: _this40.correlationId,
7141
7187
  locus_id: _this40.locusUrl.split('/').pop(),
7142
- reason: _t13.message,
7143
- stack: _t13.stack
7188
+ reason: _t14.message,
7189
+ stack: _t14.stack
7144
7190
  });
7145
7191
  _this40.isMoveToInProgress = false;
7146
7192
  case 7:
7147
7193
  case "end":
7148
- return _context21.stop();
7194
+ return _context22.stop();
7149
7195
  }
7150
- }, _callee21, null, [[0, 6]]);
7196
+ }, _callee22, null, [[0, 6]]);
7151
7197
  })));
7152
7198
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
7153
7199
 
@@ -7235,10 +7281,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7235
7281
  }, {
7236
7282
  key: "createMediaConnection",
7237
7283
  value: (function () {
7238
- var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22(turnServerInfo, bundlePolicy) {
7284
+ var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23(turnServerInfo, bundlePolicy) {
7239
7285
  var mc, audioEnabled, videoEnabled, shareEnabled;
7240
- return _regenerator.default.wrap(function (_context22) {
7241
- while (1) switch (_context22.prev = _context22.next) {
7286
+ return _regenerator.default.wrap(function (_context23) {
7287
+ while (1) switch (_context23.prev = _context23.next) {
7242
7288
  case 0:
7243
7289
  this.rtcMetrics = this.isMultistream ?
7244
7290
  // @ts-ignore
@@ -7280,42 +7326,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7280
7326
 
7281
7327
  // publish the streams
7282
7328
  if (!this.mediaProperties.audioStream) {
7283
- _context22.next = 1;
7329
+ _context23.next = 1;
7284
7330
  break;
7285
7331
  }
7286
7332
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
7287
- _context22.next = 1;
7333
+ _context23.next = 1;
7288
7334
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
7289
7335
  case 1:
7290
7336
  if (!this.mediaProperties.videoStream) {
7291
- _context22.next = 2;
7337
+ _context23.next = 2;
7292
7338
  break;
7293
7339
  }
7294
- _context22.next = 2;
7340
+ _context23.next = 2;
7295
7341
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
7296
7342
  case 2:
7297
7343
  if (!this.mediaProperties.shareVideoStream) {
7298
- _context22.next = 3;
7344
+ _context23.next = 3;
7299
7345
  break;
7300
7346
  }
7301
- _context22.next = 3;
7347
+ _context23.next = 3;
7302
7348
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
7303
7349
  case 3:
7304
7350
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
7305
- _context22.next = 4;
7351
+ _context23.next = 4;
7306
7352
  break;
7307
7353
  }
7308
- _context22.next = 4;
7354
+ _context23.next = 4;
7309
7355
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
7310
7356
  case 4:
7311
- return _context22.abrupt("return", mc);
7357
+ return _context23.abrupt("return", mc);
7312
7358
  case 5:
7313
7359
  case "end":
7314
- return _context22.stop();
7360
+ return _context23.stop();
7315
7361
  }
7316
- }, _callee22, this);
7362
+ }, _callee23, this);
7317
7363
  }));
7318
- function createMediaConnection(_x14, _x15) {
7364
+ function createMediaConnection(_x15, _x16) {
7319
7365
  return _createMediaConnection.apply(this, arguments);
7320
7366
  }
7321
7367
  return createMediaConnection;
@@ -7353,11 +7399,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7353
7399
  }, {
7354
7400
  key: "setUpLocalStreamReferences",
7355
7401
  value: (function () {
7356
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23(localStreams) {
7402
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(localStreams) {
7357
7403
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
7358
- var setUpStreamPromises, _t14;
7359
- return _regenerator.default.wrap(function (_context23) {
7360
- while (1) switch (_context23.prev = _context23.next) {
7404
+ var setUpStreamPromises, _t15;
7405
+ return _regenerator.default.wrap(function (_context24) {
7406
+ while (1) switch (_context24.prev = _context24.next) {
7361
7407
  case 0:
7362
7408
  setUpStreamPromises = [];
7363
7409
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$microph = localStreams.microphone) === null || _localStreams$microph === void 0 ? void 0 : _localStreams$microph.readyState) !== 'ended') {
@@ -7372,24 +7418,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7372
7418
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS4 = localStreams.screenShare) !== null && _localStreams$screenS4 !== void 0 && _localStreams$screenS4.audio && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS5 = localStreams.screenShare) === null || _localStreams$screenS5 === void 0 ? void 0 : (_localStreams$screenS6 = _localStreams$screenS5.audio) === null || _localStreams$screenS6 === void 0 ? void 0 : _localStreams$screenS6.readyState) !== 'ended') {
7373
7419
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
7374
7420
  }
7375
- _context23.prev = 1;
7376
- _context23.next = 2;
7421
+ _context24.prev = 1;
7422
+ _context24.next = 2;
7377
7423
  return _promise.default.all(setUpStreamPromises);
7378
7424
  case 2:
7379
- _context23.next = 4;
7425
+ _context24.next = 4;
7380
7426
  break;
7381
7427
  case 3:
7382
- _context23.prev = 3;
7383
- _t14 = _context23["catch"](1);
7384
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t14);
7385
- throw _t14;
7428
+ _context24.prev = 3;
7429
+ _t15 = _context24["catch"](1);
7430
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t15);
7431
+ throw _t15;
7386
7432
  case 4:
7387
7433
  case "end":
7388
- return _context23.stop();
7434
+ return _context24.stop();
7389
7435
  }
7390
- }, _callee23, this, [[1, 3]]);
7436
+ }, _callee24, this, [[1, 3]]);
7391
7437
  }));
7392
- function setUpLocalStreamReferences(_x16) {
7438
+ function setUpLocalStreamReferences(_x17) {
7393
7439
  return _setUpLocalStreamReferences.apply(this, arguments);
7394
7440
  }
7395
7441
  return setUpLocalStreamReferences;
@@ -7404,72 +7450,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7404
7450
  }, {
7405
7451
  key: "waitForMediaConnectionConnected",
7406
7452
  value: (function () {
7407
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
7408
- var iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, timedOutError, _t15, _t16, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29;
7409
- return _regenerator.default.wrap(function (_context24) {
7410
- while (1) switch (_context24.prev = _context24.next) {
7453
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
7454
+ var iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, timedOutError, _t16, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30;
7455
+ return _regenerator.default.wrap(function (_context25) {
7456
+ while (1) switch (_context25.prev = _context25.next) {
7411
7457
  case 0:
7412
- _context24.prev = 0;
7413
- _context24.next = 1;
7458
+ _context25.prev = 0;
7459
+ _context25.next = 1;
7414
7460
  return this.mediaProperties.waitForMediaConnectionConnected(this.correlationId);
7415
7461
  case 1:
7416
- _context24.next = 5;
7462
+ _context25.next = 5;
7417
7463
  break;
7418
7464
  case 2:
7419
- _context24.prev = 2;
7420
- _t15 = _context24["catch"](0);
7421
- iceConnected = _t15.iceConnected;
7465
+ _context25.prev = 2;
7466
+ _t16 = _context25["catch"](0);
7467
+ iceConnected = _t16.iceConnected;
7422
7468
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
7423
- _context24.next = 4;
7469
+ _context25.next = 4;
7424
7470
  break;
7425
7471
  }
7426
- _t16 = this.webex.internal.newMetrics;
7427
- _t17 = !this.turnServerUsed;
7428
- _t18 = this.addMediaData.icePhaseCallback();
7429
- _t19 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7430
- _t20 = _internalPluginMetrics.CallDiagnosticUtils;
7431
- _t21 = ((_this$mediaProperties9 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties9 === void 0 ? void 0 : (_this$mediaProperties0 = _this$mediaProperties9.multistreamConnection) === null || _this$mediaProperties0 === void 0 ? void 0 : (_this$mediaProperties1 = _this$mediaProperties0.pc) === null || _this$mediaProperties1 === void 0 ? void 0 : (_this$mediaProperties10 = _this$mediaProperties1.pc) === null || _this$mediaProperties10 === void 0 ? void 0 : _this$mediaProperties10.signalingState) || ((_this$mediaProperties11 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.mediaConnection) === null || _this$mediaProperties12 === void 0 ? void 0 : (_this$mediaProperties13 = _this$mediaProperties12.pc) === null || _this$mediaProperties13 === void 0 ? void 0 : _this$mediaProperties13.signalingState) || 'unknown';
7432
- _t22 = iceConnected;
7433
- _t23 = this.turnServerUsed;
7434
- _context24.next = 3;
7472
+ _t17 = this.webex.internal.newMetrics;
7473
+ _t18 = !this.turnServerUsed;
7474
+ _t19 = this.addMediaData.icePhaseCallback();
7475
+ _t20 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7476
+ _t21 = _internalPluginMetrics.CallDiagnosticUtils;
7477
+ _t22 = ((_this$mediaProperties9 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties9 === void 0 ? void 0 : (_this$mediaProperties0 = _this$mediaProperties9.multistreamConnection) === null || _this$mediaProperties0 === void 0 ? void 0 : (_this$mediaProperties1 = _this$mediaProperties0.pc) === null || _this$mediaProperties1 === void 0 ? void 0 : (_this$mediaProperties10 = _this$mediaProperties1.pc) === null || _this$mediaProperties10 === void 0 ? void 0 : _this$mediaProperties10.signalingState) || ((_this$mediaProperties11 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.mediaConnection) === null || _this$mediaProperties12 === void 0 ? void 0 : (_this$mediaProperties13 = _this$mediaProperties12.pc) === null || _this$mediaProperties13 === void 0 ? void 0 : _this$mediaProperties13.signalingState) || 'unknown';
7478
+ _t23 = iceConnected;
7479
+ _t24 = this.turnServerUsed;
7480
+ _context25.next = 3;
7435
7481
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
7436
7482
  return false;
7437
7483
  });
7438
7484
  case 3:
7439
- _t24 = _context24.sent;
7440
- _t25 = _t20.generateClientErrorCodeForIceFailure.call(_t20, {
7441
- signalingState: _t21,
7442
- iceConnected: _t22,
7443
- turnServerUsed: _t23,
7444
- unreachable: _t24
7485
+ _t25 = _context25.sent;
7486
+ _t26 = _t21.generateClientErrorCodeForIceFailure.call(_t21, {
7487
+ signalingState: _t22,
7488
+ iceConnected: _t23,
7489
+ turnServerUsed: _t24,
7490
+ unreachable: _t25
7445
7491
  });
7446
- _t26 = _t19.getErrorPayloadForClientErrorCode.call(_t19, {
7447
- clientErrorCode: _t25
7492
+ _t27 = _t20.getErrorPayloadForClientErrorCode.call(_t20, {
7493
+ clientErrorCode: _t26
7448
7494
  });
7449
- _t27 = [_t26];
7450
- _t28 = {
7451
- canProceed: _t17,
7452
- icePhase: _t18,
7453
- errors: _t27
7454
- };
7495
+ _t28 = [_t27];
7455
7496
  _t29 = {
7497
+ canProceed: _t18,
7498
+ icePhase: _t19,
7499
+ errors: _t28
7500
+ };
7501
+ _t30 = {
7456
7502
  meetingId: this.id,
7457
- rawError: _t15
7503
+ rawError: _t16
7458
7504
  };
7459
- _t16.submitClientEvent.call(_t16, {
7505
+ _t17.submitClientEvent.call(_t17, {
7460
7506
  name: 'client.ice.end',
7461
- payload: _t28,
7462
- options: _t29
7507
+ payload: _t29,
7508
+ options: _t30
7463
7509
  });
7464
7510
  case 4:
7465
7511
  timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
7466
- timedOutError.cause = _t15;
7512
+ timedOutError.cause = _t16;
7467
7513
  throw timedOutError;
7468
7514
  case 5:
7469
7515
  case "end":
7470
- return _context24.stop();
7516
+ return _context25.stop();
7471
7517
  }
7472
- }, _callee24, this, [[0, 2]]);
7518
+ }, _callee25, this, [[0, 2]]);
7473
7519
  }));
7474
7520
  function waitForMediaConnectionConnected() {
7475
7521
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -7536,19 +7582,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7536
7582
  }, {
7537
7583
  key: "waitForRemoteSDPAnswer",
7538
7584
  value: (function () {
7539
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
7585
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
7540
7586
  var _this44 = this;
7541
7587
  var LOG_HEADER, deferSDPAnswer;
7542
- return _regenerator.default.wrap(function (_context25) {
7543
- while (1) switch (_context25.prev = _context25.next) {
7588
+ return _regenerator.default.wrap(function (_context26) {
7589
+ while (1) switch (_context26.prev = _context26.next) {
7544
7590
  case 0:
7545
7591
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
7546
7592
  if (this.deferSDPAnswer) {
7547
- _context25.next = 1;
7593
+ _context26.next = 1;
7548
7594
  break;
7549
7595
  }
7550
7596
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
7551
- return _context25.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7597
+ return _context26.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7552
7598
  case 1:
7553
7599
  deferSDPAnswer = this.deferSDPAnswer;
7554
7600
  this.sdpResponseTimer = setTimeout(function () {
@@ -7574,12 +7620,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7574
7620
  deferSDPAnswer.reject(error);
7575
7621
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
7576
7622
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
7577
- return _context25.abrupt("return", deferSDPAnswer.promise);
7623
+ return _context26.abrupt("return", deferSDPAnswer.promise);
7578
7624
  case 2:
7579
7625
  case "end":
7580
- return _context25.stop();
7626
+ return _context26.stop();
7581
7627
  }
7582
- }, _callee25, this);
7628
+ }, _callee26, this);
7583
7629
  }));
7584
7630
  function waitForRemoteSDPAnswer() {
7585
7631
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -7598,30 +7644,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7598
7644
  }, {
7599
7645
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
7600
7646
  value: (function () {
7601
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
7602
- var LOG_HEADER, _t30;
7603
- return _regenerator.default.wrap(function (_context26) {
7604
- while (1) switch (_context26.prev = _context26.next) {
7647
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27(remoteMediaManagerConfig, bundlePolicy) {
7648
+ var LOG_HEADER, _t31;
7649
+ return _regenerator.default.wrap(function (_context27) {
7650
+ while (1) switch (_context27.prev = _context27.next) {
7605
7651
  case 0:
7606
7652
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
7607
- _context26.prev = 1;
7608
- _context26.next = 2;
7653
+ _context27.prev = 1;
7654
+ _context27.next = 2;
7609
7655
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
7610
7656
  case 2:
7611
- _context26.next = 4;
7657
+ _context27.next = 4;
7612
7658
  break;
7613
7659
  case 3:
7614
- _context26.prev = 3;
7615
- _t30 = _context26["catch"](1);
7616
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t30);
7617
- throw _t30;
7660
+ _context27.prev = 3;
7661
+ _t31 = _context27["catch"](1);
7662
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t31);
7663
+ throw _t31;
7618
7664
  case 4:
7619
7665
  case "end":
7620
- return _context26.stop();
7666
+ return _context27.stop();
7621
7667
  }
7622
- }, _callee26, this, [[1, 3]]);
7668
+ }, _callee27, this, [[1, 3]]);
7623
7669
  }));
7624
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x17, _x18) {
7670
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x18, _x19) {
7625
7671
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
7626
7672
  }
7627
7673
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -7639,14 +7685,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7639
7685
  }, {
7640
7686
  key: "retryWithForcedTurnDiscovery",
7641
7687
  value: (function () {
7642
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27(remoteMediaManagerConfig, bundlePolicy) {
7688
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy) {
7643
7689
  var LOG_HEADER;
7644
- return _regenerator.default.wrap(function (_context27) {
7645
- while (1) switch (_context27.prev = _context27.next) {
7690
+ return _regenerator.default.wrap(function (_context28) {
7691
+ while (1) switch (_context28.prev = _context28.next) {
7646
7692
  case 0:
7647
7693
  this.addMediaData.retriedWithTurnServer = true;
7648
7694
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
7649
- _context27.next = 1;
7695
+ _context28.next = 1;
7650
7696
  return this.cleanUpBeforeRetryWithTurnServer();
7651
7697
  case 1:
7652
7698
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -7656,24 +7702,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7656
7702
  reason: 'forcingTurnTls'
7657
7703
  });
7658
7704
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
7659
- _context27.next = 2;
7705
+ _context28.next = 2;
7660
7706
  break;
7661
7707
  }
7662
7708
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
7663
- _context27.next = 2;
7709
+ _context28.next = 2;
7664
7710
  return this.join({
7665
7711
  rejoin: true
7666
7712
  });
7667
7713
  case 2:
7668
- _context27.next = 3;
7714
+ _context28.next = 3;
7669
7715
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
7670
7716
  case 3:
7671
7717
  case "end":
7672
- return _context27.stop();
7718
+ return _context28.stop();
7673
7719
  }
7674
- }, _callee27, this);
7720
+ }, _callee28, this);
7675
7721
  }));
7676
- function retryWithForcedTurnDiscovery(_x19, _x20) {
7722
+ function retryWithForcedTurnDiscovery(_x20, _x21) {
7677
7723
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
7678
7724
  }
7679
7725
  return retryWithForcedTurnDiscovery;
@@ -7693,32 +7739,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7693
7739
  }, {
7694
7740
  key: "handleWaitForMediaConnectionConnectedError",
7695
7741
  value: (function () {
7696
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(error, remoteMediaManagerConfig, bundlePolicy) {
7742
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(error, remoteMediaManagerConfig, bundlePolicy) {
7697
7743
  var LOG_HEADER;
7698
- return _regenerator.default.wrap(function (_context28) {
7699
- while (1) switch (_context28.prev = _context28.next) {
7744
+ return _regenerator.default.wrap(function (_context29) {
7745
+ while (1) switch (_context29.prev = _context29.next) {
7700
7746
  case 0:
7701
7747
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
7702
7748
  if (this.turnServerUsed) {
7703
- _context28.next = 2;
7749
+ _context29.next = 2;
7704
7750
  break;
7705
7751
  }
7706
7752
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
7707
- _context28.next = 1;
7753
+ _context29.next = 1;
7708
7754
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
7709
7755
  case 1:
7710
- _context28.next = 3;
7756
+ _context29.next = 3;
7711
7757
  break;
7712
7758
  case 2:
7713
7759
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
7714
7760
  throw new _webexErrors.AddMediaFailed(error);
7715
7761
  case 3:
7716
7762
  case "end":
7717
- return _context28.stop();
7763
+ return _context29.stop();
7718
7764
  }
7719
- }, _callee28, this);
7765
+ }, _callee29, this);
7720
7766
  }));
7721
- function handleWaitForMediaConnectionConnectedError(_x21, _x22, _x23) {
7767
+ function handleWaitForMediaConnectionConnectedError(_x22, _x23, _x24) {
7722
7768
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
7723
7769
  }
7724
7770
  return handleWaitForMediaConnectionConnectedError;
@@ -7734,20 +7780,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7734
7780
  }, {
7735
7781
  key: "doTurnDiscovery",
7736
7782
  value: (function () {
7737
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(isReconnecting, isForced) {
7783
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(isReconnecting, isForced) {
7738
7784
  var cdl, turnDiscoveryResult;
7739
- return _regenerator.default.wrap(function (_context29) {
7740
- while (1) switch (_context29.prev = _context29.next) {
7785
+ return _regenerator.default.wrap(function (_context30) {
7786
+ while (1) switch (_context30.prev = _context30.next) {
7741
7787
  case 0:
7742
7788
  // @ts-ignore
7743
7789
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
7744
7790
  this.webex.internal.newMetrics.submitInternalEvent({
7745
7791
  name: 'internal.client.add-media.turn-discovery.start'
7746
7792
  });
7747
- _context29.next = 1;
7793
+ _context30.next = 1;
7748
7794
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
7749
7795
  case 1:
7750
- turnDiscoveryResult = _context29.sent;
7796
+ turnDiscoveryResult = _context30.sent;
7751
7797
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
7752
7798
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
7753
7799
 
@@ -7763,14 +7809,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7763
7809
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
7764
7810
  });
7765
7811
  }
7766
- return _context29.abrupt("return", turnDiscoveryResult);
7812
+ return _context30.abrupt("return", turnDiscoveryResult);
7767
7813
  case 2:
7768
7814
  case "end":
7769
- return _context29.stop();
7815
+ return _context30.stop();
7770
7816
  }
7771
- }, _callee29, this);
7817
+ }, _callee30, this);
7772
7818
  }));
7773
- function doTurnDiscovery(_x24, _x25) {
7819
+ function doTurnDiscovery(_x25, _x26) {
7774
7820
  return _doTurnDiscovery.apply(this, arguments);
7775
7821
  }
7776
7822
  return doTurnDiscovery;
@@ -7789,35 +7835,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7789
7835
  }, {
7790
7836
  key: "establishMediaConnection",
7791
7837
  value: (function () {
7792
- var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
7838
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
7793
7839
  var _this$locusMediaReque;
7794
- var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t31, _t32;
7795
- return _regenerator.default.wrap(function (_context30) {
7796
- while (1) switch (_context30.prev = _context30.next) {
7840
+ var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t32, _t33;
7841
+ return _regenerator.default.wrap(function (_context31) {
7842
+ while (1) switch (_context31.prev = _context31.next) {
7797
7843
  case 0:
7798
7844
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
7799
7845
  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
7800
7846
  if (this.isMoveToInProgress && this.turnServerUsed) {
7801
7847
  isForced = true;
7802
7848
  }
7803
- _context30.prev = 1;
7849
+ _context31.prev = 1;
7804
7850
  if (turnServerInfo) {
7805
- _context30.next = 3;
7851
+ _context31.next = 3;
7806
7852
  break;
7807
7853
  }
7808
- _context30.next = 2;
7854
+ _context31.next = 2;
7809
7855
  return this.doTurnDiscovery(isReconnecting, isForced);
7810
7856
  case 2:
7811
- _yield$this$doTurnDis = _context30.sent;
7857
+ _yield$this$doTurnDis = _context31.sent;
7812
7858
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
7813
7859
  case 3:
7814
- _context30.next = 4;
7860
+ _context31.next = 4;
7815
7861
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
7816
7862
  case 4:
7817
- mc = _context30.sent;
7863
+ mc = _context31.sent;
7818
7864
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
7819
7865
  if (!this.isMultistream) {
7820
- _context30.next = 5;
7866
+ _context31.next = 5;
7821
7867
  break;
7822
7868
  }
7823
7869
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -7825,42 +7871,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7825
7871
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
7826
7872
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
7827
7873
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
7828
- _context30.next = 5;
7874
+ _context31.next = 5;
7829
7875
  return this.remoteMediaManager.start();
7830
7876
  case 5:
7831
- _context30.next = 6;
7877
+ _context31.next = 6;
7832
7878
  return mc.initiateOffer();
7833
7879
  case 6:
7834
- _context30.next = 7;
7880
+ _context31.next = 7;
7835
7881
  return this.waitForRemoteSDPAnswer();
7836
7882
  case 7:
7837
7883
  this.handleMediaLogging(this.mediaProperties);
7838
- _context30.next = 9;
7884
+ _context31.next = 9;
7839
7885
  break;
7840
7886
  case 8:
7841
- _context30.prev = 8;
7842
- _t31 = _context30["catch"](1);
7843
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t31);
7844
- throw _t31;
7887
+ _context31.prev = 8;
7888
+ _t32 = _context31["catch"](1);
7889
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t32);
7890
+ throw _t32;
7845
7891
  case 9:
7846
- _context30.prev = 9;
7847
- _context30.next = 10;
7892
+ _context31.prev = 9;
7893
+ _context31.next = 10;
7848
7894
  return this.waitForMediaConnectionConnected();
7849
7895
  case 10:
7850
- _context30.next = 12;
7896
+ _context31.next = 12;
7851
7897
  break;
7852
7898
  case 11:
7853
- _context30.prev = 11;
7854
- _t32 = _context30["catch"](9);
7855
- _context30.next = 12;
7856
- return this.handleWaitForMediaConnectionConnectedError(_t32, remoteMediaManagerConfig, bundlePolicy);
7899
+ _context31.prev = 11;
7900
+ _t33 = _context31["catch"](9);
7901
+ _context31.next = 12;
7902
+ return this.handleWaitForMediaConnectionConnectedError(_t33, remoteMediaManagerConfig, bundlePolicy);
7857
7903
  case 12:
7858
7904
  case "end":
7859
- return _context30.stop();
7905
+ return _context31.stop();
7860
7906
  }
7861
- }, _callee30, this, [[1, 8], [9, 11]]);
7907
+ }, _callee31, this, [[1, 8], [9, 11]]);
7862
7908
  }));
7863
- function establishMediaConnection(_x26, _x27, _x28, _x29) {
7909
+ function establishMediaConnection(_x27, _x28, _x29, _x30) {
7864
7910
  return _establishMediaConnection.apply(this, arguments);
7865
7911
  }
7866
7912
  return establishMediaConnection;
@@ -7875,16 +7921,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7875
7921
  }, {
7876
7922
  key: "cleanUpOnAddMediaFailure",
7877
7923
  value: (function () {
7878
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
7924
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
7879
7925
  var _this$networkQualityM, _this$statsMonitor;
7880
- return _regenerator.default.wrap(function (_context31) {
7881
- while (1) switch (_context31.prev = _context31.next) {
7926
+ return _regenerator.default.wrap(function (_context32) {
7927
+ while (1) switch (_context32.prev = _context32.next) {
7882
7928
  case 0:
7883
7929
  if (!this.statsAnalyzer) {
7884
- _context31.next = 1;
7930
+ _context32.next = 1;
7885
7931
  break;
7886
7932
  }
7887
- _context31.next = 1;
7933
+ _context32.next = 1;
7888
7934
  return this.statsAnalyzer.stopAnalyzer();
7889
7935
  case 1:
7890
7936
  this.statsAnalyzer = null;
@@ -7895,7 +7941,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7895
7941
 
7896
7942
  // when media fails, we want to upload a webrtc dump to see whats going on
7897
7943
  // this function is async, but returns once the stats have been gathered
7898
- _context31.next = 2;
7944
+ _context32.next = 2;
7899
7945
  return this.forceSendStatsReport({
7900
7946
  callFrom: 'addMedia'
7901
7947
  });
@@ -7906,9 +7952,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7906
7952
  }
7907
7953
  case 3:
7908
7954
  case "end":
7909
- return _context31.stop();
7955
+ return _context32.stop();
7910
7956
  }
7911
- }, _callee31, this);
7957
+ }, _callee32, this);
7912
7958
  }));
7913
7959
  function cleanUpOnAddMediaFailure() {
7914
7960
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -7926,16 +7972,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7926
7972
  }, {
7927
7973
  key: "downgradeFromMultistreamToTranscoded",
7928
7974
  value: (function () {
7929
- var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
7975
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
7930
7976
  var _this$networkQualityM2, _this$statsMonitor2, _this$locusMediaReque2;
7931
- return _regenerator.default.wrap(function (_context32) {
7932
- while (1) switch (_context32.prev = _context32.next) {
7977
+ return _regenerator.default.wrap(function (_context33) {
7978
+ while (1) switch (_context33.prev = _context33.next) {
7933
7979
  case 0:
7934
7980
  if (!this.statsAnalyzer) {
7935
- _context32.next = 1;
7981
+ _context33.next = 1;
7936
7982
  break;
7937
7983
  }
7938
- _context32.next = 1;
7984
+ _context33.next = 1;
7939
7985
  return this.statsAnalyzer.stopAnalyzer();
7940
7986
  case 1:
7941
7987
  this.statsAnalyzer = null;
@@ -7953,9 +7999,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7953
7999
  this.createStatsAnalyzer();
7954
8000
  case 2:
7955
8001
  case "end":
7956
- return _context32.stop();
8002
+ return _context33.stop();
7957
8003
  }
7958
- }, _callee32, this);
8004
+ }, _callee33, this);
7959
8005
  }));
7960
8006
  function downgradeFromMultistreamToTranscoded() {
7961
8007
  return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
@@ -7973,11 +8019,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7973
8019
  }, {
7974
8020
  key: "cleanUpBeforeRetryWithTurnServer",
7975
8021
  value: (function () {
7976
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
7977
- return _regenerator.default.wrap(function (_context33) {
7978
- while (1) switch (_context33.prev = _context33.next) {
8022
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8023
+ return _regenerator.default.wrap(function (_context34) {
8024
+ while (1) switch (_context34.prev = _context34.next) {
7979
8025
  case 0:
7980
- _context33.next = 1;
8026
+ _context34.next = 1;
7981
8027
  return this.forceSendStatsReport({
7982
8028
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
7983
8029
  });
@@ -7997,9 +8043,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7997
8043
  }
7998
8044
  case 2:
7999
8045
  case "end":
8000
- return _context33.stop();
8046
+ return _context34.stop();
8001
8047
  }
8002
- }, _callee33, this);
8048
+ }, _callee34, this);
8003
8049
  }));
8004
8050
  function cleanUpBeforeRetryWithTurnServer() {
8005
8051
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -8009,35 +8055,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8009
8055
  }, {
8010
8056
  key: "cleanUpBeforeReconnection",
8011
8057
  value: function () {
8012
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8013
- var _t33;
8014
- return _regenerator.default.wrap(function (_context34) {
8015
- while (1) switch (_context34.prev = _context34.next) {
8058
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8059
+ var _t34;
8060
+ return _regenerator.default.wrap(function (_context35) {
8061
+ while (1) switch (_context35.prev = _context35.next) {
8016
8062
  case 0:
8017
- _context34.prev = 0;
8018
- _context34.next = 1;
8063
+ _context35.prev = 0;
8064
+ _context35.next = 1;
8019
8065
  return this.forceSendStatsReport({
8020
8066
  callFrom: 'cleanUpBeforeReconnection'
8021
8067
  });
8022
8068
  case 1:
8023
8069
  if (!this.statsAnalyzer) {
8024
- _context34.next = 2;
8070
+ _context35.next = 2;
8025
8071
  break;
8026
8072
  }
8027
- _context34.next = 2;
8073
+ _context35.next = 2;
8028
8074
  return this.statsAnalyzer.stopAnalyzer();
8029
8075
  case 2:
8030
- _context34.next = 4;
8076
+ _context35.next = 4;
8031
8077
  break;
8032
8078
  case 3:
8033
- _context34.prev = 3;
8034
- _t33 = _context34["catch"](0);
8035
- _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t33);
8079
+ _context35.prev = 3;
8080
+ _t34 = _context35["catch"](0);
8081
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t34);
8036
8082
  case 4:
8037
8083
  case "end":
8038
- return _context34.stop();
8084
+ return _context35.stop();
8039
8085
  }
8040
- }, _callee34, this, [[0, 3]]);
8086
+ }, _callee35, this, [[0, 3]]);
8041
8087
  }));
8042
8088
  function cleanUpBeforeReconnection() {
8043
8089
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -8105,7 +8151,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8105
8151
  }, {
8106
8152
  key: "addMediaInternal",
8107
8153
  value: (function () {
8108
- var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8154
+ var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8109
8155
  var options,
8110
8156
  LOG_HEADER,
8111
8157
  localStreams,
@@ -8167,26 +8213,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8167
8213
  _selectedCandidatePairChanges,
8168
8214
  _numTransports,
8169
8215
  _iceCandidateErrors,
8170
- _args35 = arguments,
8171
- _t34,
8172
- _t35;
8173
- return _regenerator.default.wrap(function (_context35) {
8174
- while (1) switch (_context35.prev = _context35.next) {
8216
+ _args36 = arguments,
8217
+ _t35,
8218
+ _t36;
8219
+ return _regenerator.default.wrap(function (_context36) {
8220
+ while (1) switch (_context36.prev = _context36.next) {
8175
8221
  case 0:
8176
- options = _args35.length > 3 && _args35[3] !== undefined ? _args35[3] : {};
8222
+ options = _args36.length > 3 && _args36[3] !== undefined ? _args36[3] : {};
8177
8223
  this.addMediaData.retriedWithTurnServer = false;
8178
8224
  this.addMediaData.icePhaseCallback = icePhaseCallback;
8179
8225
  this.hasMediaConnectionConnectedAtLeastOnce = false;
8180
8226
  LOG_HEADER = 'Meeting:index#addMedia -->';
8181
8227
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
8182
8228
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
8183
- _context35.next = 1;
8229
+ _context36.next = 1;
8184
8230
  break;
8185
8231
  }
8186
8232
  throw new _webexErrors.MeetingNotActiveError();
8187
8233
  case 1:
8188
8234
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
8189
- _context35.next = 2;
8235
+ _context36.next = 2;
8190
8236
  break;
8191
8237
  }
8192
8238
  throw new _webexErrors.UserNotJoinedError();
@@ -8203,7 +8249,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8203
8249
  ipver = _util2.default.getIpVersion(this.webex); // used just for metrics
8204
8250
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
8205
8251
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
8206
- _context35.next = 3;
8252
+ _context36.next = 3;
8207
8253
  break;
8208
8254
  }
8209
8255
  throw new _webexErrors.UserInLobbyError();
@@ -8247,62 +8293,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8247
8293
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
8248
8294
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
8249
8295
  this.brbState = (0, _brbState.createBrbState)(this, false);
8250
- _context35.prev = 4;
8296
+ _context36.prev = 4;
8251
8297
  if (!(allowPublishMediaInLobby || !this.isUserUnadmitted)) {
8252
- _context35.next = 5;
8298
+ _context36.next = 5;
8253
8299
  break;
8254
8300
  }
8255
- _context35.next = 5;
8301
+ _context36.next = 5;
8256
8302
  return this.setUpLocalStreamReferences(localStreams);
8257
8303
  case 5:
8258
8304
  this.setMercuryListener();
8259
8305
  this.createStatsAnalyzer();
8260
- _context35.prev = 6;
8261
- _context35.next = 7;
8306
+ _context36.prev = 6;
8307
+ _context36.next = 7;
8262
8308
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
8263
8309
  case 7:
8264
- _context35.next = 12;
8310
+ _context36.next = 12;
8265
8311
  break;
8266
8312
  case 8:
8267
- _context35.prev = 8;
8268
- _t34 = _context35["catch"](6);
8269
- if (!(_t34 instanceof _multistreamNotSupportedError.default)) {
8270
- _context35.next = 11;
8313
+ _context36.prev = 8;
8314
+ _t35 = _context36["catch"](6);
8315
+ if (!(_t35 instanceof _multistreamNotSupportedError.default)) {
8316
+ _context36.next = 11;
8271
8317
  break;
8272
8318
  }
8273
8319
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
8274
- _context35.next = 9;
8320
+ _context36.next = 9;
8275
8321
  return this.downgradeFromMultistreamToTranscoded();
8276
8322
  case 9:
8277
- _context35.next = 10;
8323
+ _context36.next = 10;
8278
8324
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
8279
8325
  case 10:
8280
- _context35.next = 12;
8326
+ _context36.next = 12;
8281
8327
  break;
8282
8328
  case 11:
8283
- throw _t34;
8329
+ throw _t35;
8284
8330
  case 12:
8285
8331
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
8286
8332
  if (!this.mediaProperties.hasLocalShareStream()) {
8287
- _context35.next = 13;
8333
+ _context36.next = 13;
8288
8334
  break;
8289
8335
  }
8290
- _context35.next = 13;
8336
+ _context36.next = 13;
8291
8337
  return this.enqueueScreenShareFloorRequest();
8292
8338
  case 13:
8293
- _context35.next = 14;
8339
+ _context36.next = 14;
8294
8340
  return this.mediaProperties.getCurrentConnectionInfo();
8295
8341
  case 14:
8296
- _yield$this$mediaProp = _context35.sent;
8342
+ _yield$this$mediaProp = _context36.sent;
8297
8343
  connectionType = _yield$this$mediaProp.connectionType;
8298
8344
  ipVersion = _yield$this$mediaProp.ipVersion;
8299
8345
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
8300
8346
  numTransports = _yield$this$mediaProp.numTransports;
8301
8347
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8302
- _context35.next = 15;
8348
+ _context36.next = 15;
8303
8349
  return this.getMediaReachabilityMetricFields();
8304
8350
  case 15:
8305
- reachabilityMetrics = _context35.sent;
8351
+ reachabilityMetrics = _context36.sent;
8306
8352
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
8307
8353
  correlation_id: this.correlationId,
8308
8354
  locus_id: this.locusUrl.split('/').pop(),
@@ -8332,31 +8378,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8332
8378
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
8333
8379
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
8334
8380
  this.startPeriodicLogUpload();
8335
- _context35.next = 20;
8381
+ _context36.next = 20;
8336
8382
  break;
8337
8383
  case 16:
8338
- _context35.prev = 16;
8339
- _t35 = _context35["catch"](4);
8340
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t35);
8384
+ _context36.prev = 16;
8385
+ _t36 = _context36["catch"](4);
8386
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t36);
8341
8387
 
8342
8388
  // @ts-ignore
8343
- _context35.next = 17;
8389
+ _context36.next = 17;
8344
8390
  return this.getMediaReachabilityMetricFields();
8345
8391
  case 17:
8346
- _reachabilityMetrics = _context35.sent;
8347
- _context35.next = 18;
8392
+ _reachabilityMetrics = _context36.sent;
8393
+ _context36.next = 18;
8348
8394
  return this.mediaProperties.getCurrentConnectionInfo();
8349
8395
  case 18:
8350
- _yield$this$mediaProp2 = _context35.sent;
8396
+ _yield$this$mediaProp2 = _context36.sent;
8351
8397
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
8352
8398
  _numTransports = _yield$this$mediaProp2.numTransports;
8353
8399
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8354
8400
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
8355
8401
  correlation_id: this.correlationId,
8356
8402
  locus_id: this.locusUrl.split('/').pop(),
8357
- reason: _t35.message,
8358
- stack: _t35.stack,
8359
- code: _t35.code,
8403
+ reason: _t36.message,
8404
+ stack: _t36.stack,
8405
+ code: _t36.code,
8360
8406
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
8361
8407
  numTransports: _numTransports,
8362
8408
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -8371,7 +8417,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8371
8417
  iceCandidatesCount: this.iceCandidatesCount,
8372
8418
  ipver: ipver
8373
8419
  }));
8374
- _context35.next = 19;
8420
+ _context36.next = 19;
8375
8421
  return this.cleanUpOnAddMediaFailure();
8376
8422
  case 19:
8377
8423
  // Upload logs on error while adding media
@@ -8379,23 +8425,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8379
8425
  file: 'meeting/index',
8380
8426
  function: 'addMedia'
8381
8427
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
8382
- if (_t35 instanceof _internalMediaCore.Errors.SdpError) {
8428
+ if (_t36 instanceof _internalMediaCore.Errors.SdpError) {
8383
8429
  this.leave({
8384
8430
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
8385
8431
  });
8386
8432
  }
8387
- throw _t35;
8433
+ throw _t36;
8388
8434
  case 20:
8389
- _context35.prev = 20;
8435
+ _context36.prev = 20;
8390
8436
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
8391
- return _context35.finish(20);
8437
+ return _context36.finish(20);
8392
8438
  case 21:
8393
8439
  case "end":
8394
- return _context35.stop();
8440
+ return _context36.stop();
8395
8441
  }
8396
- }, _callee35, this, [[4, 16, 20, 21], [6, 8]]);
8442
+ }, _callee36, this, [[4, 16, 20, 21], [6, 8]]);
8397
8443
  }));
8398
- function addMediaInternal(_x30, _x31, _x32) {
8444
+ function addMediaInternal(_x31, _x32, _x33) {
8399
8445
  return _addMediaInternal.apply(this, arguments);
8400
8446
  }
8401
8447
  return addMediaInternal;
@@ -8461,35 +8507,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8461
8507
  * @memberof Meeting
8462
8508
  */
8463
8509
  function () {
8464
- var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36(options) {
8510
+ var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(options) {
8465
8511
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
8466
- return _regenerator.default.wrap(function (_context36) {
8467
- while (1) switch (_context36.prev = _context36.next) {
8512
+ return _regenerator.default.wrap(function (_context37) {
8513
+ while (1) switch (_context37.prev = _context37.next) {
8468
8514
  case 0:
8469
8515
  this.checkMediaConnection();
8470
8516
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
8471
8517
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
8472
8518
  if (this.canUpdateMedia()) {
8473
- _context36.next = 1;
8519
+ _context37.next = 1;
8474
8520
  break;
8475
8521
  }
8476
- return _context36.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8522
+ return _context37.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8477
8523
  case 1:
8478
8524
  if (!this.isMultistream) {
8479
- _context36.next = 3;
8525
+ _context37.next = 3;
8480
8526
  break;
8481
8527
  }
8482
8528
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
8483
- _context36.next = 2;
8529
+ _context37.next = 2;
8484
8530
  break;
8485
8531
  }
8486
8532
  throw new Error('toggling shareAudioEnabled or shareVideoEnabled in a multistream meeting is not supported, to control receiving screen share call meeting.remoteMediaManager.setLayout() with appropriate layout');
8487
8533
  case 2:
8488
- _context36.next = 4;
8534
+ _context37.next = 4;
8489
8535
  break;
8490
8536
  case 3:
8491
8537
  if (!(shareAudioEnabled !== undefined)) {
8492
- _context36.next = 4;
8538
+ _context37.next = 4;
8493
8539
  break;
8494
8540
  }
8495
8541
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -8514,20 +8560,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8514
8560
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
8515
8561
  }
8516
8562
  if (this.isMultistream) {
8517
- _context36.next = 5;
8563
+ _context37.next = 5;
8518
8564
  break;
8519
8565
  }
8520
- _context36.next = 5;
8566
+ _context37.next = 5;
8521
8567
  return this.updateTranscodedMediaConnection();
8522
8568
  case 5:
8523
- return _context36.abrupt("return", undefined);
8569
+ return _context37.abrupt("return", undefined);
8524
8570
  case 6:
8525
8571
  case "end":
8526
- return _context36.stop();
8572
+ return _context37.stop();
8527
8573
  }
8528
- }, _callee36, this);
8574
+ }, _callee37, this);
8529
8575
  }));
8530
- function updateMedia(_x33) {
8576
+ function updateMedia(_x34) {
8531
8577
  return _updateMedia.apply(this, arguments);
8532
8578
  }
8533
8579
  return updateMedia;
@@ -8668,14 +8714,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8668
8714
  };
8669
8715
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
8670
8716
  return _util2.default.leaveMeeting(this, options).then(/*#__PURE__*/function () {
8671
- var _ref41 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(leave) {
8672
- return _regenerator.default.wrap(function (_context37) {
8673
- while (1) switch (_context37.prev = _context37.next) {
8717
+ var _ref41 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(leave) {
8718
+ return _regenerator.default.wrap(function (_context38) {
8719
+ while (1) switch (_context38.prev = _context38.next) {
8674
8720
  case 0:
8675
8721
  // CA team recommends submitting this *after* locus /leave
8676
8722
  submitLeaveMetric();
8677
8723
  _this49.meetingFiniteStateMachine.leave();
8678
- _context37.next = 1;
8724
+ _context38.next = 1;
8679
8725
  return _this49.clearMeetingData();
8680
8726
  case 1:
8681
8727
  // upload logs on leave irrespective of meeting delete
@@ -8696,14 +8742,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8696
8742
  });
8697
8743
  }
8698
8744
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
8699
- return _context37.abrupt("return", leave);
8745
+ return _context38.abrupt("return", leave);
8700
8746
  case 2:
8701
8747
  case "end":
8702
- return _context37.stop();
8748
+ return _context38.stop();
8703
8749
  }
8704
- }, _callee37);
8750
+ }, _callee38);
8705
8751
  }));
8706
- return function (_x34) {
8752
+ return function (_x35) {
8707
8753
  return _ref41.apply(this, arguments);
8708
8754
  };
8709
8755
  }()).catch(function (error) {
@@ -9369,12 +9415,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9369
9415
  locus_id: this.locusId
9370
9416
  });
9371
9417
  return _util2.default.endMeetingForAll(this).then(/*#__PURE__*/function () {
9372
- var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(end) {
9373
- return _regenerator.default.wrap(function (_context38) {
9374
- while (1) switch (_context38.prev = _context38.next) {
9418
+ var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(end) {
9419
+ return _regenerator.default.wrap(function (_context39) {
9420
+ while (1) switch (_context39.prev = _context39.next) {
9375
9421
  case 0:
9376
9422
  _this56.meetingFiniteStateMachine.end();
9377
- _context38.next = 1;
9423
+ _context39.next = 1;
9378
9424
  return _this56.clearMeetingData();
9379
9425
  case 1:
9380
9426
  // upload logs on leave irrespective of meeting delete
@@ -9382,14 +9428,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9382
9428
  file: 'meeting/index',
9383
9429
  function: 'endMeetingForAll'
9384
9430
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
9385
- return _context38.abrupt("return", end);
9431
+ return _context39.abrupt("return", end);
9386
9432
  case 2:
9387
9433
  case "end":
9388
- return _context38.stop();
9434
+ return _context39.stop();
9389
9435
  }
9390
- }, _callee38);
9436
+ }, _callee39);
9391
9437
  }));
9392
- return function (_x35) {
9438
+ return function (_x36) {
9393
9439
  return _ref42.apply(this, arguments);
9394
9440
  };
9395
9441
  }()).catch(function (error) {
@@ -9540,39 +9586,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9540
9586
  }, {
9541
9587
  key: "enableMusicMode",
9542
9588
  value: (function () {
9543
- var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(shouldEnableMusicMode) {
9544
- return _regenerator.default.wrap(function (_context39) {
9545
- while (1) switch (_context39.prev = _context39.next) {
9589
+ var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(shouldEnableMusicMode) {
9590
+ return _regenerator.default.wrap(function (_context40) {
9591
+ while (1) switch (_context40.prev = _context40.next) {
9546
9592
  case 0:
9547
9593
  this.checkMediaConnection();
9548
9594
  if (this.isMultistream) {
9549
- _context39.next = 1;
9595
+ _context40.next = 1;
9550
9596
  break;
9551
9597
  }
9552
9598
  throw new Error('enableMusicMode() only supported with multistream');
9553
9599
  case 1:
9554
9600
  if (!shouldEnableMusicMode) {
9555
- _context39.next = 3;
9601
+ _context40.next = 3;
9556
9602
  break;
9557
9603
  }
9558
- _context39.next = 2;
9604
+ _context40.next = 2;
9559
9605
  return this.sendSlotManager.setCustomCodecParameters(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, {
9560
9606
  maxaveragebitrate: '64000',
9561
9607
  maxplaybackrate: '48000'
9562
9608
  });
9563
9609
  case 2:
9564
- _context39.next = 4;
9610
+ _context40.next = 4;
9565
9611
  break;
9566
9612
  case 3:
9567
- _context39.next = 4;
9613
+ _context40.next = 4;
9568
9614
  return this.sendSlotManager.markCustomCodecParametersForDeletion(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, ['maxaveragebitrate', 'maxplaybackrate']);
9569
9615
  case 4:
9570
9616
  case "end":
9571
- return _context39.stop();
9617
+ return _context40.stop();
9572
9618
  }
9573
- }, _callee39, this);
9619
+ }, _callee40, this);
9574
9620
  }));
9575
- function enableMusicMode(_x36) {
9621
+ function enableMusicMode(_x37) {
9576
9622
  return _enableMusicMode.apply(this, arguments);
9577
9623
  }
9578
9624
  return enableMusicMode;
@@ -9663,25 +9709,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9663
9709
  }, {
9664
9710
  key: "publishStream",
9665
9711
  value: (function () {
9666
- var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(mediaType, stream) {
9667
- return _regenerator.default.wrap(function (_context40) {
9668
- while (1) switch (_context40.prev = _context40.next) {
9712
+ var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(mediaType, stream) {
9713
+ return _regenerator.default.wrap(function (_context41) {
9714
+ while (1) switch (_context41.prev = _context41.next) {
9669
9715
  case 0:
9670
9716
  if (stream) {
9671
- _context40.next = 1;
9717
+ _context41.next = 1;
9672
9718
  break;
9673
9719
  }
9674
- return _context40.abrupt("return");
9720
+ return _context41.abrupt("return");
9675
9721
  case 1:
9676
9722
  if (!this.mediaProperties.webrtcMediaConnection) {
9677
- _context40.next = 3;
9723
+ _context41.next = 3;
9678
9724
  break;
9679
9725
  }
9680
9726
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
9681
- _context40.next = 2;
9727
+ _context41.next = 2;
9682
9728
  break;
9683
9729
  }
9684
- _context40.next = 2;
9730
+ _context41.next = 2;
9685
9731
  return this.sendSlotManager.publishStream(mediaType, stream);
9686
9732
  case 2:
9687
9733
  this.emitPublishStateChangeEvent({
@@ -9692,11 +9738,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9692
9738
  });
9693
9739
  case 3:
9694
9740
  case "end":
9695
- return _context40.stop();
9741
+ return _context41.stop();
9696
9742
  }
9697
- }, _callee40, this);
9743
+ }, _callee41, this);
9698
9744
  }));
9699
- function publishStream(_x37, _x38) {
9745
+ function publishStream(_x38, _x39) {
9700
9746
  return _publishStream.apply(this, arguments);
9701
9747
  }
9702
9748
  return publishStream;
@@ -9712,21 +9758,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9712
9758
  }, {
9713
9759
  key: "unpublishStream",
9714
9760
  value: (function () {
9715
- var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(mediaType, stream) {
9716
- return _regenerator.default.wrap(function (_context41) {
9717
- while (1) switch (_context41.prev = _context41.next) {
9761
+ var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(mediaType, stream) {
9762
+ return _regenerator.default.wrap(function (_context42) {
9763
+ while (1) switch (_context42.prev = _context42.next) {
9718
9764
  case 0:
9719
9765
  if (stream) {
9720
- _context41.next = 1;
9766
+ _context42.next = 1;
9721
9767
  break;
9722
9768
  }
9723
- return _context41.abrupt("return");
9769
+ return _context42.abrupt("return");
9724
9770
  case 1:
9725
9771
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
9726
- _context41.next = 2;
9772
+ _context42.next = 2;
9727
9773
  break;
9728
9774
  }
9729
- _context41.next = 2;
9775
+ _context42.next = 2;
9730
9776
  return this.sendSlotManager.unpublishStream(mediaType);
9731
9777
  case 2:
9732
9778
  this.emitPublishStateChangeEvent({
@@ -9737,11 +9783,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9737
9783
  });
9738
9784
  case 3:
9739
9785
  case "end":
9740
- return _context41.stop();
9786
+ return _context42.stop();
9741
9787
  }
9742
- }, _callee41, this);
9788
+ }, _callee42, this);
9743
9789
  }));
9744
- function unpublishStream(_x39, _x40) {
9790
+ function unpublishStream(_x40, _x41) {
9745
9791
  return _unpublishStream.apply(this, arguments);
9746
9792
  }
9747
9793
  return unpublishStream;
@@ -9756,19 +9802,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9756
9802
  }, {
9757
9803
  key: "publishStreams",
9758
9804
  value: (function () {
9759
- var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(streams) {
9805
+ var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(streams) {
9760
9806
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
9761
9807
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
9762
- return _regenerator.default.wrap(function (_context42) {
9763
- while (1) switch (_context42.prev = _context42.next) {
9808
+ return _regenerator.default.wrap(function (_context43) {
9809
+ while (1) switch (_context43.prev = _context43.next) {
9764
9810
  case 0:
9765
9811
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
9766
9812
  this.checkMediaConnection();
9767
9813
  if (!(!streams.microphone && !streams.camera && !((_streams$screenShare = streams.screenShare) !== null && _streams$screenShare !== void 0 && _streams$screenShare.audio) && !((_streams$screenShare2 = streams.screenShare) !== null && _streams$screenShare2 !== void 0 && _streams$screenShare2.video))) {
9768
- _context42.next = 1;
9814
+ _context43.next = 1;
9769
9815
  break;
9770
9816
  }
9771
- return _context42.abrupt("return");
9817
+ return _context43.abrupt("return");
9772
9818
  case 1:
9773
9819
  streamChecks = [{
9774
9820
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -9786,62 +9832,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9786
9832
  _i = 0, _streamChecks = streamChecks;
9787
9833
  case 2:
9788
9834
  if (!(_i < _streamChecks.length)) {
9789
- _context42.next = 4;
9835
+ _context43.next = 4;
9790
9836
  break;
9791
9837
  }
9792
9838
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
9793
9839
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
9794
- _context42.next = 3;
9840
+ _context43.next = 3;
9795
9841
  break;
9796
9842
  }
9797
9843
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
9798
9844
  case 3:
9799
9845
  _i++;
9800
- _context42.next = 2;
9846
+ _context43.next = 2;
9801
9847
  break;
9802
9848
  case 4:
9803
9849
  floorRequestNeeded = false; // Screenshare Audio is supported only in multi stream. So we check for screenshare audio presence only if it's a multi stream meeting
9804
9850
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
9805
- _context42.next = 6;
9851
+ _context43.next = 6;
9806
9852
  break;
9807
9853
  }
9808
- _context42.next = 5;
9854
+ _context43.next = 5;
9809
9855
  return this.setLocalShareAudioStream(streams.screenShare.audio);
9810
9856
  case 5:
9811
9857
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
9812
9858
  case 6:
9813
9859
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
9814
- _context42.next = 8;
9860
+ _context43.next = 8;
9815
9861
  break;
9816
9862
  }
9817
- _context42.next = 7;
9863
+ _context43.next = 7;
9818
9864
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
9819
9865
  case 7:
9820
9866
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
9821
9867
  case 8:
9822
9868
  if (!streams.microphone) {
9823
- _context42.next = 9;
9869
+ _context43.next = 9;
9824
9870
  break;
9825
9871
  }
9826
- _context42.next = 9;
9872
+ _context43.next = 9;
9827
9873
  return this.setLocalAudioStream(streams.microphone);
9828
9874
  case 9:
9829
9875
  if (!streams.camera) {
9830
- _context42.next = 10;
9876
+ _context43.next = 10;
9831
9877
  break;
9832
9878
  }
9833
- _context42.next = 10;
9879
+ _context43.next = 10;
9834
9880
  return this.setLocalVideoStream(streams.camera);
9835
9881
  case 10:
9836
9882
  if (this.isMultistream) {
9837
- _context42.next = 11;
9883
+ _context43.next = 11;
9838
9884
  break;
9839
9885
  }
9840
- _context42.next = 11;
9886
+ _context43.next = 11;
9841
9887
  return this.updateTranscodedMediaConnection();
9842
9888
  case 11:
9843
9889
  if (!floorRequestNeeded) {
9844
- _context42.next = 12;
9890
+ _context43.next = 12;
9845
9891
  break;
9846
9892
  }
9847
9893
  this.localShareInstanceId = _uuid.default.v4();
@@ -9872,15 +9918,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9872
9918
  // we're sending the http request to Locus to request the screen share floor
9873
9919
  // only after the SDP update, because that's how it's always been done for transcoded meetings
9874
9920
  // and also if sharing from the start, we need confluence to have been created
9875
- _context42.next = 12;
9921
+ _context43.next = 12;
9876
9922
  return this.enqueueScreenShareFloorRequest();
9877
9923
  case 12:
9878
9924
  case "end":
9879
- return _context42.stop();
9925
+ return _context43.stop();
9880
9926
  }
9881
- }, _callee42, this);
9927
+ }, _callee43, this);
9882
9928
  }));
9883
- function publishStreams(_x41) {
9929
+ function publishStreams(_x42) {
9884
9930
  return _publishStreams.apply(this, arguments);
9885
9931
  }
9886
9932
  return publishStreams;
@@ -9895,10 +9941,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9895
9941
  }, {
9896
9942
  key: "unpublishStreams",
9897
9943
  value: (function () {
9898
- var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(streams) {
9944
+ var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(streams) {
9899
9945
  var promises, _iterator, _step, stream;
9900
- return _regenerator.default.wrap(function (_context43) {
9901
- while (1) switch (_context43.prev = _context43.next) {
9946
+ return _regenerator.default.wrap(function (_context44) {
9947
+ while (1) switch (_context44.prev = _context44.next) {
9902
9948
  case 0:
9903
9949
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
9904
9950
  this.checkMediaConnection();
@@ -9930,7 +9976,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9930
9976
  if (!this.isMultistream) {
9931
9977
  promises.push(this.updateTranscodedMediaConnection());
9932
9978
  }
9933
- _context43.next = 1;
9979
+ _context44.next = 1;
9934
9980
  return _promise.default.all(promises);
9935
9981
  case 1:
9936
9982
  // we're allowing for the SDK to support just audio share as well
@@ -9951,11 +9997,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9951
9997
  }
9952
9998
  case 2:
9953
9999
  case "end":
9954
- return _context43.stop();
10000
+ return _context44.stop();
9955
10001
  }
9956
- }, _callee43, this);
10002
+ }, _callee44, this);
9957
10003
  }));
9958
- function unpublishStreams(_x42) {
10004
+ function unpublishStreams(_x43) {
9959
10005
  return _unpublishStreams.apply(this, arguments);
9960
10006
  }
9961
10007
  return unpublishStreams;
@@ -10021,16 +10067,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10021
10067
  }, {
10022
10068
  key: "getMediaReachabilityMetricFields",
10023
10069
  value: (function () {
10024
- var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44() {
10070
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
10025
10071
  var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
10026
10072
  var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
10027
- return _regenerator.default.wrap(function (_context44) {
10028
- while (1) switch (_context44.prev = _context44.next) {
10073
+ return _regenerator.default.wrap(function (_context45) {
10074
+ while (1) switch (_context45.prev = _context45.next) {
10029
10075
  case 0:
10030
- _context44.next = 1;
10076
+ _context45.next = 1;
10031
10077
  return this.webex.meetings.reachability.getReachabilityMetrics();
10032
10078
  case 1:
10033
- reachabilityMetrics = _context44.sent;
10079
+ reachabilityMetrics = _context45.sent;
10034
10080
  successKeys = ['reachability_public_udp_success', 'reachability_public_tcp_success', 'reachability_public_xtls_success', 'reachability_vmn_udp_success', 'reachability_vmn_tcp_success', 'reachability_vmn_xtls_success'];
10035
10081
  totalSuccessCases = successKeys.reduce(function (total, key) {
10036
10082
  var value = reachabilityMetrics[key];
@@ -10047,16 +10093,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10047
10093
  this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
10048
10094
  }
10049
10095
  selectedCluster = (_this$mediaConnection = (_this$mediaConnection2 = this.mediaConnections) === null || _this$mediaConnection2 === void 0 ? void 0 : (_this$mediaConnection3 = _this$mediaConnection2[0]) === null || _this$mediaConnection3 === void 0 ? void 0 : _this$mediaConnection3.mediaAgentCluster) !== null && _this$mediaConnection !== void 0 ? _this$mediaConnection : null;
10050
- return _context44.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10096
+ return _context45.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10051
10097
  subnet_reachable: isSubnetReachable,
10052
10098
  selected_cluster: selectedCluster,
10053
10099
  selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
10054
10100
  }));
10055
10101
  case 2:
10056
10102
  case "end":
10057
- return _context44.stop();
10103
+ return _context45.stop();
10058
10104
  }
10059
- }, _callee44, this);
10105
+ }, _callee45, this);
10060
10106
  }));
10061
10107
  function getMediaReachabilityMetricFields() {
10062
10108
  return _getMediaReachabilityMetricFields.apply(this, arguments);
@@ -10187,41 +10233,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10187
10233
  }, {
10188
10234
  key: "refreshDataChannelToken",
10189
10235
  value: (function () {
10190
- var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
10191
- var isPracticeSession, dataChannelTokenType, res, msg, _t36;
10192
- return _regenerator.default.wrap(function (_context45) {
10193
- while (1) switch (_context45.prev = _context45.next) {
10236
+ var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
10237
+ var isPracticeSession, dataChannelTokenType, res, msg, _t37;
10238
+ return _regenerator.default.wrap(function (_context46) {
10239
+ while (1) switch (_context46.prev = _context46.next) {
10194
10240
  case 0:
10195
10241
  isPracticeSession = this.webinar.isJoinPracticeSessionDataChannel();
10196
10242
  dataChannelTokenType = this.getDataChannelTokenType();
10197
- _context45.prev = 1;
10198
- _context45.next = 2;
10243
+ _context46.prev = 1;
10244
+ _context46.next = 2;
10199
10245
  return this.meetingRequest.fetchDatachannelToken({
10200
10246
  locusUrl: this.locusUrl,
10201
10247
  requestingParticipantId: this.members.selfId,
10202
10248
  isPracticeSession: isPracticeSession
10203
10249
  });
10204
10250
  case 2:
10205
- res = _context45.sent;
10206
- return _context45.abrupt("return", {
10251
+ res = _context46.sent;
10252
+ return _context46.abrupt("return", {
10207
10253
  body: {
10208
10254
  datachannelToken: res.body.datachannelToken,
10209
10255
  dataChannelTokenType: dataChannelTokenType
10210
10256
  }
10211
10257
  });
10212
10258
  case 3:
10213
- _context45.prev = 3;
10214
- _t36 = _context45["catch"](1);
10215
- msg = (_t36 === null || _t36 === void 0 ? void 0 : _t36.message) || String(_t36);
10259
+ _context46.prev = 3;
10260
+ _t37 = _context46["catch"](1);
10261
+ msg = (_t37 === null || _t37 === void 0 ? void 0 : _t37.message) || String(_t37);
10216
10262
  _loggerProxy.default.logger.warn("Meeting:index#refreshDataChannelToken --> DataChannel token refresh failed (likely locus changed or participant left): ".concat(msg), {
10217
- statusCode: _t36 === null || _t36 === void 0 ? void 0 : _t36.statusCode
10263
+ statusCode: _t37 === null || _t37 === void 0 ? void 0 : _t37.statusCode
10218
10264
  });
10219
- return _context45.abrupt("return", null);
10265
+ return _context46.abrupt("return", null);
10220
10266
  case 4:
10221
10267
  case "end":
10222
- return _context45.stop();
10268
+ return _context46.stop();
10223
10269
  }
10224
- }, _callee45, this, [[1, 3]]);
10270
+ }, _callee46, this, [[1, 3]]);
10225
10271
  }));
10226
10272
  function refreshDataChannelToken() {
10227
10273
  return _refreshDataChannelToken.apply(this, arguments);