@webex/plugin-meetings 3.12.0-auth-prejoin-fetch.1 → 3.12.0-llmrefactor.10

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.
Files changed (63) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/annotation/index.js +53 -17
  3. package/dist/annotation/index.js.map +1 -1
  4. package/dist/breakouts/breakout.js +1 -1
  5. package/dist/breakouts/index.js +35 -9
  6. package/dist/breakouts/index.js.map +1 -1
  7. package/dist/hashTree/hashTreeParser.js +101 -48
  8. package/dist/hashTree/hashTreeParser.js.map +1 -1
  9. package/dist/interceptors/dataChannelAuthToken.js +41 -59
  10. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  11. package/dist/interpretation/index.js +1 -1
  12. package/dist/interpretation/siLanguage.js +1 -1
  13. package/dist/locus-info/index.js +27 -2
  14. package/dist/locus-info/index.js.map +1 -1
  15. package/dist/locus-info/types.js +2 -1
  16. package/dist/locus-info/types.js.map +1 -1
  17. package/dist/meeting/index.js +913 -921
  18. package/dist/meeting/index.js.map +1 -1
  19. package/dist/meeting/util.js +5 -1
  20. package/dist/meeting/util.js.map +1 -1
  21. package/dist/meeting/voicea-meeting.js +2 -1
  22. package/dist/meeting/voicea-meeting.js.map +1 -1
  23. package/dist/meeting-info/meeting-info-v2.js +36 -92
  24. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  25. package/dist/meetings/index.js +33 -93
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/meetings/meetings.types.js.map +1 -1
  28. package/dist/types/annotation/index.d.ts +19 -0
  29. package/dist/types/hashTree/hashTreeParser.d.ts +12 -0
  30. package/dist/types/locus-info/index.d.ts +6 -0
  31. package/dist/types/locus-info/types.d.ts +1 -0
  32. package/dist/types/meeting/index.d.ts +47 -20
  33. package/dist/types/meeting/util.d.ts +3 -1
  34. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -24
  35. package/dist/types/meetings/index.d.ts +2 -13
  36. package/dist/types/meetings/meetings.types.d.ts +1 -15
  37. package/dist/webinar/index.js +298 -255
  38. package/dist/webinar/index.js.map +1 -1
  39. package/package.json +21 -21
  40. package/src/annotation/index.ts +55 -25
  41. package/src/breakouts/index.ts +33 -11
  42. package/src/hashTree/hashTreeParser.ts +67 -3
  43. package/src/interceptors/dataChannelAuthToken.ts +48 -77
  44. package/src/locus-info/index.ts +20 -0
  45. package/src/locus-info/types.ts +1 -0
  46. package/src/meeting/index.ts +318 -332
  47. package/src/meeting/util.ts +2 -2
  48. package/src/meeting/voicea-meeting.ts +1 -1
  49. package/src/meeting-info/meeting-info-v2.ts +18 -74
  50. package/src/meetings/index.ts +6 -70
  51. package/src/meetings/meetings.types.ts +1 -17
  52. package/src/webinar/index.ts +168 -188
  53. package/test/unit/spec/annotation/index.ts +214 -182
  54. package/test/unit/spec/breakouts/index.ts +126 -25
  55. package/test/unit/spec/hashTree/hashTreeParser.ts +212 -1
  56. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +81 -99
  57. package/test/unit/spec/locus-info/index.js +79 -0
  58. package/test/unit/spec/meeting/index.js +979 -701
  59. package/test/unit/spec/meeting/utils.js +16 -2
  60. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  61. package/test/unit/spec/meeting-info/meetinginfov2.js +0 -210
  62. package/test/unit/spec/meetings/index.js +5 -231
  63. package/test/unit/spec/webinar/index.ts +886 -718
@@ -94,6 +94,7 @@ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-we
94
94
  var _brbState = require("./brbState");
95
95
  var _multistreamNotSupportedError = _interopRequireDefault(require("../common/errors/multistream-not-supported-error"));
96
96
  var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
97
+ var _types = require("../locus-info/types");
97
98
  var _aiEnableRequest = _interopRequireDefault(require("../aiEnableRequest"));
98
99
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
99
100
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -626,6 +627,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
626
627
  (0, _defineProperty3.default)(_this, "logUploadIntervalIndex", void 0);
627
628
  (0, _defineProperty3.default)(_this, "mediaServerIp", void 0);
628
629
  (0, _defineProperty3.default)(_this, "llmHealthCheckTimer", void 0);
630
+ /**
631
+ * The LLM channel owned by this meeting for datachannel communication.
632
+ * Created in updateLLMConnection, cleaned up in cleanupLLMConneciton.
633
+ */
634
+ (0, _defineProperty3.default)(_this, "llmChannel", void 0);
635
+ /**
636
+ * The Voicea channel for transcription/captions, bound to this meeting's LLM channel.
637
+ */
638
+ (0, _defineProperty3.default)(_this, "voiceaChannel", void 0);
639
+ /**
640
+ * Pending datachannel token saved from join response, used when creating the LLM channel.
641
+ */
642
+ (0, _defineProperty3.default)(_this, "_pendingDatachannelToken", void 0);
629
643
  /** Handles Locus LLM events
630
644
  *
631
645
  * @param {LocusLLMEvent} event - The Locus LLM event to process
@@ -664,9 +678,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
664
678
  }
665
679
  switch (e.data.relayType) {
666
680
  case _constants3.REACTION_RELAY_TYPES.REACTION:
681
+ // @ts-ignore - config coming from registerPlugin
667
682
  if (
668
683
  // @ts-ignore - config coming from registerPlugin
669
- (_this.config.receiveReactions || options.receiveReactions) && _this.isReactionsSupported()) {
684
+ _this.config.receiveReactions && _this.isReactionsSupported()) {
670
685
  var _this$locusInfo, _this$locusInfo$info;
671
686
  var member = _this.members.membersCollection.get(e.data.sender.participantId);
672
687
  if (!member && !((_this$locusInfo = _this.locusInfo) !== null && _this$locusInfo !== void 0 && (_this$locusInfo$info = _this$locusInfo.info) !== null && _this$locusInfo$info !== void 0 && _this$locusInfo$info.isWebinar)) {
@@ -710,92 +725,70 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
710
725
  }, _constants.EVENT_TRIGGERS.MEETING_TRANSCRIPTION_CONNECTED, undefined);
711
726
  });
712
727
  /**
713
- * Disconnects and cleans up the default LLM session listeners/timers.
714
- *
715
- * Ownership-aware: only calls `disconnectLLM` when this meeting is the
716
- * current owner of the default LLM session (or when no owner is recorded).
717
- * Event listeners belonging to this meeting instance are always detached
718
- * so they do not receive another meeting's relay events.
728
+ * Disconnects and cleans up the LLM channel owned by this meeting.
719
729
  *
720
730
  * @param {Object} options
721
- * @param {boolean} [options.removeOnlineListener=true] removes the one-time online listener
722
731
  * @param {boolean} [options.throwOnError=true] rethrows disconnect errors when true
732
+ * @param {boolean} [options.preserveVoiceaChannel=false] when true, keeps voiceaChannel for switchLLMChannel() during reconnects
723
733
  * @returns {Promise<void>}
724
734
  */
725
735
  (0, _defineProperty3.default)(_this, "cleanupLLMConneciton", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
726
736
  var _ref3,
727
- _ref3$removeOnlineLis,
728
- removeOnlineListener,
729
737
  _ref3$throwOnError,
730
738
  throwOnError,
731
- _this$webex$internal$,
732
- currentOwner,
733
- isOwner,
734
- _this$webex$internal$2,
735
- currentOwnerAfterCleanup,
736
- _this$webex$internal$3,
737
- _this$webex$internal$4,
739
+ _ref3$preserveVoiceaC,
740
+ preserveVoiceaChannel,
741
+ _this$voiceaChannel,
738
742
  _args = arguments,
739
743
  _t;
740
744
  return _regenerator.default.wrap(function (_context) {
741
745
  while (1) switch (_context.prev = _context.next) {
742
746
  case 0:
743
- _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;
744
- // @ts-ignore - Fix type
745
- // @ts-ignore - Fix type
746
- _this$webex$internal$ = _this.webex.internal.llm.resolveSessionOwnership(_this.id, _constants.LLM_DEFAULT_SESSION), currentOwner = _this$webex$internal$.currentOwner, isOwner = _this$webex$internal$.isOwner;
747
- _context.prev = 1;
748
- if (!isOwner) {
749
- _context.next = 3;
747
+ _ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref3$throwOnError = _ref3.throwOnError, throwOnError = _ref3$throwOnError === void 0 ? true : _ref3$throwOnError, _ref3$preserveVoiceaC = _ref3.preserveVoiceaChannel, preserveVoiceaChannel = _ref3$preserveVoiceaC === void 0 ? false : _ref3$preserveVoiceaC;
748
+ // Always clear the timer, even if there's no channel
749
+ _this.clearLLMHealthCheckTimer();
750
+
751
+ // Permanent cleanup must deregister voiceaChannel regardless of LLM presence.
752
+ // When a transient reconnect fails (LLM registration error), llmChannel is undefined
753
+ // but voiceaChannel may still exist with listeners attached to the old emitter.
754
+ if (!preserveVoiceaChannel) {
755
+ (_this$voiceaChannel = _this.voiceaChannel) === null || _this$voiceaChannel === void 0 ? void 0 : _this$voiceaChannel.deregisterEvents();
756
+ _this.voiceaChannel = undefined;
757
+ }
758
+ if (_this.llmChannel) {
759
+ _context.next = 1;
750
760
  break;
751
761
  }
762
+ return _context.abrupt("return");
763
+ case 1:
764
+ _context.prev = 1;
752
765
  _context.next = 2;
753
- return _this.webex.internal.llm.disconnectLLM({
766
+ return _this.llmChannel.disconnect({
754
767
  code: 3050,
755
768
  reason: 'done (permanent)'
756
- }, _constants.LLM_DEFAULT_SESSION, _this.id);
769
+ });
757
770
  case 2:
758
771
  _context.next = 4;
759
772
  break;
760
773
  case 3:
761
- _loggerProxy.default.logger.info("Meeting:index#cleanupLLMConneciton --> skipping disconnect; LLM owned by meeting ".concat(currentOwner, ", not ").concat(_this.id));
762
- case 4:
763
- _context.next = 6;
764
- break;
765
- case 5:
766
- _context.prev = 5;
774
+ _context.prev = 3;
767
775
  _t = _context["catch"](1);
768
- _loggerProxy.default.logger.error('Meeting:index#cleanupLLMConneciton --> Failed to disconnect default LLM session', _t);
776
+ _loggerProxy.default.logger.error('Meeting:index#cleanupLLMConneciton --> Failed to disconnect LLM channel', _t);
769
777
  if (!throwOnError) {
770
- _context.next = 6;
778
+ _context.next = 4;
771
779
  break;
772
780
  }
773
781
  throw _t;
774
- case 6:
775
- _context.prev = 6;
776
- if (removeOnlineListener) {
777
- // @ts-ignore - Fix type
778
- _this.webex.internal.llm.off('online', _this.handleLLMOnline);
779
- }
782
+ case 4:
783
+ _context.prev = 4;
780
784
  _this.stopListeningForLLMEvents();
781
-
782
- // Re-check ownership after awaiting disconnectLLM. If ownership changed
783
- // while cleanup was in flight, do not clear another meeting's owner tag.
784
- if (isOwner) {
785
- _this$webex$internal$2 =
786
- // @ts-ignore - Fix type
787
- _this.webex.internal.llm.resolveSessionOwnership(_this.id, _constants.LLM_DEFAULT_SESSION), currentOwnerAfterCleanup = _this$webex$internal$2.currentOwner;
788
- if (currentOwnerAfterCleanup === _this.id) {
789
- // @ts-ignore - Fix type
790
- (_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);
791
- }
792
- }
793
- return _context.finish(6);
794
- case 7:
785
+ _this.llmChannel = undefined;
786
+ return _context.finish(4);
787
+ case 5:
795
788
  case "end":
796
789
  return _context.stop();
797
790
  }
798
- }, _callee, null, [[1, 5, 6, 7]]);
791
+ }, _callee, null, [[1, 3, 4, 5]]);
799
792
  })));
800
793
  /**
801
794
  * Handles ROAP_FAILURE event from the webrtc media connection
@@ -1485,7 +1478,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1485
1478
  pendingPromiseResolve = _this$queuedMediaUpda.pendingPromiseResolve,
1486
1479
  pendingPromiseReject = _this$queuedMediaUpda.pendingPromiseReject,
1487
1480
  mediaUpdateType = _this$queuedMediaUpda.mediaUpdateType,
1488
- _options2 = _this$queuedMediaUpda.options;
1481
+ options = _this$queuedMediaUpda.options;
1489
1482
  _loggerProxy.default.logger.log("Meeting:index#processNextQueuedMediaUpdate --> performing delayed media update type=".concat(mediaUpdateType));
1490
1483
  var mediaUpdate = _promise.default.resolve();
1491
1484
  switch (mediaUpdateType) {
@@ -1496,7 +1489,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1496
1489
  mediaUpdate = _this.requestScreenShareFloor();
1497
1490
  break;
1498
1491
  case MEDIA_UPDATE_TYPE.UPDATE_MEDIA:
1499
- mediaUpdate = _this.updateMedia(_options2);
1492
+ mediaUpdate = _this.updateMedia(options);
1500
1493
  break;
1501
1494
  default:
1502
1495
  _loggerProxy.default.logger.error("Peer-connection-manager:index#processNextQueuedMediaUpdate --> unsupported media update type ".concat(mediaUpdateType, " found in the queue"));
@@ -1651,15 +1644,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1651
1644
 
1652
1645
  // Listener teardown (transcription, annotation, llm/mercury) runs in
1653
1646
  // stopListeningForMeetingEvents() before /leave and /end so events
1654
- // received mid-teardown do not trigger Locus syncs. Calling it here
1655
- // again would double-emit MEETING_STOPPED_RECEIVING_TRANSCRIPTION
1656
- // because stopTranscription() always fires its trigger.
1657
- //
1658
- // Ownership-aware token clear is encapsulated inside clearDataChannelToken().
1659
- _this.clearDataChannelToken();
1647
+ // received mid-teardown do not trigger Locus syncs.
1648
+ // Token cleanup happens automatically when cleanupLLMConneciton destroys the channel.
1649
+ // A new voiceaChannel is created on the next join. In-session LLM reconnects and
1650
+ // practice-session transitions use their own cleanup paths and preserve the channel.
1660
1651
  _context5.next = 1;
1661
1652
  return _this.cleanupLLMConneciton({
1662
- throwOnError: false
1653
+ throwOnError: false,
1654
+ preserveVoiceaChannel: false
1663
1655
  });
1664
1656
  case 1:
1665
1657
  case "end":
@@ -1859,6 +1851,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1859
1851
  }, {
1860
1852
  parent: _this.webex
1861
1853
  });
1854
+ /**
1855
+ * VoiceaChannel for transcription/captions. Created without llmChannel;
1856
+ * switchLLMChannel() is called in updateLLMConnection() when LLM connects.
1857
+ * @instance
1858
+ * @type {VoiceaChannel}
1859
+ * @public
1860
+ * @memberof Meeting
1861
+ */
1862
+ // @ts-ignore - Fix type
1863
+ _this.voiceaChannel = _this.webex.internal.voicea.createChannel();
1862
1864
  /**
1863
1865
  * helper class for managing receive slots (for multistream media connections)
1864
1866
  */
@@ -2251,10 +2253,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2251
2253
  // submitting the client.locus.sync.complete CA event is owned by the metrics
2252
2254
  // facade. Wire each method to the layer that owns that responsibility.
2253
2255
  saveLatency: function saveLatency() {
2254
- var _this$webex$internal$5;
2256
+ var _this$webex$internal$;
2255
2257
  return (
2256
2258
  // @ts-ignore
2257
- (_this$webex$internal$5 = _this.webex.internal.newMetrics.callDiagnosticLatencies).saveLatency.apply(_this$webex$internal$5, arguments)
2259
+ (_this$webex$internal$ = _this.webex.internal.newMetrics.callDiagnosticLatencies).saveLatency.apply(_this$webex$internal$, arguments)
2258
2260
  );
2259
2261
  },
2260
2262
  saveTimestamp: function saveTimestamp(saveTimestampOptions) {
@@ -2270,10 +2272,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2270
2272
  }
2271
2273
  },
2272
2274
  clearLocusSyncLatency: function clearLocusSyncLatency() {
2273
- var _this$webex$internal$6;
2275
+ var _this$webex$internal$2;
2274
2276
  return (
2275
2277
  // @ts-ignore
2276
- (_this$webex$internal$6 = _this.webex.internal.newMetrics.callDiagnosticLatencies).clearLocusSyncLatency.apply(_this$webex$internal$6, arguments)
2278
+ (_this$webex$internal$2 = _this.webex.internal.newMetrics.callDiagnosticLatencies).clearLocusSyncLatency.apply(_this$webex$internal$2, arguments)
2277
2279
  );
2278
2280
  }
2279
2281
  }
@@ -2339,19 +2341,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2339
2341
  * @private
2340
2342
  * @memberof Meeting
2341
2343
  */
2342
- _this.transcription = {
2343
- captions: [],
2344
- isListening: false,
2345
- commandText: '',
2346
- languageOptions: {
2347
- currentSpokenLanguage: 'en'
2348
- },
2349
- showCaptionBox: false,
2350
- transcribingRequestStatus: 'INACTIVE',
2351
- isCaptioning: false,
2352
- interimCaptions: {},
2353
- speakerProxy: {}
2354
- };
2344
+ _this.transcription = _this.getInitialTranscription();
2355
2345
 
2356
2346
  /**
2357
2347
  * Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
@@ -2647,6 +2637,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2647
2637
  */
2648
2638
  (0, _inherits2.default)(Meeting, _StatelessWebexPlugin);
2649
2639
  return (0, _createClass2.default)(Meeting, [{
2640
+ key: "getInitialTranscription",
2641
+ value:
2642
+ /**
2643
+ * Returns the initial transcription object shape.
2644
+ * Used by constructor and reset paths to ensure consistent initialization.
2645
+ * @private
2646
+ * @returns {Transcription}
2647
+ */
2648
+ function getInitialTranscription() {
2649
+ return {
2650
+ captions: [],
2651
+ isListening: false,
2652
+ commandText: '',
2653
+ languageOptions: {
2654
+ currentSpokenLanguage: 'en'
2655
+ },
2656
+ showCaptionBox: false,
2657
+ transcribingRequestStatus: 'INACTIVE',
2658
+ isCaptioning: false,
2659
+ interimCaptions: {},
2660
+ speakerProxy: {}
2661
+ };
2662
+ }
2663
+ }, {
2650
2664
  key: "getIngressPayloadTypeCallback",
2651
2665
  value: function getIngressPayloadTypeCallback(mediaType, codecMimeType) {
2652
2666
  if (this.isMultistream) {
@@ -2934,28 +2948,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2934
2948
  key: "fetchMeetingInfoInternal",
2935
2949
  value: (function () {
2936
2950
  var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7(_ref1) {
2937
- var destination, destinationType, _ref1$password, password, _ref1$captchaCode, captchaCode, _ref1$extraParams, extraParams, _ref1$sendCAevents, sendCAevents, _ref1$registrationId, registrationId, _ref1$classificationI, classificationId, _ref1$prefetchedMeeti, prefetchedMeetingInfo, _info, _info2, _info3, _info4, captchaInfo, info, _err$body, _err$body2, _t5;
2951
+ var destination, destinationType, _ref1$password, password, _ref1$captchaCode, captchaCode, _ref1$extraParams, extraParams, _ref1$sendCAevents, sendCAevents, _ref1$registrationId, registrationId, _ref1$classificationI, classificationId, captchaInfo, info, _err$body, _err$body2, _t5;
2938
2952
  return _regenerator.default.wrap(function (_context7) {
2939
2953
  while (1) switch (_context7.prev = _context7.next) {
2940
2954
  case 0:
2941
- destination = _ref1.destination, destinationType = _ref1.destinationType, _ref1$password = _ref1.password, password = _ref1$password === void 0 ? null : _ref1$password, _ref1$captchaCode = _ref1.captchaCode, captchaCode = _ref1$captchaCode === void 0 ? null : _ref1$captchaCode, _ref1$extraParams = _ref1.extraParams, extraParams = _ref1$extraParams === void 0 ? {} : _ref1$extraParams, _ref1$sendCAevents = _ref1.sendCAevents, sendCAevents = _ref1$sendCAevents === void 0 ? false : _ref1$sendCAevents, _ref1$registrationId = _ref1.registrationId, registrationId = _ref1$registrationId === void 0 ? null : _ref1$registrationId, _ref1$classificationI = _ref1.classificationId, classificationId = _ref1$classificationI === void 0 ? null : _ref1$classificationI, _ref1$prefetchedMeeti = _ref1.prefetchedMeetingInfo, prefetchedMeetingInfo = _ref1$prefetchedMeeti === void 0 ? null : _ref1$prefetchedMeeti;
2955
+ destination = _ref1.destination, destinationType = _ref1.destinationType, _ref1$password = _ref1.password, password = _ref1$password === void 0 ? null : _ref1$password, _ref1$captchaCode = _ref1.captchaCode, captchaCode = _ref1$captchaCode === void 0 ? null : _ref1$captchaCode, _ref1$extraParams = _ref1.extraParams, extraParams = _ref1$extraParams === void 0 ? {} : _ref1$extraParams, _ref1$sendCAevents = _ref1.sendCAevents, sendCAevents = _ref1$sendCAevents === void 0 ? false : _ref1$sendCAevents, _ref1$registrationId = _ref1.registrationId, registrationId = _ref1$registrationId === void 0 ? null : _ref1$registrationId, _ref1$classificationI = _ref1.classificationId, classificationId = _ref1$classificationI === void 0 ? null : _ref1$classificationI;
2942
2956
  _context7.prev = 1;
2943
2957
  captchaInfo = captchaCode ? {
2944
2958
  code: captchaCode,
2945
2959
  id: this.requiredCaptcha.captchaId
2946
2960
  } : null;
2947
- if (!prefetchedMeetingInfo) {
2948
- _context7.next = 3;
2949
- break;
2950
- }
2951
2961
  _context7.next = 2;
2952
- return prefetchedMeetingInfo.request;
2953
- case 2:
2954
- info = _context7.sent;
2955
- _context7.next = 5;
2956
- break;
2957
- case 3:
2958
- _context7.next = 4;
2959
2962
  return this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, destinationType, password, captchaInfo,
2960
2963
  // @ts-ignore - config coming from registerPlugin
2961
2964
  this.config.installedOrgID, this.locusId, extraParams, {
@@ -2963,18 +2966,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2963
2966
  sendCAevents: sendCAevents,
2964
2967
  correlationId: this.correlationId
2965
2968
  }, registrationId, null, classificationId);
2966
- case 4:
2969
+ case 2:
2967
2970
  info = _context7.sent;
2968
- case 5:
2969
- this.parseMeetingInfo((_info = info) === null || _info === void 0 ? void 0 : _info.body, this.destination, (_info2 = info) === null || _info2 === void 0 ? void 0 : _info2.errors);
2970
- this.setMeetingInfo((_info3 = info) === null || _info3 === void 0 ? void 0 : _info3.body, (_info4 = info) === null || _info4 === void 0 ? void 0 : _info4.url);
2971
+ this.parseMeetingInfo(info === null || info === void 0 ? void 0 : info.body, this.destination, info === null || info === void 0 ? void 0 : info.errors);
2972
+ this.setMeetingInfo(info === null || info === void 0 ? void 0 : info.body, info === null || info === void 0 ? void 0 : info.url);
2971
2973
  return _context7.abrupt("return", _promise.default.resolve());
2972
- case 6:
2973
- _context7.prev = 6;
2974
+ case 3:
2975
+ _context7.prev = 3;
2974
2976
  _t5 = _context7["catch"](1);
2975
2977
  this.updateMeetingActions();
2976
2978
  if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2977
- _context7.next = 7;
2979
+ _context7.next = 4;
2978
2980
  break;
2979
2981
  }
2980
2982
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.POLICY;
@@ -2983,9 +2985,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2983
2985
  this.meetingInfo = _t5.meetingInfo;
2984
2986
  }
2985
2987
  throw new _permission.default();
2986
- case 7:
2988
+ case 4:
2987
2989
  if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2JoinWebinarError)) {
2988
- _context7.next = 8;
2990
+ _context7.next = 5;
2989
2991
  break;
2990
2992
  }
2991
2993
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION;
@@ -3000,9 +3002,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3000
3002
  }
3001
3003
  this.requiredCaptcha = null;
3002
3004
  throw new _joinWebinarError.default();
3003
- case 8:
3005
+ case 5:
3004
3006
  if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2JoinForbiddenError)) {
3005
- _context7.next = 9;
3007
+ _context7.next = 6;
3006
3008
  break;
3007
3009
  }
3008
3010
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.JOIN_FORBIDDEN;
@@ -3016,9 +3018,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3016
3018
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NOT_REACH_JBH;
3017
3019
  }
3018
3020
  throw new _joinForbiddenError.default(this.meetingInfoFailureReason, _t5);
3019
- case 9:
3021
+ case 6:
3020
3022
  if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
3021
- _context7.next = 11;
3023
+ _context7.next = 8;
3022
3024
  break;
3023
3025
  }
3024
3026
  _loggerProxy.default.logger.info(// @ts-ignore
@@ -3033,16 +3035,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3033
3035
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
3034
3036
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
3035
3037
  if (!this.requiredCaptcha) {
3036
- _context7.next = 10;
3038
+ _context7.next = 7;
3037
3039
  break;
3038
3040
  }
3039
- _context7.next = 10;
3041
+ _context7.next = 7;
3040
3042
  return this.refreshCaptcha();
3041
- case 10:
3043
+ case 7:
3042
3044
  throw new _passwordError.default();
3043
- case 11:
3045
+ case 8:
3044
3046
  if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
3045
- _context7.next = 12;
3047
+ _context7.next = 9;
3046
3048
  break;
3047
3049
  }
3048
3050
  _loggerProxy.default.logger.info(// @ts-ignore
@@ -3063,14 +3065,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3063
3065
  }
3064
3066
  this.requiredCaptcha = _t5.captchaInfo;
3065
3067
  throw new _captchaError.default();
3066
- case 12:
3068
+ case 9:
3067
3069
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
3068
3070
  throw _t5;
3069
- case 13:
3071
+ case 10:
3070
3072
  case "end":
3071
3073
  return _context7.stop();
3072
3074
  }
