@webex/plugin-meetings 3.12.0-next.64 → 3.12.0-next.66

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.
@@ -712,10 +712,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
712
712
  removeOnlineListener,
713
713
  _ref3$throwOnError,
714
714
  throwOnError,
715
+ _this$webex$internal$,
715
716
  currentOwner,
716
717
  isOwner,
717
- _this$webex$internal$,
718
718
  _this$webex$internal$2,
719
+ currentOwnerAfterCleanup,
720
+ _this$webex$internal$3,
721
+ _this$webex$internal$4,
719
722
  _args = arguments,
720
723
  _t;
721
724
  return _regenerator.default.wrap(function (_context) {
@@ -723,8 +726,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
723
726
  case 0:
724
727
  _ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref3$removeOnlineLis = _ref3.removeOnlineListener, removeOnlineListener = _ref3$removeOnlineLis === void 0 ? true : _ref3$removeOnlineLis, _ref3$throwOnError = _ref3.throwOnError, throwOnError = _ref3$throwOnError === void 0 ? true : _ref3$throwOnError;
725
728
  // @ts-ignore - Fix type
726
- currentOwner = _this.webex.internal.llm.getOwnerMeetingId();
727
- isOwner = !currentOwner || currentOwner === _this.id;
729
+ // @ts-ignore - Fix type
730
+ _this$webex$internal$ = _this.webex.internal.llm.resolveSessionOwnership(_this.id, _constants.LLM_DEFAULT_SESSION), currentOwner = _this$webex$internal$.currentOwner, isOwner = _this$webex$internal$.isOwner;
728
731
  _context.prev = 1;
729
732
  if (!isOwner) {
730
733
  _context.next = 3;
@@ -734,7 +737,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
734
737
  return _this.webex.internal.llm.disconnectLLM({
735
738
  code: 3050,
736
739
  reason: 'done (permanent)'
737
- });
740
+ }, _constants.LLM_DEFAULT_SESSION, _this.id);
738
741
  case 2:
739
742
  _context.next = 4;
740
743
  break;
@@ -760,15 +763,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
760
763
  }
761
764
  _this.stopListeningForLLMEvents();
762
765
 
763
- // If this meeting owned (or could have owned) the default LLM session,
764
- // always release the owner tag here regardless of whether disconnectLLM
765
- // resolved. `disconnectLLM` only clears the owner on its success path,
766
- // so a failed disconnect would otherwise leave a stale owner pointing
767
- // at a torn-down meeting and permanently block other meetings'
768
- // `updateLLMConnection` calls via the ownership guard.
766
+ // Re-check ownership after awaiting disconnectLLM. If ownership changed
767
+ // while cleanup was in flight, do not clear another meeting's owner tag.
769
768
  if (isOwner) {
769
+ _this$webex$internal$2 =
770
770
  // @ts-ignore - Fix type
771
- (_this$webex$internal$ = (_this$webex$internal$2 = _this.webex.internal.llm).setOwnerMeetingId) === null || _this$webex$internal$ === void 0 ? void 0 : _this$webex$internal$.call(_this$webex$internal$2, undefined);
771
+ _this.webex.internal.llm.resolveSessionOwnership(_this.id, _constants.LLM_DEFAULT_SESSION), currentOwnerAfterCleanup = _this$webex$internal$2.currentOwner;
772
+ if (currentOwnerAfterCleanup === _this.id) {
773
+ // @ts-ignore - Fix type
774
+ (_this$webex$internal$3 = (_this$webex$internal$4 = _this.webex.internal.llm).setOwnerMeetingId) === null || _this$webex$internal$3 === void 0 ? void 0 : _this$webex$internal$3.call(_this$webex$internal$4, undefined);
775
+ }
772
776
  }
773
777
  return _context.finish(6);
774
778
  case 7:
@@ -1607,7 +1611,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1607
1611
  * @memberof Meeting
1608
1612
  */
1609
1613
  (0, _defineProperty3.default)(_this, "clearMeetingData", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
1610
- var currentOwner, isOwner;
1611
1614
  return _regenerator.default.wrap(function (_context5) {
1612
1615
  while (1) switch (_context5.prev = _context5.next) {
1613
1616
  case 0:
@@ -1625,18 +1628,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1625
1628
  // again would double-emit MEETING_STOPPED_RECEIVING_TRANSCRIPTION
1626
1629
  // because stopTranscription() always fires its trigger.
1627
1630
  //
1628
- // Ownership-aware token clear: only clear the shared LLM data channel
1629
- // tokens when this meeting owns (or no meeting owns) the default LLM
1630
- // session. Otherwise we would wipe tokens still in use by another
1631
- // meeting's active LLM connection.
1632
- // @ts-ignore - Fix type
1633
- currentOwner = _this.webex.internal.llm.getOwnerMeetingId();
1634
- isOwner = !currentOwner || currentOwner === _this.id;
1635
- if (isOwner) {
1636
- _this.clearDataChannelToken();
1637
- } else {
1638
- _loggerProxy.default.logger.info("Meeting:index#clearMeetingData --> skipping clearDataChannelToken; LLM owned by meeting ".concat(currentOwner, ", not ").concat(_this.id));
1639
- }
1631
+ // Ownership-aware token clear is encapsulated inside clearDataChannelToken().
1632
+ _this.clearDataChannelToken();
1640
1633
  _context5.next = 1;
1641
1634
  return _this.cleanupLLMConneciton({
1642
1635
  throwOnError: false
@@ -4207,10 +4200,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4207
4200
  _this14.recordingController.setLocusUrl(_this14.locusUrl);
4208
4201
  _this14.controlsOptionsManager.setLocusUrl(_this14.locusUrl, !!isMainLocus);
4209
4202
  _this14.webinar.locusUrlUpdate(url);
4210
- // @ts-ignore
4211
- _this14.webex.internal.llm.setRefreshHandler(function () {
4212
- return _this14.refreshDataChannelToken();
4213
- });
4214
4203
  _triggerProxy.default.trigger(_this14, {
4215
4204
  file: 'meeting/index',
4216
4205
  function: 'setUpLocusSelfListener'
@@ -4440,34 +4429,56 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4440
4429
  });
4441
4430
  _this19.updateLLMConnection();
4442
4431
  });
4443
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
4444
- var _this19$rtcMetrics;
4445
- _this19.stopKeepAlive();
4446
- if (payload) {
4447
- _triggerProxy.default.trigger(_this19, {
4448
- file: 'meeting/index',
4449
- function: 'setUpLocusInfoSelfListener'
4450
- }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
4451
- payload: payload
4452
- });
4432
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
4433
+ var _ref37 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(payload) {
4434
+ var _this19$rtcMetrics;
4435
+ var _t9;
4436
+ return _regenerator.default.wrap(function (_context1) {
4437
+ while (1) switch (_context1.prev = _context1.next) {
4438
+ case 0:
4439
+ _this19.stopKeepAlive();
4440
+ if (payload) {
4441
+ _triggerProxy.default.trigger(_this19, {
4442
+ file: 'meeting/index',
4443
+ function: 'setUpLocusInfoSelfListener'
4444
+ }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
4445
+ payload: payload
4446
+ });
4453
4447
 
4454
- // @ts-ignore
4455
- _this19.webex.internal.newMetrics.submitClientEvent({
4456
- name: 'client.lobby.exited',
4457
- options: {
4458
- meetingId: _this19.id
4448
+ // @ts-ignore
4449
+ _this19.webex.internal.newMetrics.submitClientEvent({
4450
+ name: 'client.lobby.exited',
4451
+ options: {
4452
+ meetingId: _this19.id
4453
+ }
4454
+ });
4455
+ _metrics.default.sendBehavioralMetric(_constants2.default.GUEST_EXITED_LOBBY, {
4456
+ correlation_id: _this19.correlationId
4457
+ });
4458
+ }
4459
+ (_this19$rtcMetrics = _this19.rtcMetrics) === null || _this19$rtcMetrics === void 0 ? void 0 : _this19$rtcMetrics.sendNextMetrics();
4460
+ _context1.prev = 1;
4461
+ _context1.next = 2;
4462
+ return _this19.ensureDefaultDatachannelTokenAfterAdmit();
4463
+ case 2:
4464
+ _context1.next = 4;
4465
+ break;
4466
+ case 3:
4467
+ _context1.prev = 3;
4468
+ _t9 = _context1["catch"](1);
4469
+ _loggerProxy.default.logger.warn("Meeting:index#setUpLocusInfoSelfListener --> failed post-admit token prefetch flow: ".concat((_t9 === null || _t9 === void 0 ? void 0 : _t9.message) || String(_t9)));
4470
+ case 4:
4471
+ _this19.updateLLMConnection();
4472
+ case 5:
4473
+ case "end":
4474
+ return _context1.stop();
4459
4475
  }
4460
- });
4461
- _metrics.default.sendBehavioralMetric(_constants2.default.GUEST_EXITED_LOBBY, {
4462
- correlation_id: _this19.correlationId
4463
- });
4464
- }
4465
- (_this19$rtcMetrics = _this19.rtcMetrics) === null || _this19$rtcMetrics === void 0 ? void 0 : _this19$rtcMetrics.sendNextMetrics();
4466
- _this19.ensureDefaultDatachannelTokenAfterAdmit().catch(function (error) {
4467
- _loggerProxy.default.logger.warn("Meeting:index#setUpLocusInfoSelfListener --> failed post-admit token prefetch flow: ".concat((error === null || error === void 0 ? void 0 : error.message) || String(error)));
4468
- });
4469
- _this19.updateLLMConnection();
4470
- });
4476
+ }, _callee1, null, [[1, 3]]);
4477
+ }));
4478
+ return function (_x9) {
4479
+ return _ref37.apply(this, arguments);
4480
+ };
4481
+ }());
4471
4482
 
4472
4483
  // @ts-ignore - check if MEDIA_INACTIVITY exists
4473
4484
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
@@ -4587,49 +4598,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4587
4598
  }
4588
4599
  });
4589
4600
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4590
- var _ref37 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(payload) {
4591
- var _t9;
4592
- return _regenerator.default.wrap(function (_context1) {
4593
- while (1) switch (_context1.prev = _context1.next) {
4601
+ var _ref38 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4602
+ var _t0;
4603
+ return _regenerator.default.wrap(function (_context10) {
4604
+ while (1) switch (_context10.prev = _context10.next) {
4594
4605
  case 0:
4595
4606
  if (!_this20.wirelessShare) {
4596
- _context1.next = 2;
4607
+ _context10.next = 2;
4597
4608
  break;
4598
4609
  }
4599
4610
  if (!_this20.mediaProperties.shareVideoStream) {
4600
- _context1.next = 1;
4611
+ _context10.next = 1;
4601
4612
  break;
4602
4613
  }
4603
- _context1.next = 1;
4614
+ _context10.next = 1;
4604
4615
  return _this20.setLocalShareVideoStream(undefined);
4605
4616
  case 1:
4606
4617
  if (!_this20.mediaProperties.shareAudioStream) {
4607
- _context1.next = 2;
4618
+ _context10.next = 2;
4608
4619
  break;
4609
4620
  }
4610
- _context1.next = 2;
4621
+ _context10.next = 2;
4611
4622
  return _this20.setLocalShareAudioStream(undefined);
4612
4623
  case 2:
4613
4624
  if (!payload.shouldLeave) {
4614
- _context1.next = 7;
4625
+ _context10.next = 7;
4615
4626
  break;
4616
4627
  }
4617
- _context1.prev = 3;
4618
- _context1.next = 4;
4628
+ _context10.prev = 3;
4629
+ _context10.next = 4;
4619
4630
  return _this20.leave({
4620
4631
  reason: payload.reason
4621
4632
  });
4622
4633
  case 4:
4623
4634
  _loggerProxy.default.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
4624
- _context1.next = 6;
4635
+ _context10.next = 6;
4625
4636
  break;
4626
4637
  case 5:
4627
- _context1.prev = 5;
4628
- _t9 = _context1["catch"](3);
4638
+ _context10.prev = 5;
4639
+ _t0 = _context10["catch"](3);
4629
4640
  // @ts-ignore
4630
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_t9));
4641
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_t0));
4631
4642
  case 6:
4632
- _context1.next = 8;
4643
+ _context10.next = 8;
4633
4644
  break;
4634
4645
  case 7:
4635
4646
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
@@ -4643,12 +4654,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4643
4654
  });
4644
4655
  case 8:
4645
4656
  case "end":
4646
- return _context1.stop();
4657
+ return _context10.stop();
4647
4658
  }
4648
- }, _callee1, null, [[3, 5]]);
4659
+ }, _callee10, null, [[3, 5]]);
4649
4660
  }));
4650
- return function (_x9) {
4651
- return _ref37.apply(this, arguments);
4661
+ return function (_x0) {
4662
+ return _ref38.apply(this, arguments);
4652
4663
  };
4653
4664
  }());
4654
4665
  }
@@ -4766,31 +4777,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4766
4777
  }, {
4767
4778
  key: "beRightBack",
4768
4779
  value: (function () {
4769
- var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(enabled) {
4780
+ var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4770
4781
  var _this22 = this;
4771
4782
  var errorMessage, error, _errorMessage, _error;
4772
- return _regenerator.default.wrap(function (_context10) {
4773
- while (1) switch (_context10.prev = _context10.next) {
4783
+ return _regenerator.default.wrap(function (_context11) {
4784
+ while (1) switch (_context11.prev = _context11.next) {
4774
4785
  case 0:
4775
4786
  if (this.isMultistream) {
4776
- _context10.next = 1;
4787
+ _context11.next = 1;
4777
4788
  break;
4778
4789
  }
4779
4790
  errorMessage = 'Meeting:index#beRightBack --> Not a multistream meeting';
4780
4791
  error = new Error(errorMessage);
4781
4792
  _loggerProxy.default.logger.error(error);
4782
- return _context10.abrupt("return", _promise.default.reject(error));
4793
+ return _context11.abrupt("return", _promise.default.reject(error));
4783
4794
  case 1:
4784
4795
  if (this.mediaProperties.webrtcMediaConnection) {
4785
- _context10.next = 2;
4796
+ _context11.next = 2;
4786
4797
  break;
4787
4798
  }
4788
4799
  _errorMessage = 'Meeting:index#beRightBack --> WebRTC media connection is not defined';
4789
4800
  _error = new Error(_errorMessage);
4790
4801
  _loggerProxy.default.logger.error(_error);
4791
- return _context10.abrupt("return", _promise.default.reject(_error));
4802
+ return _context11.abrupt("return", _promise.default.reject(_error));
4792
4803
  case 2:
4793
- return _context10.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4804
+ return _context11.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4794
4805
  if (_this22.audio && enabled) {
4795
4806
  // locus mutes the participant with brb enabled request,
4796
4807
  // so we need to explicitly update remote mute for correct logic flow
@@ -4801,11 +4812,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4801
4812
  }));
4802
4813
  case 3:
4803
4814
  case "end":
4804
- return _context10.stop();
4815
+ return _context11.stop();
4805
4816
  }
4806
- }, _callee10, this);
4817
+ }, _callee11, this);
4807
4818
  }));