3073
- }, _callee7, this, [[1, 6]]);
3075
+ }, _callee7, this, [[1, 3]]);
3074
3076
  }));
3075
3077
  function fetchMeetingInfoInternal(_x5) {
3076
3078
  return _fetchMeetingInfoInternal.apply(this, arguments);
@@ -3190,47 +3192,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3190
3192
  }
3191
3193
  return fetchMeetingInfo;
3192
3194
  }()
3193
- /**
3194
- * Consumes meeting information requested before this Meeting was created.
3195
- *
3196
- * @param {PrefetchedMeetingInfo} prefetchedMeetingInfo opaque early request handle
3197
- * @returns {Promise<void>} resolves after the response is applied to this Meeting
3198
- */
3199
- )
3200
- }, {
3201
- key: "consumePrefetchedMeetingInfo",
3202
- value: (function () {
3203
- var _consumePrefetchedMeetingInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0(prefetchedMeetingInfo) {
3204
- var provider, request, extraParams;
3205
- return _regenerator.default.wrap(function (_context0) {
3206
- while (1) switch (_context0.prev = _context0.next) {
3207
- case 0:
3208
- provider = prefetchedMeetingInfo.provider, request = prefetchedMeetingInfo.request, extraParams = prefetchedMeetingInfo.extraParams;
3209
- _context0.next = 1;
3210
- return this.prepForFetchMeetingInfo({
3211
- extraParams: extraParams
3212
- }, 'consumePrefetchedMeetingInfo');
3213
- case 1:
3214
- this.attrs.meetingInfoProvider = provider;
3215
- return _context0.abrupt("return", this.fetchMeetingInfoInternal({
3216
- destination: this.destination,
3217
- destinationType: this.destinationType,
3218
- extraParams: extraParams,
3219
- prefetchedMeetingInfo: {
3220
- request: request
3221
- }
3222
- }));
3223
- case 2:
3224
- case "end":
3225
- return _context0.stop();
3226
- }
3227
- }, _callee0, this);
3228
- }));
3229
- function consumePrefetchedMeetingInfo(_x8) {
3230
- return _consumePrefetchedMeetingInfo.apply(this, arguments);
3231
- }
3232
- return consumePrefetchedMeetingInfo;
3233
- }()
3234
3195
  /**
3235
3196
  * Checks if the supplied password/host key is correct. It returns a promise with information whether the
3236
3197
  * password and captcha code were correct or not.
@@ -3415,9 +3376,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3415
3376
  }, {
3416
3377
  key: "emitLocusSyncCompleteMetric",
3417
3378
  value: function emitLocusSyncCompleteMetric(meetingId, completed) {
3418
- var _this$webex$internal$7, _this$webex$internal$8;
3379
+ var _this$webex$internal$3, _this$webex$internal$4;
3419
3380
  // @ts-ignore
3420
- var llmWebsocketUrl = ((_this$webex$internal$7 = this.webex.internal.llm) === null || _this$webex$internal$7 === void 0 ? void 0 : (_this$webex$internal$8 = _this$webex$internal$7.getWebSocketUrl) === null || _this$webex$internal$8 === void 0 ? void 0 : _this$webex$internal$8.call(_this$webex$internal$7)) || undefined;
3381
+ var llmWebsocketUrl = ((_this$webex$internal$3 = this.webex.internal.llm) === null || _this$webex$internal$3 === void 0 ? void 0 : (_this$webex$internal$4 = _this$webex$internal$3.getWebSocketUrl) === null || _this$webex$internal$4 === void 0 ? void 0 : _this$webex$internal$4.call(_this$webex$internal$3)) || undefined;
3421
3382
 
3422
3383
  // Per the LLM sync-latency spec, the event carries the LLM websocket url identifier,
3423
3384
  // the llmInfo.dataSet (main, atd-active or atd-unmuted) and the syncLatency block.
@@ -3562,20 +3523,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3562
3523
  }, {
3563
3524
  key: "setUpVoiceaListeners",
3564
3525
  value: function setUpVoiceaListeners() {
3565
- // @ts-ignore
3566
- this.webex.internal.voicea.listenToEvents();
3567
-
3568
- // @ts-ignore
3569
- this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
3570
-
3571
- // @ts-ignore
3572
- this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
3573
-
3574
- // @ts-ignore
3575
- this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
3576
-
3577
- // @ts-ignore
3578
- this.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
3526
+ if (!this.voiceaChannel) {
3527
+ _loggerProxy.default.logger.warn('Meeting:index#setUpVoiceaListeners --> voiceaChannel not available');
3528
+ return;
3529
+ }
3530
+ this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
3531
+ this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
3532
+ this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
3533
+ this.voiceaChannel.on(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
3579
3534
  this.areVoiceaEventsSetup = true;
3580
3535
  }
3581
3536
 
@@ -3882,28 +3837,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3882
3837
  // user need to be joined to start the llm and receive transcription
3883
3838
  if (_this12.isJoined()) {
3884
3839
  // @ts-ignore - config coming from registerPlugin
3885
- if (transcribing && !_this12.transcription) {
3886
- _this12.startTranscription();
3887
- } else if (!transcribing && _this12.transcription) {
3888
- _triggerProxy.default.trigger(_this12, {
3889
- file: 'meeting/index',
3890
- function: 'setupLocusControlsListener'
3891
- }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
3892
- caption: caption,
3893
- transcribing: transcribing
3894
- });
3840
+ if (transcribing && !_this12.areVoiceaEventsSetup) {
3841
+ var _this12$voiceaChannel;
3842
+ if ((_this12$voiceaChannel = _this12.voiceaChannel) !== null && _this12$voiceaChannel !== void 0 && _this12$voiceaChannel.isLLMConnected()) {
3843
+ _this12.startTranscription();
3844
+ }
3845
+ } else if (!transcribing) {
3846
+ if (_this12.areVoiceaEventsSetup) {
3847
+ _triggerProxy.default.trigger(_this12, {
3848
+ file: 'meeting/index',
3849
+ function: 'setupLocusControlsListener'
3850
+ }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
3851
+ caption: caption,
3852
+ transcribing: transcribing
3853
+ });
3854
+ }
3895
3855
  }
3896
3856
  }
3897
3857
  });
3898
3858
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, function (_ref13) {
3899
3859
  var spokenLanguage = _ref13.spokenLanguage;
3900
3860
  if (spokenLanguage) {
3901
- var _this12$transcription;
3861
+ var _this12$transcription, _this12$voiceaChannel2;
3902
3862
  if ((_this12$transcription = _this12.transcription) !== null && _this12$transcription !== void 0 && _this12$transcription.languageOptions) {
3903
3863
  _this12.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
3904
3864
  }
3905
- // @ts-ignore
3906
- _this12.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage, _this12.id);
3865
+ (_this12$voiceaChannel2 = _this12.voiceaChannel) === null || _this12$voiceaChannel2 === void 0 ? void 0 : _this12$voiceaChannel2.onSpokenLanguageUpdate(spokenLanguage, _this12.id);
3907
3866
  _triggerProxy.default.trigger(_this12, {
3908
3867
  file: 'meeting/index',
3909
3868
  function: 'setupLocusControlsListener'
@@ -3925,8 +3884,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3925
3884
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_HESIOD_LLM_ID_UPDATED, function (_ref15) {
3926
3885
  var hesiodLlmId = _ref15.hesiodLlmId;
3927
3886
  if (hesiodLlmId) {
3928
- // @ts-ignore
3929
- _this12.webex.internal.voicea.onCaptionServiceIdUpdate(hesiodLlmId);
3887
+ var _this12$voiceaChannel3;
3888
+ (_this12$voiceaChannel3 = _this12.voiceaChannel) === null || _this12$voiceaChannel3 === void 0 ? void 0 : _this12$voiceaChannel3.onCaptionServiceIdUpdate(hesiodLlmId);
3930
3889
  }
3931
3890
  });
3932
3891
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref16) {
@@ -4138,21 +4097,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4138
4097
  var _this13 = this;
4139
4098
  // Will get triggered on local and remote share
4140
4099
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
4141
- var _ref35 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(payload) {
4100
+ var _ref35 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0(payload) {
4142
4101
  var _payload$previous, _payload$previous2;
4143
4102
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this13$locusInfo, _this13$locusInfo$inf, _this13$webinar, oldShareStatus, sendStartedSharingRemote, _this13$mediaProperti, _t7, _t8;
4144
- return _regenerator.default.wrap(function (_context1) {
4145
- while (1) switch (_context1.prev = _context1.next) {
4103
+ return _regenerator.default.wrap(function (_context0) {
4104
+ while (1) switch (_context0.prev = _context0.next) {
4146
4105
  case 0:
4147
4106
  _payload$current = payload.current, contentShare = _payload$current.content, whiteboardShare = _payload$current.whiteboard;
4148
4107
  previousContentShare = (_payload$previous = payload.previous) === null || _payload$previous === void 0 ? void 0 : _payload$previous.content;
4149
4108
  previousWhiteboardShare = (_payload$previous2 = payload.previous) === null || _payload$previous2 === void 0 ? void 0 : _payload$previous2.whiteboard;
4150
4109
  _this13.triggerAnnotationInfoEvent(contentShare, previousContentShare);
4151
4110
  if (!(!payload.forceUpdate && contentShare.beneficiaryId === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.beneficiaryId) && contentShare.disposition === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.disposition) && contentShare.deviceUrlSharing === previousContentShare.deviceUrlSharing && whiteboardShare.beneficiaryId === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.beneficiaryId) && whiteboardShare.disposition === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.disposition) && whiteboardShare.resourceUrl === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.resourceUrl) && contentShare.resourceType === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.resourceType))) {
4152
- _context1.next = 1;
4111
+ _context0.next = 1;
4153
4112
  break;
4154
4113
  }
4155
- return _context1.abrupt("return");
4114
+ return _context0.abrupt("return");
4156
4115
  case 1:
4157
4116
  newShareStatus = _this13.shareStatus; // REMOTE - check if remote started sharing
4158
4117
  if (_this13.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
@@ -4190,7 +4149,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4190
4149
  }
4191
4150
  _loggerProxy.default.logger.info("Meeting:index#setUpLocusMediaSharesListener --> this.shareStatus=".concat(_this13.shareStatus, " newShareStatus=").concat(newShareStatus));
4192
4151
  if (!(newShareStatus !== _this13.shareStatus)) {
4193
- _context1.next = 17;
4152
+ _context0.next = 17;
4194
4153
  break;
4195
4154
  }
4196
4155
  oldShareStatus = _this13.shareStatus; // update our state before we send out any notifications
@@ -4198,14 +4157,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4198
4157
 
4199
4158
  // send out "stop" notifications for the old state
4200
4159
  _t7 = oldShareStatus;
4201
- _context1.next = _t7 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 2 : _t7 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 3 : _t7 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 4 : _t7 === _constants.SHARE_STATUS.NO_SHARE ? 5 : 6;
4160
+ _context0.next = _t7 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 2 : _t7 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 3 : _t7 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 4 : _t7 === _constants.SHARE_STATUS.NO_SHARE ? 5 : 6;
4202
4161
  break;
4203
4162
  case 2:
4204
4163
  _triggerProxy.default.trigger(_this13, {
4205
4164
  file: 'meetings/index',
4206
4165
  function: 'remoteShare'
4207
4166
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
4208
- return _context1.abrupt("continue", 7);
4167
+ return _context0.abrupt("continue", 7);
4209
4168
  case 3:
4210
4169
  _triggerProxy.default.trigger(_this13, {
4211
4170
  file: 'meeting/index',
@@ -4213,7 +4172,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4213
4172
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
4214
4173
  reason: _constants.SHARE_STOPPED_REASON.SELF_STOPPED
4215
4174
  });
4216
- return _context1.abrupt("continue", 7);
4175
+ return _context0.abrupt("continue", 7);
4217
4176
  case 4:
4218
4177
  _triggerProxy.default.trigger(_this13, {
4219
4178
  file: 'meeting/index',
@@ -4236,14 +4195,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4236
4195
  meetingId: _this13.id
4237
4196
  }
4238
4197
  });
4239
- return _context1.abrupt("continue", 7);
4198
+ return _context0.abrupt("continue", 7);
4240
4199
  case 5:
4241
- return _context1.abrupt("continue", 7);
4200
+ return _context0.abrupt("continue", 7);
4242
4201
  case 6:
4243
- return _context1.abrupt("continue", 7);
4202
+ return _context0.abrupt("continue", 7);
4244
4203
  case 7:
4245
4204
  _t8 = newShareStatus;
4246
- _context1.next = _t8 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 8 : _t8 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 12 : _t8 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 13 : _t8 === _constants.SHARE_STATUS.NO_SHARE ? 14 : 15;
4205
+ _context0.next = _t8 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 8 : _t8 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 12 : _t8 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 13 : _t8 === _constants.SHARE_STATUS.NO_SHARE ? 14 : 15;
4247
4206
  break;
4248
4207
  case 8:
4249
4208
  sendStartedSharingRemote = function sendStartedSharingRemote() {
@@ -4269,19 +4228,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4269
4228
  resourceType: contentShare.resourceType
4270
4229
  });
4271
4230
  };
4272
- _context1.prev = 9;
4231
+ _context0.prev = 9;
4273
4232
  if (!((_this13$mediaProperti = _this13.mediaProperties.mediaDirection) !== null && _this13$mediaProperti !== void 0 && _this13$mediaProperti.sendShare && oldShareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE)) {
4274
- _context1.next = 10;
4233
+ _context0.next = 10;
4275
4234
  break;
4276
4235
  }
4277
- _context1.next = 10;
4236
+ _context0.next = 10;
4278
4237
  return _this13.unpublishStreams([_this13.mediaProperties.shareVideoStream, _this13.mediaProperties.shareAudioStream]);
4279
4238
  case 10:
4280
- _context1.prev = 10;
4239
+ _context0.prev = 10;
4281
4240
  sendStartedSharingRemote();
4282
- return _context1.finish(10);
4241
+ return _context0.finish(10);
4283
4242
  case 11:
4284
- return _context1.abrupt("continue", 16);
4243
+ return _context0.abrupt("continue", 16);
4285
4244
  case 12:
4286
4245
  _triggerProxy.default.trigger(_this13, {
4287
4246
  file: 'meeting/index',
@@ -4298,7 +4257,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4298
4257
  meetingId: _this13.id
4299
4258
  }
4300
4259
  });
4301
- return _context1.abrupt("continue", 16);
4260
+ return _context0.abrupt("continue", 16);
4302
4261
  case 13:
4303
4262
  _triggerProxy.default.trigger(_this13, {
4304
4263
  file: 'meeting/index',
@@ -4317,14 +4276,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4317
4276
  meetingId: _this13.id
4318
4277
  }
4319
4278
  });
4320
- return _context1.abrupt("continue", 16);
4279
+ return _context0.abrupt("continue", 16);
4321
4280
  case 14:
4322
- return _context1.abrupt("continue", 16);
4281
+ return _context0.abrupt("continue", 16);
4323
4282
  case 15:
4324
- return _context1.abrupt("continue", 16);
4283
+ return _context0.abrupt("continue", 16);
4325
4284
  case 16:
4326
4285
  _this13.members.locusMediaSharesUpdate(payload);
4327
- _context1.next = 18;
4286
+ _context0.next = 18;
4328
4287
  break;
4329
4288
  case 17:
4330
4289
  if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
@@ -4368,11 +4327,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4368
4327
  }
4369
4328
  case 18:
4370
4329
  case "end":
4371
- return _context1.stop();
4330
+ return _context0.stop();
4372
4331
  }
4373
- }, _callee1, null, [[9,, 10, 11]]);
4332
+ }, _callee0, null, [[9,, 10, 11]]);
4374
4333
  }));
4375
- return function (_x9) {
4334
+ return function (_x8) {
4376
4335
  return _ref35.apply(this, arguments);
4377
4336
  };
4378
4337
  }());
@@ -4633,11 +4592,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4633
4592
  _this19.updateLLMConnection();
4634
4593
  });
4635
4594
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
4636
- var _ref37 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4595
+ var _ref37 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(payload) {
4637
4596
  var _this19$rtcMetrics;
4638
4597
  var _t9;
4639
- return _regenerator.default.wrap(function (_context10) {
4640
- while (1) switch (_context10.prev = _context10.next) {
4598
+ return _regenerator.default.wrap(function (_context1) {
4599
+ while (1) switch (_context1.prev = _context1.next) {
4641
4600
  case 0:
4642
4601
  _this19.stopKeepAlive();
4643
4602
  if (payload) {
@@ -4660,25 +4619,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4660
4619
  });
4661
4620
  }
4662
4621
  (_this19$rtcMetrics = _this19.rtcMetrics) === null || _this19$rtcMetrics === void 0 ? void 0 : _this19$rtcMetrics.sendNextMetrics();
4663
- _context10.prev = 1;
4664
- _context10.next = 2;
4622
+ _context1.prev = 1;
4623
+ _context1.next = 2;
4665
4624
  return _this19.ensureDefaultDatachannelTokenAfterAdmit();
4666
4625
  case 2:
4667
- _context10.next = 4;
4626
+ _context1.next = 4;
4668
4627
  break;
4669
4628
  case 3:
4670
- _context10.prev = 3;
4671
- _t9 = _context10["catch"](1);
4629
+ _context1.prev = 3;
4630
+ _t9 = _context1["catch"](1);
4672
4631
  _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)));
4673
4632
  case 4:
4674
4633
  _this19.updateLLMConnection();
4675
4634
  case 5:
4676
4635
  case "end":
4677
- return _context10.stop();
4636
+ return _context1.stop();
4678
4637
  }
4679
- }, _callee10, null, [[1, 3]]);
4638
+ }, _callee1, null, [[1, 3]]);
4680
4639
  }));
4681
- return function (_x0) {
4640
+ return function (_x9) {
4682
4641
  return _ref37.apply(this, arguments);
4683
4642
  };
4684
4643
  }());
@@ -4803,49 +4762,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4803
4762
  }
4804
4763
  });
4805
4764
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4806
- var _ref38 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(payload) {
4765
+ var _ref38 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4807
4766
  var _t0;
4808
- return _regenerator.default.wrap(function (_context11) {
4809
- while (1) switch (_context11.prev = _context11.next) {
4767
+ return _regenerator.default.wrap(function (_context10) {
4768
+ while (1) switch (_context10.prev = _context10.next) {
4810
4769
  case 0:
4811
4770
  if (!_this20.wirelessShare) {
4812
- _context11.next = 2;
4771
+ _context10.next = 2;
4813
4772
  break;
4814
4773
  }
4815
4774
  if (!_this20.mediaProperties.shareVideoStream) {
4816
- _context11.next = 1;
4775
+ _context10.next = 1;
4817
4776
  break;
4818
4777
  }
4819
- _context11.next = 1;
4778
+ _context10.next = 1;
4820
4779
  return _this20.setLocalShareVideoStream(undefined);
4821
4780
  case 1:
4822
4781
  if (!_this20.mediaProperties.shareAudioStream) {
4823
- _context11.next = 2;
4782
+ _context10.next = 2;
4824
4783
  break;
4825
4784
  }
4826
- _context11.next = 2;
4785
+ _context10.next = 2;
4827
4786
  return _this20.setLocalShareAudioStream(undefined);
4828
4787
  case 2:
4829
4788
  if (!payload.shouldLeave) {
4830
- _context11.next = 7;
4789
+ _context10.next = 7;
4831
4790
  break;
4832
4791
  }
4833
- _context11.prev = 3;
4834
- _context11.next = 4;
4792
+ _context10.prev = 3;
4793
+ _context10.next = 4;
4835
4794
  return _this20.leave({
4836
4795
  reason: payload.reason
4837
4796
  });
4838
4797
  case 4:
4839
4798
  _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.');
4840
- _context11.next = 6;
4799
+ _context10.next = 6;
4841
4800
  break;
4842
4801
  case 5:
4843
- _context11.prev = 5;
4844
- _t0 = _context11["catch"](3);
4802
+ _context10.prev = 5;
4803
+ _t0 = _context10["catch"](3);
4845
4804
  // @ts-ignore
4846
4805
  _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_t0));
4847
4806
  case 6:
4848
- _context11.next = 8;
4807
+ _context10.next = 8;
4849
4808
  break;
4850
4809
  case 7:
4851
4810
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
@@ -4859,11 +4818,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4859
4818
  });
4860
4819
  case 8:
4861
4820
  case "end":
4862
- return _context11.stop();
4821
+ return _context10.stop();
4863
4822
  }
4864
- }, _callee11, null, [[3, 5]]);
4823
+ }, _callee10, null, [[3, 5]]);
4865
4824
  }));
4866
- return function (_x1) {
4825
+ return function (_x0) {
4867
4826
  return _ref38.apply(this, arguments);
4868
4827
  };
4869
4828
  }());
@@ -4987,31 +4946,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4987
4946
  }, {
4988
4947
  key: "beRightBack",
4989
4948
  value: (function () {
4990
- var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(enabled) {
4949
+ var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4991
4950
  var _this22 = this;
4992
4951
  var errorMessage, error, _errorMessage, _error;
4993
- return _regenerator.default.wrap(function (_context12) {
4994
- while (1) switch (_context12.prev = _context12.next) {
4952
+ return _regenerator.default.wrap(function (_context11) {
4953
+ while (1) switch (_context11.prev = _context11.next) {
4995
4954
  case 0:
4996
4955
  if (this.isMultistream) {
4997
- _context12.next = 1;
4956
+ _context11.next = 1;
4998
4957
  break;
4999
4958
  }
5000
4959
  errorMessage = 'Meeting:index#beRightBack --> Not a multistream meeting';
5001
4960
  error = new Error(errorMessage);
5002
4961
  _loggerProxy.default.logger.error(error);
5003
- return _context12.abrupt("return", _promise.default.reject(error));
4962
+ return _context11.abrupt("return", _promise.default.reject(error));
5004
4963
  case 1:
5005
4964
  if (this.mediaProperties.webrtcMediaConnection) {
5006
- _context12.next = 2;
4965
+ _context11.next = 2;
5007
4966
  break;
5008
4967
  }
5009
4968
  _errorMessage = 'Meeting:index#beRightBack --> WebRTC media connection is not defined';
5010
4969
  _error = new Error(_errorMessage);
5011
4970
  _loggerProxy.default.logger.error(_error);
5012
- return _context12.abrupt("return", _promise.default.reject(_error));
4971
+ return _context11.abrupt("return", _promise.default.reject(_error));
5013
4972
  case 2:
5014
- return _context12.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4973
+ return _context11.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
5015
4974
  if (_this22.audio && enabled) {
5016
4975
  // locus mutes the participant with brb enabled request,
5017
4976
  // so we need to explicitly update remote mute for correct logic flow
@@ -5022,11 +4981,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5022
4981
  }));
5023
4982
  case 3:
5024
4983
  case "end":
5025
- return _context12.stop();
4984
+ return _context11.stop();
5026
4985
  }
5027
- }, _callee12, this);
4986
+ }, _callee11, this);
5028
4987
  }));
5029
- function beRightBack(_x10) {
4988
+ function beRightBack(_x1) {
5030
4989
  return _beRightBack.apply(this, arguments);
5031
4990
  }
5032
4991
  return beRightBack;
@@ -5533,11 +5492,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5533
5492
  }, {
5534
5493
  key: "finalizeMeetingAfterInitialLocusSetup",
5535
5494
  value: (function () {
5536
- var _finalizeMeetingAfterInitialLocusSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(locus) {
5495
+ var _finalizeMeetingAfterInitialLocusSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(locus) {
5537
5496
  var _this$destination;
5538
5497
  var _t1;
5539
- return _regenerator.default.wrap(function (_context13) {
5540
- while (1) switch (_context13.prev = _context13.next) {
5498
+ return _regenerator.default.wrap(function (_context12) {
5499
+ while (1) switch (_context12.prev = _context12.next) {
5541
5500
  case 0:
5542
5501
  if (locus && (this === null || this === void 0 ? void 0 : this.destinationType) === _constants.DESTINATION_TYPE.LOCUS_ID) {
5543
5502
  // destination is initialized from the initial locus snapshot in constructor,
@@ -5545,26 +5504,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5545
5504
  this.destination = locus;
5546
5505
  }
5547
5506
  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))) {
5548
- _context13.next = 4;
5507
+ _context12.next = 4;
5549
5508
  break;
5550
5509
  }
5551
- _context13.prev = 1;
5552
- _context13.next = 2;
5510
+ _context12.prev = 1;
5511
+ _context12.next = 2;
5553
5512
  return this.fetchMeetingInfo({});
5554
5513
  case 2:
5555
- _context13.next = 4;
5514
+ _context12.next = 4;
5556
5515
  break;
5557
5516
  case 3:
5558
- _context13.prev = 3;
5559
- _t1 = _context13["catch"](1);
5517
+ _context12.prev = 3;
5518
+ _t1 = _context12["catch"](1);
5560
5519
  _loggerProxy.default.logger.info("Meeting:index#finalizeMeetingAfterInitialLocusSetup --> deferred fetchMeetingInfo failed: ".concat(_t1.message));
5561
5520
  case 4:
5562
5521
  case "end":
5563
- return _context13.stop();
5522
+ return _context12.stop();
5564
5523
  }
5565
- }, _callee13, this, [[1, 3]]);
5524
+ }, _callee12, this, [[1, 3]]);
5566
5525
  }));
5567
- function finalizeMeetingAfterInitialLocusSetup(_x11) {
5526
+ function finalizeMeetingAfterInitialLocusSetup(_x10) {
5568
5527
  return _finalizeMeetingAfterInitialLocusSetup.apply(this, arguments);
5569
5528
  }
5570
5529
  return finalizeMeetingAfterInitialLocusSetup;
@@ -5764,11 +5723,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5764
5723
  }, {
5765
5724
  key: "setLocalAudioStream",
5766
5725
  value: (function () {
5767
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localStream) {
5726
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localStream) {
5768
5727
  var _this$audio2;
5769
5728
  var oldStream;
5770
- return _regenerator.default.wrap(function (_context14) {
5771
- while (1) switch (_context14.prev = _context14.next) {
5729
+ return _regenerator.default.wrap(function (_context13) {
5730
+ while (1) switch (_context13.prev = _context13.next) {
5772
5731
  case 0:
5773
5732
  oldStream = this.mediaProperties.audioStream;
5774
5733
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -5782,21 +5741,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5782
5741
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
5783
5742
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5784
5743
  if (!(!this.isMultistream || !localStream)) {
5785
- _context14.next = 1;
5744
+ _context13.next = 1;
5786
5745
  break;
5787
5746
  }
5788
- _context14.next = 1;
5747
+ _context13.next = 1;
5789
5748
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
5790
5749
  case 1:
5791
- _context14.next = 2;
5750
+ _context13.next = 2;
5792
5751
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5793
5752
  case 2:
5794
5753
  case "end":
5795
- return _context14.stop();
5754
+ return _context13.stop();
5796
5755
  }
5797
- }, _callee14, this);
5756
+ }, _callee13, this);
5798
5757
  }));
5799
- function setLocalAudioStream(_x12) {
5758
+ function setLocalAudioStream(_x11) {
5800
5759
  return _setLocalAudioStream.apply(this, arguments);
5801
5760
  }
5802
5761
  return setLocalAudioStream;
@@ -5812,11 +5771,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5812
5771
  }, {
5813
5772
  key: "setLocalVideoStream",
5814
5773
  value: (function () {
5815
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15(localStream) {
5774
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localStream) {
5816
5775
  var _this$video2;
5817
5776
  var oldStream;
5818
- return _regenerator.default.wrap(function (_context15) {
5819
- while (1) switch (_context15.prev = _context15.next) {
5777
+ return _regenerator.default.wrap(function (_context14) {
5778
+ while (1) switch (_context14.prev = _context14.next) {
5820
5779
  case 0:
5821
5780
  oldStream = this.mediaProperties.videoStream;
5822
5781
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -5832,21 +5791,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5832
5791
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5833
5792
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.ConstraintsChange, this.localConstraintsChangeHandler);
5834
5793
  if (!(!this.isMultistream || !localStream)) {
5835
- _context15.next = 1;
5794
+ _context14.next = 1;
5836
5795
  break;
5837
5796
  }
5838
- _context15.next = 1;
5797
+ _context14.next = 1;
5839
5798
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
5840
5799
  case 1:
5841
- _context15.next = 2;
5800
+ _context14.next = 2;
5842
5801
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5843
5802
  case 2:
5844
5803
  case "end":
5845
- return _context15.stop();
5804
+ return _context14.stop();
5846
5805
  }
5847
- }, _callee15, this);
5806
+ }, _callee14, this);
5848
5807
  }));
5849
- function setLocalVideoStream(_x13) {
5808
+ function setLocalVideoStream(_x12) {
5850
5809
  return _setLocalVideoStream.apply(this, arguments);
5851
5810
  }
5852
5811
  return setLocalVideoStream;
@@ -5863,10 +5822,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5863
5822
  }, {
5864
5823
  key: "setLocalShareVideoStream",
5865
5824
  value: (function () {
5866
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16(localDisplayStream) {
5825
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15(localDisplayStream) {
5867
5826
  var oldStream;
5868
- return _regenerator.default.wrap(function (_context16) {
5869
- while (1) switch (_context16.prev = _context16.next) {
5827
+ return _regenerator.default.wrap(function (_context15) {
5828
+ while (1) switch (_context15.prev = _context15.next) {
5870
5829
  case 0:
5871
5830
  oldStream = this.mediaProperties.shareVideoStream;
5872
5831
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -5878,21 +5837,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5878
5837
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5879
5838
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5880
5839
  if (!(!this.isMultistream || !localDisplayStream)) {
5881
- _context16.next = 1;
5840
+ _context15.next = 1;
5882
5841
  break;
5883
5842
  }
5884
- _context16.next = 1;
5843
+ _context15.next = 1;
5885
5844
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
5886
5845
  case 1:
5887
- _context16.next = 2;
5846
+ _context15.next = 2;
5888
5847
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5889
5848
  case 2:
5890
5849
  case "end":
5891
- return _context16.stop();
5850
+ return _context15.stop();
5892
5851
  }
5893
- }, _callee16, this);
5852
+ }, _callee15, this);
5894
5853
  }));
5895
- function setLocalShareVideoStream(_x14) {
5854
+ function setLocalShareVideoStream(_x13) {
5896
5855
  return _setLocalShareVideoStream.apply(this, arguments);
5897
5856
  }
5898
5857
  return setLocalShareVideoStream;
@@ -5908,10 +5867,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5908
5867
  }, {
5909
5868
  key: "setLocalShareAudioStream",
5910
5869
  value: (function () {
5911
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17(localSystemAudioStream) {
5870
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16(localSystemAudioStream) {
5912
5871
  var oldStream;
5913
- return _regenerator.default.wrap(function (_context17) {
5914
- while (1) switch (_context17.prev = _context17.next) {
5872
+ return _regenerator.default.wrap(function (_context16) {
5873
+ while (1) switch (_context16.prev = _context16.next) {
5915
5874
  case 0:
5916
5875
  oldStream = this.mediaProperties.shareAudioStream;
5917
5876
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -5921,21 +5880,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5921
5880
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5922
5881
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5923
5882
  if (!(!this.isMultistream || !localSystemAudioStream)) {
5924
- _context17.next = 1;
5883
+ _context16.next = 1;
5925
5884
  break;
5926
5885
  }
5927
- _context17.next = 1;
5886
+ _context16.next = 1;
5928
5887
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
5929
5888
  case 1:
5930
- _context17.next = 2;
5889
+ _context16.next = 2;
5931
5890
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5932
5891
  case 2:
5933
5892
  case "end":
5934
- return _context17.stop();
5893
+ return _context16.stop();
5935
5894
  }
5936
- }, _callee17, this);
5895
+ }, _callee16, this);
5937
5896
  }));
5938
- function setLocalShareAudioStream(_x15) {
5897
+ function setLocalShareAudioStream(_x14) {
5939
5898
  return _setLocalShareAudioStream.apply(this, arguments);
5940
5899
  }
5941
5900
  return setLocalShareAudioStream;
@@ -6406,7 +6365,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6406
6365
  }, {
6407
6366
  key: "joinWithMedia",
6408
6367
  value: (function () {
6409
- var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6368
+ var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
6410
6369
  var _this30 = this;
6411
6370
  var options,
6412
6371
  mediaOptions,
@@ -6433,20 +6392,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6433
6392
  _error2,
6434
6393
  _error3,
6435
6394
  firstError,
6436
- _args18 = arguments,
6395
+ _args17 = arguments,
6437
6396
  _t10,
6438
6397
  _t11;
6439
- return _regenerator.default.wrap(function (_context18) {
6440
- while (1) switch (_context18.prev = _context18.next) {
6398
+ return _regenerator.default.wrap(function (_context17) {
6399
+ while (1) switch (_context17.prev = _context17.next) {
6441
6400
  case 0:
6442
- options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
6401
+ options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
6443
6402
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
6444
6403
  _this$joinWithMediaRe = this.joinWithMediaRetryInfo, retryCount = _this$joinWithMediaRe.retryCount, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse, prevError = _this$joinWithMediaRe.prevError;
6445
6404
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
6446
- _context18.next = 1;
6405
+ _context17.next = 1;
6447
6406
  break;
6448
6407
  }
6449
- return _context18.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6408
+ return _context17.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6450
6409
  case 1:
6451
6410
  this.allowMediaInLobby = true;
6452
6411
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
@@ -6457,7 +6416,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6457
6416
  in case WebRTC is not available at all.
6458
6417
  */
6459
6418
  if (!(_webCapabilities.WebCapabilities.supportsRTCPeerConnection() === _webCapabilities.CapabilityState.NOT_CAPABLE)) {
6460
- _context18.next = 2;
6419
+ _context17.next = 2;
6461
6420
  break;
6462
6421
  }
6463
6422
  throw new _internalMediaCore.Errors.WebrtcApiNotAvailableError('RTCPeerConnection API is not available in this environment');
@@ -6475,34 +6434,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6475
6434
  prevError && prevError instanceof _webexErrors.UserNotJoinedError ||
6476
6435
  // last try failed with UserNotJoinedError
6477
6436
  this.isErrorMeaningLocusDroppedUs(prevError) || _util2.default.isUserInLeftState(this.locusInfo); // locus dropped the connection before we can re-try addMedia
6478
- _context18.prev = 3;
6437
+ _context17.prev = 3;
6479
6438
  forceTurnDiscovery = false;
6480
6439
  if (!shouldJoin) {
6481
- _context18.next = 8;
6440
+ _context17.next = 8;
6482
6441
  break;
6483
6442
  }
6484
- _context18.next = 4;
6443
+ _context17.next = 4;
6485
6444
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
6486
6445
  case 4:
6487
- turnDiscoveryRequest = _context18.sent;
6446
+ turnDiscoveryRequest = _context17.sent;
6488
6447
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
6489
6448
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
6490
6449
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
6491
- _context18.next = 5;
6450
+ _context17.next = 5;
6492
6451
  return this.join(joinOptions);
6493
6452
  case 5:
6494
- joinResponse = _context18.sent;
6453
+ joinResponse = _context17.sent;
6495
6454
  joined = true;
6496
6455
 
6497
6456
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
6498
6457
  if (!joinOptions.roapMessage) {
6499
- _context18.next = 7;
6458
+ _context17.next = 7;
6500
6459
  break;
6501
6460
  }
6502
- _context18.next = 6;
6461
+ _context17.next = 6;
6503
6462
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
6504
6463
  case 6:
6505
- _yield$this$roap$hand = _context18.sent;
6464
+ _yield$this$roap$hand = _context17.sent;
6506
6465
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
6507
6466
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
6508
6467
  this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
@@ -6511,7 +6470,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6511
6470
  this.roap.abortTurnDiscovery();
6512
6471
  }
6513
6472
  case 7:
6514
- _context18.next = 9;
6473
+ _context17.next = 9;
6515
6474
  break;
6516
6475
  case 8:
6517
6476
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
@@ -6519,38 +6478,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6519
6478
  forceTurnDiscovery = true;
6520
6479
  joined = true;
6521
6480
  case 9:
6522
- _context18.next = 10;
6481
+ _context17.next = 10;
6523
6482
  return this.shouldRetryMediaWithOnlyTurnTLS(prevError);
6524
6483
  case 10:
6525
- shouldRetryMediaWithOnlyTurnTLS = _context18.sent;
6526
- _context18.next = 11;
6484
+ shouldRetryMediaWithOnlyTurnTLS = _context17.sent;
6485
+ _context17.next = 11;
6527
6486
  return this.addMediaInternal(function () {
6528
6487
  // callback is not called when UserNotJoinedError is thrown
6529
6488
  return _this30.joinWithMediaRetryInfo.retryCount >= 1 ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6530
6489
  }, forceTurnDiscovery, turnServerInfo, shouldRetryMediaWithOnlyTurnTLS ? 'relay' : undefined, mediaOptions);
6531
6490
  case 11:
6532
- mediaResponse = _context18.sent;
6491
+ mediaResponse = _context17.sent;
6533
6492
  this.joinWithMediaRetryInfo = {
6534
6493
  retryCount: 0,
6535
6494
  prevJoinResponse: undefined
6536
6495
  };
6537
6496
  this.locusInfo.suspendDestroyMeeting(false);
6538
- return _context18.abrupt("return", {
6497
+ return _context17.abrupt("return", {
6539
6498
  join: joinResponse,
6540
6499
  media: mediaResponse,
6541
6500
  multistreamEnabled: this.isMultistream
6542
6501
  });
6543
6502
  case 12:
6544
- _context18.prev = 12;
6545
- _t10 = _context18["catch"](3);
6503
+ _context17.prev = 12;
6504
+ _t10 = _context17["catch"](3);
6546
6505
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t10);
6547
6506
  this.roap.abortTurnDiscovery();
6548
6507
 
6549
6508
  // let's do a retry (but not on 1-1 calls, because the flow would get too complicated)
6550
6509
  shouldRetry = !_util3.default.isOneOnOneCall(this.locusInfo.parsedLocus) && (retryCount < 1 || (_t10 instanceof _webexErrors.UserNotJoinedError || this.isErrorMeaningLocusDroppedUs(_t10)) && retryCount < JOIN_WITH_MEDIA_RETRY_MAX_COUNT);
6551
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t10) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t10)) {
6510
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t10) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t10) || this.isLocusUserFullError(_t10)) {
6552
6511
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
6553
6512
  // so there is no point doing a retry
6513
+ // when the locus is full, we also don't want to retry, because it will just fail again
6554
6514
  shouldRetry = false;
6555
6515
  }
6556
6516
  if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t10)) {
@@ -6569,21 +6529,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6569
6529
 
6570
6530
  // we only want to call leave if join was successful, and we won't be doing any more retries
6571
6531
  if (!(joined && !shouldRetry)) {
6572
- _context18.next = 16;
6532
+ _context17.next = 16;
6573
6533
  break;
6574
6534
  }
6575
- _context18.prev = 13;
6576
- _context18.next = 14;
6535
+ _context17.prev = 13;
6536
+ _context17.next = 14;
6577
6537
  return this.leave({
6578
6538
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
6579
6539
  reason: 'joinWithMedia failure'
6580
6540
  });
6581
6541
  case 14:
6582
- _context18.next = 16;
6542
+ _context17.next = 16;
6583
6543
  break;
6584
6544
  case 15:
6585
- _context18.prev = 15;
6586
- _t11 = _context18["catch"](13);
6545
+ _context17.prev = 15;
6546
+ _t11 = _context17["catch"](13);
6587
6547
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t11);
6588
6548
  leaveError = _t11;
6589
6549
  case 16:
@@ -6599,7 +6559,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6599
6559
  type: _t10.name
6600
6560
  });
6601
6561
  if (!shouldRetry) {
6602
- _context18.next = 17;
6562
+ _context17.next = 17;
6603
6563
  break;
6604
6564
  }
6605
6565
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
@@ -6609,7 +6569,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6609
6569
  if (!this.joinWithMediaRetryInfo.firstError) {
6610
6570
  this.joinWithMediaRetryInfo.firstError = _t10;
6611
6571
  }
6612
- return _context18.abrupt("return", this.joinWithMedia(options));
6572
+ return _context17.abrupt("return", this.joinWithMedia(options));
6613
6573
  case 17:
6614
6574
  firstError = this.joinWithMediaRetryInfo.firstError;