4808
- function beRightBack(_x0) {
4819
+ function beRightBack(_x1) {
4809
4820
  return _beRightBack.apply(this, arguments);
4810
4821
  }
4811
4822
  return beRightBack;
@@ -5294,11 +5305,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5294
5305
  }, {
5295
5306
  key: "finalizeMeetingAfterInitialLocusSetup",
5296
5307
  value: (function () {
5297
- var _finalizeMeetingAfterInitialLocusSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(locus) {
5308
+ var _finalizeMeetingAfterInitialLocusSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(locus) {
5298
5309
  var _this$destination;
5299
- var _t0;
5300
- return _regenerator.default.wrap(function (_context11) {
5301
- while (1) switch (_context11.prev = _context11.next) {
5310
+ var _t1;
5311
+ return _regenerator.default.wrap(function (_context12) {
5312
+ while (1) switch (_context12.prev = _context12.next) {
5302
5313
  case 0:
5303
5314
  if (locus && (this === null || this === void 0 ? void 0 : this.destinationType) === _constants.DESTINATION_TYPE.LOCUS_ID) {
5304
5315
  // destination is initialized from the initial locus snapshot in constructor,
@@ -5306,26 +5317,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5306
5317
  this.destination = locus;
5307
5318
  }
5308
5319
  if (!((!this.meetingInfo || (0, _lodash.isEmpty)(this.meetingInfo)) && (_this$destination = this.destination) !== null && _this$destination !== void 0 && _this$destination.info && !this.fetchMeetingInfoTimeoutId && !_util3.default.isOneOnOneCall(locus))) {
5309
- _context11.next = 4;
5320
+ _context12.next = 4;
5310
5321
  break;
5311
5322
  }
5312
- _context11.prev = 1;
5313
- _context11.next = 2;
5323
+ _context12.prev = 1;
5324
+ _context12.next = 2;
5314
5325
  return this.fetchMeetingInfo({});
5315
5326
  case 2:
5316
- _context11.next = 4;
5327
+ _context12.next = 4;
5317
5328
  break;
5318
5329
  case 3:
5319
- _context11.prev = 3;
5320
- _t0 = _context11["catch"](1);
5321
- _loggerProxy.default.logger.info("Meeting:index#finalizeMeetingAfterInitialLocusSetup --> deferred fetchMeetingInfo failed: ".concat(_t0.message));
5330
+ _context12.prev = 3;
5331
+ _t1 = _context12["catch"](1);
5332
+ _loggerProxy.default.logger.info("Meeting:index#finalizeMeetingAfterInitialLocusSetup --> deferred fetchMeetingInfo failed: ".concat(_t1.message));
5322
5333
  case 4:
5323
5334
  case "end":
5324
- return _context11.stop();
5335
+ return _context12.stop();
5325
5336
  }
5326
- }, _callee11, this, [[1, 3]]);
5337
+ }, _callee12, this, [[1, 3]]);
5327
5338
  }));
5328
- function finalizeMeetingAfterInitialLocusSetup(_x1) {
5339
+ function finalizeMeetingAfterInitialLocusSetup(_x10) {
5329
5340
  return _finalizeMeetingAfterInitialLocusSetup.apply(this, arguments);
5330
5341
  }
5331
5342
  return finalizeMeetingAfterInitialLocusSetup;
@@ -5525,11 +5536,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5525
5536
  }, {
5526
5537
  key: "setLocalAudioStream",
5527
5538
  value: (function () {
5528
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
5539
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localStream) {
5529
5540
  var _this$audio2;
5530
5541
  var oldStream;
5531
- return _regenerator.default.wrap(function (_context12) {
5532
- while (1) switch (_context12.prev = _context12.next) {
5542
+ return _regenerator.default.wrap(function (_context13) {
5543
+ while (1) switch (_context13.prev = _context13.next) {
5533
5544
  case 0:
5534
5545
  oldStream = this.mediaProperties.audioStream;
5535
5546
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -5543,21 +5554,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5543
5554
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
5544
5555
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5545
5556
  if (!(!this.isMultistream || !localStream)) {
5546
- _context12.next = 1;
5557
+ _context13.next = 1;
5547
5558
  break;
5548
5559
  }
5549
- _context12.next = 1;
5560
+ _context13.next = 1;
5550
5561
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
5551
5562
  case 1:
5552
- _context12.next = 2;
5563
+ _context13.next = 2;
5553
5564
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5554
5565
  case 2:
5555
5566
  case "end":
5556
- return _context12.stop();
5567
+ return _context13.stop();
5557
5568
  }
5558
- }, _callee12, this);
5569
+ }, _callee13, this);
5559
5570
  }));
5560
- function setLocalAudioStream(_x10) {
5571
+ function setLocalAudioStream(_x11) {
5561
5572
  return _setLocalAudioStream.apply(this, arguments);
5562
5573
  }
5563
5574
  return setLocalAudioStream;
@@ -5573,11 +5584,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5573
5584
  }, {
5574
5585
  key: "setLocalVideoStream",
5575
5586
  value: (function () {
5576
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localStream) {
5587
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localStream) {
5577
5588
  var _this$video2;
5578
5589
  var oldStream;
5579
- return _regenerator.default.wrap(function (_context13) {
5580
- while (1) switch (_context13.prev = _context13.next) {
5590
+ return _regenerator.default.wrap(function (_context14) {
5591
+ while (1) switch (_context14.prev = _context14.next) {
5581
5592
  case 0:
5582
5593
  oldStream = this.mediaProperties.videoStream;
5583
5594
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -5593,21 +5604,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5593
5604
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5594
5605
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.ConstraintsChange, this.localConstraintsChangeHandler);
5595
5606
  if (!(!this.isMultistream || !localStream)) {
5596
- _context13.next = 1;
5607
+ _context14.next = 1;
5597
5608
  break;
5598
5609
  }
5599
- _context13.next = 1;
5610
+ _context14.next = 1;
5600
5611
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
5601
5612
  case 1:
5602
- _context13.next = 2;
5613
+ _context14.next = 2;
5603
5614
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5604
5615
  case 2:
5605
5616
  case "end":
5606
- return _context13.stop();
5617
+ return _context14.stop();
5607
5618
  }
5608
- }, _callee13, this);
5619
+ }, _callee14, this);
5609
5620
  }));
5610
- function setLocalVideoStream(_x11) {
5621
+ function setLocalVideoStream(_x12) {
5611
5622
  return _setLocalVideoStream.apply(this, arguments);
5612
5623
  }
5613
5624
  return setLocalVideoStream;
@@ -5624,10 +5635,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5624
5635
  }, {
5625
5636
  key: "setLocalShareVideoStream",
5626
5637
  value: (function () {
5627
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localDisplayStream) {
5638
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15(localDisplayStream) {
5628
5639
  var oldStream;
5629
- return _regenerator.default.wrap(function (_context14) {
5630
- while (1) switch (_context14.prev = _context14.next) {
5640
+ return _regenerator.default.wrap(function (_context15) {
5641
+ while (1) switch (_context15.prev = _context15.next) {
5631
5642
  case 0:
5632
5643
  oldStream = this.mediaProperties.shareVideoStream;
5633
5644
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -5639,21 +5650,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5639
5650
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5640
5651
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5641
5652
  if (!(!this.isMultistream || !localDisplayStream)) {
5642
- _context14.next = 1;
5653
+ _context15.next = 1;
5643
5654
  break;
5644
5655
  }
5645
- _context14.next = 1;
5656
+ _context15.next = 1;
5646
5657
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
5647
5658
  case 1:
5648
- _context14.next = 2;
5659
+ _context15.next = 2;
5649
5660
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5650
5661
  case 2:
5651
5662
  case "end":
5652
- return _context14.stop();
5663
+ return _context15.stop();
5653
5664
  }
5654
- }, _callee14, this);
5665
+ }, _callee15, this);
5655
5666
  }));
5656
- function setLocalShareVideoStream(_x12) {
5667
+ function setLocalShareVideoStream(_x13) {
5657
5668
  return _setLocalShareVideoStream.apply(this, arguments);
5658
5669
  }
5659
5670
  return setLocalShareVideoStream;
@@ -5669,10 +5680,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5669
5680
  }, {
5670
5681
  key: "setLocalShareAudioStream",
5671
5682
  value: (function () {
5672
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15(localSystemAudioStream) {
5683
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16(localSystemAudioStream) {
5673
5684
  var oldStream;
5674
- return _regenerator.default.wrap(function (_context15) {
5675
- while (1) switch (_context15.prev = _context15.next) {
5685
+ return _regenerator.default.wrap(function (_context16) {
5686
+ while (1) switch (_context16.prev = _context16.next) {
5676
5687
  case 0:
5677
5688
  oldStream = this.mediaProperties.shareAudioStream;
5678
5689
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -5682,21 +5693,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5682
5693
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5683
5694
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5684
5695
  if (!(!this.isMultistream || !localSystemAudioStream)) {
5685
- _context15.next = 1;
5696
+ _context16.next = 1;
5686
5697
  break;
5687
5698
  }
5688
- _context15.next = 1;
5699
+ _context16.next = 1;
5689
5700
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
5690
5701
  case 1:
5691
- _context15.next = 2;
5702
+ _context16.next = 2;
5692
5703
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5693
5704
  case 2:
5694
5705
  case "end":
5695
- return _context15.stop();
5706
+ return _context16.stop();
5696
5707
  }
5697
- }, _callee15, this);
5708
+ }, _callee16, this);
5698
5709
  }));
5699
- function setLocalShareAudioStream(_x13) {
5710
+ function setLocalShareAudioStream(_x14) {
5700
5711
  return _setLocalShareAudioStream.apply(this, arguments);
5701
5712
  }
5702
5713
  return setLocalShareAudioStream;
@@ -6167,7 +6178,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6167
6178
  }, {
6168
6179
  key: "joinWithMedia",
6169
6180
  value: (function () {
6170
- var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
6181
+ var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
6171
6182
  var _this30 = this;
6172
6183
  var options,
6173
6184
  mediaOptions,
@@ -6190,20 +6201,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6190
6201
  shouldRetry,
6191
6202
  _error2,
6192
6203
  _error3,
6193
- _args16 = arguments,
6194
- _t1,
6195
- _t10;
6196
- return _regenerator.default.wrap(function (_context16) {
6197
- while (1) switch (_context16.prev = _context16.next) {
6204
+ _args17 = arguments,
6205
+ _t10,
6206
+ _t11;
6207
+ return _regenerator.default.wrap(function (_context17) {
6208
+ while (1) switch (_context17.prev = _context17.next) {
6198
6209
  case 0:
6199
- options = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
6210
+ options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
6200
6211
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
6201
6212
  _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
6202
6213
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
6203
- _context16.next = 1;
6214
+ _context17.next = 1;
6204
6215
  break;
6205
6216
  }
6206
- return _context16.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6217
+ return _context17.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6207
6218
  case 1:
6208
6219
  this.allowMediaInLobby = true;
6209
6220
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
@@ -6215,39 +6226,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6215
6226
  in case WebRTC is not available at all.
6216
6227
  */
6217
6228
  if (!(_webCapabilities.WebCapabilities.supportsRTCPeerConnection() === _webCapabilities.CapabilityState.NOT_CAPABLE)) {
6218
- _context16.next = 2;
6229
+ _context17.next = 2;
6219
6230
  break;
6220
6231
  }
6221
6232
  throw new _internalMediaCore.Errors.WebrtcApiNotAvailableError('RTCPeerConnection API is not available in this environment');
6222
6233
  case 2:
6223
- _context16.prev = 2;
6234
+ _context17.prev = 2;
6224
6235
  forceTurnDiscovery = false;
6225
6236
  if (joinResponse) {
6226
- _context16.next = 7;
6237
+ _context17.next = 7;
6227
6238
  break;
6228
6239
  }
6229
- _context16.next = 3;
6240
+ _context17.next = 3;
6230
6241
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
6231
6242
  case 3:
6232
- turnDiscoveryRequest = _context16.sent;
6243
+ turnDiscoveryRequest = _context17.sent;
6233
6244
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
6234
6245
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
6235
6246
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
6236
- _context16.next = 4;
6247
+ _context17.next = 4;
6237
6248
  return this.join(joinOptions);
6238
6249
  case 4:
6239
- joinResponse = _context16.sent;
6250
+ joinResponse = _context17.sent;
6240
6251
  joined = true;
6241
6252
 
6242
6253
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
6243
6254
  if (!joinOptions.roapMessage) {
6244
- _context16.next = 6;
6255
+ _context17.next = 6;
6245
6256
  break;
6246
6257
  }
6247
- _context16.next = 5;
6258
+ _context17.next = 5;
6248
6259
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
6249
6260
  case 5:
6250
- _yield$this$roap$hand = _context16.sent;
6261
+ _yield$this$roap$hand = _context17.sent;
6251
6262
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
6252
6263
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
6253
6264
  this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
@@ -6256,7 +6267,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6256
6267
  this.roap.abortTurnDiscovery();
6257
6268
  }
6258
6269
  case 6:
6259
- _context16.next = 8;
6270
+ _context17.next = 8;
6260
6271
  break;
6261
6272
  case 7:
6262
6273
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
@@ -6264,43 +6275,43 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6264
6275
  forceTurnDiscovery = true;
6265
6276
  joined = true;
6266
6277
  case 8:
6267
- _context16.next = 9;
6278
+ _context17.next = 9;
6268
6279
  return this.addMediaInternal(function () {
6269
6280
  return _this30.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6270
6281
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
6271
6282
  case 9:
6272
- mediaResponse = _context16.sent;
6283
+ mediaResponse = _context17.sent;
6273
6284
  this.joinWithMediaRetryInfo = {
6274
6285
  isRetry: false,
6275
6286
  prevJoinResponse: undefined
6276
6287
  };
6277
- return _context16.abrupt("return", {
6288
+ return _context17.abrupt("return", {
6278
6289
  join: joinResponse,
6279
6290
  media: mediaResponse,
6280
6291
  multistreamEnabled: this.isMultistream
6281
6292
  });
6282
6293
  case 10:
6283
- _context16.prev = 10;
6284
- _t1 = _context16["catch"](2);
6285
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t1);
6294
+ _context17.prev = 10;
6295
+ _t10 = _context17["catch"](2);
6296
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t10);
6286
6297
  this.roap.abortTurnDiscovery();
6287
6298
 
6288
6299
  // if this was the first attempt, let's do a retry
6289
6300
  shouldRetry = !isRetry;
6290
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t1) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t1)) {
6301
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t10) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t10)) {
6291
6302
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
6292
6303
  // so there is no point doing a retry
6293
6304
  shouldRetry = false;
6294
6305
  }
6295
- if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t1)) {
6306
+ if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t10)) {
6296
6307
  shouldRetry = false;
6297
6308
  // eslint-disable-next-line no-ex-assign
6298
- _t1 = (0, _lodash.merge)({
6309
+ _t10 = (0, _lodash.merge)({
6299
6310
  error: {
6300
6311
  body: {
6301
- errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t1),
6302
- message: (_error2 = _t1) === null || _error2 === void 0 ? void 0 : _error2.message,
6303
- name: (_error3 = _t1) === null || _error3 === void 0 ? void 0 : _error3.name
6312
+ errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t10),
6313
+ message: (_error2 = _t10) === null || _error2 === void 0 ? void 0 : _error2.message,
6314
+ name: (_error3 = _t10) === null || _error3 === void 0 ? void 0 : _error3.name
6304
6315
  }
6305
6316
  }
6306
6317
  });
@@ -6308,54 +6319,54 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6308
6319
 
6309
6320
  // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
6310
6321
  if (!(joined && (isRetry || !shouldRetry))) {
6311
- _context16.next = 14;
6322
+ _context17.next = 14;
6312
6323
  break;
6313
6324
  }
6314
- _context16.prev = 11;
6315
- _context16.next = 12;
6325
+ _context17.prev = 11;
6326
+ _context17.next = 12;
6316
6327
  return this.leave({
6317
6328
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
6318
6329
  reason: 'joinWithMedia failure'
6319
6330
  });
6320
6331
  case 12:
6321
- _context16.next = 14;
6332
+ _context17.next = 14;
6322
6333
  break;
6323
6334
  case 13:
6324
- _context16.prev = 13;
6325
- _t10 = _context16["catch"](11);
6326
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t10);
6327
- leaveError = _t10;
6335
+ _context17.prev = 13;
6336
+ _t11 = _context17["catch"](11);
6337
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t11);
6338
+ leaveError = _t11;
6328
6339
  case 14:
6329
6340
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
6330
6341
  correlation_id: this.correlationId,
6331
6342
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
6332
6343
  // if join fails, we may end up with no locusUrl
6333
- reason: _t1.message,
6334
- stack: _t1.stack,
6344
+ reason: _t10.message,
6345
+ stack: _t10.stack,
6335
6346
  leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
6336
6347
  isRetry: isRetry
6337
6348
  }, {
6338
- type: _t1.name
6349
+ type: _t10.name
6339
6350
  });
6340
6351
  if (!shouldRetry) {
6341
- _context16.next = 15;
6352
+ _context17.next = 15;
6342
6353
  break;
6343
6354
  }
6344
6355
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
6345
6356
  this.joinWithMediaRetryInfo.isRetry = true;
6346
6357
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
6347
- return _context16.abrupt("return", this.joinWithMedia(options));
6358
+ return _context17.abrupt("return", this.joinWithMedia(options));
6348
6359
  case 15:
6349
6360
  this.joinWithMediaRetryInfo = {
6350
6361
  isRetry: false,
6351
6362
  prevJoinResponse: undefined
6352
6363
  };
6353
- throw _t1;
6364
+ throw _t10;
6354
6365
  case 16:
6355
6366
  case "end":
6356
- return _context16.stop();
6367
+ return _context17.stop();
6357
6368
  }
6358
- }, _callee16, this, [[2, 10], [11, 13]]);
6369
+ }, _callee17, this, [[2, 10], [11, 13]]);
6359
6370
  }));
6360
6371
  function joinWithMedia() {
6361
6372
  return _joinWithMedia.apply(this, arguments);
@@ -6385,20 +6396,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6385
6396
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
6386
6397
  }
6387
6398
  this.cleanUpBeforeReconnection();
6388
- return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
6389
- return _regenerator.default.wrap(function (_context17) {
6390
- while (1) switch (_context17.prev = _context17.next) {
6399
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6400
+ return _regenerator.default.wrap(function (_context18) {
6401
+ while (1) switch (_context18.prev = _context18.next) {
6391
6402
  case 0:
6392
- _context17.next = 1;
6403
+ _context18.next = 1;
6393
6404
  return _this31.waitForRemoteSDPAnswer();
6394
6405
  case 1:
6395
- _context17.next = 2;
6406
+ _context18.next = 2;
6396
6407
  return _this31.waitForMediaConnectionConnected();
6397
6408
  case 2:
6398
6409
  case "end":
6399
- return _context17.stop();
6410
+ return _context18.stop();
6400
6411
  }
6401
- }, _callee17);
6412
+ }, _callee18);
6402
6413
  }))).then(function () {
6403
6414
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
6404
6415
  }).catch(function (error) {
@@ -6539,49 +6550,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6539
6550
  }, {
6540
6551
  key: "startTranscription",
6541
6552
  value: (function () {
6542
- var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18(options) {
6543
- var _t11;
6544
- return _regenerator.default.wrap(function (_context18) {
6545
- while (1) switch (_context18.prev = _context18.next) {
6553
+ var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19(options) {
6554
+ var _t12;
6555
+ return _regenerator.default.wrap(function (_context19) {
6556
+ while (1) switch (_context19.prev = _context19.next) {
6546
6557
  case 0:
6547
6558
  if (!this.isJoined()) {
6548
- _context18.next = 5;
6559
+ _context19.next = 5;
6549
6560
  break;
6550
6561
  }
6551
6562
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
6552
- _context18.prev = 1;
6563
+ _context19.prev = 1;
6553
6564
  if (!this.areVoiceaEventsSetup) {
6554
6565
  this.setUpVoiceaListeners();
6555
6566
  }
6556
6567
 
6557
6568
  // @ts-ignore
6558
- _context18.next = 2;
6569
+ _context19.next = 2;
6559
6570
  return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
6560
6571
  case 2:
6561
- _context18.next = 4;
6572
+ _context19.next = 4;
6562
6573
  break;
6563
6574
  case 3:
6564
- _context18.prev = 3;
6565
- _t11 = _context18["catch"](1);
6566
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t11));
6575
+ _context19.prev = 3;
6576
+ _t12 = _context19["catch"](1);
6577
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t12));
6567
6578
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
6568
6579
  correlation_id: this.correlationId,
6569
- reason: _t11.message,
6570
- stack: _t11.stack
6580
+ reason: _t12.message,
6581
+ stack: _t12.stack
6571
6582
  });
6572
6583
  case 4:
6573
- _context18.next = 6;
6584
+ _context19.next = 6;
6574
6585
  break;
6575
6586
  case 5:
6576
6587
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
6577
6588
  throw new Error('Meeting is not joined');
6578
6589
  case 6:
6579
6590
  case "end":
6580
- return _context18.stop();
6591
+ return _context19.stop();
6581
6592
  }
6582
- }, _callee18, this, [[1, 3]]);
6593
+ }, _callee19, this, [[1, 3]]);
6583
6594
  }));
6584
- function startTranscription(_x14) {
6595
+ function startTranscription(_x15) {
6585
6596
  return _startTranscription.apply(this, arguments);
6586
6597
  }
6587
6598
  return startTranscription;
@@ -6658,9 +6669,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6658
6669
  key: "restoreLLMSubscriptionsIfNeeded",
6659
6670
  value: function restoreLLMSubscriptionsIfNeeded() {
6660
6671
  try {
6661
- var _this$webex$internal$3, _this$webex$internal$4;
6672
+ var _this$webex$internal$5, _this$webex$internal$6;
6662
6673
  // @ts-ignore
6663
- var isCaptionBoxOn = (_this$webex$internal$3 = this.webex.internal.voicea) === null || _this$webex$internal$3 === void 0 ? void 0 : (_this$webex$internal$4 = _this$webex$internal$3.getIsCaptionBoxOn) === null || _this$webex$internal$4 === void 0 ? void 0 : _this$webex$internal$4.call(_this$webex$internal$3);
6674
+ var isCaptionBoxOn = (_this$webex$internal$5 = this.webex.internal.voicea) === null || _this$webex$internal$5 === void 0 ? void 0 : (_this$webex$internal$6 = _this$webex$internal$5.getIsCaptionBoxOn) === null || _this$webex$internal$6 === void 0 ? void 0 : _this$webex$internal$6.call(_this$webex$internal$5);
6664
6675
  if (!isCaptionBoxOn) {
6665
6676
  return;
6666
6677
  }
@@ -6690,7 +6701,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6690
6701
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
6691
6702
  */
6692
6703
  function () {
6693
- var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
6704
+ var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
6694
6705
  var _this34 = this;
6695
6706
  var options,
6696
6707
  errorMessage,
@@ -6701,26 +6712,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6701
6712
  _error4,
6702
6713
  _errorMessage3,
6703
6714
  _error5,
6704
- _args19 = arguments,
6705
- _t12;
6706
- return _regenerator.default.wrap(function (_context19) {
6707
- while (1) switch (_context19.prev = _context19.next) {
6715
+ _args20 = arguments,
6716
+ _t13;
6717
+ return _regenerator.default.wrap(function (_context20) {
6718
+ while (1) switch (_context20.prev = _context20.next) {
6708
6719
  case 0:
6709
- options = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
6720
+ options = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
6710
6721
  if (this.webex.meetings.registered) {
6711
- _context19.next = 1;
6722
+ _context20.next = 1;
6712
6723
  break;
6713
6724
  }
6714
6725
  errorMessage = 'Meeting:index#join --> Device not registered';
6715
6726
  error = new Error(errorMessage);
6716
6727
  _loggerProxy.default.logger.error(errorMessage);
6717
- return _context19.abrupt("return", _promise.default.reject(error));
6728
+ return _context20.abrupt("return", _promise.default.reject(error));
6718
6729
  case 1:
6719
6730
  if (!this.deferJoin) {
6720
- _context19.next = 2;
6731
+ _context20.next = 2;
6721
6732
  break;
6722
6733
  }
6723
- return _context19.abrupt("return", this.deferJoin);
6734
+ return _context20.abrupt("return", this.deferJoin);
6724
6735
  case 2:
6725
6736
  // Create a deferred promise for a consistent resolve value from utils.
6726
6737
  // This also prevents redundant API calls.
@@ -6772,15 +6783,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6772
6783
  this.wirelessShare = true;
6773
6784
  }
6774
6785
  if (!options.meetingQuality) {
6775
- _context19.next = 6;
6786
+ _context20.next = 6;
6776
6787
  break;
6777
6788
  }
6778
6789
  if (!(typeof options.meetingQuality === 'string')) {
6779
- _context19.next = 4;
6790
+ _context20.next = 4;
6780
6791
  break;
6781
6792
  }
6782
6793
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
6783
- _context19.next = 3;
6794
+ _context20.next = 3;
6784
6795
  break;
6785
6796
  }
6786
6797
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -6788,16 +6799,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6788
6799
  _loggerProxy.default.logger.error(_errorMessage2);
6789
6800
  joinFailed(_error4);
6790
6801
  this.deferJoin = undefined;
6791
- return _context19.abrupt("return", _promise.default.reject(_error4));
6802
+ return _context20.abrupt("return", _promise.default.reject(_error4));
6792
6803
  case 3:
6793
6804
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
6794
6805
  case 4:
6795
6806
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
6796
- _context19.next = 6;
6807
+ _context20.next = 6;
6797
6808
  break;
6798
6809
  }
6799
6810
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
6800
- _context19.next = 5;
6811
+ _context20.next = 5;
6801
6812
  break;
6802
6813
  }
6803
6814
  _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -6805,42 +6816,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6805
6816
  _error5 = new Error(_errorMessage3);
6806
6817
  joinFailed(_error5);
6807
6818
  this.deferJoin = undefined;
6808
- return _context19.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6819
+ return _context20.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6809
6820
  case 5:
6810
6821
  if (options.meetingQuality.remote) {
6811
6822
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
6812
6823
  }
6813
6824
  case 6:
6814
6825
  this.isMultistream = !!options.enableMultistream;
6815
- _context19.prev = 7;
6816
- _context19.next = 8;
6826
+ _context20.prev = 7;
6827
+ _context20.next = 8;
6817
6828
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
6818
6829
  case 8:
6819
- _context19.next = 10;
6830
+ _context20.next = 10;
6820
6831
  break;
6821
6832
  case 9:
6822
- _context19.prev = 9;
6823
- _t12 = _context19["catch"](7);
6824
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t12);
6825
- if (!(_t12 instanceof _captchaError.default || _t12 instanceof _passwordError.default || _t12 instanceof _permission.default)) {
6826
- _context19.next = 10;
6833
+ _context20.prev = 9;
6834
+ _t13 = _context20["catch"](7);
6835
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t13);
6836
+ if (!(_t13 instanceof _captchaError.default || _t13 instanceof _passwordError.default || _t13 instanceof _permission.default)) {
6837
+ _context20.next = 10;
6827
6838
  break;
6828
6839
  }
6829
- this.meetingFiniteStateMachine.fail(_t12);
6840
+ this.meetingFiniteStateMachine.fail(_t13);
6830
6841
 
6831
6842
  // Upload logs on refreshpermissionToken refresh Failure
6832
6843
  _triggerProxy.default.trigger(this, {
6833
6844
  file: 'meeting/index',
6834
6845
  function: 'join'
6835
6846
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6836
- joinFailed(_t12);
6847
+ joinFailed(_t13);
6837
6848
  this.deferJoin = undefined;
6838
6849
 
6839
6850
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
6840
6851
  // and bubble it up to client
6841
- return _context19.abrupt("return", _promise.default.reject(_t12));
6852
+ return _context20.abrupt("return", _promise.default.reject(_t13));
6842
6853
  case 10:
6843
- return _context19.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6854
+ return _context20.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6844
6855
  _this34.meetingFiniteStateMachine.join();
6845
6856
  _this34.setupLocusMediaRequest();
6846
6857
 
@@ -6896,9 +6907,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6896
6907
  }));
6897
6908
  case 11:
6898
6909
  case "end":
6899
- return _context19.stop();
6910
+ return _context20.stop();
6900
6911
  }
6901
- }, _callee19, this, [[7, 9]]);
6912
+ }, _callee20, this, [[7, 9]]);
6902
6913
  }));
6903
6914
  function join() {
6904
6915
  return _join.apply(this, arguments);
@@ -6998,13 +7009,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6998
7009
  key: "clearDataChannelToken",
6999
7010
  value:
7000
7011
  /**
7001
- * Clears all data channel tokens stored in LLM.
7002
- * Called during meeting cleanup to ensure stale tokens are not reused.
7012
+ * Clears data channel tokens associated with this meeting ownership.
7013
+ * Ownership checks are enforced in internal-plugin-llm.
7003
7014
  * @returns {void}
7004
7015
  */
7005
7016
  function clearDataChannelToken() {
7006
7017
  // @ts-ignore
7007
- this.webex.internal.llm.resetDatachannelTokens();
7018
+ this.webex.internal.llm.clearDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id);
7019
+ // @ts-ignore
7020
+ this.webex.internal.llm.clearDatachannelToken(_constants.LLM_PRACTICE_SESSION, this.id);
7008
7021
  }
7009
7022
 