6615
6575
  this.joinWithMediaRetryInfo = {
@@ -6619,12 +6579,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6619
6579
  prevError: undefined
6620
6580
  };
6621
6581
  this.locusInfo.suspendDestroyMeeting(false);
6622
- throw firstError !== null && firstError !== void 0 ? firstError : _t10;
6582
+
6583
+ // LOCUS_USER_FULL is a definitive capacity error the client must surface, so it takes
6584
+ // precedence over any earlier retryable error stored in firstError.
6585
+ throw this.isLocusUserFullError(_t10) ? _t10 : firstError !== null && firstError !== void 0 ? firstError : _t10;
6623
6586
  case 18:
6624
6587
  case "end":
6625
- return _context18.stop();
6588
+ return _context17.stop();
6626
6589
  }
6627
- }, _callee18, this, [[3, 12], [13, 15]]);
6590
+ }, _callee17, this, [[3, 12], [13, 15]]);
6628
6591
  }));
6629
6592
  function joinWithMedia() {
6630
6593
  return _joinWithMedia.apply(this, arguments);
@@ -6654,20 +6617,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6654
6617
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
6655
6618
  }
6656
6619
  this.cleanUpBeforeReconnection();
6657
- return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
6658
- return _regenerator.default.wrap(function (_context19) {
6659
- while (1) switch (_context19.prev = _context19.next) {
6620
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6621
+ return _regenerator.default.wrap(function (_context18) {
6622
+ while (1) switch (_context18.prev = _context18.next) {
6660
6623
  case 0:
6661
- _context19.next = 1;
6624
+ _context18.next = 1;
6662
6625
  return _this31.waitForRemoteSDPAnswer();
6663
6626
  case 1:
6664
- _context19.next = 2;
6627
+ _context18.next = 2;
6665
6628
  return _this31.waitForMediaConnectionConnected();
6666
6629
  case 2:
6667
6630
  case "end":
6668
- return _context19.stop();
6631
+ return _context18.stop();
6669
6632
  }
6670
- }, _callee19);
6633
+ }, _callee18);
6671
6634
  }))).then(function () {
6672
6635
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
6673
6636
  }).catch(function (error) {
@@ -6730,9 +6693,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6730
6693
  reject(new Error('Webex Assistant is not enabled/supported'));
6731
6694
  }
6732
6695
  try {
6696
+ var _this32$voiceaChannel2, _this32$voiceaChannel3;
6733
6697
  var _voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
6734
- // @ts-ignore
6735
- _this32.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6698
+ var _this32$voiceaChannel;
6699
+ (_this32$voiceaChannel = _this32.voiceaChannel) === null || _this32$voiceaChannel === void 0 ? void 0 : _this32$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6736
6700
  var statusCode = payload.statusCode;
6737
6701
  if (statusCode === 200) {
6738
6702
  _this32.transcription.languageOptions = _objectSpread(_objectSpread({}, _this32.transcription.languageOptions), {}, {
@@ -6743,10 +6707,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6743
6707
  reject(payload);
6744
6708
  }
6745
6709
  };
6746
- // @ts-ignore
6747
- _this32.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6748
- // @ts-ignore
6749
- _this32.webex.internal.voicea.requestLanguage(language);
6710
+ (_this32$voiceaChannel2 = _this32.voiceaChannel) === null || _this32$voiceaChannel2 === void 0 ? void 0 : _this32$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6711
+ (_this32$voiceaChannel3 = _this32.voiceaChannel) === null || _this32$voiceaChannel3 === void 0 ? void 0 : _this32$voiceaChannel3.requestLanguage(language);
6750
6712
  } catch (error) {
6751
6713
  _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
6752
6714
  reject(error);
@@ -6773,9 +6735,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6773
6735
  reject(new Error('Only host can set spoken language'));
6774
6736
  }
6775
6737
  try {
6738
+ var _this33$voiceaChannel2, _this33$voiceaChannel3;
6776
6739
  var _voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
6777
- // @ts-ignore
6778
- _this33.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6740
+ var _this33$voiceaChannel;
6741
+ (_this33$voiceaChannel = _this33.voiceaChannel) === null || _this33$voiceaChannel === void 0 ? void 0 : _this33$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6779
6742
  var languageCode = payload.languageCode;
6780
6743
  if (languageCode) {
6781
6744
  _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
@@ -6786,12 +6749,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6786
6749
  reject(payload);
6787
6750
  }
6788
6751
  };
6789
-
6790
- // @ts-ignore
6791
- _this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6792
-
6793
- // @ts-ignore
6794
- _this33.webex.internal.voicea.setSpokenLanguage(language);
6752
+ (_this33$voiceaChannel2 = _this33.voiceaChannel) === null || _this33$voiceaChannel2 === void 0 ? void 0 : _this33$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6753
+ (_this33$voiceaChannel3 = _this33.voiceaChannel) === null || _this33$voiceaChannel3 === void 0 ? void 0 : _this33$voiceaChannel3.setSpokenLanguage(language);
6795
6754
  } catch (error) {
6796
6755
  _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
6797
6756
  reject(error);
@@ -6808,70 +6767,94 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6808
6767
  }, {
6809
6768
  key: "startTranscription",
6810
6769
  value: (function () {
6811
- var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20(options) {
6770
+ var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19(options) {
6812
6771
  var _t12;
6813
- return _regenerator.default.wrap(function (_context20) {
6814
- while (1) switch (_context20.prev = _context20.next) {
6772
+ return _regenerator.default.wrap(function (_context19) {
6773
+ while (1) switch (_context19.prev = _context19.next) {
6815
6774
  case 0:
6816
6775
  if (!this.isJoined()) {
6817
- _context20.next = 5;
6776
+ _context19.next = 6;
6818
6777
  break;
6819
6778
  }
6820
6779
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
6821
- _context20.prev = 1;
6780
+ _context19.prev = 1;
6781
+ if (this.voiceaChannel) {
6782
+ _context19.next = 2;
6783
+ break;
6784
+ }
6785
+ _loggerProxy.default.logger.warn('Meeting:index#startTranscription --> voiceaChannel not available');
6786
+ return _context19.abrupt("return");
6787
+ case 2:
6822
6788
  if (!this.areVoiceaEventsSetup) {
6823
6789
  this.setUpVoiceaListeners();
6824
6790
  }
6825
-
6826
- // @ts-ignore
6827
- _context20.next = 2;
6828
- return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
6829
- case 2:
6830
- _context20.next = 4;
6831
- break;
6791
+ _context19.next = 3;
6792
+ return this.voiceaChannel.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
6832
6793
  case 3:
6833
- _context20.prev = 3;
6834
- _t12 = _context20["catch"](1);
6794
+ _context19.next = 5;
6795
+ break;
6796
+ case 4:
6797
+ _context19.prev = 4;
6798
+ _t12 = _context19["catch"](1);
6835
6799
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t12));
6836
6800
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
6837
6801
  correlation_id: this.correlationId,
6838
6802
  reason: _t12.message,
6839
6803
  stack: _t12.stack
6840
6804
  });
6841
- case 4:
6842
- _context20.next = 6;
6843
- break;
6844
6805
  case 5:
6806
+ _context19.next = 7;
6807
+ break;
6808
+ case 6:
6845
6809
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
6846
6810
  throw new Error('Meeting is not joined');
6847
- case 6:
6811
+ case 7:
6848
6812
  case "end":
6849
- return _context20.stop();
6813
+ return _context19.stop();
6850
6814
  }
6851
- }, _callee20, this, [[1, 3]]);
6815
+ }, _callee19, this, [[1, 4]]);
6852
6816
  }));
6853
- function startTranscription(_x16) {
6817
+ function startTranscription(_x15) {
6854
6818
  return _startTranscription.apply(this, arguments);
6855
6819
  }
6856
6820
  return startTranscription;
6857
- }())
6821
+ }()
6822
+ /**
6823
+ * Starts transcription when requested by the current Locus controls and an
6824
+ * active LLM channel is ready.
6825
+ * @internal
6826
+ * @returns {void}
6827
+ */
6828
+ )
6829
+ }, {
6830
+ key: "startTranscriptionIfNeeded",
6831
+ value: function startTranscriptionIfNeeded() {
6832
+ var _this$locusInfo$contr2, _this$locusInfo$contr3, _this$voiceaChannel2;
6833
+ if ((_this$locusInfo$contr2 = this.locusInfo.controls) !== null && _this$locusInfo$contr2 !== void 0 && (_this$locusInfo$contr3 = _this$locusInfo$contr2.transcribe) !== null && _this$locusInfo$contr3 !== void 0 && _this$locusInfo$contr3.transcribing && !this.areVoiceaEventsSetup && (_this$voiceaChannel2 = this.voiceaChannel) !== null && _this$voiceaChannel2 !== void 0 && _this$voiceaChannel2.isLLMConnected()) {
6834
+ this.startTranscription();
6835
+ }
6836
+ }
6858
6837
  }, {
6859
6838
  key: "isRelayEventRouteValid",
6860
6839
  value:
6861
6840
  /**
6862
6841
  * Verifies the relay event was delivered for the active LLM session binding.
6842
+ * With the factory pattern, each meeting owns its channel, so we just verify
6843
+ * the route matches our channel's binding or the practice session binding.
6863
6844
  * @param {RelayEvent} event Event object coming from LLM Connection
6864
6845
  * @returns {boolean}
6865
6846
  */
6866
6847
  function isRelayEventRouteValid(event) {
6867
- var _event$headers;
6848
+ var _event$headers, _this$webinar$isPract, _this$webinar, _this$webinar2, _this$llmChannel;
6868
6849
  var route = event === null || event === void 0 ? void 0 : (_event$headers = event.headers) === null || _event$headers === void 0 ? void 0 : _event$headers.route;
6869
6850
  if (!route) {
6870
6851
  return true;
6871
6852
  }
6872
- var llm = this.webex.internal.llm;
6873
- var isPracticeSession = llm.isConnected(_constants.LLM_PRACTICE_SESSION);
6874
- var expectedBinding = isPracticeSession ? llm.getBinding(_constants.LLM_PRACTICE_SESSION) : llm.getBinding();
6853
+
6854
+ // With the factory pattern, both channels may be connected simultaneously.
6855
+ // Determine which session is "active" based on whether PS channel is connected.
6856
+ var isPracticeSession = (_this$webinar$isPract = (_this$webinar = this.webinar) === null || _this$webinar === void 0 ? void 0 : _this$webinar.isPracticeSessionLLMChannelConnected()) !== null && _this$webinar$isPract !== void 0 ? _this$webinar$isPract : false;
6857
+ var expectedBinding = isPracticeSession ? (_this$webinar2 = this.webinar) === null || _this$webinar2 === void 0 ? void 0 : _this$webinar2.getPracticeSessionBinding() : (_this$llmChannel = this.llmChannel) === null || _this$llmChannel === void 0 ? void 0 : _this$llmChannel.getBinding();
6875
6858
  if (!expectedBinding || route === expectedBinding) {
6876
6859
  return true;
6877
6860
  }
@@ -6885,23 +6868,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6885
6868
  * @returns {void}
6886
6869
  */
6887
6870
  function stopTranscription() {
6888
- // @ts-ignore
6889
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
6890
-
6891
- // @ts-ignore
6892
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
6893
-
6894
- // @ts-ignore
6895
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
6896
-
6897
- // @ts-ignore
6898
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
6899
-
6900
- // @ts-ignore
6901
- this.webex.internal.voicea.deregisterEvents();
6902
- this.areVoiceaEventsSetup = false;
6903
- this.triggerStopReceivingTranscriptionEvent();
6904
- }
6871
+ var _this$voiceaChannel3, _this$voiceaChannel4, _this$voiceaChannel5, _this$voiceaChannel6, _this$voiceaChannel7;
6872
+ (_this$voiceaChannel3 = this.voiceaChannel) === null || _this$voiceaChannel3 === void 0 ? void 0 : _this$voiceaChannel3.off(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
6873
+ (_this$voiceaChannel4 = this.voiceaChannel) === null || _this$voiceaChannel4 === void 0 ? void 0 : _this$voiceaChannel4.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
6874
+ (_this$voiceaChannel5 = this.voiceaChannel) === null || _this$voiceaChannel5 === void 0 ? void 0 : _this$voiceaChannel5.off(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
6875
+ (_this$voiceaChannel6 = this.voiceaChannel) === null || _this$voiceaChannel6 === void 0 ? void 0 : _this$voiceaChannel6.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
6876
+ (_this$voiceaChannel7 = this.voiceaChannel) === null || _this$voiceaChannel7 === void 0 ? void 0 : _this$voiceaChannel7.deregisterEvents();
6877
+ this.areVoiceaEventsSetup = false;
6878
+ this.triggerStopReceivingTranscriptionEvent();
6879
+ }
6905
6880
 
6906
6881
  /**
6907
6882
  * triggers an event to notify that the user
@@ -6927,15 +6902,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6927
6902
  key: "restoreLLMSubscriptionsIfNeeded",
6928
6903
  value: function restoreLLMSubscriptionsIfNeeded() {
6929
6904
  try {
6930
- var _this$webex$internal$9, _this$webex$internal$0;
6931
- var keepTranscriptionSubscribed = // @ts-ignore
6932
- (_this$webex$internal$9 = this.webex.internal.voicea) === null || _this$webex$internal$9 === void 0 ? void 0 : (_this$webex$internal$0 = _this$webex$internal$9.getKeepTranscriptionSubscribed) === null || _this$webex$internal$0 === void 0 ? void 0 : _this$webex$internal$0.call(_this$webex$internal$9);
6905
+ var _this$voiceaChannel8, _this$voiceaChannel9;
6906
+ var keepTranscriptionSubscribed = (_this$voiceaChannel8 = this.voiceaChannel) === null || _this$voiceaChannel8 === void 0 ? void 0 : _this$voiceaChannel8.getKeepTranscriptionSubscribed();
6933
6907
  if (!keepTranscriptionSubscribed) {
6934
6908
  return;
6935
6909
  }
6936
-
6937
- // @ts-ignore
6938
- this.webex.internal.voicea.updateSubchannelSubscriptions({
6910
+ (_this$voiceaChannel9 = this.voiceaChannel) === null || _this$voiceaChannel9 === void 0 ? void 0 : _this$voiceaChannel9.updateSubchannelSubscriptions({
6939
6911
  subscribe: ['transcription']
6940
6912
  });
6941
6913
  } catch (error) {
@@ -6959,7 +6931,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6959
6931
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
6960
6932
  */
6961
6933
  function () {
6962
- var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
6934
+ var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
6963
6935
  var _this34 = this;
6964
6936
  var options,
6965
6937
  errorMessage,
@@ -6970,26 +6942,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6970
6942
  _error4,
6971
6943
  _errorMessage3,
6972
6944
  _error5,
6973
- _args21 = arguments,
6945
+ _args20 = arguments,
6974
6946
  _t13;
6975
- return _regenerator.default.wrap(function (_context21) {
6976
- while (1) switch (_context21.prev = _context21.next) {
6947
+ return _regenerator.default.wrap(function (_context20) {
6948
+ while (1) switch (_context20.prev = _context20.next) {
6977
6949
  case 0:
6978
- options = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
6950
+ options = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
6979
6951
  if (this.webex.meetings.registered) {
6980
- _context21.next = 1;
6952
+ _context20.next = 1;
6981
6953
  break;
6982
6954
  }
6983
6955
  errorMessage = 'Meeting:index#join --> Device not registered';
6984
6956
  error = new Error(errorMessage);
6985
6957
  _loggerProxy.default.logger.error(errorMessage);
6986
- return _context21.abrupt("return", _promise.default.reject(error));
6958
+ return _context20.abrupt("return", _promise.default.reject(error));
6987
6959
  case 1:
6988
6960
  if (!this.deferJoin) {
6989
- _context21.next = 2;
6961
+ _context20.next = 2;
6990
6962
  break;
6991
6963
  }
6992
- return _context21.abrupt("return", this.deferJoin);
6964
+ return _context20.abrupt("return", this.deferJoin);
6993
6965
  case 2:
6994
6966
  // Create a deferred promise for a consistent resolve value from utils.
6995
6967
  // This also prevents redundant API calls.
@@ -7041,15 +7013,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7041
7013
  this.wirelessShare = true;
7042
7014
  }
7043
7015
  if (!options.meetingQuality) {
7044
- _context21.next = 6;
7016
+ _context20.next = 6;
7045
7017
  break;
7046
7018
  }
7047
7019
  if (!(typeof options.meetingQuality === 'string')) {
7048
- _context21.next = 4;
7020
+ _context20.next = 4;
7049
7021
  break;
7050
7022
  }
7051
7023
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
7052
- _context21.next = 3;
7024
+ _context20.next = 3;
7053
7025
  break;
7054
7026
  }
7055
7027
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -7057,16 +7029,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7057
7029
  _loggerProxy.default.logger.error(_errorMessage2);
7058
7030
  joinFailed(_error4);
7059
7031
  this.deferJoin = undefined;
7060
- return _context21.abrupt("return", _promise.default.reject(_error4));
7032
+ return _context20.abrupt("return", _promise.default.reject(_error4));
7061
7033
  case 3:
7062
7034
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
7063
7035
  case 4:
7064
7036
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
7065
- _context21.next = 6;
7037
+ _context20.next = 6;
7066
7038
  break;
7067
7039
  }
7068
7040
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
7069
- _context21.next = 5;
7041
+ _context20.next = 5;
7070
7042
  break;
7071
7043
  }
7072
7044
  _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -7074,25 +7046,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7074
7046
  _error5 = new Error(_errorMessage3);
7075
7047
  joinFailed(_error5);
7076
7048
  this.deferJoin = undefined;
7077
- return _context21.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
7049
+ return _context20.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
7078
7050
  case 5:
7079
7051
  if (options.meetingQuality.remote) {
7080
7052
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
7081
7053
  }
7082
7054
  case 6:
7083
7055
  this.isMultistream = !!options.enableMultistream;
7084
- _context21.prev = 7;
7085
- _context21.next = 8;
7056
+ _context20.prev = 7;
7057
+ _context20.next = 8;
7086
7058
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
7087
7059
  case 8:
7088
- _context21.next = 10;
7060
+ _context20.next = 10;
7089
7061
  break;
7090
7062
  case 9:
7091
- _context21.prev = 9;
7092
- _t13 = _context21["catch"](7);
7063
+ _context20.prev = 9;
7064
+ _t13 = _context20["catch"](7);
7093
7065
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t13);
7094
7066
  if (!(_t13 instanceof _captchaError.default || _t13 instanceof _passwordError.default || _t13 instanceof _permission.default)) {
7095
- _context21.next = 10;
7067
+ _context20.next = 10;
7096
7068
  break;
7097
7069
  }
7098
7070
  this.meetingFiniteStateMachine.fail(_t13);
@@ -7107,9 +7079,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7107
7079
 
7108
7080
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
7109
7081
  // and bubble it up to client
7110
- return _context21.abrupt("return", _promise.default.reject(_t13));
7082
+ return _context20.abrupt("return", _promise.default.reject(_t13));
7111
7083
  case 10:
7112
- return _context21.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
7084
+ return _context20.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
7113
7085
  _this34.meetingFiniteStateMachine.join();
7114
7086
  _this34.setupLocusMediaRequest();
7115
7087
 
@@ -7146,10 +7118,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7146
7118
  _this34.saveDataChannelToken(join);
7147
7119
  // @ts-ignore - config coming from registerPlugin
7148
7120
  if (_this34.config.enableAutomaticLLM) {
7149
- // @ts-ignore
7150
- _this34.webex.internal.llm.off('online', _this34.handleLLMOnline);
7151
- // @ts-ignore
7152
- _this34.webex.internal.llm.on('online', _this34.handleLLMOnline);
7153
7121
  _this34.updateLLMConnection({
7154
7122
  isInitialJoinPhase: true
7155
7123
  }).catch(function (error) {
@@ -7167,9 +7135,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7167
7135
  }));
7168
7136
  case 11:
7169
7137
  case "end":
7170
- return _context21.stop();
7138
+ return _context20.stop();
7171
7139
  }
7172
- }, _callee21, this, [[7, 9]]);
7140
+ }, _callee20, this, [[7, 9]]);
7173
7141
  }));
7174
7142
  function join() {
7175
7143
  return _join.apply(this, arguments);
@@ -7189,11 +7157,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7189
7157
  // first cancel any existing timer
7190
7158
  this.clearLLMHealthCheckTimer();
7191
7159
  this.llmHealthCheckTimer = setTimeout(function () {
7192
- // @ts-ignore
7193
- var isConnected = _this35.webex.internal.llm.isConnected();
7160
+ var _this35$llmChannel$is, _this35$llmChannel;
7161
+ var isConnected = (_this35$llmChannel$is = (_this35$llmChannel = _this35.llmChannel) === null || _this35$llmChannel === void 0 ? void 0 : _this35$llmChannel.isConnected()) !== null && _this35$llmChannel$is !== void 0 ? _this35$llmChannel$is : false;
7194
7162
  if (!isConnected) {
7195
- // @ts-ignore
7196
- var hasEverConnected = _this35.webex.internal.llm.hasEverConnected;
7163
+ var _this35$llmChannel$ha, _this35$llmChannel2;
7164
+ var hasEverConnected = (_this35$llmChannel$ha = (_this35$llmChannel2 = _this35.llmChannel) === null || _this35$llmChannel2 === void 0 ? void 0 : _this35$llmChannel2.hasEverConnected) !== null && _this35$llmChannel$ha !== void 0 ? _this35$llmChannel$ha : false;
7197
7165
 
7198
7166
  // only send metric if not connected - to avoid too many metrics
7199
7167
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_HEALTHCHECK_FAILURE, {
@@ -7231,10 +7199,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7231
7199
  }, {
7232
7200
  key: "stopListeningForLLMEvents",
7233
7201
  value: function stopListeningForLLMEvents() {
7234
- // @ts-ignore - fix types
7235
- this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
7236
- // @ts-ignore - fix types
7237
- this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
7202
+ var _this$llmChannel2, _this$llmChannel3, _this$llmChannel4, _this$breakouts3;
7203
+ (_this$llmChannel2 = this.llmChannel) === null || _this$llmChannel2 === void 0 ? void 0 : _this$llmChannel2.off('event:relay.event', this.processRelayEvent);
7204
+ (_this$llmChannel3 = this.llmChannel) === null || _this$llmChannel3 === void 0 ? void 0 : _this$llmChannel3.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
7205
+ (_this$llmChannel4 = this.llmChannel) === null || _this$llmChannel4 === void 0 ? void 0 : _this$llmChannel4.off('online', this.handleLLMOnline);
7206
+ (_this$breakouts3 = this.breakouts) === null || _this$breakouts3 === void 0 ? void 0 : _this$breakouts3.unregisterLLMChannel();
7207
+ // voiceaChannel persists across LLM reconnects; switchLLMChannel() handles re-subscribing
7238
7208
  this.clearLLMHealthCheckTimer();
7239
7209
  }
7240
7210
 
@@ -7259,30 +7229,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7259
7229
  value: function stopListeningForMeetingEvents() {
7260
7230
  this.stopListeningForLLMEvents();
7261
7231
  this.stopListeningForMercuryEvents();
7262
- if (this.transcription) {
7232
+ if (this.areVoiceaEventsSetup) {
7263
7233
  this.stopTranscription();
7264
- this.transcription = undefined;
7265
7234
  }
7235
+ // Reset to initial shape instead of null - transcription is always a valid object
7236
+ this.transcription = this.getInitialTranscription();
7266
7237
  this.annotation.deregisterEvents();
7267
7238
  }
7268
7239
  }, {
7269
- key: "clearDataChannelToken",
7240
+ key: "setLLMChannelDataToken",
7270
7241
  value:
7271
7242
  /**
7272
- * Clears data channel tokens associated with this meeting ownership.
7273
- * Ownership checks are enforced in internal-plugin-llm.
7243
+ * Sets the datachannel token on the meeting's LLM channel.
7244
+ * Used by the DataChannelAuthTokenInterceptor after refreshing tokens.
7245
+ * @param {string} token - The new datachannel token
7274
7246
  * @returns {void}
7275
7247
  */
7276
- function clearDataChannelToken() {
7277
- // @ts-ignore
7278
- this.webex.internal.llm.clearDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id);
7279
- // @ts-ignore
7280
- this.webex.internal.llm.clearDatachannelToken(_constants.LLM_PRACTICE_SESSION, this.id);
7248
+ function setLLMChannelDataToken(token) {
7249
+ var _this$llmChannel5;
7250
+ (_this$llmChannel5 = this.llmChannel) === null || _this$llmChannel5 === void 0 ? void 0 : _this$llmChannel5.setDatachannelToken(token);
7281
7251
  }
7282
7252
 
7283
7253
  /**
7284
- * Saves the data channel tokens from the join response into LLM so that
7285
- * updateLLMConnection / updatePSDataChannel don't need to fetch them from locusInfo.
7254
+ * Saves the data channel tokens from the join response.
7255
+ * Default session token is stored on this.llmChannel when available.
7256
+ * Practice session token is stored on the webinar's practice LLM channel.
7286
7257
  * @param {Object} join - The parsed join response (from MeetingUtil.parseLocusJoin)
7287
7258
  * @returns {void}
7288
7259
  */
@@ -7292,13 +7263,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7292
7263
  var _join$locus, _join$locus$self, _join$locus2, _join$locus2$self;
7293
7264
  var datachannelToken = join === null || join === void 0 ? void 0 : (_join$locus = join.locus) === null || _join$locus === void 0 ? void 0 : (_join$locus$self = _join$locus.self) === null || _join$locus$self === void 0 ? void 0 : _join$locus$self.datachannelToken;
7294
7265
  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;
7266
+
7267
+ // Store default session token on our LLM channel if it exists
7268
+ if (datachannelToken && this.llmChannel) {
7269
+ this.llmChannel.setDatachannelToken(datachannelToken);
7270
+ }
7271
+
7272
+ // Store the token temporarily for use when channel is created
7295
7273
  if (datachannelToken) {
7296
- // @ts-ignore
7297
- this.webex.internal.llm.setDatachannelToken(datachannelToken, _constants.LLM_DEFAULT_SESSION, this.id);
7274
+ this._pendingDatachannelToken = datachannelToken;
7298
7275
  }
7276
+
7277
+ // Practice session token is handled by webinar
7299
7278
  if (practiceSessionDatachannelToken) {
7300
- // @ts-ignore
7301
- this.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION, this.id);
7279
+ this.webinar.setPracticeSessionDatachannelToken(practiceSessionDatachannelToken);
7302
7280
  }
7303
7281
  }
7304
7282
 
@@ -7310,55 +7288,58 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7310
7288
  }, {
7311
7289
  key: "ensureDefaultDatachannelTokenAfterAdmit",
7312
7290
  value: (function () {
7313
- var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
7314
- var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t14;
7315
- return _regenerator.default.wrap(function (_context22) {
7316
- while (1) switch (_context22.prev = _context22.next) {
7291
+ var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
7292
+ var _this$llmChannel$getD, _this$llmChannel6, _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t14;
7293
+ return _regenerator.default.wrap(function (_context21) {
7294
+ while (1) switch (_context21.prev = _context21.next) {
7317
7295
  case 0:
7318
- _context22.prev = 0;
7319
- // @ts-ignore
7320
- datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id); // @ts-ignore
7321
- _context22.next = 1;
7296
+ _context21.prev = 0;
7297
+ datachannelToken = (_this$llmChannel$getD = (_this$llmChannel6 = this.llmChannel) === null || _this$llmChannel6 === void 0 ? void 0 : _this$llmChannel6.getDatachannelToken()) !== null && _this$llmChannel$getD !== void 0 ? _this$llmChannel$getD : this._pendingDatachannelToken; // @ts-ignore
7298
+ _context21.next = 1;
7322
7299
  return this.webex.internal.llm.isDataChannelTokenEnabled();
7323
7300
  case 1:
7324
- isDataChannelTokenEnabled = _context22.sent;
7301
+ isDataChannelTokenEnabled = _context21.sent;
7325
7302
  if (!(!isDataChannelTokenEnabled || datachannelToken)) {
7326
- _context22.next = 2;
7303
+ _context21.next = 2;
7327
7304
  break;
7328
7305
  }
7329
- return _context22.abrupt("return", false);
7306
+ return _context21.abrupt("return", false);
7330
7307
  case 2:
7331
- _context22.next = 3;
7308
+ _context21.next = 3;
7332
7309
  return this.meetingRequest.fetchDatachannelToken({
7333
7310
  locusUrl: this.locusUrl,
7334
7311
  requestingParticipantId: this.members.selfId,
7335
7312
  isPracticeSession: false
7336
7313
  });
7337
7314
  case 3:
7338
- response = _context22.sent;
7315
+ response = _context21.sent;
7339
7316
  fetchedDatachannelToken = response === null || response === void 0 ? void 0 : (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.datachannelToken;
7340
7317
  if (fetchedDatachannelToken) {
7341
- _context22.next = 4;
7318
+ _context21.next = 4;
7342
7319
  break;
7343
7320
  }
7344
- return _context22.abrupt("return", false);
7321
+ return _context21.abrupt("return", false);
7345
7322
  case 4:
7346
- // @ts-ignore
7347
- this.webex.internal.llm.setDatachannelToken(fetchedDatachannelToken, _constants.LLM_DEFAULT_SESSION, this.id);
7348
- return _context22.abrupt("return", true);
7323
+ // Store on channel if exists, otherwise save as pending
7324
+ if (this.llmChannel) {
7325
+ this.llmChannel.setDatachannelToken(fetchedDatachannelToken);
7326
+ } else {
7327
+ this._pendingDatachannelToken = fetchedDatachannelToken;
7328
+ }
7329
+ return _context21.abrupt("return", true);
7349
7330
  case 5:
7350
- _context22.prev = 5;
7351
- _t14 = _context22["catch"](0);
7331
+ _context21.prev = 5;
7332
+ _t14 = _context21["catch"](0);
7352
7333
  msg = (_t14 === null || _t14 === void 0 ? void 0 : _t14.message) || String(_t14);
7353
7334
  _loggerProxy.default.logger.warn("Meeting:index#ensureDefaultDatachannelTokenAfterAdmit --> failed to proactively fetch default data channel token after admit: ".concat(msg), {
7354
7335
  statusCode: _t14 === null || _t14 === void 0 ? void 0 : _t14.statusCode
7355
7336
  });
7356
- return _context22.abrupt("return", false);
7337
+ return _context21.abrupt("return", false);
7357
7338
  case 6:
7358
7339
  case "end":
7359
- return _context22.stop();
7340
+ return _context21.stop();
7360
7341
  }
7361
- }, _callee22, this, [[0, 5]]);
7342
+ }, _callee21, this, [[0, 5]]);
7362
7343
  }));
7363
7344
  function ensureDefaultDatachannelTokenAfterAdmit() {
7364
7345
  return _ensureDefaultDatachannelTokenAfterAdmit.apply(this, arguments);
@@ -7376,8 +7357,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7376
7357
  }, {
7377
7358
  key: "updateLLMConnection",
7378
7359
  value: (function () {
7379
- var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
7380
- var _this36 = this;
7360
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
7361
+ var _this$_pendingDatacha,
7362
+ _this36 = this;
7381
7363
  var _ref40,
7382
7364
  _ref40$isInitialJoinP,
7383
7365
  isInitialJoinPhase,
@@ -7390,135 +7372,104 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7390
7372
  datachannelUrl,
7391
7373
  isJoined,
7392
7374
  dataChannelUrl,
7393
- _this$webex$internal$1,
7394
- currentOwner,
7395
- wasConnected,
7375
+ isSameUrls,
7396
7376
  datachannelToken,
7397
- refreshHandlerOwnerMeetingId,
7398
- shouldAlignRefreshHandlerAfterOwnershipClaim,
7399
- _args23 = arguments;
7400
- return _regenerator.default.wrap(function (_context23) {
7401
- while (1) switch (_context23.prev = _context23.next) {
7377
+ _args22 = arguments;
7378
+ return _regenerator.default.wrap(function (_context22) {
7379
+ while (1) switch (_context22.prev = _context22.next) {
7402
7380
  case 0:
7403
- _ref40 = _args23.length > 0 && _args23[0] !== undefined ? _args23[0] : {}, _ref40$isInitialJoinP = _ref40.isInitialJoinPhase, isInitialJoinPhase = _ref40$isInitialJoinP === void 0 ? false : _ref40$isInitialJoinP;
7381
+ _ref40 = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : {}, _ref40$isInitialJoinP = _ref40.isInitialJoinPhase, isInitialJoinPhase = _ref40$isInitialJoinP === void 0 ? false : _ref40$isInitialJoinP;
7404
7382
  // @ts-ignore - Fix type
7405
7383
  _ref41 = this.locusInfo || {}, _ref41$url = _ref41.url, url = _ref41$url === void 0 ? undefined : _ref41$url, _ref41$info = _ref41.info, _ref41$info2 = _ref41$info === void 0 ? {} : _ref41$info, _ref41$info2$datachan = _ref41$info2.datachannelUrl, datachannelUrl = _ref41$info2$datachan === void 0 ? undefined : _ref41$info2$datachan;
7406
7384
  isJoined = this.isJoined();
7407
- dataChannelUrl = datachannelUrl; // Ownership guard: when the default LLM session is already connected and
7408
- // owned by a *different* Meeting instance, do not disconnect or reconfigure
7409
- // it. Another meeting's `updateLLMConnection` must be ignored here to
7410
- // avoid killing the socket it relies on. We only proceed to manage the
7411
- // connection when this meeting is the current owner, or when no owner is
7412
- // set yet (first claim).
7413
- // @ts-ignore - Fix type
7414
- _this$webex$internal$1 = this.webex.internal.llm.resolveSessionOwnership(this.id, _constants.LLM_DEFAULT_SESSION), currentOwner = _this$webex$internal$1.currentOwner; // Capture connectivity before any reconnect attempt. If LLM was already
7415
- // connected, we must respect current ownership. If it was disconnected,
7416
- // this flow may reclaim stale owner tags after a fresh connect.
7417
- // @ts-ignore - Fix type
7418
- wasConnected = this.webex.internal.llm.isConnected(); // Prefer ownership-scoped token read. For disconnected stale-owner reclaim
7419
- // flows, fallback to ownerless read so initial register can still carry a
7420
- // token and recover from stale ownership without 401/403 dead-end.
7421
- // @ts-ignore - Fix type
7422
- datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id);
7423
- if (!datachannelToken && !wasConnected && currentOwner && currentOwner !== this.id) {
7424
- // @ts-ignore - Fix type
7425
- datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION);
7426
- }
7427
-
7428
- // @ts-ignore - Fix type
7429
- if (!wasConnected) {
7430
- _context23.next = 3;
7385
+ dataChannelUrl = datachannelUrl; // If we have an existing channel, check if we should reuse it or clean it up
7386
+ if (!this.llmChannel) {
7387
+ _context22.next = 3;
7431
7388
  break;
7432
7389
  }
7433
- if (!(currentOwner && currentOwner !== this.id)) {
7434
- _context23.next = 1;
7390
+ isSameUrls = url === this.llmChannel.getLocusUrl() && dataChannelUrl === this.llmChannel.getDatachannelUrl(); // If already connected to same URLs, skip reconnect
7391
+ if (!(this.llmChannel.isConnected() && isSameUrls && isJoined)) {
7392
+ _context22.next = 1;
7435
7393
  break;
7436
7394
  }
7437
- // Another meeting owns the live LLM socket. We must not disconnect
7438
- // or reconfigure it -- doing so would tear down a session the
7439
- // owning meeting still relies on. Locus/datachannel URL mismatch is
7440
- // expected here (each meeting has its own locus URL) and is NOT a
7441
- // valid signal of staleness, so we never reclaim from this path.
7442
- // The only safe reclaim mechanism is the `finally`-block owner-tag
7443
- // release in `cleanupLLMConneciton`, which fires when this meeting
7444
- // itself is being torn down.
7445
- _loggerProxy.default.logger.info("Meeting:index#updateLLMConnection --> skipping; LLM owned by meeting ".concat(currentOwner, ", not ").concat(this.id));
7446
- return _context23.abrupt("return", undefined);
7395
+ return _context22.abrupt("return", undefined);
7447
7396
  case 1:
7448
- if (!(
7449
- // @ts-ignore - Fix type
7450
- url === this.webex.internal.llm.getLocusUrl() &&
7451
- // @ts-ignore - Fix type
7452
- dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
7453
- _context23.next = 2;
7397
+ if (!(this.llmChannel.isConnecting() && isSameUrls && isJoined)) {
7398
+ _context22.next = 2;
7454
7399
  break;
7455
7400
  }
7456
- return _context23.abrupt("return", undefined);
7401
+ return _context22.abrupt("return", undefined);
7457
7402
  case 2:
7458
- _context23.next = 3;
7403
+ _context22.next = 3;
7459
7404
  return this.cleanupLLMConneciton({
7460
- removeOnlineListener: false
7405
+ preserveVoiceaChannel: true
7461
7406
  });
7462
7407
  case 3:
7463
7408
  if (isJoined) {
7464
- _context23.next = 4;
7409
+ _context22.next = 4;
7465
7410
  break;
7466
7411
  }
7467
- return _context23.abrupt("return", undefined);
7412
+ return _context22.abrupt("return", undefined);
7468
7413
  case 4:
7469
- // Bind refresh handler before registration so interceptor-triggered token
7414
+ // Create a new LLM channel for this meeting
7415
+ // @ts-ignore - Fix type
7416
+ this.llmChannel = this.webex.internal.llm.createChannel();
7417
+
7418
+ // Get token from pending (saved from join response) or channel
7419
+ datachannelToken = (_this$_pendingDatacha = this._pendingDatachannelToken) !== null && _this$_pendingDatacha !== void 0 ? _this$_pendingDatacha : this.llmChannel.getDatachannelToken(); // Set up refresh handler before registration so interceptor-triggered token
7470
7420
  // refresh during register POST can resolve a valid handler.
7471
- // Prefer this meeting as owner, but allow owner-less fallback when a stale
7472
- // foreign owner tag is present on a disconnected session.
7473
- refreshHandlerOwnerMeetingId = currentOwner && currentOwner !== this.id ? undefined : this.id;
7474
- shouldAlignRefreshHandlerAfterOwnershipClaim = refreshHandlerOwnerMeetingId !== this.id; // @ts-ignore - Fix type
7475
- this.webex.internal.llm.setRefreshHandler(function () {
7421
+ this.llmChannel.setRefreshHandler(function () {
7476
7422
  return _this36.refreshDataChannelToken();
7477
- }, _constants.LLM_DEFAULT_SESSION, refreshHandlerOwnerMeetingId);
7423
+ });
7478
7424
 
7479
- // @ts-ignore - Fix type
7480
- return _context23.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
7425
+ // If we have a pending token, store it on the channel
7426
+ if (this._pendingDatachannelToken) {
7427
+ this.llmChannel.setDatachannelToken(this._pendingDatachannelToken);
7428
+ this._pendingDatachannelToken = undefined;
7429
+ }
7430
+ return _context22.abrupt("return", this.llmChannel.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
7431
+ var _this36$webinar, _this36$webinar$isPra, _this36$webinar2;
7481
7432
  _this36.locusInfo.syncAllHashTreeDatasets({
7482
7433
  onlyLLM: true
7483
7434
  });
7484
- // Record ownership of the default LLM session for this meeting so
7485
- // subsequent cross-meeting `updateLLMConnection` / `cleanupLLMConneciton`
7486
- // calls can detect and skip work that doesn't belong to them.
7487
- // @ts-ignore - Fix type
7488
- var _this36$webex$interna = _this36.webex.internal.llm.resolveSessionOwnership(_this36.id, _constants.LLM_DEFAULT_SESSION),
7489
- isOwner = _this36$webex$interna.isOwner;
7490
- var canReclaimAfterDisconnectedStart = !wasConnected;
7491
-
7492
- // Refresh handler is pre-bound before registerAndConnect so token
7493
- // refresh can work even during the registration request itself.
7494
- if (isOwner || canReclaimAfterDisconnectedStart) {
7495
- var _this36$webex$interna2, _this36$webex$interna3;
7496
- // Record ownership of the default LLM session for this meeting so
7497
- // subsequent cross-meeting `updateLLMConnection` / `cleanupLLMConneciton`
7498
- // calls can detect and skip work that doesn't belong to them.
7499
- // @ts-ignore - Fix type
7500
- (_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);
7501
-
7502
- // If we pre-bound refresh ownerlessly (stale-owner reclaim path),
7503
- // align the handler with the newly claimed owner immediately after
7504
- // ownership is updated.
7505
- if (shouldAlignRefreshHandlerAfterOwnershipClaim) {
7506
- // @ts-ignore - Fix type
7507
- _this36.webex.internal.llm.setRefreshHandler(function () {
7508
- return _this36.refreshDataChannelToken();
7509
- }, _constants.LLM_DEFAULT_SESSION, _this36.id);
7510
- }
7435
+
7436
+ // Register event listeners on the channel
7437
+ _this36.llmChannel.off('event:relay.event', _this36.processRelayEvent);
7438
+ _this36.llmChannel.on('event:relay.event', _this36.processRelayEvent);
7439
+ _this36.llmChannel.off(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
7440
+ _this36.llmChannel.on(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
7441
+ _this36.llmChannel.off('online', _this36.handleLLMOnline);
7442
+ _this36.llmChannel.on('online', _this36.handleLLMOnline);
7443
+
7444
+ // Register annotation channel only if not in practice session
7445
+ // (practice session manages its own annotation channel via updatePSDataChannel)
7446
+ if (!((_this36$webinar = _this36.webinar) !== null && _this36$webinar !== void 0 && _this36$webinar.isJoinPracticeSessionDataChannel())) {
7447
+ _this36.annotation.registerChannel(_this36.llmChannel);
7511
7448
  }
7512
- // @ts-ignore - Fix type
7513
- _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
7514
- // @ts-ignore - Fix type
7515
- _this36.webex.internal.llm.on('event:relay.event', _this36.processRelayEvent);
7516
- // @ts-ignore - Fix type
7517
- _this36.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
7518
- // @ts-ignore - Fix type
7519
- _this36.webex.internal.llm.on(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
7449
+
7450
+ // Register breakouts channel
7451
+ _this36.breakouts.registerLLMChannel(_this36.llmChannel);
7520
7452
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
7521
7453
  _this36.startLLMHealthCheckTimer();
7454
+
7455
+ // Switch voiceaChannel to use the new LLM channel (preserves transcription state).
7456
+ // Skip if practice session is active - practice session manages its own voicea binding
7457
+ // via updatePSDataChannel, and switching here would break practice session captions.
7458
+ var isPracticeSessionActive = (_this36$webinar$isPra = (_this36$webinar2 = _this36.webinar) === null || _this36$webinar2 === void 0 ? void 0 : _this36$webinar2.isPracticeSessionLLMChannelConnected()) !== null && _this36$webinar$isPra !== void 0 ? _this36$webinar$isPra : false;
7459
+ if (!_this36.voiceaChannel) {
7460
+ // @ts-ignore - Fix type
7461
+ _this36.voiceaChannel = _this36.webex.internal.voicea.createChannel();
7462
+ }
7463
+ if (!isPracticeSessionActive) {
7464
+ // Fire-and-forget: caption restoration shouldn't block LLM connection result.
7465
+ // transcription is always initialized (reset to initial shape, never null),
7466
+ // so no re-init needed here.
7467
+ _this36.voiceaChannel.switchLLMChannel(_this36.llmChannel).then(function () {
7468
+ _this36.startTranscriptionIfNeeded();
7469
+ }).catch(function (error) {
7470
+ _loggerProxy.default.logger.warn('Meeting:index#updateLLMConnection --> failed to switch voicea channel:', error);
7471
+ });
7472
+ }
7522
7473
  if (registerAndConnectResult) {
7523
7474
  var _this36$breakouts;
7524
7475
  if (isInitialJoinPhase) {
@@ -7546,13 +7497,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7546
7497
  llmLatency: llmLatency,
7547
7498
  error: error
7548
7499
  });
7500
+
7501
+ // Clean up the channel on failure
7502
+ _this36.llmChannel = undefined;
7549
7503
  return _promise.default.reject(error);
7550
7504
  }));
7551
7505
  case 5:
7552
7506
  case "end":
7553
- return _context23.stop();
7507
+ return _context22.stop();
7554
7508
  }
7555
- }, _callee23, this);
7509
+ }, _callee22, this);
7556
7510
  }));
7557
7511
  function updateLLMConnection() {
7558
7512
  return _updateLLMConnection.apply(this, arguments);
@@ -7597,9 +7551,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7597
7551
  }, {
7598
7552
  key: "sendLLMConnectMetric",
7599
7553
  value: function sendLLMConnectMetric(timings, error) {
7600
- var _this$webex$internal$10, _this$webex$internal$11;
7554
+ var _this$webex$internal$5, _this$webex$internal$6;
7601
7555
  // @ts-ignore
7602
- var llmWebsocketUrl = ((_this$webex$internal$10 = (_this$webex$internal$11 = this.webex.internal.llm).getWebSocketUrl) === null || _this$webex$internal$10 === void 0 ? void 0 : _this$webex$internal$10.call(_this$webex$internal$11)) || undefined;
7556
+ var llmWebsocketUrl = ((_this$webex$internal$5 = (_this$webex$internal$6 = this.webex.internal.llm).getWebSocketUrl) === null || _this$webex$internal$5 === void 0 ? void 0 : _this$webex$internal$5.call(_this$webex$internal$6)) || undefined;
7603
7557
  var _ref42 = timings || {},
7604
7558
  _ref42$clientLLMDatac = _ref42.clientLLMDatachannelResponseTime,
7605
7559
  clientLLMDatachannelResponseTime = _ref42$clientLLMDatac === void 0 ? 0 : _ref42$clientLLMDatac,
@@ -7809,17 +7763,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7809
7763
  meetingId: this.id
7810
7764
  }
7811
7765
  });
7812
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
7766
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
7813
7767
  var mediaSettings, _t15;
7814
- return _regenerator.default.wrap(function (_context24) {
7815
- while (1) switch (_context24.prev = _context24.next) {
7768
+ return _regenerator.default.wrap(function (_context23) {
7769
+ while (1) switch (_context23.prev = _context23.next) {
7816
7770
  case 0:
7817
- _context24.prev = 0;
7771
+ _context23.prev = 0;
7818
7772
  if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
7819
- _context24.next = 1;
7773
+ _context23.next = 1;
7820
7774
  break;
7821
7775
  }
7822
- _context24.next = 1;
7776
+ _context23.next = 1;
7823
7777
  return _this40.releaseScreenShareFloor();
7824
7778
  case 1:
7825
7779
  mediaSettings = {
@@ -7838,23 +7792,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7838
7792
  // 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
7839
7793
  // once the device answers we close the old connection and create new media server connection with only share enabled
7840
7794
  if (!_this40.statsAnalyzer) {
7841
- _context24.next = 2;
7795
+ _context23.next = 2;
7842
7796
  break;
7843
7797
  }
7844
- _context24.next = 2;
7798
+ _context23.next = 2;
7845
7799
  return _this40.statsAnalyzer.stopAnalyzer();
7846
7800
  case 2:
7847
- _context24.next = 3;
7801
+ _context23.next = 3;
7848
7802
  return _this40.closeRemoteStreams();
7849
7803
  case 3:
7850
- _context24.next = 4;
7804
+ _context23.next = 4;
7851
7805
  return _this40.closePeerConnections();
7852
7806
  case 4:
7853
7807
  _this40.cleanupLocalStreams();
7854
7808
  _this40.unsetRemoteStreams();
7855
7809
  _this40.unsetPeerConnections();
7856
7810
  _this40.reconnectionManager.cleanUp();
7857
- _context24.next = 5;
7811
+ _context23.next = 5;
7858
7812
  return _this40.addMedia({
7859
7813
  audioEnabled: false,
7860
7814
  videoEnabled: false,
@@ -7863,11 +7817,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7863
7817
  case 5:
7864
7818
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
7865
7819
  _this40.isMoveToInProgress = false;
7866
- _context24.next = 7;
7820
+ _context23.next = 7;
7867
7821
  break;
7868
7822
  case 6:
7869
- _context24.prev = 6;
7870
- _t15 = _context24["catch"](0);
7823
+ _context23.prev = 6;
7824
+ _t15 = _context23["catch"](0);
7871
7825
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t15);
7872
7826
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
7873
7827
  correlation_id: _this40.correlationId,
@@ -7878,9 +7832,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7878
7832
  _this40.isMoveToInProgress = false;
7879
7833
  case 7:
7880
7834
  case "end":
7881
- return _context24.stop();
7835
+ return _context23.stop();
7882
7836
  }
7883
- }, _callee24, null, [[0, 6]]);
7837
+ }, _callee23, null, [[0, 6]]);
7884
7838
  })));
7885
7839
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
7886
7840
 
@@ -7973,6 +7927,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7973
7927
  var causeStatusCode = error === null || error === void 0 ? void 0 : (_cause = error.cause) === null || _cause === void 0 ? void 0 : _cause.statusCode;
7974
7928
  return statusCode === 409 || statusCode === 403 || causeStatusCode === 409 || causeStatusCode === 403;
7975
7929
  }
7930
+ }, {
7931
+ key: "isLocusUserFullError",
7932
+ value: function isLocusUserFullError(error) {
7933
+ var _error6, _error6$body;
7934
+ return (error === null || error === void 0 ? void 0 : (_error6 = error.error) === null || _error6 === void 0 ? void 0 : (_error6$body = _error6.body) === null || _error6$body === void 0 ? void 0 : _error6$body.errorCode) === _types.LocusErrorCodes.LOCUS_USER_FULL;
7935
+ }
7976
7936
 
7977
7937
  /**
7978
7938
  * Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
@@ -7990,34 +7950,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7990
7950
  }, {
7991
7951
  key: "shouldRetryMediaWithOnlyTurnTLS",
7992
7952
  value: (function () {
7993
- var _shouldRetryMediaWithOnlyTurnTLS = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25(prevError) {
7953
+ var _shouldRetryMediaWithOnlyTurnTLS = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(prevError) {
7994
7954
  var hasTlsReachability;
7995
- return _regenerator.default.wrap(function (_context25) {
7996
- while (1) switch (_context25.prev = _context25.next) {
7955
+ return _regenerator.default.wrap(function (_context24) {
7956
+ while (1) switch (_context24.prev = _context24.next) {
7997
7957
  case 0:
7998
7958
  if (!(this.isMultistream && prevError instanceof _webexErrors.AddMediaFailed && prevError.isDtlsHandshakeFailure && prevError.connectionType === 'UDP')) {
7999
- _context25.next = 2;
7959
+ _context24.next = 2;
8000
7960
  break;
8001
7961
  }
8002
- _context25.next = 1;
7962
+ _context24.next = 1;
8003
7963
  return this.webex.meetings.reachability.isAnyClusterReachableViaProtocol('xtls');
8004
7964
  case 1:
8005
- hasTlsReachability = _context25.sent;
7965
+ hasTlsReachability = _context24.sent;
8006
7966
  if (!hasTlsReachability) {
8007
- _context25.next = 2;
7967
+ _context24.next = 2;
8008
7968
  break;
8009
7969
  }
8010
7970
  _loggerProxy.default.logger.info('Meeting:index#shouldRetryMediaWithOnlyTurnTLS --> previous attempt failed due to DTLS handshake failure over UDP and TLS reachability is available');
8011
- return _context25.abrupt("return", true);
7971
+ return _context24.abrupt("return", true);
8012
7972
  case 2:
8013
- return _context25.abrupt("return", false);
7973
+ return _context24.abrupt("return", false);
8014
7974
  case 3:
8015
7975
  case "end":
8016
- return _context25.stop();
7976
+ return _context24.stop();
8017
7977
  }
8018
- }, _callee25, this);
7978
+ }, _callee24, this);
8019
7979
  }));
8020
- function shouldRetryMediaWithOnlyTurnTLS(_x17) {
7980
+ function shouldRetryMediaWithOnlyTurnTLS(_x16) {
8021
7981
  return _shouldRetryMediaWithOnlyTurnTLS.apply(this, arguments);
8022
7982
  }
8023
7983
  return shouldRetryMediaWithOnlyTurnTLS;
@@ -8034,10 +7994,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8034
7994
  }, {
8035
7995
  key: "createMediaConnection",
8036
7996
  value: (function () {
8037
- var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26(turnServerInfo, bundlePolicy, iceTransportPolicy) {
7997
+ var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25(turnServerInfo, bundlePolicy, iceTransportPolicy) {
8038
7998
  var mc, audioEnabled, videoEnabled, shareEnabled;
8039
- return _regenerator.default.wrap(function (_context26) {
8040
- while (1) switch (_context26.prev = _context26.next) {
7999
+ return _regenerator.default.wrap(function (_context25) {
8000
+ while (1) switch (_context25.prev = _context25.next) {
8041
8001
  case 0:
8042
8002
  this.rtcMetrics = this.isMultistream ?
8043
8003
  // @ts-ignore
@@ -8083,42 +8043,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8083
8043
 
8084
8044
  // publish the streams
8085
8045
  if (!this.mediaProperties.audioStream) {
8086
- _context26.next = 1;
8046
+ _context25.next = 1;
8087
8047
  break;
8088
8048
  }
8089
8049
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
8090
- _context26.next = 1;
8050
+ _context25.next = 1;
8091
8051
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
8092
8052
  case 1:
8093
8053
  if (!this.mediaProperties.videoStream) {
8094
- _context26.next = 2;
8054
+ _context25.next = 2;
8095
8055
  break;
8096
8056
  }
8097
- _context26.next = 2;
8057
+ _context25.next = 2;
8098
8058
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
8099
8059
  case 2:
8100
8060
  if (!this.mediaProperties.shareVideoStream) {
8101
- _context26.next = 3;
8061
+ _context25.next = 3;
8102
8062
  break;
8103
8063
  }
8104
- _context26.next = 3;
8064
+ _context25.next = 3;
8105
8065
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
8106
8066
  case 3:
8107
8067
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
8108
- _context26.next = 4;
8068
+ _context25.next = 4;
8109
8069
  break;
8110
8070
  }
8111
- _context26.next = 4;
8071
+ _context25.next = 4;
8112
8072
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
8113
8073
  case 4:
8114
- return _context26.abrupt("return", mc);
8074
+ return _context25.abrupt("return", mc);
8115
8075
  case 5:
8116
8076
  case "end":
8117
- return _context26.stop();
8077
+ return _context25.stop();
8118
8078
  }
8119
- }, _callee26, this);
8079
+ }, _callee25, this);
8120
8080
  }));
8121
- function createMediaConnection(_x18, _x19, _x20) {
8081
+ function createMediaConnection(_x17, _x18, _x19) {
8122
8082
  return _createMediaConnection.apply(this, arguments);
8123
8083
  }
8124
8084
  return createMediaConnection;
@@ -8156,11 +8116,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8156
8116
  }, {
8157
8117
  key: "setUpLocalStreamReferences",
8158
8118
  value: (function () {
8159
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27(localStreams) {
8119
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26(localStreams) {
8160
8120
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
8161
8121
  var setUpStreamPromises, _t16;
8162
- return _regenerator.default.wrap(function (_context27) {
8163
- while (1) switch (_context27.prev = _context27.next) {
8122
+ return _regenerator.default.wrap(function (_context26) {
8123
+ while (1) switch (_context26.prev = _context26.next) {
8164
8124
  case 0:
8165
8125
  setUpStreamPromises = [];
8166
8126
  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') {
@@ -8175,24 +8135,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8175
8135
  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') {
8176
8136
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
8177
8137
  }
8178
- _context27.prev = 1;
8179
- _context27.next = 2;
8138
+ _context26.prev = 1;
8139
+ _context26.next = 2;
8180
8140
  return _promise.default.all(setUpStreamPromises);
8181
8141
  case 2:
8182
- _context27.next = 4;
8142
+ _context26.next = 4;
8183
8143
  break;
8184
8144
  case 3:
8185
- _context27.prev = 3;
8186
- _t16 = _context27["catch"](1);
8145
+ _context26.prev = 3;
8146
+ _t16 = _context26["catch"](1);
8187
8147
  _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t16);
8188
8148
  throw _t16;
8189
8149
  case 4:
8190
8150
  case "end":
8191
- return _context27.stop();
8151
+ return _context26.stop();
8192
8152
  }
8193
- }, _callee27, this, [[1, 3]]);
8153
+ }, _callee26, this, [[1, 3]]);
8194
8154
  }));
8195
- function setUpLocalStreamReferences(_x21) {
8155
+ function setUpLocalStreamReferences(_x20) {
8196
8156
  return _setUpLocalStreamReferences.apply(this, arguments);
8197
8157
  }
8198
8158
  return setUpLocalStreamReferences;
@@ -8207,23 +8167,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8207
8167
  }, {
8208
8168
  key: "waitForMediaConnectionConnected",
8209
8169
  value: (function () {
8210
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
8170
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
8211
8171
  var _ref44, iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31;
8212
- return _regenerator.default.wrap(function (_context28) {
8213
- while (1) switch (_context28.prev = _context28.next) {
8172
+ return _regenerator.default.wrap(function (_context27) {
8173
+ while (1) switch (_context27.prev = _context27.next) {
8214
8174
  case 0:
8215
- _context28.prev = 0;
8216
- _context28.next = 1;
8175
+ _context27.prev = 0;
8176
+ _context27.next = 1;
8217
8177
  return this.mediaProperties.waitForMediaConnectionConnected(this.correlationId);
8218
8178
  case 1:
8219
- _context28.next = 5;
8179
+ _context27.next = 5;
8220
8180
  break;
8221
8181
  case 2:
8222
- _context28.prev = 2;
8223
- _t17 = _context28["catch"](0);
8182
+ _context27.prev = 2;
8183
+ _t17 = _context27["catch"](0);
8224
8184
  _ref44 = _t17, iceConnected = _ref44.iceConnected;
8225
8185
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
8226
- _context28.next = 4;
8186
+ _context27.next = 4;
8227
8187
  break;
8228
8188
  }
8229
8189
  _t18 = this.webex.internal.newMetrics;
@@ -8234,12 +8194,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8234
8194
  _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';
8235
8195
  _t24 = iceConnected;
8236
8196
  _t25 = this.turnServerUsed;
8237
- _context28.next = 3;
8197
+ _context27.next = 3;
8238
8198
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
8239
8199
  return false;
8240
8200
  });
8241
8201
  case 3:
8242
- _t26 = _context28.sent;
8202
+ _t26 = _context27.sent;
8243
8203
  _t27 = _t22.generateClientErrorCodeForIceFailure.call(_t22, {
8244
8204
  signalingState: _t23,
8245
8205
  iceConnected: _t24,
@@ -8269,9 +8229,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8269
8229
  _t17);
8270
8230
  case 5:
8271
8231
  case "end":
8272
- return _context28.stop();
8232
+ return _context27.stop();
8273
8233
  }
8274
- }, _callee28, this, [[0, 2]]);
8234
+ }, _callee27, this, [[0, 2]]);
8275
8235
  }));
8276
8236
  function waitForMediaConnectionConnected() {
8277
8237
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -8343,19 +8303,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8343
8303
  }, {
8344
8304
  key: "waitForRemoteSDPAnswer",
8345
8305
  value: (function () {
8346
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
8306
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
8347
8307
  var _this44 = this;
8348
8308
  var LOG_HEADER, deferSDPAnswer;
8349
- return _regenerator.default.wrap(function (_context29) {
8350
- while (1) switch (_context29.prev = _context29.next) {
8309
+ return _regenerator.default.wrap(function (_context28) {
8310
+ while (1) switch (_context28.prev = _context28.next) {
8351
8311
  case 0:
8352
8312
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
8353
8313
  if (this.deferSDPAnswer) {
8354
- _context29.next = 1;
8314
+ _context28.next = 1;
8355
8315
  break;
8356
8316
  }
8357
8317
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
8358
- return _context29.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
8318
+ return _context28.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
8359
8319
  case 1:
8360
8320
  deferSDPAnswer = this.deferSDPAnswer;
8361
8321
  this.sdpResponseTimer = setTimeout(function () {
@@ -8381,12 +8341,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8381
8341
  deferSDPAnswer.reject(error);
8382
8342
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
8383
8343
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
8384
- return _context29.abrupt("return", deferSDPAnswer.promise);
8344
+ return _context28.abrupt("return", deferSDPAnswer.promise);
8385
8345
  case 2:
8386
8346
  case "end":
8387
- return _context29.stop();
8347
+ return _context28.stop();
8388
8348
  }
8389
- }, _callee29, this);
8349
+ }, _callee28, this);
8390
8350
  }));
8391
8351
  function waitForRemoteSDPAnswer() {
8392
8352
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -8405,30 +8365,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8405
8365
  }, {
8406
8366
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
8407
8367
  value: (function () {
8408
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy) {
8368
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy) {
8409
8369
  var LOG_HEADER, _t32;
8410
- return _regenerator.default.wrap(function (_context30) {
8411
- while (1) switch (_context30.prev = _context30.next) {
8370
+ return _regenerator.default.wrap(function (_context29) {
8371
+ while (1) switch (_context29.prev = _context29.next) {
8412
8372
  case 0:
8413
8373
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
8414
- _context30.prev = 1;
8415
- _context30.next = 2;
8374
+ _context29.prev = 1;
8375
+ _context29.next = 2;
8416
8376
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
8417
8377
  case 2:
8418
- _context30.next = 4;
8378
+ _context29.next = 4;
8419
8379
  break;
8420
8380
  case 3:
8421
- _context30.prev = 3;
8422
- _t32 = _context30["catch"](1);
8381
+ _context29.prev = 3;
8382
+ _t32 = _context29["catch"](1);
8423
8383
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t32);
8424
8384
  throw _t32;
8425
8385
  case 4:
8426
8386
  case "end":
8427
- return _context30.stop();
8387
+ return _context29.stop();
8428
8388
  }
8429
- }, _callee30, this, [[1, 3]]);
8389
+ }, _callee29, this, [[1, 3]]);
8430
8390
  }));
8431
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x22, _x23) {
8391
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x21, _x22) {
8432
8392
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
8433
8393
  }
8434
8394
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -8446,14 +8406,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8446
8406
  }, {
8447
8407
  key: "retryWithForcedTurnDiscovery",
8448
8408
  value: (function () {
8449
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(remoteMediaManagerConfig, bundlePolicy) {
8409
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy) {
8450
8410
  var LOG_HEADER;
8451
- return _regenerator.default.wrap(function (_context31) {
8452
- while (1) switch (_context31.prev = _context31.next) {
8411
+ return _regenerator.default.wrap(function (_context30) {
8412
+ while (1) switch (_context30.prev = _context30.next) {
8453
8413
  case 0:
8454
8414
  this.addMediaData.retriedWithTurnServer = true;
8455
8415
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
8456
- _context31.next = 1;
8416
+ _context30.next = 1;
8457
8417
  return this.cleanUpBeforeRetryWithTurnServer();
8458
8418
  case 1:
8459
8419
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -8463,24 +8423,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8463
8423
  reason: 'forcingTurnTls'
8464
8424
  });
8465
8425
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
8466
- _context31.next = 2;
8426
+ _context30.next = 2;
8467
8427
  break;
8468
8428
  }
8469
8429
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
8470
- _context31.next = 2;
8430
+ _context30.next = 2;
8471
8431
  return this.join({
8472
8432
  rejoin: true
8473
8433
  });
8474
8434
  case 2:
8475
- _context31.next = 3;
8435
+ _context30.next = 3;
8476
8436
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
8477
8437
  case 3:
8478
8438
  case "end":
8479
- return _context31.stop();
8439
+ return _context30.stop();
8480
8440
  }
8481
- }, _callee31, this);
8441
+ }, _callee30, this);
8482
8442
  }));
8483
- function retryWithForcedTurnDiscovery(_x24, _x25) {
8443
+ function retryWithForcedTurnDiscovery(_x23, _x24) {
8484
8444
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
8485
8445
  }
8486
8446
  return retryWithForcedTurnDiscovery;
@@ -8500,28 +8460,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8500
8460
  }, {
8501
8461
  key: "handleWaitForMediaConnectionConnectedError",
8502
8462
  value: (function () {
8503
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32(error, remoteMediaManagerConfig, bundlePolicy) {
8463
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(error, remoteMediaManagerConfig, bundlePolicy) {
8504
8464
  var LOG_HEADER, _yield$this$mediaProp, connectionType, selectedCandidatePairChanges, numTransports, iceConnected;
8505
- return _regenerator.default.wrap(function (_context32) {
8506
- while (1) switch (_context32.prev = _context32.next) {
8465
+ return _regenerator.default.wrap(function (_context31) {
8466
+ while (1) switch (_context31.prev = _context31.next) {
8507
8467
  case 0:
8508
8468
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
8509
8469
  if (this.turnServerUsed) {
8510
- _context32.next = 2;
8470
+ _context31.next = 2;
8511
8471
  break;
8512
8472
  }
8513
8473
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
8514
- _context32.next = 1;
8474
+ _context31.next = 1;
8515
8475
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
8516
8476
  case 1:
8517
- _context32.next = 4;
8477
+ _context31.next = 4;
8518
8478
  break;
8519
8479
  case 2:
8520
8480
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
8521
- _context32.next = 3;
8481
+ _context31.next = 3;
8522
8482
  return this.mediaProperties.getCurrentConnectionInfo();
8523
8483
  case 3:
8524
- _yield$this$mediaProp = _context32.sent;
8484
+ _yield$this$mediaProp = _context31.sent;
8525
8485
  connectionType = _yield$this$mediaProp.connectionType;
8526
8486
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
8527
8487
  numTransports = _yield$this$mediaProp.numTransports;
@@ -8535,11 +8495,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8535
8495
  });
8536
8496
  case 4:
8537
8497
  case "end":
8538
- return _context32.stop();
8498
+ return _context31.stop();
8539
8499
  }
8540
- }, _callee32, this);
8500
+ }, _callee31, this);
8541
8501
  }));
8542
- function handleWaitForMediaConnectionConnectedError(_x26, _x27, _x28) {
8502
+ function handleWaitForMediaConnectionConnectedError(_x25, _x26, _x27) {
8543
8503
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
8544
8504
  }
8545
8505
  return handleWaitForMediaConnectionConnectedError;
@@ -8555,20 +8515,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8555
8515
  }, {
8556
8516
  key: "doTurnDiscovery",
8557
8517
  value: (function () {
8558
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33(isReconnecting, isForced) {
8518
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32(isReconnecting, isForced) {
8559
8519
  var cdl, turnDiscoveryResult;
8560
- return _regenerator.default.wrap(function (_context33) {
8561
- while (1) switch (_context33.prev = _context33.next) {
8520
+ return _regenerator.default.wrap(function (_context32) {
8521
+ while (1) switch (_context32.prev = _context32.next) {
8562
8522
  case 0:
8563
8523
  // @ts-ignore
8564
8524
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
8565
8525
  this.webex.internal.newMetrics.submitInternalEvent({
8566
8526
  name: 'internal.client.add-media.turn-discovery.start'
8567
8527
  });
8568
- _context33.next = 1;
8528
+ _context32.next = 1;
8569
8529
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
8570
8530
  case 1:
8571
- turnDiscoveryResult = _context33.sent;
8531
+ turnDiscoveryResult = _context32.sent;
8572
8532
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
8573
8533
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
8574
8534
 
@@ -8584,14 +8544,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8584
8544
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
8585
8545
  });
8586
8546
  }
8587
- return _context33.abrupt("return", turnDiscoveryResult);
8547
+ return _context32.abrupt("return", turnDiscoveryResult);
8588
8548
  case 2:
8589
8549
  case "end":
8590
- return _context33.stop();
8550
+ return _context32.stop();
8591
8551
  }
8592
- }, _callee33, this);
8552
+ }, _callee32, this);
8593
8553
  }));
8594
- function doTurnDiscovery(_x29, _x30) {
8554
+ function doTurnDiscovery(_x28, _x29) {
8595
8555
  return _doTurnDiscovery.apply(this, arguments);
8596
8556
  }
8597
8557
  return doTurnDiscovery;
@@ -8610,26 +8570,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8610
8570
  }, {
8611
8571
  key: "establishMediaConnection",
8612
8572
  value: (function () {
8613
- var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
8573
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
8614
8574
  var _this$locusMediaReque;
8615
8575
  var LOG_HEADER, isReconnecting, _turnServerInfo$urls, _yield$this$doTurnDis, mediaConnection, _t33, _t34;
8616
- return _regenerator.default.wrap(function (_context34) {
8617
- while (1) switch (_context34.prev = _context34.next) {
8576
+ return _regenerator.default.wrap(function (_context33) {
8577
+ while (1) switch (_context33.prev = _context33.next) {
8618
8578
  case 0:
8619
8579
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
8620
8580
  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
8621
8581
  if (this.isMoveToInProgress && this.turnServerUsed) {
8622
8582
  isForced = true;
8623
8583
  }
8624
- _context34.prev = 1;
8584
+ _context33.prev = 1;
8625
8585
  if (turnServerInfo) {
8626
- _context34.next = 3;
8586
+ _context33.next = 3;
8627
8587
  break;
8628
8588
  }
8629
- _context34.next = 2;
8589
+ _context33.next = 2;
8630
8590
  return this.doTurnDiscovery(isReconnecting, isForced);
8631
8591
  case 2:
8632
- _yield$this$doTurnDis = _context34.sent;
8592
+ _yield$this$doTurnDis = _context33.sent;
8633
8593
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
8634
8594
  case 3:
8635
8595
  if ((!turnServerInfo || !((_turnServerInfo$urls = turnServerInfo.urls) !== null && _turnServerInfo$urls !== void 0 && _turnServerInfo$urls.length)) && this.addMediaData.iceTransportPolicy === 'relay') {
@@ -8637,13 +8597,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8637
8597
  // drop the forced relay policy and use the default, because we don't have a TURN server
8638
8598
  this.addMediaData.iceTransportPolicy = undefined;
8639
8599
  }
8640
- _context34.next = 4;
8600
+ _context33.next = 4;
8641
8601
  return this.createMediaConnection(turnServerInfo, bundlePolicy, this.addMediaData.iceTransportPolicy);
8642
8602
  case 4:
8643
- mediaConnection = _context34.sent;
8603
+ mediaConnection = _context33.sent;
8644
8604
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
8645
8605
  if (!this.isMultistream) {
8646
- _context34.next = 5;
8606
+ _context33.next = 5;
8647
8607
  break;
8648
8608
  }
8649
8609
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -8651,42 +8611,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8651
8611
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
8652
8612
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
8653
8613
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
8654
- _context34.next = 5;
8614
+ _context33.next = 5;
8655
8615
  return this.remoteMediaManager.start();
8656
8616
  case 5:
8657
- _context34.next = 6;
8617
+ _context33.next = 6;
8658
8618
  return mediaConnection.initiateOffer();
8659
8619
  case 6:
8660
- _context34.next = 7;
8620
+ _context33.next = 7;
8661
8621
  return this.waitForRemoteSDPAnswer();
8662
8622
  case 7:
8663
8623
  this.handleMediaLogging(this.mediaProperties);
8664
- _context34.next = 9;
8624
+ _context33.next = 9;
8665
8625
  break;
8666
8626
  case 8:
8667
- _context34.prev = 8;
8668
- _t33 = _context34["catch"](1);
8627
+ _context33.prev = 8;
8628
+ _t33 = _context33["catch"](1);
8669
8629
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t33);
8670
8630
  throw _t33;
8671
8631
  case 9:
8672
- _context34.prev = 9;
8673
- _context34.next = 10;
8632
+ _context33.prev = 9;
8633
+ _context33.next = 10;
8674
8634
  return this.waitForMediaConnectionConnected();
8675
8635
  case 10:
8676
- _context34.next = 12;
8636
+ _context33.next = 12;
8677
8637
  break;
8678
8638
  case 11:
8679
- _context34.prev = 11;
8680
- _t34 = _context34["catch"](9);
8681
- _context34.next = 12;
8639
+ _context33.prev = 11;
8640
+ _t34 = _context33["catch"](9);
8641
+ _context33.next = 12;
8682
8642
  return this.handleWaitForMediaConnectionConnectedError(_t34, remoteMediaManagerConfig, bundlePolicy);
8683
8643
  case 12:
8684
8644
  case "end":
8685
- return _context34.stop();
8645
+ return _context33.stop();
8686
8646
  }
8687
- }, _callee34, this, [[1, 8], [9, 11]]);
8647
+ }, _callee33, this, [[1, 8], [9, 11]]);
8688
8648
  }));
8689
- function establishMediaConnection(_x31, _x32, _x33, _x34) {
8649
+ function establishMediaConnection(_x30, _x31, _x32, _x33) {
8690
8650
  return _establishMediaConnection.apply(this, arguments);
8691
8651
  }
8692
8652
  return establishMediaConnection;
@@ -8701,16 +8661,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8701
8661
  }, {
8702
8662
  key: "cleanUpOnAddMediaFailure",
8703
8663
  value: (function () {
8704
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8664
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8705
8665
  var _this$networkQualityM, _this$statsMonitor;
8706
- return _regenerator.default.wrap(function (_context35) {
8707
- while (1) switch (_context35.prev = _context35.next) {
8666
+ return _regenerator.default.wrap(function (_context34) {
8667
+ while (1) switch (_context34.prev = _context34.next) {
8708
8668
  case 0:
8709
8669
  if (!this.statsAnalyzer) {
8710
- _context35.next = 1;
8670
+ _context34.next = 1;
8711
8671
  break;
8712
8672
  }
8713
- _context35.next = 1;
8673
+ _context34.next = 1;
8714
8674
  return this.statsAnalyzer.stopAnalyzer();
8715
8675
  case 1:
8716
8676
  this.statsAnalyzer = null;
@@ -8721,7 +8681,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8721
8681
 
8722
8682
  // when media fails, we want to upload a webrtc dump to see whats going on
8723
8683
  // this function is async, but returns once the stats have been gathered
8724
- _context35.next = 2;
8684
+ _context34.next = 2;
8725
8685
  return this.forceSendStatsReport({
8726
8686
  callFrom: 'addMedia'
8727
8687
  });
@@ -8732,9 +8692,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8732
8692
  }
8733
8693
  case 3:
8734
8694
  case "end":
8735
- return _context35.stop();
8695
+ return _context34.stop();
8736
8696
  }
8737
- }, _callee35, this);
8697
+ }, _callee34, this);
8738
8698
  }));
8739
8699
  function cleanUpOnAddMediaFailure() {
8740
8700
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -8752,16 +8712,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8752
8712
  }, {
8753
8713
  key: "downgradeFromMultistreamToTranscoded",
8754
8714
  value: (function () {
8755
- var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
8715
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8756
8716
  var _this$networkQualityM2, _this$statsMonitor2, _this$locusMediaReque2;
8757
- return _regenerator.default.wrap(function (_context36) {
8758
- while (1) switch (_context36.prev = _context36.next) {
8717
+ return _regenerator.default.wrap(function (_context35) {
8718
+ while (1) switch (_context35.prev = _context35.next) {
8759
8719
  case 0:
8760
8720
  if (!this.statsAnalyzer) {
8761
- _context36.next = 1;
8721
+ _context35.next = 1;
8762
8722
  break;
8763
8723
  }
8764
- _context36.next = 1;
8724
+ _context35.next = 1;
8765
8725
  return this.statsAnalyzer.stopAnalyzer();
8766
8726
  case 1:
8767
8727
  this.statsAnalyzer = null;
@@ -8782,9 +8742,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8782
8742
  this.createStatsAnalyzer();
8783
8743
  case 2:
8784
8744
  case "end":
8785
- return _context36.stop();
8745
+ return _context35.stop();
8786
8746
  }
8787
- }, _callee36, this);
8747
+ }, _callee35, this);
8788
8748
  }));
8789
8749
  function downgradeFromMultistreamToTranscoded() {
8790
8750
  return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
@@ -8802,11 +8762,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8802
8762
  }, {
8803
8763
  key: "cleanUpBeforeRetryWithTurnServer",
8804
8764
  value: (function () {
8805
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37() {
8806
- return _regenerator.default.wrap(function (_context37) {
8807
- while (1) switch (_context37.prev = _context37.next) {
8765
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
8766
+ return _regenerator.default.wrap(function (_context36) {
8767
+ while (1) switch (_context36.prev = _context36.next) {
8808
8768
  case 0:
8809
- _context37.next = 1;
8769
+ _context36.next = 1;
8810
8770
  return this.forceSendStatsReport({
8811
8771
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
8812
8772
  });
@@ -8826,9 +8786,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8826
8786
  }
8827
8787
  case 2:
8828
8788
  case "end":
8829
- return _context37.stop();
8789
+ return _context36.stop();
8830
8790
  }
8831
- }, _callee37, this);
8791
+ }, _callee36, this);
8832
8792
  }));
8833
8793
  function cleanUpBeforeRetryWithTurnServer() {
8834
8794
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -8838,35 +8798,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8838
8798
  }, {
8839
8799
  key: "cleanUpBeforeReconnection",
8840
8800
  value: function () {
8841
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38() {
8801
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37() {
8842
8802
  var _t35;
8843
- return _regenerator.default.wrap(function (_context38) {
8844
- while (1) switch (_context38.prev = _context38.next) {
8803
+ return _regenerator.default.wrap(function (_context37) {
8804
+ while (1) switch (_context37.prev = _context37.next) {
8845
8805
  case 0:
8846
- _context38.prev = 0;
8847
- _context38.next = 1;
8806
+ _context37.prev = 0;
8807
+ _context37.next = 1;
8848
8808
  return this.forceSendStatsReport({
8849
8809
  callFrom: 'cleanUpBeforeReconnection'
8850
8810
  });
8851
8811
  case 1:
8852
8812
  if (!this.statsAnalyzer) {
8853
- _context38.next = 2;
8813
+ _context37.next = 2;
8854
8814
  break;
8855
8815
  }
8856
- _context38.next = 2;
8816
+ _context37.next = 2;
8857
8817
  return this.statsAnalyzer.stopAnalyzer();
8858
8818
  case 2:
8859
- _context38.next = 4;
8819
+ _context37.next = 4;
8860
8820
  break;
8861
8821
  case 3:
8862
- _context38.prev = 3;
8863
- _t35 = _context38["catch"](0);
8822
+ _context37.prev = 3;
8823
+ _t35 = _context37["catch"](0);
8864
8824
  _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t35);
8865
8825
  case 4:
8866
8826
  case "end":
8867
- return _context38.stop();
8827
+ return _context37.stop();
8868
8828
  }
8869
- }, _callee38, this, [[0, 3]]);
8829
+ }, _callee37, this, [[0, 3]]);
8870
8830
  }));
8871
8831
  function cleanUpBeforeReconnection() {
8872
8832
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -8974,7 +8934,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8974
8934
  }, {
8975
8935
  key: "addMediaInternal",
8976
8936
  value: (function () {
8977
- var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(icePhaseCallback, forceTurnDiscovery, turnServerInfo, iceTransportPolicy) {
8937
+ var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(icePhaseCallback, forceTurnDiscovery, turnServerInfo, iceTransportPolicy) {
8978
8938
  var options,
8979
8939
  LOG_HEADER,
8980
8940
  localStreams,
@@ -9037,14 +8997,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9037
8997
  _selectedCandidatePairChanges,
9038
8998
  _numTransports,
9039
8999
  _iceCandidateErrors,
9040
- _args39 = arguments,
9000
+ _args38 = arguments,
9041
9001
  _t36,
9042
9002
  _t37,
9043
9003
  _t38;
9044
- return _regenerator.default.wrap(function (_context39) {
9045
- while (1) switch (_context39.prev = _context39.next) {
9004
+ return _regenerator.default.wrap(function (_context38) {
9005
+ while (1) switch (_context38.prev = _context38.next) {
9046
9006
  case 0:
9047
- options = _args39.length > 4 && _args39[4] !== undefined ? _args39[4] : {};
9007
+ options = _args38.length > 4 && _args38[4] !== undefined ? _args38[4] : {};
9048
9008
  this.addMediaData.retriedWithTurnServer = false;
9049
9009
  this.addMediaData.icePhaseCallback = icePhaseCallback;
9050
9010
  this.addMediaData.iceTransportPolicy = iceTransportPolicy;
@@ -9052,13 +9012,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9052
9012
  LOG_HEADER = 'Meeting:index#addMedia -->';
9053
9013
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery, ", iceTransportPolicy=").concat(iceTransportPolicy));
9054
9014
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
9055
- _context39.next = 1;
9015
+ _context38.next = 1;
9056
9016
  break;
9057
9017
  }
9058
9018
  throw new _webexErrors.MeetingNotActiveError();
9059
9019
  case 1:
9060
9020
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
9061
- _context39.next = 2;
9021
+ _context38.next = 2;
9062
9022
  break;
9063
9023
  }
9064
9024
  throw new _webexErrors.UserNotJoinedError();
@@ -9075,7 +9035,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9075
9035
  ipver = _util2.default.getIpVersion(this.webex); // used just for metrics
9076
9036
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
9077
9037
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
9078
- _context39.next = 3;
9038
+ _context38.next = 3;
9079
9039
  break;
9080
9040
  }
9081
9041
  throw new _webexErrors.UserInLobbyError();
@@ -9119,62 +9079,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9119
9079
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
9120
9080
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
9121
9081
  this.brbState = (0, _brbState.createBrbState)(this, false);
9122
- _context39.prev = 4;
9082
+ _context38.prev = 4;
9123
9083
  if (!(allowPublishMediaInLobby || !this.isUserUnadmitted)) {
9124
- _context39.next = 5;
9084
+ _context38.next = 5;
9125
9085
  break;
9126
9086
  }
9127
- _context39.next = 5;
9087
+ _context38.next = 5;
9128
9088
  return this.setUpLocalStreamReferences(localStreams);
9129
9089
  case 5:
9130
9090
  this.setMercuryListener();
9131
9091
  this.createStatsAnalyzer();
9132
- _context39.prev = 6;
9133
- _context39.next = 7;
9092
+ _context38.prev = 6;
9093
+ _context38.next = 7;
9134
9094
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
9135
9095
  case 7:
9136
- _context39.next = 12;
9096
+ _context38.next = 12;
9137
9097
  break;
9138
9098
  case 8:
9139
- _context39.prev = 8;
9140
- _t36 = _context39["catch"](6);
9099
+ _context38.prev = 8;
9100
+ _t36 = _context38["catch"](6);
9141
9101
  if (!(_t36 instanceof _multistreamNotSupportedError.default)) {
9142
- _context39.next = 11;
9102
+ _context38.next = 11;
9143
9103
  break;
9144
9104
  }
9145
9105
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
9146
- _context39.next = 9;
9106
+ _context38.next = 9;
9147
9107
  return this.downgradeFromMultistreamToTranscoded();
9148
9108
  case 9:
9149
- _context39.next = 10;
9109
+ _context38.next = 10;
9150
9110
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
9151
9111
  case 10:
9152
- _context39.next = 12;
9112
+ _context38.next = 12;
9153
9113
  break;
9154
9114
  case 11:
9155
9115
  throw _t36;
9156
9116
  case 12:
9157
9117
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
9158
9118
  if (!this.mediaProperties.hasLocalShareStream()) {
9159
- _context39.next = 13;
9119
+ _context38.next = 13;
9160
9120
  break;
9161
9121
  }
9162
- _context39.next = 13;
9122
+ _context38.next = 13;
9163
9123
  return this.enqueueScreenShareFloorRequest();
9164
9124
  case 13:
9165
- _context39.next = 14;
9125
+ _context38.next = 14;
9166
9126
  return this.mediaProperties.getCurrentConnectionInfo();
9167
9127
  case 14:
9168
- _yield$this$mediaProp2 = _context39.sent;
9128
+ _yield$this$mediaProp2 = _context38.sent;
9169
9129
  connectionType = _yield$this$mediaProp2.connectionType;
9170
9130
  ipVersion = _yield$this$mediaProp2.ipVersion;
9171
9131
  selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
9172
9132
  numTransports = _yield$this$mediaProp2.numTransports;
9173
9133
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
9174
- _context39.next = 15;
9134
+ _context38.next = 15;
9175
9135
  return this.getMediaReachabilityMetricFields();
9176
9136
  case 15:
9177
- reachabilityMetrics = _context39.sent;
9137
+ reachabilityMetrics = _context38.sent;
9178
9138
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
9179
9139
  correlation_id: this.correlationId,
9180
9140
  locus_id: this.locusUrl.split('/').pop(),
@@ -9205,30 +9165,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9205
9165
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
9206
9166
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
9207
9167
  this.startPeriodicLogUpload();
9208
- _context39.next = 22;
9168
+ _context38.next = 22;
9209
9169
  break;
9210
9170
  case 16:
9211
- _context39.prev = 16;
9212
- _t37 = _context39["catch"](4);
9171
+ _context38.prev = 16;
9172
+ _t37 = _context38["catch"](4);
9213
9173
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t37);
9214
9174
 
9215
9175
  // @ts-ignore
9216
- _context39.next = 17;
9176
+ _context38.next = 17;
9217
9177
  return this.getMediaReachabilityMetricFields();
9218
9178
  case 17:
9219
- _reachabilityMetrics = _context39.sent;
9179
+ _reachabilityMetrics = _context38.sent;
9220
9180
  if (!(_t37 instanceof _webexErrors.AddMediaFailed)) {
9221
- _context39.next = 18;
9181
+ _context38.next = 18;
9222
9182
  break;
9223
9183
  }
9224
9184
  _t38 = _t37;
9225
- _context39.next = 20;
9185
+ _context38.next = 20;
9226
9186
  break;
9227
9187
  case 18:
9228
- _context39.next = 19;
9188
+ _context38.next = 19;
9229
9189
  return this.mediaProperties.getCurrentConnectionInfo();
9230
9190
  case 19:
9231
- _t38 = _context39.sent;
9191
+ _t38 = _context38.sent;
9232
9192
  case 20:
9233
9193
  _ref45 = _t38;
9234
9194
  _connectionType = _ref45.connectionType;
@@ -9257,7 +9217,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9257
9217
  iceCandidatesCount: this.iceCandidatesCount,
9258
9218
  ipver: ipver
9259
9219
  }));
9260
- _context39.next = 21;
9220
+ _context38.next = 21;
9261
9221
  return this.cleanUpOnAddMediaFailure();
9262
9222
  case 21:
9263
9223
  // Upload logs on error while adding media
@@ -9272,16 +9232,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9272
9232
  }
9273
9233
  throw _t37;
9274
9234
  case 22:
9275
- _context39.prev = 22;
9235
+ _context38.prev = 22;
9276
9236
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
9277
- return _context39.finish(22);
9237
+ return _context38.finish(22);
9278
9238
  case 23:
9279
9239
  case "end":
9280
- return _context39.stop();
9240
+ return _context38.stop();
9281
9241
  }
9282
- }, _callee39, this, [[4, 16, 22, 23], [6, 8]]);
9242
+ }, _callee38, this, [[4, 16, 22, 23], [6, 8]]);
9283
9243
  }));
9284
- function addMediaInternal(_x35, _x36, _x37, _x38) {
9244
+ function addMediaInternal(_x34, _x35, _x36, _x37) {
9285
9245
  return _addMediaInternal.apply(this, arguments);
9286
9246
  }
9287
9247
  return addMediaInternal;
@@ -9347,35 +9307,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9347
9307
  * @memberof Meeting
9348
9308
  */
9349
9309
  function () {
9350
- var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(options) {
9310
+ var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(options) {
9351
9311
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
9352
- return _regenerator.default.wrap(function (_context40) {
9353
- while (1) switch (_context40.prev = _context40.next) {
9312
+ return _regenerator.default.wrap(function (_context39) {
9313
+ while (1) switch (_context39.prev = _context39.next) {
9354
9314
  case 0:
9355
9315
  this.checkMediaConnection();
9356
9316
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
9357
9317
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
9358
9318
  if (this.canUpdateMedia()) {
9359
- _context40.next = 1;
9319
+ _context39.next = 1;
9360
9320
  break;
9361
9321
  }
9362
- return _context40.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
9322
+ return _context39.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
9363
9323
  case 1:
9364
9324
  if (!this.isMultistream) {
9365
- _context40.next = 3;
9325
+ _context39.next = 3;
9366
9326
  break;
9367
9327
  }
9368
9328
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
9369
- _context40.next = 2;
9329
+ _context39.next = 2;
9370
9330
  break;
9371
9331
  }
9372
9332
  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');
9373
9333
  case 2:
9374
- _context40.next = 4;
9334
+ _context39.next = 4;
9375
9335
  break;
9376
9336
  case 3:
9377
9337
  if (!(shareAudioEnabled !== undefined)) {
9378
- _context40.next = 4;
9338
+ _context39.next = 4;
9379
9339
  break;
9380
9340
  }
9381
9341
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -9400,20 +9360,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9400
9360
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
9401
9361
  }
9402
9362
  if (this.isMultistream) {
9403
- _context40.next = 5;
9363
+ _context39.next = 5;
9404
9364
  break;
9405
9365
  }
9406
- _context40.next = 5;
9366
+ _context39.next = 5;
9407
9367
  return this.updateTranscodedMediaConnection();
9408
9368
  case 5:
9409
- return _context40.abrupt("return", undefined);
9369
+ return _context39.abrupt("return", undefined);
9410
9370
  case 6:
9411
9371
  case "end":
9412
- return _context40.stop();
9372
+ return _context39.stop();
9413
9373
  }
9414
- }, _callee40, this);
9374
+ }, _callee39, this);
9415
9375
  }));
9416
- function updateMedia(_x39) {
9376
+ function updateMedia(_x38) {
9417
9377
  return _updateMedia.apply(this, arguments);
9418
9378
  }
9419
9379
  return updateMedia;
@@ -9555,14 +9515,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9555
9515
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
9556
9516
  this.stopListeningForMeetingEvents();
9557
9517
  return _util2.default.leaveMeeting(this, options).then(/*#__PURE__*/function () {
9558
- var _ref46 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(leave) {
9559
- return _regenerator.default.wrap(function (_context41) {
9560
- while (1) switch (_context41.prev = _context41.next) {
9518
+ var _ref46 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(leave) {
9519
+ return _regenerator.default.wrap(function (_context40) {
9520
+ while (1) switch (_context40.prev = _context40.next) {
9561
9521
  case 0:
9562
9522
  // CA team recommends submitting this *after* locus /leave
9563
9523
  submitLeaveMetric();
9564
9524
  _this51.meetingFiniteStateMachine.leave();
9565
- _context41.next = 1;
9525
+ _context40.next = 1;
9566
9526
  return _this51.clearMeetingData();
9567
9527
  case 1:
9568
9528
  // upload logs on leave irrespective of meeting delete
@@ -9583,14 +9543,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9583
9543
  });
9584
9544
  }
9585
9545
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
9586
- return _context41.abrupt("return", leave);
9546
+ return _context40.abrupt("return", leave);
9587
9547
  case 2:
9588
9548
  case "end":
9589
- return _context41.stop();
9549
+ return _context40.stop();
9590
9550
  }
9591
- }, _callee41);
9551
+ }, _callee40);
9592
9552
  }));
9593
- return function (_x40) {
9553
+ return function (_x39) {
9594
9554
  return _ref46.apply(this, arguments);
9595
9555
  };
9596
9556
  }()).catch(function (error) {
@@ -10257,12 +10217,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10257
10217
  });
10258
10218
  this.stopListeningForMeetingEvents();
10259
10219
  return _util2.default.endMeetingForAll(this).then(/*#__PURE__*/function () {
10260
- var _ref47 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(end) {
10261
- return _regenerator.default.wrap(function (_context42) {
10262
- while (1) switch (_context42.prev = _context42.next) {
10220
+ var _ref47 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(end) {
10221
+ return _regenerator.default.wrap(function (_context41) {
10222
+ while (1) switch (_context41.prev = _context41.next) {
10263
10223
  case 0:
10264
10224
  _this58.meetingFiniteStateMachine.end();
10265
- _context42.next = 1;
10225
+ _context41.next = 1;
10266
10226
  return _this58.clearMeetingData();
10267
10227
  case 1:
10268
10228
  // upload logs on leave irrespective of meeting delete
@@ -10270,14 +10230,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10270
10230
  file: 'meeting/index',
10271
10231
  function: 'endMeetingForAll'
10272
10232
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
10273
- return _context42.abrupt("return", end);
10233
+ return _context41.abrupt("return", end);
10274
10234
  case 2:
10275
10235
  case "end":
10276
- return _context42.stop();
10236
+ return _context41.stop();
10277
10237
  }
10278
- }, _callee42);
10238
+ }, _callee41);
10279
10239
  }));
10280
- return function (_x41) {
10240
+ return function (_x40) {
10281
10241
  return _ref47.apply(this, arguments);
10282
10242
  };
10283
10243
  }()).catch(function (error) {
@@ -10427,39 +10387,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10427
10387
  }, {
10428
10388
  key: "enableMusicMode",
10429
10389
  value: (function () {
10430
- var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(shouldEnableMusicMode) {
10431
- return _regenerator.default.wrap(function (_context43) {
10432
- while (1) switch (_context43.prev = _context43.next) {
10390
+ var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(shouldEnableMusicMode) {
10391
+ return _regenerator.default.wrap(function (_context42) {
10392
+ while (1) switch (_context42.prev = _context42.next) {
10433
10393
  case 0:
10434
10394
  this.checkMediaConnection();
10435
10395
  if (this.isMultistream) {
10436
- _context43.next = 1;
10396
+ _context42.next = 1;
10437
10397
  break;
10438
10398
  }
10439
10399
  throw new Error('enableMusicMode() only supported with multistream');
10440
10400
  case 1:
10441
10401
  if (!shouldEnableMusicMode) {
10442
- _context43.next = 3;
10402
+ _context42.next = 3;
10443
10403
  break;
10444
10404
  }
10445
- _context43.next = 2;
10405
+ _context42.next = 2;
10446
10406
  return this.sendSlotManager.setCustomCodecParameters(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, {
10447
10407
  maxaveragebitrate: '64000',
10448
10408
  maxplaybackrate: '48000'
10449
10409
  });
10450
10410
  case 2:
10451
- _context43.next = 4;
10411
+ _context42.next = 4;
10452
10412
  break;
10453
10413
  case 3:
10454
- _context43.next = 4;
10414
+ _context42.next = 4;
10455
10415
  return this.sendSlotManager.markCustomCodecParametersForDeletion(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, ['maxaveragebitrate', 'maxplaybackrate']);
10456
10416
  case 4:
10457
10417
  case "end":
10458
- return _context43.stop();
10418
+ return _context42.stop();
10459
10419
  }
10460
- }, _callee43, this);
10420
+ }, _callee42, this);
10461
10421
  }));
10462
- function enableMusicMode(_x42) {
10422
+ function enableMusicMode(_x41) {
10463
10423
  return _enableMusicMode.apply(this, arguments);
10464
10424
  }
10465
10425
  return enableMusicMode;
@@ -10550,25 +10510,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10550
10510
  }, {
10551
10511
  key: "publishStream",
10552
10512
  value: (function () {
10553
- var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(mediaType, stream) {
10554
- return _regenerator.default.wrap(function (_context44) {
10555
- while (1) switch (_context44.prev = _context44.next) {
10513
+ var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(mediaType, stream) {
10514
+ return _regenerator.default.wrap(function (_context43) {
10515
+ while (1) switch (_context43.prev = _context43.next) {
10556
10516
  case 0:
10557
10517
  if (stream) {
10558
- _context44.next = 1;
10518
+ _context43.next = 1;
10559
10519
  break;
10560
10520
  }
10561
- return _context44.abrupt("return");
10521
+ return _context43.abrupt("return");
10562
10522
  case 1:
10563
10523
  if (!this.mediaProperties.webrtcMediaConnection) {
10564
- _context44.next = 3;
10524
+ _context43.next = 3;
10565
10525
  break;
10566
10526
  }
10567
10527
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
10568
- _context44.next = 2;
10528
+ _context43.next = 2;
10569
10529
  break;
10570
10530
  }
10571
- _context44.next = 2;
10531
+ _context43.next = 2;
10572
10532
  return this.sendSlotManager.publishStream(mediaType, stream);
10573
10533
  case 2:
10574
10534
  this.emitPublishStateChangeEvent({
@@ -10579,11 +10539,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10579
10539
  });
10580
10540
  case 3:
10581
10541
  case "end":
10582
- return _context44.stop();
10542
+ return _context43.stop();
10583
10543
  }
10584
- }, _callee44, this);
10544
+ }, _callee43, this);
10585
10545
  }));
10586
- function publishStream(_x43, _x44) {
10546
+ function publishStream(_x42, _x43) {
10587
10547
  return _publishStream.apply(this, arguments);
10588
10548
  }
10589
10549
  return publishStream;
@@ -10599,21 +10559,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10599
10559
  }, {
10600
10560
  key: "unpublishStream",
10601
10561
  value: (function () {
10602
- var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45(mediaType, stream) {
10603
- return _regenerator.default.wrap(function (_context45) {
10604
- while (1) switch (_context45.prev = _context45.next) {
10562
+ var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(mediaType, stream) {
10563
+ return _regenerator.default.wrap(function (_context44) {
10564
+ while (1) switch (_context44.prev = _context44.next) {
10605
10565
  case 0:
10606
10566
  if (stream) {
10607
- _context45.next = 1;
10567
+ _context44.next = 1;
10608
10568
  break;
10609
10569
  }
10610
- return _context45.abrupt("return");
10570
+ return _context44.abrupt("return");
10611
10571
  case 1:
10612
10572
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
10613
- _context45.next = 2;
10573
+ _context44.next = 2;
10614
10574
  break;
10615
10575
  }
10616
- _context45.next = 2;
10576
+ _context44.next = 2;
10617
10577
  return this.sendSlotManager.unpublishStream(mediaType);
10618
10578
  case 2:
10619
10579
  this.emitPublishStateChangeEvent({
@@ -10624,11 +10584,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10624
10584
  });
10625
10585
  case 3:
10626
10586
  case "end":
10627
- return _context45.stop();
10587
+ return _context44.stop();
10628
10588
  }
10629
- }, _callee45, this);
10589
+ }, _callee44, this);
10630
10590
  }));
10631
- function unpublishStream(_x45, _x46) {
10591
+ function unpublishStream(_x44, _x45) {
10632
10592
  return _unpublishStream.apply(this, arguments);
10633
10593
  }
10634
10594
  return unpublishStream;
@@ -10643,19 +10603,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10643
10603
  }, {
10644
10604
  key: "publishStreams",
10645
10605
  value: (function () {
10646
- var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46(streams) {
10606
+ var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45(streams) {
10647
10607
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
10648
10608
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
10649
- return _regenerator.default.wrap(function (_context46) {
10650
- while (1) switch (_context46.prev = _context46.next) {
10609
+ return _regenerator.default.wrap(function (_context45) {
10610
+ while (1) switch (_context45.prev = _context45.next) {
10651
10611
  case 0:
10652
10612
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
10653
10613
  this.checkMediaConnection();
10654
10614
  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))) {
10655
- _context46.next = 1;
10615
+ _context45.next = 1;
10656
10616
  break;
10657
10617
  }
10658
- return _context46.abrupt("return");
10618
+ return _context45.abrupt("return");
10659
10619
  case 1:
10660
10620
  streamChecks = [{
10661
10621
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -10673,62 +10633,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10673
10633
  _i = 0, _streamChecks = streamChecks;
10674
10634
  case 2:
10675
10635
  if (!(_i < _streamChecks.length)) {
10676
- _context46.next = 4;
10636
+ _context45.next = 4;
10677
10637
  break;
10678
10638
  }
10679
10639
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
10680
10640
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
10681
- _context46.next = 3;
10641
+ _context45.next = 3;
10682
10642
  break;
10683
10643
  }
10684
10644
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
10685
10645
  case 3:
10686
10646
  _i++;
10687
- _context46.next = 2;
10647
+ _context45.next = 2;
10688
10648
  break;
10689
10649
  case 4:
10690
10650
  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
10691
10651
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
10692
- _context46.next = 6;
10652
+ _context45.next = 6;
10693
10653
  break;
10694
10654
  }
10695
- _context46.next = 5;
10655
+ _context45.next = 5;
10696
10656
  return this.setLocalShareAudioStream(streams.screenShare.audio);
10697
10657
  case 5:
10698
10658
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
10699
10659
  case 6:
10700
10660
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
10701
- _context46.next = 8;
10661
+ _context45.next = 8;
10702
10662
  break;
10703
10663
  }
10704
- _context46.next = 7;
10664
+ _context45.next = 7;
10705
10665
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
10706
10666
  case 7:
10707
10667
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
10708
10668
  case 8:
10709
10669
  if (!streams.microphone) {
10710
- _context46.next = 9;
10670
+ _context45.next = 9;
10711
10671
  break;
10712
10672
  }
10713
- _context46.next = 9;
10673
+ _context45.next = 9;
10714
10674
  return this.setLocalAudioStream(streams.microphone);
10715
10675
  case 9:
10716
10676
  if (!streams.camera) {
10717
- _context46.next = 10;
10677
+ _context45.next = 10;
10718
10678
  break;
10719
10679
  }
10720
- _context46.next = 10;
10680
+ _context45.next = 10;
10721
10681
  return this.setLocalVideoStream(streams.camera);
10722
10682
  case 10:
10723
10683
  if (this.isMultistream) {
10724
- _context46.next = 11;
10684
+ _context45.next = 11;
10725
10685
  break;
10726
10686
  }
10727
- _context46.next = 11;
10687
+ _context45.next = 11;
10728
10688
  return this.updateTranscodedMediaConnection();
10729
10689
  case 11:
10730
10690
  if (!floorRequestNeeded) {
10731
- _context46.next = 12;
10691
+ _context45.next = 12;
10732
10692
  break;
10733
10693
  }
10734
10694
  this.localShareInstanceId = _uuid.default.v4();
@@ -10759,15 +10719,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10759
10719
  // we're sending the http request to Locus to request the screen share floor
10760
10720
  // only after the SDP update, because that's how it's always been done for transcoded meetings
10761
10721
  // and also if sharing from the start, we need confluence to have been created
10762
- _context46.next = 12;
10722
+ _context45.next = 12;
10763
10723
  return this.enqueueScreenShareFloorRequest();
10764
10724
  case 12:
10765
10725
  case "end":
10766
- return _context46.stop();
10726
+ return _context45.stop();
10767
10727
  }
10768
- }, _callee46, this);
10728
+ }, _callee45, this);
10769
10729
  }));
10770
- function publishStreams(_x47) {
10730
+ function publishStreams(_x46) {
10771
10731
  return _publishStreams.apply(this, arguments);
10772
10732
  }
10773
10733
  return publishStreams;
@@ -10782,10 +10742,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10782
10742
  }, {
10783
10743
  key: "unpublishStreams",
10784
10744
  value: (function () {
10785
- var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47(streams) {
10745
+ var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46(streams) {
10786
10746
  var promises, _iterator2, _step2, stream;
10787
- return _regenerator.default.wrap(function (_context47) {
10788
- while (1) switch (_context47.prev = _context47.next) {
10747
+ return _regenerator.default.wrap(function (_context46) {
10748
+ while (1) switch (_context46.prev = _context46.next) {
10789
10749
  case 0:
10790
10750
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
10791
10751
  this.checkMediaConnection();
@@ -10817,7 +10777,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10817
10777
  if (!this.isMultistream) {
10818
10778
  promises.push(this.updateTranscodedMediaConnection());
10819
10779
  }
10820
- _context47.next = 1;
10780
+ _context46.next = 1;
10821
10781
  return _promise.default.all(promises);
10822
10782
  case 1:
10823
10783
  // we're allowing for the SDK to support just audio share as well
@@ -10838,11 +10798,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10838
10798
  }
10839
10799
  case 2:
10840
10800
  case "end":
10841
- return _context47.stop();
10801
+ return _context46.stop();
10842
10802
  }
10843
- }, _callee47, this);
10803
+ }, _callee46, this);
10844
10804
  }));
10845
- function unpublishStreams(_x48) {
10805
+ function unpublishStreams(_x47) {
10846
10806
  return _unpublishStreams.apply(this, arguments);
10847
10807
  }
10848
10808
  return unpublishStreams;
@@ -10908,16 +10868,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10908
10868
  }, {
10909
10869
  key: "getMediaReachabilityMetricFields",
10910
10870
  value: (function () {
10911
- var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee48() {
10871
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47() {
10912
10872
  var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
10913
10873
  var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
10914
- return _regenerator.default.wrap(function (_context48) {
10915
- while (1) switch (_context48.prev = _context48.next) {
10874
+ return _regenerator.default.wrap(function (_context47) {
10875
+ while (1) switch (_context47.prev = _context47.next) {
10916
10876
  case 0:
10917
- _context48.next = 1;
10877
+ _context47.next = 1;
10918
10878
  return this.webex.meetings.reachability.getReachabilityMetrics();
10919
10879
  case 1:
10920
- reachabilityMetrics = _context48.sent;
10880
+ reachabilityMetrics = _context47.sent;
10921
10881
  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'];
10922
10882
  totalSuccessCases = successKeys.reduce(function (total, key) {
10923
10883
  var value = reachabilityMetrics[key];
@@ -10934,16 +10894,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10934
10894
  this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
10935
10895
  }
10936
10896
  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;
10937
- return _context48.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10897
+ return _context47.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10938
10898
  subnet_reachable: isSubnetReachable,
10939
10899
  selected_cluster: selectedCluster,
10940
10900
  selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
10941
10901
  }));
10942
10902
  case 2:
10943
10903
  case "end":
10944
- return _context48.stop();
10904
+ return _context47.stop();
10945
10905
  }
10946
- }, _callee48, this);
10906
+ }, _callee47, this);
10947
10907
  }));
10948
10908
  function getMediaReachabilityMetricFields() {
10949
10909
  return _getMediaReachabilityMetricFields.apply(this, arguments);
@@ -11074,47 +11034,80 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
11074
11034
  }, {
11075
11035
  key: "refreshDataChannelToken",
11076
11036
  value: (function () {
11077
- var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee49() {
11037
+ var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee48() {
11078
11038
  var isPracticeSession, dataChannelTokenType, res, msg, _t39;
11079
- return _regenerator.default.wrap(function (_context49) {
11080
- while (1) switch (_context49.prev = _context49.next) {
11039
+ return _regenerator.default.wrap(function (_context48) {
11040
+ while (1) switch (_context48.prev = _context48.next) {
11081
11041
  case 0:
11082
11042
  isPracticeSession = this.webinar.isJoinPracticeSessionDataChannel();
11083
11043
  dataChannelTokenType = this.getDataChannelTokenType();
11084
- _context49.prev = 1;
11085
- _context49.next = 2;
11044
+ _context48.prev = 1;
11045
+ _context48.next = 2;
11086
11046
  return this.meetingRequest.fetchDatachannelToken({
11087
11047
  locusUrl: this.locusUrl,
11088
11048
  requestingParticipantId: this.members.selfId,
11089
11049
  isPracticeSession: isPracticeSession
11090
11050
  });
11091
11051
  case 2:
11092
- res = _context49.sent;
11093
- return _context49.abrupt("return", {
11052
+ res = _context48.sent;
11053
+ return _context48.abrupt("return", {
11094
11054
  body: {
11095
11055
  datachannelToken: res.body.datachannelToken,
11096
11056
  dataChannelTokenType: dataChannelTokenType
11097
11057
  }
11098
11058
  });
11099
11059
  case 3:
11100
- _context49.prev = 3;
11101
- _t39 = _context49["catch"](1);
11060
+ _context48.prev = 3;
11061
+ _t39 = _context48["catch"](1);
11102
11062
  msg = (_t39 === null || _t39 === void 0 ? void 0 : _t39.message) || String(_t39);
11103
11063
  _loggerProxy.default.logger.warn("Meeting:index#refreshDataChannelToken --> DataChannel token refresh failed (likely locus changed or participant left): ".concat(msg), {
11104
11064
  statusCode: _t39 === null || _t39 === void 0 ? void 0 : _t39.statusCode
11105
11065
  });
11106
- return _context49.abrupt("return", null);
11066
+ return _context48.abrupt("return", null);
11107
11067
  case 4:
11108
11068
  case "end":
11109
- return _context49.stop();
11069
+ return _context48.stop();
11110
11070
  }
11111
- }, _callee49, this, [[1, 3]]);
11071
+ }, _callee48, this, [[1, 3]]);
11112
11072
  }));
11113
11073
  function refreshDataChannelToken() {
11114
11074
  return _refreshDataChannelToken.apply(this, arguments);
11115
11075
  }
11116
11076
  return refreshDataChannelToken;
11117
11077
  }()
11078
+ /**
11079
+ * Checks if the LLM channel is connected.
11080
+ * Handles practice session context automatically - returns practice session
11081
+ * LLM channel status when in practice session, main LLM channel status otherwise.
11082
+ * @returns {boolean} True if the appropriate LLM channel is connected
11083
+ */
11084
+ )
11085
+ }, {
11086
+ key: "isLLMConnected",
11087
+ value: function isLLMConnected() {
11088
+ var _this$webinar3, _this$llmChannel$isCo, _this$llmChannel7;
11089
+ if ((_this$webinar3 = this.webinar) !== null && _this$webinar3 !== void 0 && _this$webinar3.isJoinPracticeSessionDataChannel()) {
11090
+ return this.webinar.isPracticeSessionLLMChannelConnected();
11091
+ }
11092
+ return (_this$llmChannel$isCo = (_this$llmChannel7 = this.llmChannel) === null || _this$llmChannel7 === void 0 ? void 0 : _this$llmChannel7.isConnected()) !== null && _this$llmChannel$isCo !== void 0 ? _this$llmChannel$isCo : false;
11093
+ }
11094
+
11095
+ /**
11096
+ * Gets the locus URL from the LLM channel.
11097
+ * Handles practice session context automatically - returns practice session
11098
+ * LLM channel's locus URL when in practice session, main LLM channel's locus URL otherwise.
11099
+ * @returns {string | undefined} The locus URL or undefined
11100
+ */
11101
+ }, {
11102
+ key: "getLLMLocusUrl",
11103
+ value: function getLLMLocusUrl() {
11104
+ var _this$webinar4, _this$llmChannel8;
11105
+ if ((_this$webinar4 = this.webinar) !== null && _this$webinar4 !== void 0 && _this$webinar4.isJoinPracticeSessionDataChannel()) {
11106
+ return this.webinar.getPracticeSessionLocusUrl();
11107
+ }
11108
+ return (_this$llmChannel8 = this.llmChannel) === null || _this$llmChannel8 === void 0 ? void 0 : _this$llmChannel8.getLocusUrl();
11109
+ }
11110
+
11118
11111
  /**
11119
11112
  * Determines the current data channel token type based on the meeting state.
11120
11113
  *
@@ -11122,7 +11115,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
11122
11115
  *
11123
11116
  * @returns {DataChannelTokenType} The token type representing the current session mode.
11124
11117
  */
11125
- )
11126
11118
  }, {
11127
11119
  key: "getDataChannelTokenType",
11128
11120
  value: function getDataChannelTokenType() {