7010
7023
  /**
@@ -7021,11 +7034,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7021
7034
  var practiceSessionDatachannelToken = join === null || join === void 0 ? void 0 : (_join$locus2 = join.locus) === null || _join$locus2 === void 0 ? void 0 : (_join$locus2$self = _join$locus2.self) === null || _join$locus2$self === void 0 ? void 0 : _join$locus2$self.practiceSessionDatachannelToken;
7022
7035
  if (datachannelToken) {
7023
7036
  // @ts-ignore
7024
- this.webex.internal.llm.setDatachannelToken(datachannelToken, _internalPluginLlm.DataChannelTokenType.Default);
7037
+ this.webex.internal.llm.setDatachannelToken(datachannelToken, _constants.LLM_DEFAULT_SESSION, this.id);
7025
7038
  }
7026
7039
  if (practiceSessionDatachannelToken) {
7027
7040
  // @ts-ignore
7028
- this.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _internalPluginLlm.DataChannelTokenType.PracticeSession);
7041
+ this.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION, this.id);
7029
7042
  }
7030
7043
  }
7031
7044
 
@@ -7037,55 +7050,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7037
7050
  }, {
7038
7051
  key: "ensureDefaultDatachannelTokenAfterAdmit",
7039
7052
  value: (function () {
7040
- var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
7041
- var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t13;
7042
- return _regenerator.default.wrap(function (_context20) {
7043
- while (1) switch (_context20.prev = _context20.next) {
7053
+ var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
7054
+ var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t14;
7055
+ return _regenerator.default.wrap(function (_context21) {
7056
+ while (1) switch (_context21.prev = _context21.next) {
7044
7057
  case 0:
7045
- _context20.prev = 0;
7058
+ _context21.prev = 0;
7046
7059
  // @ts-ignore
7047
- datachannelToken = this.webex.internal.llm.getDatachannelToken(); // @ts-ignore
7048
- _context20.next = 1;
7060
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id); // @ts-ignore
7061
+ _context21.next = 1;
7049
7062
  return this.webex.internal.llm.isDataChannelTokenEnabled();
7050
7063
  case 1:
7051
- isDataChannelTokenEnabled = _context20.sent;
7064
+ isDataChannelTokenEnabled = _context21.sent;
7052
7065
  if (!(!isDataChannelTokenEnabled || datachannelToken)) {
7053
- _context20.next = 2;
7066
+ _context21.next = 2;
7054
7067
  break;
7055
7068
  }
7056
- return _context20.abrupt("return", false);
7069
+ return _context21.abrupt("return", false);
7057
7070
  case 2:
7058
- _context20.next = 3;
7071
+ _context21.next = 3;
7059
7072
  return this.meetingRequest.fetchDatachannelToken({
7060
7073
  locusUrl: this.locusUrl,
7061
7074
  requestingParticipantId: this.members.selfId,
7062
7075
  isPracticeSession: false
7063
7076
  });
7064
7077
  case 3:
7065
- response = _context20.sent;
7078
+ response = _context21.sent;
7066
7079
  fetchedDatachannelToken = response === null || response === void 0 ? void 0 : (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.datachannelToken;
7067
7080
  if (fetchedDatachannelToken) {
7068
- _context20.next = 4;
7081
+ _context21.next = 4;
7069
7082
  break;
7070
7083
  }
7071
- return _context20.abrupt("return", false);
7084
+ return _context21.abrupt("return", false);
7072
7085
  case 4:
7073
7086
  // @ts-ignore
7074
- this.webex.internal.llm.setDatachannelToken(fetchedDatachannelToken, _internalPluginLlm.DataChannelTokenType.Default);
7075
- return _context20.abrupt("return", true);
7087
+ this.webex.internal.llm.setDatachannelToken(fetchedDatachannelToken, _constants.LLM_DEFAULT_SESSION, this.id);
7088
+ return _context21.abrupt("return", true);
7076
7089
  case 5:
7077
- _context20.prev = 5;
7078
- _t13 = _context20["catch"](0);
7079
- msg = (_t13 === null || _t13 === void 0 ? void 0 : _t13.message) || String(_t13);
7090
+ _context21.prev = 5;
7091
+ _t14 = _context21["catch"](0);
7092
+ msg = (_t14 === null || _t14 === void 0 ? void 0 : _t14.message) || String(_t14);
7080
7093
  _loggerProxy.default.logger.warn("Meeting:index#ensureDefaultDatachannelTokenAfterAdmit --> failed to proactively fetch default data channel token after admit: ".concat(msg), {
7081
- statusCode: _t13 === null || _t13 === void 0 ? void 0 : _t13.statusCode
7094
+ statusCode: _t14 === null || _t14 === void 0 ? void 0 : _t14.statusCode
7082
7095
  });
7083
- return _context20.abrupt("return", false);
7096
+ return _context21.abrupt("return", false);
7084
7097
  case 6:
7085
7098
  case "end":
7086
- return _context20.stop();
7099
+ return _context21.stop();
7087
7100
  }
7088
- }, _callee20, this, [[0, 5]]);
7101
+ }, _callee21, this, [[0, 5]]);
7089
7102
  }));
7090
7103
  function ensureDefaultDatachannelTokenAfterAdmit() {
7091
7104
  return _ensureDefaultDatachannelTokenAfterAdmit.apply(this, arguments);
@@ -7101,16 +7114,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7101
7114
  }, {
7102
7115
  key: "updateLLMConnection",
7103
7116
  value: (function () {
7104
- var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
7117
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
7105
7118
  var _this36 = this;
7106
- var _ref39, _ref39$url, url, _ref39$info, _ref39$info2, _ref39$info2$datachan, datachannelUrl, isJoined, datachannelToken, dataChannelUrl, currentOwner;
7107
- return _regenerator.default.wrap(function (_context21) {
7108
- while (1) switch (_context21.prev = _context21.next) {
7119
+ var _ref40, _ref40$url, url, _ref40$info, _ref40$info2, _ref40$info2$datachan, datachannelUrl, isJoined, dataChannelUrl, _this$webex$internal$7, currentOwner, wasConnected, datachannelToken, refreshHandlerOwnerMeetingId, shouldAlignRefreshHandlerAfterOwnershipClaim;
7120
+ return _regenerator.default.wrap(function (_context22) {
7121
+ while (1) switch (_context22.prev = _context22.next) {
7109
7122
  case 0:
7110
7123
  // @ts-ignore - Fix type
7111
- _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;
7112
- isJoined = this.isJoined(); // @ts-ignore
7113
- datachannelToken = this.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.Default);
7124
+ _ref40 = this.locusInfo || {}, _ref40$url = _ref40.url, url = _ref40$url === void 0 ? undefined : _ref40$url, _ref40$info = _ref40.info, _ref40$info2 = _ref40$info === void 0 ? {} : _ref40$info, _ref40$info2$datachan = _ref40$info2.datachannelUrl, datachannelUrl = _ref40$info2$datachan === void 0 ? undefined : _ref40$info2$datachan;
7125
+ isJoined = this.isJoined();
7114
7126
  dataChannelUrl = datachannelUrl; // Ownership guard: when the default LLM session is already connected and
7115
7127
  // owned by a *different* Meeting instance, do not disconnect or reconfigure
7116
7128
  // it. Another meeting's `updateLLMConnection` must be ignored here to
@@ -7118,13 +7130,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7118
7130
  // connection when this meeting is the current owner, or when no owner is
7119
7131
  // set yet (first claim).
7120
7132
  // @ts-ignore - Fix type
7121
- currentOwner = this.webex.internal.llm.getOwnerMeetingId(); // @ts-ignore - Fix type
7122
- if (!this.webex.internal.llm.isConnected()) {
7123
- _context21.next = 3;
7133
+ _this$webex$internal$7 = this.webex.internal.llm.resolveSessionOwnership(this.id, _constants.LLM_DEFAULT_SESSION), currentOwner = _this$webex$internal$7.currentOwner; // Capture connectivity before any reconnect attempt. If LLM was already
7134
+ // connected, we must respect current ownership. If it was disconnected,
7135
+ // this flow may reclaim stale owner tags after a fresh connect.
7136
+ // @ts-ignore - Fix type
7137
+ wasConnected = this.webex.internal.llm.isConnected(); // Prefer ownership-scoped token read. For disconnected stale-owner reclaim
7138
+ // flows, fallback to ownerless read so initial register can still carry a
7139
+ // token and recover from stale ownership without 401/403 dead-end.
7140
+ // @ts-ignore - Fix type
7141
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id);
7142
+ if (!datachannelToken && !wasConnected && currentOwner && currentOwner !== this.id) {
7143
+ // @ts-ignore - Fix type
7144
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION);
7145
+ }
7146
+
7147
+ // @ts-ignore - Fix type
7148
+ if (!wasConnected) {
7149
+ _context22.next = 3;
7124
7150
  break;
7125
7151
  }
7126
7152
  if (!(currentOwner && currentOwner !== this.id)) {
7127
- _context21.next = 1;
7153
+ _context22.next = 1;
7128
7154
  break;
7129
7155
  }
7130
7156
  // Another meeting owns the live LLM socket. We must not disconnect
@@ -7136,31 +7162,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7136
7162
  // release in `cleanupLLMConneciton`, which fires when this meeting
7137
7163
  // itself is being torn down.
7138
7164
  _loggerProxy.default.logger.info("Meeting:index#updateLLMConnection --> skipping; LLM owned by meeting ".concat(currentOwner, ", not ").concat(this.id));
7139
- return _context21.abrupt("return", undefined);
7165
+ return _context22.abrupt("return", undefined);
7140
7166
  case 1:
7141
7167
  if (!(
7142
7168
  // @ts-ignore - Fix type
7143
7169
  url === this.webex.internal.llm.getLocusUrl() &&
7144
7170
  // @ts-ignore - Fix type
7145
7171
  dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
7146
- _context21.next = 2;
7172
+ _context22.next = 2;
7147
7173
  break;
7148
7174
  }
7149
- return _context21.abrupt("return", undefined);
7175
+ return _context22.abrupt("return", undefined);
7150
7176
  case 2:
7151
- _context21.next = 3;
7177
+ _context22.next = 3;
7152
7178
  return this.cleanupLLMConneciton({
7153
7179
  removeOnlineListener: false
7154
7180
  });
7155
7181
  case 3:
7156
7182
  if (isJoined) {
7157
- _context21.next = 4;
7183
+ _context22.next = 4;
7158
7184
  break;
7159
7185
  }
7160
- return _context21.abrupt("return", undefined);
7186
+ return _context22.abrupt("return", undefined);
7161
7187
  case 4:
7162
- return _context21.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
7163
- var _this36$webex$interna, _this36$webex$interna2;
7188
+ // Bind refresh handler before registration so interceptor-triggered token
7189
+ // refresh during register POST can resolve a valid handler.
7190
+ // Prefer this meeting as owner, but allow owner-less fallback when a stale
7191
+ // foreign owner tag is present on a disconnected session.
7192
+ refreshHandlerOwnerMeetingId = currentOwner && currentOwner !== this.id ? undefined : this.id;
7193
+ shouldAlignRefreshHandlerAfterOwnershipClaim = refreshHandlerOwnerMeetingId !== this.id; // @ts-ignore - Fix type
7194
+ this.webex.internal.llm.setRefreshHandler(function () {
7195
+ return _this36.refreshDataChannelToken();
7196
+ }, _constants.LLM_DEFAULT_SESSION, refreshHandlerOwnerMeetingId);
7197
+
7198
+ // @ts-ignore - Fix type
7199
+ return _context22.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
7164
7200
  _this36.locusInfo.syncAllHashTreeDatasets({
7165
7201
  onlyLLM: true
7166
7202
  });
@@ -7168,7 +7204,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7168
7204
  // subsequent cross-meeting `updateLLMConnection` / `cleanupLLMConneciton`
7169
7205
  // calls can detect and skip work that doesn't belong to them.
7170
7206
  // @ts-ignore - Fix type
7171
- (_this36$webex$interna = (_this36$webex$interna2 = _this36.webex.internal.llm).setOwnerMeetingId) === null || _this36$webex$interna === void 0 ? void 0 : _this36$webex$interna.call(_this36$webex$interna2, _this36.id);
7207
+ var _this36$webex$interna = _this36.webex.internal.llm.resolveSessionOwnership(_this36.id, _constants.LLM_DEFAULT_SESSION),
7208
+ isOwner = _this36$webex$interna.isOwner;
7209
+ var canReclaimAfterDisconnectedStart = !wasConnected;
7210
+
7211
+ // Refresh handler is pre-bound before registerAndConnect so token
7212
+ // refresh can work even during the registration request itself.
7213
+ if (isOwner || canReclaimAfterDisconnectedStart) {
7214
+ var _this36$webex$interna2, _this36$webex$interna3;
7215
+ // Record ownership of the default LLM session for this meeting so
7216
+ // subsequent cross-meeting `updateLLMConnection` / `cleanupLLMConneciton`
7217
+ // calls can detect and skip work that doesn't belong to them.
7218
+ // @ts-ignore - Fix type
7219
+ (_this36$webex$interna2 = (_this36$webex$interna3 = _this36.webex.internal.llm).setOwnerMeetingId) === null || _this36$webex$interna2 === void 0 ? void 0 : _this36$webex$interna2.call(_this36$webex$interna3, _this36.id);
7220
+
7221
+ // If we pre-bound refresh ownerlessly (stale-owner reclaim path),
7222
+ // align the handler with the newly claimed owner immediately after
7223
+ // ownership is updated.
7224
+ if (shouldAlignRefreshHandlerAfterOwnershipClaim) {
7225
+ // @ts-ignore - Fix type
7226
+ _this36.webex.internal.llm.setRefreshHandler(function () {
7227
+ return _this36.refreshDataChannelToken();
7228
+ }, _constants.LLM_DEFAULT_SESSION, _this36.id);
7229
+ }
7230
+ }
7172
7231
  // @ts-ignore - Fix type
7173
7232
  _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
7174
7233
  // @ts-ignore - Fix type
@@ -7183,9 +7242,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7183
7242
  }));
7184
7243
  case 5:
7185
7244
  case "end":
7186
- return _context21.stop();
7245
+ return _context22.stop();
7187
7246
  }
7188
- }, _callee21, this);
7247
+ }, _callee22, this);
7189
7248
  }));
7190
7249
  function updateLLMConnection() {
7191
7250
  return _updateLLMConnection.apply(this, arguments);
@@ -7371,17 +7430,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7371
7430
  meetingId: this.id
7372
7431
  }
7373
7432
  });
7374
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
7375
- var mediaSettings, _t14;
7376
- return _regenerator.default.wrap(function (_context22) {
7377
- while (1) switch (_context22.prev = _context22.next) {
7433
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
7434
+ var mediaSettings, _t15;
7435
+ return _regenerator.default.wrap(function (_context23) {
7436
+ while (1) switch (_context23.prev = _context23.next) {
7378
7437
  case 0:
7379
- _context22.prev = 0;
7438
+ _context23.prev = 0;
7380
7439
  if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
7381
- _context22.next = 1;
7440
+ _context23.next = 1;
7382
7441
  break;
7383
7442
  }
7384
- _context22.next = 1;
7443
+ _context23.next = 1;
7385
7444
  return _this40.releaseScreenShareFloor();
7386
7445
  case 1:
7387
7446
  mediaSettings = {
@@ -7400,23 +7459,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7400
7459
  // 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
7401
7460
  // once the device answers we close the old connection and create new media server connection with only share enabled
7402
7461
  if (!_this40.statsAnalyzer) {
7403
- _context22.next = 2;
7462
+ _context23.next = 2;
7404
7463
  break;
7405
7464
  }
7406
- _context22.next = 2;
7465
+ _context23.next = 2;
7407
7466
  return _this40.statsAnalyzer.stopAnalyzer();
7408
7467
  case 2:
7409
- _context22.next = 3;
7468
+ _context23.next = 3;
7410
7469
  return _this40.closeRemoteStreams();
7411
7470
  case 3:
7412
- _context22.next = 4;
7471
+ _context23.next = 4;
7413
7472
  return _this40.closePeerConnections();
7414
7473
  case 4:
7415
7474
  _this40.cleanupLocalStreams();
7416
7475
  _this40.unsetRemoteStreams();
7417
7476
  _this40.unsetPeerConnections();
7418
7477
  _this40.reconnectionManager.cleanUp();
7419
- _context22.next = 5;
7478
+ _context23.next = 5;
7420
7479
  return _this40.addMedia({
7421
7480
  audioEnabled: false,
7422
7481
  videoEnabled: false,
@@ -7425,24 +7484,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7425
7484
  case 5:
7426
7485
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
7427
7486
  _this40.isMoveToInProgress = false;
7428
- _context22.next = 7;
7487
+ _context23.next = 7;
7429
7488
  break;
7430
7489
  case 6:
7431
- _context22.prev = 6;
7432
- _t14 = _context22["catch"](0);
7433
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t14);
7490
+ _context23.prev = 6;
7491
+ _t15 = _context23["catch"](0);
7492
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t15);
7434
7493
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
7435
7494
  correlation_id: _this40.correlationId,
7436
7495
  locus_id: _this40.locusUrl.split('/').pop(),
7437
- reason: _t14.message,
7438
- stack: _t14.stack
7496
+ reason: _t15.message,
7497
+ stack: _t15.stack
7439
7498
  });
7440
7499
  _this40.isMoveToInProgress = false;
7441
7500
  case 7:
7442
7501
  case "end":
7443
- return _context22.stop();
7502
+ return _context23.stop();
7444
7503
  }
7445
- }, _callee22, null, [[0, 6]]);
7504
+ }, _callee23, null, [[0, 6]]);
7446
7505
  })));
7447
7506
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
7448
7507
 
@@ -7530,10 +7589,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7530
7589
  }, {
7531
7590
  key: "createMediaConnection",
7532
7591
  value: (function () {
7533
- var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23(turnServerInfo, bundlePolicy) {
7592
+ var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(turnServerInfo, bundlePolicy) {
7534
7593
  var mc, audioEnabled, videoEnabled, shareEnabled;
7535
- return _regenerator.default.wrap(function (_context23) {
7536
- while (1) switch (_context23.prev = _context23.next) {
7594
+ return _regenerator.default.wrap(function (_context24) {
7595
+ while (1) switch (_context24.prev = _context24.next) {
7537
7596
  case 0:
7538
7597
  this.rtcMetrics = this.isMultistream ?
7539
7598
  // @ts-ignore
@@ -7577,42 +7636,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7577
7636
 
7578
7637
  // publish the streams
7579
7638
  if (!this.mediaProperties.audioStream) {
7580
- _context23.next = 1;
7639
+ _context24.next = 1;
7581
7640
  break;
7582
7641
  }
7583
7642
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
7584
- _context23.next = 1;
7643
+ _context24.next = 1;
7585
7644
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
7586
7645
  case 1:
7587
7646
  if (!this.mediaProperties.videoStream) {
7588
- _context23.next = 2;
7647
+ _context24.next = 2;
7589
7648
  break;
7590
7649
  }
7591
- _context23.next = 2;
7650
+ _context24.next = 2;
7592
7651
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
7593
7652
  case 2:
7594
7653
  if (!this.mediaProperties.shareVideoStream) {
7595
- _context23.next = 3;
7654
+ _context24.next = 3;
7596
7655
  break;
7597
7656
  }
7598
- _context23.next = 3;
7657
+ _context24.next = 3;
7599
7658
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
7600
7659
  case 3:
7601
7660
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
7602
- _context23.next = 4;
7661
+ _context24.next = 4;
7603
7662
  break;
7604
7663
  }
7605
- _context23.next = 4;
7664
+ _context24.next = 4;
7606
7665
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
7607
7666
  case 4:
7608
- return _context23.abrupt("return", mc);
7667
+ return _context24.abrupt("return", mc);
7609
7668
  case 5:
7610
7669
  case "end":
7611
- return _context23.stop();
7670
+ return _context24.stop();
7612
7671
  }
7613
- }, _callee23, this);
7672
+ }, _callee24, this);
7614
7673
  }));
7615
- function createMediaConnection(_x15, _x16) {
7674
+ function createMediaConnection(_x16, _x17) {
7616
7675
  return _createMediaConnection.apply(this, arguments);
7617
7676
  }
7618
7677
  return createMediaConnection;
@@ -7650,11 +7709,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7650
7709
  }, {
7651
7710
  key: "setUpLocalStreamReferences",
7652
7711
  value: (function () {
7653
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(localStreams) {
7712
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25(localStreams) {
7654
7713
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
7655
- var setUpStreamPromises, _t15;
7656
- return _regenerator.default.wrap(function (_context24) {
7657
- while (1) switch (_context24.prev = _context24.next) {
7714
+ var setUpStreamPromises, _t16;
7715
+ return _regenerator.default.wrap(function (_context25) {
7716
+ while (1) switch (_context25.prev = _context25.next) {
7658
7717
  case 0:
7659
7718
  setUpStreamPromises = [];
7660
7719
  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') {
@@ -7669,24 +7728,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7669
7728
  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') {
7670
7729
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
7671
7730
  }
7672
- _context24.prev = 1;
7673
- _context24.next = 2;
7731
+ _context25.prev = 1;
7732
+ _context25.next = 2;
7674
7733
  return _promise.default.all(setUpStreamPromises);
7675
7734
  case 2:
7676
- _context24.next = 4;
7735
+ _context25.next = 4;
7677
7736
  break;
7678
7737
  case 3:
7679
- _context24.prev = 3;
7680
- _t15 = _context24["catch"](1);
7681
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t15);
7682
- throw _t15;
7738
+ _context25.prev = 3;
7739
+ _t16 = _context25["catch"](1);
7740
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t16);
7741
+ throw _t16;
7683
7742
  case 4:
7684
7743
  case "end":
7685
- return _context24.stop();
7744
+ return _context25.stop();
7686
7745
  }
7687
- }, _callee24, this, [[1, 3]]);
7746
+ }, _callee25, this, [[1, 3]]);
7688
7747
  }));
7689
- function setUpLocalStreamReferences(_x17) {
7748
+ function setUpLocalStreamReferences(_x18) {
7690
7749
  return _setUpLocalStreamReferences.apply(this, arguments);
7691
7750
  }
7692
7751
  return setUpLocalStreamReferences;
@@ -7701,72 +7760,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7701
7760
  }, {
7702
7761
  key: "waitForMediaConnectionConnected",
7703
7762
  value: (function () {
7704
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
7705
- 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;
7706
- return _regenerator.default.wrap(function (_context25) {
7707
- while (1) switch (_context25.prev = _context25.next) {
7763
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
7764
+ var iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, timedOutError, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31;
7765
+ return _regenerator.default.wrap(function (_context26) {
7766
+ while (1) switch (_context26.prev = _context26.next) {
7708
7767
  case 0:
7709
- _context25.prev = 0;
7710
- _context25.next = 1;
7768
+ _context26.prev = 0;
7769
+ _context26.next = 1;
7711
7770
  return this.mediaProperties.waitForMediaConnectionConnected(this.correlationId);
7712
7771
  case 1:
7713
- _context25.next = 5;
7772
+ _context26.next = 5;
7714
7773
  break;
7715
7774
  case 2:
7716
- _context25.prev = 2;
7717
- _t16 = _context25["catch"](0);
7718
- iceConnected = _t16.iceConnected;
7775
+ _context26.prev = 2;
7776
+ _t17 = _context26["catch"](0);
7777
+ iceConnected = _t17.iceConnected;
7719
7778
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
7720
- _context25.next = 4;
7779
+ _context26.next = 4;
7721
7780
  break;
7722
7781
  }
7723
- _t17 = this.webex.internal.newMetrics;
7724
- _t18 = !this.turnServerUsed;
7725
- _t19 = this.addMediaData.icePhaseCallback();
7726
- _t20 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7727
- _t21 = _internalPluginMetrics.CallDiagnosticUtils;
7728
- _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';
7729
- _t23 = iceConnected;
7730
- _t24 = this.turnServerUsed;
7731
- _context25.next = 3;
7782
+ _t18 = this.webex.internal.newMetrics;
7783
+ _t19 = !this.turnServerUsed;
7784
+ _t20 = this.addMediaData.icePhaseCallback();
7785
+ _t21 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7786
+ _t22 = _internalPluginMetrics.CallDiagnosticUtils;
7787
+ _t23 = ((_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';
7788
+ _t24 = iceConnected;
7789
+ _t25 = this.turnServerUsed;
7790
+ _context26.next = 3;
7732
7791
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
7733
7792
  return false;
7734
7793
  });
7735
7794
  case 3:
7736
- _t25 = _context25.sent;
7737
- _t26 = _t21.generateClientErrorCodeForIceFailure.call(_t21, {
7738
- signalingState: _t22,
7739
- iceConnected: _t23,
7740
- turnServerUsed: _t24,
7741
- unreachable: _t25
7795
+ _t26 = _context26.sent;
7796
+ _t27 = _t22.generateClientErrorCodeForIceFailure.call(_t22, {
7797
+ signalingState: _t23,
7798
+ iceConnected: _t24,
7799
+ turnServerUsed: _t25,
7800
+ unreachable: _t26
7742
7801
  });
7743
- _t27 = _t20.getErrorPayloadForClientErrorCode.call(_t20, {
7744
- clientErrorCode: _t26
7802
+ _t28 = _t21.getErrorPayloadForClientErrorCode.call(_t21, {
7803
+ clientErrorCode: _t27
7745
7804
  });
7746
- _t28 = [_t27];
7747
- _t29 = {
7748
- canProceed: _t18,
7749
- icePhase: _t19,
7750
- errors: _t28
7751
- };
7805
+ _t29 = [_t28];
7752
7806
  _t30 = {
7807
+ canProceed: _t19,
7808
+ icePhase: _t20,
7809
+ errors: _t29
7810
+ };
7811
+ _t31 = {
7753
7812
  meetingId: this.id,
7754
- rawError: _t16
7813
+ rawError: _t17
7755
7814
  };
7756
- _t17.submitClientEvent.call(_t17, {
7815
+ _t18.submitClientEvent.call(_t18, {
7757
7816
  name: 'client.ice.end',
7758
- payload: _t29,
7759
- options: _t30
7817
+ payload: _t30,
7818
+ options: _t31
7760
7819
  });
7761
7820
  case 4:
7762
7821
  timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
7763
- timedOutError.cause = _t16;
7822
+ timedOutError.cause = _t17;
7764
7823
  throw timedOutError;
7765
7824
  case 5:
7766
7825
  case "end":
7767
- return _context25.stop();
7826
+ return _context26.stop();
7768
7827
  }
7769
- }, _callee25, this, [[0, 2]]);
7828
+ }, _callee26, this, [[0, 2]]);
7770
7829
  }));
7771
7830
  function waitForMediaConnectionConnected() {
7772
7831
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -7833,19 +7892,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7833
7892
  }, {
7834
7893
  key: "waitForRemoteSDPAnswer",
7835
7894
  value: (function () {
7836
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
7895
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
7837
7896
  var _this44 = this;
7838
7897
  var LOG_HEADER, deferSDPAnswer;
7839
- return _regenerator.default.wrap(function (_context26) {
7840
- while (1) switch (_context26.prev = _context26.next) {
7898
+ return _regenerator.default.wrap(function (_context27) {
7899
+ while (1) switch (_context27.prev = _context27.next) {
7841
7900
  case 0:
7842
7901
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
7843
7902
  if (this.deferSDPAnswer) {
7844
- _context26.next = 1;
7903
+ _context27.next = 1;
7845
7904
  break;
7846
7905
  }
7847
7906
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
7848
- return _context26.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7907
+ return _context27.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7849
7908
  case 1:
7850
7909
  deferSDPAnswer = this.deferSDPAnswer;
7851
7910
  this.sdpResponseTimer = setTimeout(function () {
@@ -7871,12 +7930,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7871
7930
  deferSDPAnswer.reject(error);
7872
7931
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
7873
7932
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
7874
- return _context26.abrupt("return", deferSDPAnswer.promise);
7933
+ return _context27.abrupt("return", deferSDPAnswer.promise);
7875
7934
  case 2:
7876
7935
  case "end":
7877
- return _context26.stop();
7936
+ return _context27.stop();
7878
7937
  }
7879
- }, _callee26, this);
7938
+ }, _callee27, this);
7880
7939
  }));
7881
7940
  function waitForRemoteSDPAnswer() {
7882
7941
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -7895,30 +7954,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7895
7954
  }, {
7896
7955
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
7897
7956
  value: (function () {
7898
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27(remoteMediaManagerConfig, bundlePolicy) {
7899
- var LOG_HEADER, _t31;
7900
- return _regenerator.default.wrap(function (_context27) {
7901
- while (1) switch (_context27.prev = _context27.next) {
7957
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy) {
7958
+ var LOG_HEADER, _t32;
7959
+ return _regenerator.default.wrap(function (_context28) {
7960
+ while (1) switch (_context28.prev = _context28.next) {
7902
7961
  case 0:
7903
7962
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
7904
- _context27.prev = 1;
7905
- _context27.next = 2;
7963
+ _context28.prev = 1;
7964
+ _context28.next = 2;
7906
7965
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
7907
7966
  case 2:
7908
- _context27.next = 4;
7967
+ _context28.next = 4;
7909
7968
  break;
7910
7969
  case 3:
7911
- _context27.prev = 3;
7912
- _t31 = _context27["catch"](1);
7913
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t31);
7914
- throw _t31;
7970
+ _context28.prev = 3;
7971
+ _t32 = _context28["catch"](1);
7972
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t32);
7973
+ throw _t32;
7915
7974
  case 4:
7916
7975
  case "end":
7917
- return _context27.stop();
7976
+ return _context28.stop();
7918
7977
  }
7919
- }, _callee27, this, [[1, 3]]);
7978
+ }, _callee28, this, [[1, 3]]);
7920
7979
  }));
7921
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x18, _x19) {
7980
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
7922
7981
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
7923
7982
  }
7924
7983
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -7936,14 +7995,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7936
7995
  }, {
7937
7996
  key: "retryWithForcedTurnDiscovery",
7938
7997
  value: (function () {
7939
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy) {
7998
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy) {
7940
7999
  var LOG_HEADER;
7941
- return _regenerator.default.wrap(function (_context28) {
7942
- while (1) switch (_context28.prev = _context28.next) {
8000
+ return _regenerator.default.wrap(function (_context29) {
8001
+ while (1) switch (_context29.prev = _context29.next) {
7943
8002
  case 0:
7944
8003
  this.addMediaData.retriedWithTurnServer = true;
7945
8004
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
7946
- _context28.next = 1;
8005
+ _context29.next = 1;
7947
8006
  return this.cleanUpBeforeRetryWithTurnServer();
7948
8007
  case 1:
7949
8008
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -7953,24 +8012,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7953
8012
  reason: 'forcingTurnTls'
7954
8013
  });
7955
8014
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
7956
- _context28.next = 2;
8015
+ _context29.next = 2;
7957
8016
  break;
7958
8017
  }
7959
8018
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
7960
- _context28.next = 2;
8019
+ _context29.next = 2;
7961
8020
  return this.join({
7962
8021
  rejoin: true
7963
8022
  });
7964
8023
  case 2:
7965
- _context28.next = 3;
8024
+ _context29.next = 3;
7966
8025
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
7967
8026
  case 3:
7968
8027
  case "end":
7969
- return _context28.stop();
8028
+ return _context29.stop();
7970
8029
  }
7971
- }, _callee28, this);
8030
+ }, _callee29, this);
7972
8031
  }));
7973
- function retryWithForcedTurnDiscovery(_x20, _x21) {
8032
+ function retryWithForcedTurnDiscovery(_x21, _x22) {
7974
8033
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
7975
8034
  }
7976
8035
  return retryWithForcedTurnDiscovery;
@@ -7990,32 +8049,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7990
8049
  }, {
7991
8050
  key: "handleWaitForMediaConnectionConnectedError",
7992
8051
  value: (function () {
7993
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(error, remoteMediaManagerConfig, bundlePolicy) {
8052
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(error, remoteMediaManagerConfig, bundlePolicy) {
7994
8053
  var LOG_HEADER;
7995
- return _regenerator.default.wrap(function (_context29) {
7996
- while (1) switch (_context29.prev = _context29.next) {
8054
+ return _regenerator.default.wrap(function (_context30) {
8055
+ while (1) switch (_context30.prev = _context30.next) {
7997
8056
  case 0:
7998
8057
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
7999
8058
  if (this.turnServerUsed) {
8000
- _context29.next = 2;
8059
+ _context30.next = 2;
8001
8060
  break;
8002
8061
  }
8003
8062
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
8004
- _context29.next = 1;
8063
+ _context30.next = 1;
8005
8064
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
8006
8065
  case 1:
8007
- _context29.next = 3;
8066
+ _context30.next = 3;
8008
8067
  break;
8009
8068
  case 2:
8010
8069
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
8011
8070
  throw new _webexErrors.AddMediaFailed(error);
8012
8071
  case 3:
8013
8072
  case "end":
8014
- return _context29.stop();
8073
+ return _context30.stop();
8015
8074
  }
8016
- }, _callee29, this);
8075
+ }, _callee30, this);
8017
8076
  }));
8018
- function handleWaitForMediaConnectionConnectedError(_x22, _x23, _x24) {
8077
+ function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
8019
8078
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
8020
8079
  }
8021
8080
  return handleWaitForMediaConnectionConnectedError;
@@ -8031,20 +8090,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8031
8090
  }, {
8032
8091
  key: "doTurnDiscovery",
8033
8092
  value: (function () {
8034
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(isReconnecting, isForced) {
8093
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(isReconnecting, isForced) {
8035
8094
  var cdl, turnDiscoveryResult;
8036
- return _regenerator.default.wrap(function (_context30) {
8037
- while (1) switch (_context30.prev = _context30.next) {
8095
+ return _regenerator.default.wrap(function (_context31) {
8096
+ while (1) switch (_context31.prev = _context31.next) {
8038
8097
  case 0:
8039
8098
  // @ts-ignore
8040
8099
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
8041
8100
  this.webex.internal.newMetrics.submitInternalEvent({
8042
8101
  name: 'internal.client.add-media.turn-discovery.start'
8043
8102
  });
8044
- _context30.next = 1;
8103
+ _context31.next = 1;
8045
8104
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
8046
8105
  case 1:
8047
- turnDiscoveryResult = _context30.sent;
8106
+ turnDiscoveryResult = _context31.sent;
8048
8107
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
8049
8108
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
8050
8109
 
@@ -8060,14 +8119,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8060
8119
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
8061
8120
  });
8062
8121
  }
8063
- return _context30.abrupt("return", turnDiscoveryResult);
8122
+ return _context31.abrupt("return", turnDiscoveryResult);
8064
8123
  case 2:
8065
8124
  case "end":
8066
- return _context30.stop();
8125
+ return _context31.stop();
8067
8126
  }
8068
- }, _callee30, this);
8127
+ }, _callee31, this);
8069
8128
  }));
8070
- function doTurnDiscovery(_x25, _x26) {
8129
+ function doTurnDiscovery(_x26, _x27) {
8071
8130
  return _doTurnDiscovery.apply(this, arguments);
8072
8131
  }
8073
8132
  return doTurnDiscovery;
@@ -8086,35 +8145,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8086
8145
  }, {
8087
8146
  key: "establishMediaConnection",
8088
8147
  value: (function () {
8089
- var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
8148
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
8090
8149
  var _this$locusMediaReque;
8091
- var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t32, _t33;
8092
- return _regenerator.default.wrap(function (_context31) {
8093
- while (1) switch (_context31.prev = _context31.next) {
8150
+ var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t33, _t34;
8151
+ return _regenerator.default.wrap(function (_context32) {
8152
+ while (1) switch (_context32.prev = _context32.next) {
8094
8153
  case 0:
8095
8154
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
8096
8155
  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
8097
8156
  if (this.isMoveToInProgress && this.turnServerUsed) {
8098
8157
  isForced = true;
8099
8158
  }
8100
- _context31.prev = 1;
8159
+ _context32.prev = 1;
8101
8160
  if (turnServerInfo) {
8102
- _context31.next = 3;
8161
+ _context32.next = 3;
8103
8162
  break;
8104
8163
  }
8105
- _context31.next = 2;
8164
+ _context32.next = 2;
8106
8165
  return this.doTurnDiscovery(isReconnecting, isForced);
8107
8166
  case 2:
8108
- _yield$this$doTurnDis = _context31.sent;
8167
+ _yield$this$doTurnDis = _context32.sent;
8109
8168
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
8110
8169
  case 3:
8111
- _context31.next = 4;
8170
+ _context32.next = 4;
8112
8171
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
8113
8172
  case 4:
8114
- mc = _context31.sent;
8173
+ mc = _context32.sent;
8115
8174
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
8116
8175
  if (!this.isMultistream) {
8117
- _context31.next = 5;
8176
+ _context32.next = 5;
8118
8177
  break;
8119
8178
  }
8120
8179
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -8122,42 +8181,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8122
8181
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
8123
8182
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
8124
8183
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
8125
- _context31.next = 5;
8184
+ _context32.next = 5;
8126
8185
  return this.remoteMediaManager.start();
8127
8186
  case 5:
8128
- _context31.next = 6;
8187
+ _context32.next = 6;
8129
8188
  return mc.initiateOffer();
8130
8189
  case 6:
8131
- _context31.next = 7;
8190
+ _context32.next = 7;
8132
8191
  return this.waitForRemoteSDPAnswer();
8133
8192
  case 7:
8134
8193
  this.handleMediaLogging(this.mediaProperties);
8135
- _context31.next = 9;
8194
+ _context32.next = 9;
8136
8195
  break;
8137
8196
  case 8:
8138
- _context31.prev = 8;
8139
- _t32 = _context31["catch"](1);
8140
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t32);
8141
- throw _t32;
8197
+ _context32.prev = 8;
8198
+ _t33 = _context32["catch"](1);
8199
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t33);
8200
+ throw _t33;
8142
8201
  case 9:
8143
- _context31.prev = 9;
8144
- _context31.next = 10;
8202
+ _context32.prev = 9;
8203
+ _context32.next = 10;
8145
8204
  return this.waitForMediaConnectionConnected();
8146
8205
  case 10:
8147
- _context31.next = 12;
8206
+ _context32.next = 12;
8148
8207
  break;
8149
8208
  case 11:
8150
- _context31.prev = 11;
8151
- _t33 = _context31["catch"](9);
8152
- _context31.next = 12;
8153
- return this.handleWaitForMediaConnectionConnectedError(_t33, remoteMediaManagerConfig, bundlePolicy);
8209
+ _context32.prev = 11;
8210
+ _t34 = _context32["catch"](9);
8211
+ _context32.next = 12;
8212
+ return this.handleWaitForMediaConnectionConnectedError(_t34, remoteMediaManagerConfig, bundlePolicy);
8154
8213
  case 12:
8155
8214
  case "end":
8156
- return _context31.stop();
8215
+ return _context32.stop();
8157
8216
  }
8158
- }, _callee31, this, [[1, 8], [9, 11]]);
8217
+ }, _callee32, this, [[1, 8], [9, 11]]);
8159
8218
  }));
8160
- function establishMediaConnection(_x27, _x28, _x29, _x30) {
8219
+ function establishMediaConnection(_x28, _x29, _x30, _x31) {
8161
8220
  return _establishMediaConnection.apply(this, arguments);
8162
8221
  }
8163
8222
  return establishMediaConnection;
@@ -8172,16 +8231,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8172
8231
  }, {
8173
8232
  key: "cleanUpOnAddMediaFailure",
8174
8233
  value: (function () {
8175
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
8234
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
8176
8235
  var _this$networkQualityM, _this$statsMonitor;
8177
- return _regenerator.default.wrap(function (_context32) {
8178
- while (1) switch (_context32.prev = _context32.next) {
8236
+ return _regenerator.default.wrap(function (_context33) {
8237
+ while (1) switch (_context33.prev = _context33.next) {
8179
8238
  case 0:
8180
8239
  if (!this.statsAnalyzer) {
8181
- _context32.next = 1;
8240
+ _context33.next = 1;
8182
8241
  break;
8183
8242
  }
8184
- _context32.next = 1;
8243
+ _context33.next = 1;
8185
8244
  return this.statsAnalyzer.stopAnalyzer();
8186
8245
  case 1:
8187
8246
  this.statsAnalyzer = null;
@@ -8192,7 +8251,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8192
8251
 
8193
8252
  // when media fails, we want to upload a webrtc dump to see whats going on
8194
8253
  // this function is async, but returns once the stats have been gathered
8195
- _context32.next = 2;
8254
+ _context33.next = 2;
8196
8255
  return this.forceSendStatsReport({
8197
8256
  callFrom: 'addMedia'
8198
8257
  });
@@ -8203,9 +8262,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8203
8262
  }
8204
8263
  case 3:
8205
8264
  case "end":
8206
- return _context32.stop();
8265
+ return _context33.stop();
8207
8266
  }
8208
- }, _callee32, this);
8267
+ }, _callee33, this);
8209
8268
  }));
8210
8269
  function cleanUpOnAddMediaFailure() {
8211
8270
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -8223,16 +8282,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8223
8282
  }, {
8224
8283
  key: "downgradeFromMultistreamToTranscoded",
8225
8284
  value: (function () {
8226
- var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
8285
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8227
8286
  var _this$networkQualityM2, _this$statsMonitor2, _this$locusMediaReque2;
8228
- return _regenerator.default.wrap(function (_context33) {
8229
- while (1) switch (_context33.prev = _context33.next) {
8287
+ return _regenerator.default.wrap(function (_context34) {
8288
+ while (1) switch (_context34.prev = _context34.next) {
8230
8289
  case 0:
8231
8290
  if (!this.statsAnalyzer) {
8232
- _context33.next = 1;
8291
+ _context34.next = 1;
8233
8292
  break;
8234
8293
  }
8235
- _context33.next = 1;
8294
+ _context34.next = 1;
8236
8295
  return this.statsAnalyzer.stopAnalyzer();
8237
8296
  case 1:
8238
8297
  this.statsAnalyzer = null;
@@ -8250,9 +8309,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8250
8309
  this.createStatsAnalyzer();
8251
8310
  case 2:
8252
8311
  case "end":
8253
- return _context33.stop();
8312
+ return _context34.stop();
8254
8313
  }
8255
- }, _callee33, this);
8314
+ }, _callee34, this);
8256
8315
  }));
8257
8316
  function downgradeFromMultistreamToTranscoded() {
8258
8317
  return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
@@ -8270,11 +8329,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8270
8329
  }, {
8271
8330
  key: "cleanUpBeforeRetryWithTurnServer",
8272
8331
  value: (function () {
8273
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8274
- return _regenerator.default.wrap(function (_context34) {
8275
- while (1) switch (_context34.prev = _context34.next) {
8332
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8333
+ return _regenerator.default.wrap(function (_context35) {
8334
+ while (1) switch (_context35.prev = _context35.next) {
8276
8335
  case 0:
8277
- _context34.next = 1;
8336
+ _context35.next = 1;
8278
8337
  return this.forceSendStatsReport({
8279
8338
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
8280
8339
  });
@@ -8294,9 +8353,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8294
8353
  }
8295
8354
  case 2:
8296
8355
  case "end":
8297
- return _context34.stop();
8356
+ return _context35.stop();
8298
8357
  }
8299
- }, _callee34, this);
8358
+ }, _callee35, this);
8300
8359
  }));
8301
8360
  function cleanUpBeforeRetryWithTurnServer() {
8302
8361
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -8306,35 +8365,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8306
8365
  }, {
8307
8366
  key: "cleanUpBeforeReconnection",
8308
8367
  value: function () {
8309
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8310
- var _t34;
8311
- return _regenerator.default.wrap(function (_context35) {
8312
- while (1) switch (_context35.prev = _context35.next) {
8368
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
8369
+ var _t35;
8370
+ return _regenerator.default.wrap(function (_context36) {
8371
+ while (1) switch (_context36.prev = _context36.next) {
8313
8372
  case 0:
8314
- _context35.prev = 0;
8315
- _context35.next = 1;
8373
+ _context36.prev = 0;
8374
+ _context36.next = 1;
8316
8375
  return this.forceSendStatsReport({
8317
8376
  callFrom: 'cleanUpBeforeReconnection'
8318
8377
  });
8319
8378
  case 1:
8320
8379
  if (!this.statsAnalyzer) {
8321
- _context35.next = 2;
8380
+ _context36.next = 2;
8322
8381
  break;
8323
8382
  }
8324
- _context35.next = 2;
8383
+ _context36.next = 2;
8325
8384
  return this.statsAnalyzer.stopAnalyzer();
8326
8385
  case 2:
8327
- _context35.next = 4;
8386
+ _context36.next = 4;
8328
8387
  break;
8329
8388
  case 3:
8330
- _context35.prev = 3;
8331
- _t34 = _context35["catch"](0);
8332
- _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t34);
8389
+ _context36.prev = 3;
8390
+ _t35 = _context36["catch"](0);
8391
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t35);
8333
8392
  case 4:
8334
8393
  case "end":
8335
- return _context35.stop();
8394
+ return _context36.stop();
8336
8395
  }
8337
- }, _callee35, this, [[0, 3]]);
8396
+ }, _callee36, this, [[0, 3]]);
8338
8397
  }));
8339
8398
  function cleanUpBeforeReconnection() {
8340
8399
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -8402,7 +8461,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8402
8461
  }, {
8403
8462
  key: "addMediaInternal",
8404
8463
  value: (function () {
8405
- var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8464
+ var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8406
8465
  var options,
8407
8466
  LOG_HEADER,
8408
8467
  localStreams,
@@ -8464,26 +8523,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8464
8523
  _selectedCandidatePairChanges,
8465
8524
  _numTransports,
8466
8525
  _iceCandidateErrors,
8467
- _args36 = arguments,
8468
- _t35,
8469
- _t36;
8470
- return _regenerator.default.wrap(function (_context36) {
8471
- while (1) switch (_context36.prev = _context36.next) {
8526
+ _args37 = arguments,
8527
+ _t36,
8528
+ _t37;
8529
+ return _regenerator.default.wrap(function (_context37) {
8530
+ while (1) switch (_context37.prev = _context37.next) {
8472
8531
  case 0:
8473
- options = _args36.length > 3 && _args36[3] !== undefined ? _args36[3] : {};
8532
+ options = _args37.length > 3 && _args37[3] !== undefined ? _args37[3] : {};
8474
8533
  this.addMediaData.retriedWithTurnServer = false;
8475
8534
  this.addMediaData.icePhaseCallback = icePhaseCallback;
8476
8535
  this.hasMediaConnectionConnectedAtLeastOnce = false;
8477
8536
  LOG_HEADER = 'Meeting:index#addMedia -->';
8478
8537
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
8479
8538
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
8480
- _context36.next = 1;
8539
+ _context37.next = 1;
8481
8540
  break;
8482
8541
  }
8483
8542
  throw new _webexErrors.MeetingNotActiveError();
8484
8543
  case 1:
8485
8544
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
8486
- _context36.next = 2;
8545
+ _context37.next = 2;
8487
8546
  break;
8488
8547
  }
8489
8548
  throw new _webexErrors.UserNotJoinedError();
@@ -8500,7 +8559,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8500
8559
  ipver = _util2.default.getIpVersion(this.webex); // used just for metrics
8501
8560
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
8502
8561
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
8503
- _context36.next = 3;
8562
+ _context37.next = 3;
8504
8563
  break;
8505
8564
  }
8506
8565
  throw new _webexErrors.UserInLobbyError();
@@ -8544,62 +8603,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8544
8603
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
8545
8604
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
8546
8605
  this.brbState = (0, _brbState.createBrbState)(this, false);
8547
- _context36.prev = 4;
8606
+ _context37.prev = 4;
8548
8607
  if (!(allowPublishMediaInLobby || !this.isUserUnadmitted)) {
8549
- _context36.next = 5;
8608
+ _context37.next = 5;
8550
8609
  break;
8551
8610
  }
8552
- _context36.next = 5;
8611
+ _context37.next = 5;
8553
8612
  return this.setUpLocalStreamReferences(localStreams);
8554
8613
  case 5:
8555
8614
  this.setMercuryListener();
8556
8615
  this.createStatsAnalyzer();
8557
- _context36.prev = 6;
8558
- _context36.next = 7;
8616
+ _context37.prev = 6;
8617
+ _context37.next = 7;
8559
8618
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
8560
8619
  case 7:
8561
- _context36.next = 12;
8620
+ _context37.next = 12;
8562
8621
  break;
8563
8622
  case 8:
8564
- _context36.prev = 8;
8565
- _t35 = _context36["catch"](6);
8566
- if (!(_t35 instanceof _multistreamNotSupportedError.default)) {
8567
- _context36.next = 11;
8623
+ _context37.prev = 8;
8624
+ _t36 = _context37["catch"](6);
8625
+ if (!(_t36 instanceof _multistreamNotSupportedError.default)) {
8626
+ _context37.next = 11;
8568
8627
  break;
8569
8628
  }
8570
8629
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
8571
- _context36.next = 9;
8630
+ _context37.next = 9;
8572
8631
  return this.downgradeFromMultistreamToTranscoded();
8573
8632
  case 9:
8574
- _context36.next = 10;
8633
+ _context37.next = 10;
8575
8634
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
8576
8635
  case 10:
8577
- _context36.next = 12;
8636
+ _context37.next = 12;
8578
8637
  break;
8579
8638
  case 11:
8580
- throw _t35;
8639
+ throw _t36;
8581
8640
  case 12:
8582
8641
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
8583
8642
  if (!this.mediaProperties.hasLocalShareStream()) {
8584
- _context36.next = 13;
8643
+ _context37.next = 13;
8585
8644
  break;
8586
8645
  }
8587
- _context36.next = 13;
8646
+ _context37.next = 13;
8588
8647
  return this.enqueueScreenShareFloorRequest();
8589
8648
  case 13:
8590
- _context36.next = 14;
8649
+ _context37.next = 14;
8591
8650
  return this.mediaProperties.getCurrentConnectionInfo();
8592
8651
  case 14:
8593
- _yield$this$mediaProp = _context36.sent;
8652
+ _yield$this$mediaProp = _context37.sent;
8594
8653
  connectionType = _yield$this$mediaProp.connectionType;
8595
8654
  ipVersion = _yield$this$mediaProp.ipVersion;
8596
8655
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
8597
8656
  numTransports = _yield$this$mediaProp.numTransports;
8598
8657
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8599
- _context36.next = 15;
8658
+ _context37.next = 15;
8600
8659
  return this.getMediaReachabilityMetricFields();
8601
8660
  case 15:
8602
- reachabilityMetrics = _context36.sent;
8661
+ reachabilityMetrics = _context37.sent;
8603
8662
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
8604
8663
  correlation_id: this.correlationId,
8605
8664
  locus_id: this.locusUrl.split('/').pop(),
@@ -8629,31 +8688,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8629
8688
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
8630
8689
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
8631
8690
  this.startPeriodicLogUpload();
8632
- _context36.next = 20;
8691
+ _context37.next = 20;
8633
8692
  break;
8634
8693
  case 16:
8635
- _context36.prev = 16;
8636
- _t36 = _context36["catch"](4);
8637
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t36);
8694
+ _context37.prev = 16;
8695
+ _t37 = _context37["catch"](4);
8696
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t37);
8638
8697
 
8639
8698
  // @ts-ignore
8640
- _context36.next = 17;
8699
+ _context37.next = 17;
8641
8700
  return this.getMediaReachabilityMetricFields();
8642
8701
  case 17:
8643
- _reachabilityMetrics = _context36.sent;
8644
- _context36.next = 18;
8702
+ _reachabilityMetrics = _context37.sent;
8703
+ _context37.next = 18;
8645
8704
  return this.mediaProperties.getCurrentConnectionInfo();
8646
8705
  case 18:
8647
- _yield$this$mediaProp2 = _context36.sent;
8706
+ _yield$this$mediaProp2 = _context37.sent;
8648
8707
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
8649
8708
  _numTransports = _yield$this$mediaProp2.numTransports;
8650
8709
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8651
8710
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
8652
8711
  correlation_id: this.correlationId,
8653
8712
  locus_id: this.locusUrl.split('/').pop(),
8654
- reason: _t36.message,
8655
- stack: _t36.stack,
8656
- code: _t36.code,
8713
+ reason: _t37.message,
8714
+ stack: _t37.stack,
8715
+ code: _t37.code,
8657
8716
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
8658
8717
  numTransports: _numTransports,
8659
8718
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -8668,7 +8727,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8668
8727
  iceCandidatesCount: this.iceCandidatesCount,
8669
8728
  ipver: ipver
8670
8729
  }));
8671
- _context36.next = 19;
8730
+ _context37.next = 19;
8672
8731
  return this.cleanUpOnAddMediaFailure();
8673
8732
  case 19:
8674
8733
  // Upload logs on error while adding media
@@ -8676,23 +8735,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8676
8735
  file: 'meeting/index',
8677
8736
  function: 'addMedia'
8678
8737
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
8679
- if (_t36 instanceof _internalMediaCore.Errors.SdpError) {
8738
+ if (_t37 instanceof _internalMediaCore.Errors.SdpError) {
8680
8739
  this.leave({
8681
8740
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
8682
8741
  });
8683
8742
  }
8684
- throw _t36;
8743
+ throw _t37;
8685
8744
  case 20:
8686
- _context36.prev = 20;
8745
+ _context37.prev = 20;
8687
8746
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
8688
- return _context36.finish(20);
8747
+ return _context37.finish(20);
8689
8748
  case 21:
8690
8749
  case "end":
8691
- return _context36.stop();
8750
+ return _context37.stop();
8692
8751
  }
8693
- }, _callee36, this, [[4, 16, 20, 21], [6, 8]]);
8752
+ }, _callee37, this, [[4, 16, 20, 21], [6, 8]]);
8694
8753
  }));
8695
- function addMediaInternal(_x31, _x32, _x33) {
8754
+ function addMediaInternal(_x32, _x33, _x34) {
8696
8755
  return _addMediaInternal.apply(this, arguments);
8697
8756
  }
8698
8757
  return addMediaInternal;
@@ -8758,35 +8817,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8758
8817
  * @memberof Meeting
8759
8818
  */
8760
8819
  function () {
8761
- var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(options) {
8820
+ var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(options) {
8762
8821
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
8763
- return _regenerator.default.wrap(function (_context37) {
8764
- while (1) switch (_context37.prev = _context37.next) {
8822
+ return _regenerator.default.wrap(function (_context38) {
8823
+ while (1) switch (_context38.prev = _context38.next) {
8765
8824
  case 0:
8766
8825
  this.checkMediaConnection();
8767
8826
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
8768
8827
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
8769
8828
  if (this.canUpdateMedia()) {
8770
- _context37.next = 1;
8829
+ _context38.next = 1;
8771
8830
  break;
8772
8831
  }
8773
- return _context37.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8832
+ return _context38.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8774
8833
  case 1:
8775
8834
  if (!this.isMultistream) {
8776
- _context37.next = 3;
8835
+ _context38.next = 3;
8777
8836
  break;
8778
8837
  }
8779
8838
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
8780
- _context37.next = 2;
8839
+ _context38.next = 2;
8781
8840
  break;
8782
8841
  }
8783
8842
  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');
8784
8843
  case 2:
8785
- _context37.next = 4;
8844
+ _context38.next = 4;
8786
8845
  break;
8787
8846
  case 3:
8788
8847
  if (!(shareAudioEnabled !== undefined)) {
8789
- _context37.next = 4;
8848
+ _context38.next = 4;
8790
8849
  break;
8791
8850
  }
8792
8851
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -8811,20 +8870,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8811
8870
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
8812
8871
  }
8813
8872
  if (this.isMultistream) {
8814
- _context37.next = 5;
8873
+ _context38.next = 5;
8815
8874
  break;
8816
8875
  }
8817
- _context37.next = 5;
8876
+ _context38.next = 5;
8818
8877
  return this.updateTranscodedMediaConnection();
8819
8878
  case 5:
8820
- return _context37.abrupt("return", undefined);
8879
+ return _context38.abrupt("return", undefined);
8821
8880
  case 6:
8822
8881
  case "end":
8823
- return _context37.stop();
8882
+ return _context38.stop();
8824
8883
  }
8825
- }, _callee37, this);
8884
+ }, _callee38, this);
8826
8885
  }));
8827
- function updateMedia(_x34) {
8886
+ function updateMedia(_x35) {
8828
8887
  return _updateMedia.apply(this, arguments);
8829
8888
  }
8830
8889
  return updateMedia;
@@ -8966,14 +9025,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8966
9025
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
8967
9026
  this.stopListeningForMeetingEvents();
8968
9027
  return _util2.default.leaveMeeting(this, options).then(/*#__PURE__*/function () {
8969
- var _ref41 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(leave) {
8970
- return _regenerator.default.wrap(function (_context38) {
8971
- while (1) switch (_context38.prev = _context38.next) {
9028
+ var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(leave) {
9029
+ return _regenerator.default.wrap(function (_context39) {
9030
+ while (1) switch (_context39.prev = _context39.next) {
8972
9031
  case 0:
8973
9032
  // CA team recommends submitting this *after* locus /leave
8974
9033
  submitLeaveMetric();
8975
9034
  _this49.meetingFiniteStateMachine.leave();
8976
- _context38.next = 1;
9035
+ _context39.next = 1;
8977
9036
  return _this49.clearMeetingData();
8978
9037
  case 1:
8979
9038
  // upload logs on leave irrespective of meeting delete
@@ -8994,15 +9053,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8994
9053
  });
8995
9054
  }
8996
9055
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
8997
- return _context38.abrupt("return", leave);
9056
+ return _context39.abrupt("return", leave);
8998
9057
  case 2:
8999
9058
  case "end":
9000
- return _context38.stop();
9059
+ return _context39.stop();
9001
9060
  }
9002
- }, _callee38);
9061
+ }, _callee39);
9003
9062
  }));
9004
- return function (_x35) {
9005
- return _ref41.apply(this, arguments);
9063
+ return function (_x36) {
9064
+ return _ref42.apply(this, arguments);
9006
9065
  };
9007
9066
  }()).catch(function (error) {
9008
9067
  // CA team recommends submitting this *after* locus /leave
@@ -9668,12 +9727,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9668
9727
  });
9669
9728
  this.stopListeningForMeetingEvents();
9670
9729
  return _util2.default.endMeetingForAll(this).then(/*#__PURE__*/function () {
9671
- var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(end) {
9672
- return _regenerator.default.wrap(function (_context39) {
9673
- while (1) switch (_context39.prev = _context39.next) {
9730
+ var _ref43 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(end) {
9731
+ return _regenerator.default.wrap(function (_context40) {
9732
+ while (1) switch (_context40.prev = _context40.next) {
9674
9733
  case 0:
9675
9734
  _this56.meetingFiniteStateMachine.end();
9676
- _context39.next = 1;
9735
+ _context40.next = 1;
9677
9736
  return _this56.clearMeetingData();
9678
9737
  case 1:
9679
9738
  // upload logs on leave irrespective of meeting delete
@@ -9681,15 +9740,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9681
9740
  file: 'meeting/index',
9682
9741
  function: 'endMeetingForAll'
9683
9742
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
9684
- return _context39.abrupt("return", end);
9743
+ return _context40.abrupt("return", end);
9685
9744
  case 2:
9686
9745
  case "end":
9687
- return _context39.stop();
9746
+ return _context40.stop();
9688
9747
  }
9689
- }, _callee39);
9748
+ }, _callee40);
9690
9749
  }));
9691
- return function (_x36) {
9692
- return _ref42.apply(this, arguments);
9750
+ return function (_x37) {
9751
+ return _ref43.apply(this, arguments);
9693
9752
  };
9694
9753
  }()).catch(function (error) {
9695
9754
  _this56.meetingFiniteStateMachine.fail(error);
@@ -9752,12 +9811,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9752
9811
  */
9753
9812
  }, {
9754
9813
  key: "extendMeeting",
9755
- value: function extendMeeting(_ref43) {
9756
- var meetingPolicyUrl = _ref43.meetingPolicyUrl,
9757
- meetingInstanceId = _ref43.meetingInstanceId,
9758
- participantId = _ref43.participantId,
9759
- _ref43$extensionMinut = _ref43.extensionMinutes,
9760
- extensionMinutes = _ref43$extensionMinut === void 0 ? 30 : _ref43$extensionMinut;
9814
+ value: function extendMeeting(_ref44) {
9815
+ var meetingPolicyUrl = _ref44.meetingPolicyUrl,
9816
+ meetingInstanceId = _ref44.meetingInstanceId,
9817
+ participantId = _ref44.participantId,
9818
+ _ref44$extensionMinut = _ref44.extensionMinutes,
9819
+ extensionMinutes = _ref44$extensionMinut === void 0 ? 30 : _ref44$extensionMinut;
9761
9820
  if (!meetingInstanceId || !participantId) {
9762
9821
  return _promise.default.reject(new Error('Missing meetingInstanceId or participantId'));
9763
9822
  }
@@ -9838,39 +9897,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9838
9897
  }, {
9839
9898
  key: "enableMusicMode",
9840
9899
  value: (function () {
9841
- var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(shouldEnableMusicMode) {
9842
- return _regenerator.default.wrap(function (_context40) {
9843
- while (1) switch (_context40.prev = _context40.next) {
9900
+ var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(shouldEnableMusicMode) {
9901
+ return _regenerator.default.wrap(function (_context41) {
9902
+ while (1) switch (_context41.prev = _context41.next) {
9844
9903
  case 0:
9845
9904
  this.checkMediaConnection();
9846
9905
  if (this.isMultistream) {
9847
- _context40.next = 1;
9906
+ _context41.next = 1;
9848
9907
  break;
9849
9908
  }
9850
9909
  throw new Error('enableMusicMode() only supported with multistream');
9851
9910
  case 1:
9852
9911
  if (!shouldEnableMusicMode) {
9853
- _context40.next = 3;
9912
+ _context41.next = 3;
9854
9913
  break;
9855
9914
  }
9856
- _context40.next = 2;
9915
+ _context41.next = 2;
9857
9916
  return this.sendSlotManager.setCustomCodecParameters(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, {
9858
9917
  maxaveragebitrate: '64000',
9859
9918
  maxplaybackrate: '48000'
9860
9919
  });
9861
9920
  case 2:
9862
- _context40.next = 4;
9921
+ _context41.next = 4;
9863
9922
  break;
9864
9923
  case 3:
9865
- _context40.next = 4;
9924
+ _context41.next = 4;
9866
9925
  return this.sendSlotManager.markCustomCodecParametersForDeletion(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, ['maxaveragebitrate', 'maxplaybackrate']);
9867
9926
  case 4:
9868
9927
  case "end":
9869
- return _context40.stop();
9928
+ return _context41.stop();
9870
9929
  }
9871
- }, _callee40, this);
9930
+ }, _callee41, this);
9872
9931
  }));
9873
- function enableMusicMode(_x37) {
9932
+ function enableMusicMode(_x38) {
9874
9933
  return _enableMusicMode.apply(this, arguments);
9875
9934
  }
9876
9935
  return enableMusicMode;
@@ -9961,25 +10020,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9961
10020
  }, {
9962
10021
  key: "publishStream",
9963
10022
  value: (function () {
9964
- var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(mediaType, stream) {
9965
- return _regenerator.default.wrap(function (_context41) {
9966
- while (1) switch (_context41.prev = _context41.next) {
10023
+ var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(mediaType, stream) {
10024
+ return _regenerator.default.wrap(function (_context42) {
10025
+ while (1) switch (_context42.prev = _context42.next) {
9967
10026
  case 0:
9968
10027
  if (stream) {
9969
- _context41.next = 1;
10028
+ _context42.next = 1;
9970
10029
  break;
9971
10030
  }
9972
- return _context41.abrupt("return");
10031
+ return _context42.abrupt("return");
9973
10032
  case 1:
9974
10033
  if (!this.mediaProperties.webrtcMediaConnection) {
9975
- _context41.next = 3;
10034
+ _context42.next = 3;
9976
10035
  break;
9977
10036
  }
9978
10037
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
9979
- _context41.next = 2;
10038
+ _context42.next = 2;
9980
10039
  break;
9981
10040
  }
9982
- _context41.next = 2;
10041
+ _context42.next = 2;
9983
10042
  return this.sendSlotManager.publishStream(mediaType, stream);
9984
10043
  case 2:
9985
10044
  this.emitPublishStateChangeEvent({
@@ -9990,11 +10049,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9990
10049
  });
9991
10050
  case 3:
9992
10051
  case "end":
9993
- return _context41.stop();
10052
+ return _context42.stop();
9994
10053
  }
9995
- }, _callee41, this);
10054
+ }, _callee42, this);
9996
10055
  }));
9997
- function publishStream(_x38, _x39) {
10056
+ function publishStream(_x39, _x40) {
9998
10057
  return _publishStream.apply(this, arguments);
9999
10058
  }
10000
10059
  return publishStream;
@@ -10010,21 +10069,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10010
10069
  }, {
10011
10070
  key: "unpublishStream",
10012
10071
  value: (function () {
10013
- var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(mediaType, stream) {
10014
- return _regenerator.default.wrap(function (_context42) {
10015
- while (1) switch (_context42.prev = _context42.next) {
10072
+ var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(mediaType, stream) {
10073
+ return _regenerator.default.wrap(function (_context43) {
10074
+ while (1) switch (_context43.prev = _context43.next) {
10016
10075
  case 0:
10017
10076
  if (stream) {
10018
- _context42.next = 1;
10077
+ _context43.next = 1;
10019
10078
  break;
10020
10079
  }
10021
- return _context42.abrupt("return");
10080
+ return _context43.abrupt("return");
10022
10081
  case 1:
10023
10082
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
10024
- _context42.next = 2;
10083
+ _context43.next = 2;
10025
10084
  break;
10026
10085
  }
10027
- _context42.next = 2;
10086
+ _context43.next = 2;
10028
10087
  return this.sendSlotManager.unpublishStream(mediaType);
10029
10088
  case 2:
10030
10089
  this.emitPublishStateChangeEvent({
@@ -10035,11 +10094,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10035
10094
  });
10036
10095
  case 3:
10037
10096
  case "end":
10038
- return _context42.stop();
10097
+ return _context43.stop();
10039
10098
  }
10040
- }, _callee42, this);
10099
+ }, _callee43, this);
10041
10100
  }));
10042
- function unpublishStream(_x40, _x41) {
10101
+ function unpublishStream(_x41, _x42) {
10043
10102
  return _unpublishStream.apply(this, arguments);
10044
10103
  }
10045
10104
  return unpublishStream;
@@ -10054,19 +10113,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10054
10113
  }, {
10055
10114
  key: "publishStreams",
10056
10115
  value: (function () {
10057
- var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(streams) {
10116
+ var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(streams) {
10058
10117
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
10059
10118
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
10060
- return _regenerator.default.wrap(function (_context43) {
10061
- while (1) switch (_context43.prev = _context43.next) {
10119
+ return _regenerator.default.wrap(function (_context44) {
10120
+ while (1) switch (_context44.prev = _context44.next) {
10062
10121
  case 0:
10063
10122
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
10064
10123
  this.checkMediaConnection();
10065
10124
  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))) {
10066
- _context43.next = 1;
10125
+ _context44.next = 1;
10067
10126
  break;
10068
10127
  }
10069
- return _context43.abrupt("return");
10128
+ return _context44.abrupt("return");
10070
10129
  case 1:
10071
10130
  streamChecks = [{
10072
10131
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -10084,62 +10143,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10084
10143
  _i = 0, _streamChecks = streamChecks;
10085
10144
  case 2:
10086
10145
  if (!(_i < _streamChecks.length)) {
10087
- _context43.next = 4;
10146
+ _context44.next = 4;
10088
10147
  break;
10089
10148
  }
10090
10149
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
10091
10150
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
10092
- _context43.next = 3;
10151
+ _context44.next = 3;
10093
10152
  break;
10094
10153
  }
10095
10154
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
10096
10155
  case 3:
10097
10156
  _i++;
10098
- _context43.next = 2;
10157
+ _context44.next = 2;
10099
10158
  break;
10100
10159
  case 4:
10101
10160
  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
10102
10161
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
10103
- _context43.next = 6;
10162
+ _context44.next = 6;
10104
10163
  break;
10105
10164
  }
10106
- _context43.next = 5;
10165
+ _context44.next = 5;
10107
10166
  return this.setLocalShareAudioStream(streams.screenShare.audio);
10108
10167
  case 5:
10109
10168
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
10110
10169
  case 6:
10111
10170
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
10112
- _context43.next = 8;
10171
+ _context44.next = 8;
10113
10172
  break;
10114
10173
  }
10115
- _context43.next = 7;
10174
+ _context44.next = 7;
10116
10175
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
10117
10176
  case 7:
10118
10177
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
10119
10178
  case 8:
10120
10179
  if (!streams.microphone) {
10121
- _context43.next = 9;
10180
+ _context44.next = 9;
10122
10181
  break;
10123
10182
  }
10124
- _context43.next = 9;
10183
+ _context44.next = 9;
10125
10184
  return this.setLocalAudioStream(streams.microphone);
10126
10185
  case 9:
10127
10186
  if (!streams.camera) {
10128
- _context43.next = 10;
10187
+ _context44.next = 10;
10129
10188
  break;
10130
10189
  }
10131
- _context43.next = 10;
10190
+ _context44.next = 10;
10132
10191
  return this.setLocalVideoStream(streams.camera);
10133
10192
  case 10:
10134
10193
  if (this.isMultistream) {
10135
- _context43.next = 11;
10194
+ _context44.next = 11;
10136
10195
  break;
10137
10196
  }
10138
- _context43.next = 11;
10197
+ _context44.next = 11;
10139
10198
  return this.updateTranscodedMediaConnection();
10140
10199
  case 11:
10141
10200
  if (!floorRequestNeeded) {
10142
- _context43.next = 12;
10201
+ _context44.next = 12;
10143
10202
  break;
10144
10203
  }
10145
10204
  this.localShareInstanceId = _uuid.default.v4();
@@ -10170,15 +10229,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10170
10229
  // we're sending the http request to Locus to request the screen share floor
10171
10230
  // only after the SDP update, because that's how it's always been done for transcoded meetings
10172
10231
  // and also if sharing from the start, we need confluence to have been created
10173
- _context43.next = 12;
10232
+ _context44.next = 12;
10174
10233
  return this.enqueueScreenShareFloorRequest();
10175
10234
  case 12:
10176
10235
  case "end":
10177
- return _context43.stop();
10236
+ return _context44.stop();
10178
10237
  }
10179
- }, _callee43, this);
10238
+ }, _callee44, this);
10180
10239
  }));
10181
- function publishStreams(_x42) {
10240
+ function publishStreams(_x43) {
10182
10241
  return _publishStreams.apply(this, arguments);
10183
10242
  }
10184
10243
  return publishStreams;
@@ -10193,10 +10252,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10193
10252
  }, {
10194
10253
  key: "unpublishStreams",
10195
10254
  value: (function () {
10196
- var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(streams) {
10255
+ var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45(streams) {
10197
10256
  var promises, _iterator2, _step2, stream;
10198
- return _regenerator.default.wrap(function (_context44) {
10199
- while (1) switch (_context44.prev = _context44.next) {
10257
+ return _regenerator.default.wrap(function (_context45) {
10258
+ while (1) switch (_context45.prev = _context45.next) {
10200
10259
  case 0:
10201
10260
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
10202
10261
  this.checkMediaConnection();
@@ -10228,7 +10287,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10228
10287
  if (!this.isMultistream) {
10229
10288
  promises.push(this.updateTranscodedMediaConnection());
10230
10289
  }
10231
- _context44.next = 1;
10290
+ _context45.next = 1;
10232
10291
  return _promise.default.all(promises);
10233
10292
  case 1:
10234
10293
  // we're allowing for the SDK to support just audio share as well
@@ -10249,11 +10308,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10249
10308
  }
10250
10309
  case 2:
10251
10310
  case "end":
10252
- return _context44.stop();
10311
+ return _context45.stop();
10253
10312
  }
10254
- }, _callee44, this);
10313
+ }, _callee45, this);
10255
10314
  }));
10256
- function unpublishStreams(_x43) {
10315
+ function unpublishStreams(_x44) {
10257
10316
  return _unpublishStreams.apply(this, arguments);
10258
10317
  }
10259
10318
  return unpublishStreams;
@@ -10319,16 +10378,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10319
10378
  }, {
10320
10379
  key: "getMediaReachabilityMetricFields",
10321
10380
  value: (function () {
10322
- var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
10381
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
10323
10382
  var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
10324
10383
  var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
10325
- return _regenerator.default.wrap(function (_context45) {
10326
- while (1) switch (_context45.prev = _context45.next) {
10384
+ return _regenerator.default.wrap(function (_context46) {
10385
+ while (1) switch (_context46.prev = _context46.next) {
10327
10386
  case 0:
10328
- _context45.next = 1;
10387
+ _context46.next = 1;
10329
10388
  return this.webex.meetings.reachability.getReachabilityMetrics();
10330
10389
  case 1:
10331
- reachabilityMetrics = _context45.sent;
10390
+ reachabilityMetrics = _context46.sent;
10332
10391
  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'];
10333
10392
  totalSuccessCases = successKeys.reduce(function (total, key) {
10334
10393
  var value = reachabilityMetrics[key];
@@ -10345,16 +10404,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10345
10404
  this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
10346
10405
  }
10347
10406
  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;
10348
- return _context45.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10407
+ return _context46.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10349
10408
  subnet_reachable: isSubnetReachable,
10350
10409
  selected_cluster: selectedCluster,
10351
10410
  selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
10352
10411
  }));
10353
10412
  case 2:
10354
10413
  case "end":
10355
- return _context45.stop();
10414
+ return _context46.stop();
10356
10415
  }
10357
- }, _callee45, this);
10416
+ }, _callee46, this);
10358
10417
  }));
10359
10418
  function getMediaReachabilityMetricFields() {
10360
10419
  return _getMediaReachabilityMetricFields.apply(this, arguments);
@@ -10371,17 +10430,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10371
10430
  }, {
10372
10431
  key: "setStage",
10373
10432
  value: function setStage() {
10374
- var _ref44 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10375
- _ref44$activeSpeakerP = _ref44.activeSpeakerProportion,
10376
- activeSpeakerProportion = _ref44$activeSpeakerP === void 0 ? 0.5 : _ref44$activeSpeakerP,
10377
- customBackground = _ref44.customBackground,
10378
- customLogo = _ref44.customLogo,
10379
- customNameLabel = _ref44.customNameLabel,
10380
- importantParticipants = _ref44.importantParticipants,
10381
- _ref44$lockAttendeeVi = _ref44.lockAttendeeViewOnStage,
10382
- lockAttendeeViewOnStage = _ref44$lockAttendeeVi === void 0 ? false : _ref44$lockAttendeeVi,
10383
- _ref44$showActiveSpea = _ref44.showActiveSpeaker,
10384
- showActiveSpeaker = _ref44$showActiveSpea === void 0 ? false : _ref44$showActiveSpea;
10433
+ var _ref45 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10434
+ _ref45$activeSpeakerP = _ref45.activeSpeakerProportion,
10435
+ activeSpeakerProportion = _ref45$activeSpeakerP === void 0 ? 0.5 : _ref45$activeSpeakerP,
10436
+ customBackground = _ref45.customBackground,
10437
+ customLogo = _ref45.customLogo,
10438
+ customNameLabel = _ref45.customNameLabel,
10439
+ importantParticipants = _ref45.importantParticipants,
10440
+ _ref45$lockAttendeeVi = _ref45.lockAttendeeViewOnStage,
10441
+ lockAttendeeViewOnStage = _ref45$lockAttendeeVi === void 0 ? false : _ref45$lockAttendeeVi,
10442
+ _ref45$showActiveSpea = _ref45.showActiveSpeaker,
10443
+ showActiveSpeaker = _ref45$showActiveSpea === void 0 ? false : _ref45$showActiveSpea;
10385
10444
  var videoLayout = {
10386
10445
  overrideDefault: true,
10387
10446
  lockAttendeeViewOnStageOnly: lockAttendeeViewOnStage,
@@ -10485,41 +10544,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10485
10544
  }, {
10486
10545
  key: "refreshDataChannelToken",
10487
10546
  value: (function () {
10488
- var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
10489
- var isPracticeSession, dataChannelTokenType, res, msg, _t37;
10490
- return _regenerator.default.wrap(function (_context46) {
10491
- while (1) switch (_context46.prev = _context46.next) {
10547
+ var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47() {
10548
+ var isPracticeSession, dataChannelTokenType, res, msg, _t38;
10549
+ return _regenerator.default.wrap(function (_context47) {
10550
+ while (1) switch (_context47.prev = _context47.next) {
10492
10551
  case 0:
10493
10552
  isPracticeSession = this.webinar.isJoinPracticeSessionDataChannel();
10494
10553
  dataChannelTokenType = this.getDataChannelTokenType();
10495
- _context46.prev = 1;
10496
- _context46.next = 2;
10554
+ _context47.prev = 1;
10555
+ _context47.next = 2;
10497
10556
  return this.meetingRequest.fetchDatachannelToken({
10498
10557
  locusUrl: this.locusUrl,
10499
10558
  requestingParticipantId: this.members.selfId,
10500
10559
  isPracticeSession: isPracticeSession
10501
10560
  });
10502
10561
  case 2:
10503
- res = _context46.sent;
10504
- return _context46.abrupt("return", {
10562
+ res = _context47.sent;
10563
+ return _context47.abrupt("return", {
10505
10564
  body: {
10506
10565
  datachannelToken: res.body.datachannelToken,
10507
10566
  dataChannelTokenType: dataChannelTokenType
10508
10567
  }
10509
10568
  });
10510
10569
  case 3:
10511
- _context46.prev = 3;
10512
- _t37 = _context46["catch"](1);
10513
- msg = (_t37 === null || _t37 === void 0 ? void 0 : _t37.message) || String(_t37);
10570
+ _context47.prev = 3;
10571
+ _t38 = _context47["catch"](1);
10572
+ msg = (_t38 === null || _t38 === void 0 ? void 0 : _t38.message) || String(_t38);
10514
10573
  _loggerProxy.default.logger.warn("Meeting:index#refreshDataChannelToken --> DataChannel token refresh failed (likely locus changed or participant left): ".concat(msg), {
10515
- statusCode: _t37 === null || _t37 === void 0 ? void 0 : _t37.statusCode
10574
+ statusCode: _t38 === null || _t38 === void 0 ? void 0 : _t38.statusCode
10516
10575
  });
10517
- return _context46.abrupt("return", null);
10576
+ return _context47.abrupt("return", null);
10518
10577
  case 4:
10519
10578
  case "end":
10520
- return _context46.stop();
10579
+ return _context47.stop();
10521
10580
  }
10522
- }, _callee46, this, [[1, 3]]);
10581
+ }, _callee47, this, [[1, 3]]);
10523
10582
  }));
10524
10583
  function refreshDataChannelToken() {
10525
10584
  return _refreshDataChannelToken.apply(this, arguments);