@webex/plugin-meetings 3.12.0-next.8 → 3.12.0-next.81

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 (183) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +15 -2
  3. package/dist/aiEnableRequest/index.js.map +1 -1
  4. package/dist/breakouts/breakout.js +8 -3
  5. package/dist/breakouts/breakout.js.map +1 -1
  6. package/dist/breakouts/index.js +26 -2
  7. package/dist/breakouts/index.js.map +1 -1
  8. package/dist/config.js +2 -0
  9. package/dist/config.js.map +1 -1
  10. package/dist/constants.js +34 -8
  11. package/dist/constants.js.map +1 -1
  12. package/dist/controls-options-manager/constants.js +11 -1
  13. package/dist/controls-options-manager/constants.js.map +1 -1
  14. package/dist/controls-options-manager/index.js +67 -29
  15. package/dist/controls-options-manager/index.js.map +1 -1
  16. package/dist/controls-options-manager/util.js +91 -0
  17. package/dist/controls-options-manager/util.js.map +1 -1
  18. package/dist/hashTree/constants.js +13 -1
  19. package/dist/hashTree/constants.js.map +1 -1
  20. package/dist/hashTree/hashTreeParser.js +880 -382
  21. package/dist/hashTree/hashTreeParser.js.map +1 -1
  22. package/dist/hashTree/utils.js +42 -0
  23. package/dist/hashTree/utils.js.map +1 -1
  24. package/dist/index.js +7 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  27. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  28. package/dist/interceptors/locusRetry.js +23 -8
  29. package/dist/interceptors/locusRetry.js.map +1 -1
  30. package/dist/interpretation/index.js +10 -1
  31. package/dist/interpretation/index.js.map +1 -1
  32. package/dist/interpretation/interpretation.types.js +7 -0
  33. package/dist/interpretation/interpretation.types.js.map +1 -0
  34. package/dist/interpretation/siLanguage.js +1 -1
  35. package/dist/locus-info/controlsUtils.js +4 -1
  36. package/dist/locus-info/controlsUtils.js.map +1 -1
  37. package/dist/locus-info/index.js +303 -88
  38. package/dist/locus-info/index.js.map +1 -1
  39. package/dist/locus-info/infoUtils.js +36 -5
  40. package/dist/locus-info/infoUtils.js.map +1 -1
  41. package/dist/locus-info/types.js +19 -0
  42. package/dist/locus-info/types.js.map +1 -1
  43. package/dist/media/index.js +3 -1
  44. package/dist/media/index.js.map +1 -1
  45. package/dist/media/properties.js +1 -0
  46. package/dist/media/properties.js.map +1 -1
  47. package/dist/meeting/in-meeting-actions.js +5 -1
  48. package/dist/meeting/in-meeting-actions.js.map +1 -1
  49. package/dist/meeting/index.js +1111 -724
  50. package/dist/meeting/index.js.map +1 -1
  51. package/dist/meeting/muteState.js +10 -1
  52. package/dist/meeting/muteState.js.map +1 -1
  53. package/dist/meeting/request.js +5 -2
  54. package/dist/meeting/request.js.map +1 -1
  55. package/dist/meeting/util.js +29 -2
  56. package/dist/meeting/util.js.map +1 -1
  57. package/dist/meeting-info/meeting-info-v2.js +2 -2
  58. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  59. package/dist/meetings/index.js +231 -78
  60. package/dist/meetings/index.js.map +1 -1
  61. package/dist/meetings/meetings.types.js +6 -1
  62. package/dist/meetings/meetings.types.js.map +1 -1
  63. package/dist/meetings/request.js +39 -0
  64. package/dist/meetings/request.js.map +1 -1
  65. package/dist/meetings/util.js +79 -5
  66. package/dist/meetings/util.js.map +1 -1
  67. package/dist/member/index.js +10 -0
  68. package/dist/member/index.js.map +1 -1
  69. package/dist/member/types.js.map +1 -1
  70. package/dist/member/util.js +3 -0
  71. package/dist/member/util.js.map +1 -1
  72. package/dist/metrics/constants.js +4 -1
  73. package/dist/metrics/constants.js.map +1 -1
  74. package/dist/multistream/codec/constants.js +63 -0
  75. package/dist/multistream/codec/constants.js.map +1 -0
  76. package/dist/multistream/mediaRequestManager.js +62 -15
  77. package/dist/multistream/mediaRequestManager.js.map +1 -1
  78. package/dist/multistream/receiveSlot.js +9 -0
  79. package/dist/multistream/receiveSlot.js.map +1 -1
  80. package/dist/reactions/reactions.type.js.map +1 -1
  81. package/dist/recording-controller/index.js +1 -3
  82. package/dist/recording-controller/index.js.map +1 -1
  83. package/dist/types/config.d.ts +2 -0
  84. package/dist/types/constants.d.ts +12 -1
  85. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  86. package/dist/types/controls-options-manager/index.d.ts +16 -0
  87. package/dist/types/hashTree/constants.d.ts +2 -0
  88. package/dist/types/hashTree/hashTreeParser.d.ts +146 -17
  89. package/dist/types/hashTree/utils.d.ts +18 -0
  90. package/dist/types/index.d.ts +3 -0
  91. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  92. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  93. package/dist/types/locus-info/index.d.ts +50 -6
  94. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  95. package/dist/types/locus-info/types.d.ts +21 -1
  96. package/dist/types/media/properties.d.ts +1 -0
  97. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  98. package/dist/types/meeting/index.d.ts +80 -6
  99. package/dist/types/meeting/request.d.ts +1 -0
  100. package/dist/types/meeting/util.d.ts +9 -0
  101. package/dist/types/meetings/index.d.ts +30 -2
  102. package/dist/types/meetings/meetings.types.d.ts +15 -0
  103. package/dist/types/meetings/request.d.ts +14 -0
  104. package/dist/types/member/index.d.ts +1 -0
  105. package/dist/types/member/types.d.ts +1 -0
  106. package/dist/types/member/util.d.ts +1 -0
  107. package/dist/types/metrics/constants.d.ts +3 -0
  108. package/dist/types/multistream/codec/constants.d.ts +7 -0
  109. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  110. package/dist/types/reactions/reactions.type.d.ts +3 -0
  111. package/dist/webinar/index.js +305 -159
  112. package/dist/webinar/index.js.map +1 -1
  113. package/package.json +22 -22
  114. package/src/aiEnableRequest/index.ts +16 -0
  115. package/src/breakouts/breakout.ts +3 -1
  116. package/src/breakouts/index.ts +31 -0
  117. package/src/config.ts +2 -0
  118. package/src/constants.ts +16 -2
  119. package/src/controls-options-manager/constants.ts +14 -1
  120. package/src/controls-options-manager/index.ts +87 -28
  121. package/src/controls-options-manager/util.ts +81 -1
  122. package/src/hashTree/constants.ts +16 -0
  123. package/src/hashTree/hashTreeParser.ts +580 -196
  124. package/src/hashTree/utils.ts +36 -0
  125. package/src/index.ts +6 -0
  126. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  127. package/src/interceptors/locusRetry.ts +25 -4
  128. package/src/interpretation/index.ts +27 -9
  129. package/src/interpretation/interpretation.types.ts +11 -0
  130. package/src/locus-info/controlsUtils.ts +3 -1
  131. package/src/locus-info/index.ts +304 -100
  132. package/src/locus-info/infoUtils.ts +41 -6
  133. package/src/locus-info/types.ts +25 -1
  134. package/src/media/index.ts +3 -0
  135. package/src/media/properties.ts +1 -0
  136. package/src/meeting/in-meeting-actions.ts +8 -0
  137. package/src/meeting/index.ts +441 -65
  138. package/src/meeting/muteState.ts +10 -1
  139. package/src/meeting/request.ts +11 -0
  140. package/src/meeting/util.ts +33 -2
  141. package/src/meeting-info/meeting-info-v2.ts +4 -2
  142. package/src/meetings/index.ts +134 -44
  143. package/src/meetings/meetings.types.ts +19 -0
  144. package/src/meetings/request.ts +43 -0
  145. package/src/meetings/util.ts +97 -1
  146. package/src/member/index.ts +10 -0
  147. package/src/member/types.ts +1 -0
  148. package/src/member/util.ts +3 -0
  149. package/src/metrics/constants.ts +3 -0
  150. package/src/multistream/codec/constants.ts +58 -0
  151. package/src/multistream/mediaRequestManager.ts +119 -28
  152. package/src/multistream/receiveSlot.ts +18 -0
  153. package/src/reactions/reactions.type.ts +3 -0
  154. package/src/recording-controller/index.ts +1 -2
  155. package/src/webinar/index.ts +214 -36
  156. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  157. package/test/unit/spec/breakouts/breakout.ts +9 -3
  158. package/test/unit/spec/breakouts/index.ts +49 -0
  159. package/test/unit/spec/controls-options-manager/index.js +244 -29
  160. package/test/unit/spec/controls-options-manager/util.js +165 -0
  161. package/test/unit/spec/hashTree/hashTreeParser.ts +1838 -180
  162. package/test/unit/spec/hashTree/utils.ts +125 -1
  163. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  164. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  165. package/test/unit/spec/interpretation/index.ts +26 -4
  166. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  167. package/test/unit/spec/locus-info/index.js +499 -81
  168. package/test/unit/spec/locus-info/infoUtils.js +87 -0
  169. package/test/unit/spec/media/index.ts +31 -0
  170. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  171. package/test/unit/spec/meeting/index.js +1552 -42
  172. package/test/unit/spec/meeting/muteState.js +81 -0
  173. package/test/unit/spec/meeting/request.js +12 -0
  174. package/test/unit/spec/meeting/utils.js +82 -0
  175. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  176. package/test/unit/spec/meetings/index.js +363 -10
  177. package/test/unit/spec/meetings/request.js +141 -0
  178. package/test/unit/spec/meetings/utils.js +189 -0
  179. package/test/unit/spec/member/index.js +7 -0
  180. package/test/unit/spec/member/util.js +24 -0
  181. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  182. package/test/unit/spec/recording-controller/index.js +9 -8
  183. package/test/unit/spec/webinar/index.ts +329 -28
@@ -111,6 +111,7 @@ var DEFAULT_ICE_PHASE_CALLBACK = function DEFAULT_ICE_PHASE_CALLBACK() {
111
111
  return 'JOIN_MEETING_FINAL';
112
112
  };
113
113
  var LLM_HEALTHCHECK_TIMER_MS = 3 * 60 * 1000;
114
+ var JOIN_WITH_MEDIA_RETRY_MAX_COUNT = 2;
114
115
  var logRequest = function logRequest(request, _ref) {
115
116
  var _ref$logText = _ref.logText,
116
117
  logText = _ref$logText === void 0 ? '' : _ref$logText;
@@ -496,6 +497,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
496
497
  (0, _defineProperty3.default)(_this, "floorGrantPending", void 0);
497
498
  (0, _defineProperty3.default)(_this, "hasJoinedOnce", void 0);
498
499
  (0, _defineProperty3.default)(_this, "hasWebsocketConnected", void 0);
500
+ (0, _defineProperty3.default)(_this, "mercuryOnlineHandler", void 0);
501
+ (0, _defineProperty3.default)(_this, "mercuryOfflineHandler", void 0);
499
502
  (0, _defineProperty3.default)(_this, "inMeetingActions", void 0);
500
503
  (0, _defineProperty3.default)(_this, "isLocalShareLive", void 0);
501
504
  (0, _defineProperty3.default)(_this, "isRoapInProgress", void 0);
@@ -507,6 +510,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
507
510
  (0, _defineProperty3.default)(_this, "joinedWith", void 0);
508
511
  (0, _defineProperty3.default)(_this, "selfId", void 0);
509
512
  (0, _defineProperty3.default)(_this, "roles", void 0);
513
+ (0, _defineProperty3.default)(_this, "canNotViewTheParticipantList", void 0);
510
514
  // ... there is more ... see SelfUtils.parse()
511
515
  // end of the group
512
516
  (0, _defineProperty3.default)(_this, "locusMediaRequest", void 0);
@@ -641,6 +645,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
641
645
  * @returns {void}
642
646
  */
643
647
  (0, _defineProperty3.default)(_this, "processRelayEvent", function (e) {
648
+ if (!_this.isRelayEventRouteValid(e)) {
649
+ return;
650
+ }
644
651
  switch (e.data.relayType) {
645
652
  case _constants3.REACTION_RELAY_TYPES.REACTION:
646
653
  if (
@@ -680,6 +687,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
680
687
  */
681
688
  (0, _defineProperty3.default)(_this, "handleLLMOnline", function () {
682
689
  _this.restoreLLMSubscriptionsIfNeeded();
690
+ _this.locusInfo.syncAllHashTreeDatasets({
691
+ onlyLLM: true
692
+ });
683
693
  _triggerProxy.default.trigger(_this, {
684
694
  file: 'meeting/index',
685
695
  function: 'handleLLMOnline'
@@ -687,6 +697,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
687
697
  });
688
698
  /**
689
699
  * Disconnects and cleans up the default LLM session listeners/timers.
700
+ *
701
+ * Ownership-aware: only calls `disconnectLLM` when this meeting is the
702
+ * current owner of the default LLM session (or when no owner is recorded).
703
+ * Event listeners belonging to this meeting instance are always detached
704
+ * so they do not receive another meeting's relay events.
705
+ *
690
706
  * @param {Object} options
691
707
  * @param {boolean} [options.removeOnlineListener=true] removes the one-time online listener
692
708
  * @param {boolean} [options.throwOnError=true] rethrows disconnect errors when true
@@ -698,47 +714,74 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
698
714
  removeOnlineListener,
699
715
  _ref3$throwOnError,
700
716
  throwOnError,
717
+ _this$webex$internal$,
718
+ currentOwner,
719
+ isOwner,
720
+ _this$webex$internal$2,
721
+ currentOwnerAfterCleanup,
722
+ _this$webex$internal$3,
723
+ _this$webex$internal$4,
701
724
  _args = arguments,
702
725
  _t;
703
726
  return _regenerator.default.wrap(function (_context) {
704
727
  while (1) switch (_context.prev = _context.next) {
705
728
  case 0:
706
729
  _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;
730
+ // @ts-ignore - Fix type
731
+ // @ts-ignore - Fix type
732
+ _this$webex$internal$ = _this.webex.internal.llm.resolveSessionOwnership(_this.id, _constants.LLM_DEFAULT_SESSION), currentOwner = _this$webex$internal$.currentOwner, isOwner = _this$webex$internal$.isOwner;
707
733
  _context.prev = 1;
734
+ if (!isOwner) {
735
+ _context.next = 3;
736
+ break;
737
+ }
708
738
  _context.next = 2;
709
739
  return _this.webex.internal.llm.disconnectLLM({
710
740
  code: 3050,
711
741
  reason: 'done (permanent)'
712
- });
742
+ }, _constants.LLM_DEFAULT_SESSION, _this.id);
713
743
  case 2:
714
744
  _context.next = 4;
715
745
  break;
716
746
  case 3:
717
- _context.prev = 3;
747
+ _loggerProxy.default.logger.info("Meeting:index#cleanupLLMConneciton --> skipping disconnect; LLM owned by meeting ".concat(currentOwner, ", not ").concat(_this.id));
748
+ case 4:
749
+ _context.next = 6;
750
+ break;
751
+ case 5:
752
+ _context.prev = 5;
718
753
  _t = _context["catch"](1);
719
754
  _loggerProxy.default.logger.error('Meeting:index#cleanupLLMConneciton --> Failed to disconnect default LLM session', _t);
720
755
  if (!throwOnError) {
721
- _context.next = 4;
756
+ _context.next = 6;
722
757
  break;
723
758
  }
724
759
  throw _t;
725
- case 4:
726
- _context.prev = 4;
760
+ case 6:
761
+ _context.prev = 6;
727
762
  if (removeOnlineListener) {
728
763
  // @ts-ignore - Fix type
729
764
  _this.webex.internal.llm.off('online', _this.handleLLMOnline);
730
765
  }
731
- // @ts-ignore - fix types
732
- _this.webex.internal.llm.off('event:relay.event', _this.processRelayEvent);
733
- // @ts-ignore - Fix type
734
- _this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, _this.processLocusLLMEvent);
735
- _this.clearLLMHealthCheckTimer();
736
- return _context.finish(4);
737
- case 5:
766
+ _this.stopListeningForLLMEvents();
767
+
768
+ // Re-check ownership after awaiting disconnectLLM. If ownership changed
769
+ // while cleanup was in flight, do not clear another meeting's owner tag.
770
+ if (isOwner) {
771
+ _this$webex$internal$2 =
772
+ // @ts-ignore - Fix type
773
+ _this.webex.internal.llm.resolveSessionOwnership(_this.id, _constants.LLM_DEFAULT_SESSION), currentOwnerAfterCleanup = _this$webex$internal$2.currentOwner;
774
+ if (currentOwnerAfterCleanup === _this.id) {
775
+ // @ts-ignore - Fix type
776
+ (_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);
777
+ }
778
+ }
779
+ return _context.finish(6);
780
+ case 7:
738
781
  case "end":
739
782
  return _context.stop();
740
783
  }
741
- }, _callee, null, [[1, 3, 4, 5]]);
784
+ }, _callee, null, [[1, 5, 6, 7]]);
742
785
  })));
743
786
  /**
744
787
  * Handles ROAP_FAILURE event from the webrtc media connection
@@ -1321,6 +1364,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1321
1364
  }
1322
1365
  }
1323
1366
  });
1367
+ _this.statsAnalyzer.on(_internalMediaCore.StatsAnalyzerEventNames.STATS_UPDATE, function (data) {
1368
+ // Extract srtpCipher from transport stats
1369
+ var srtpCipher;
1370
+ var _iterator = _createForOfIteratorHelper(data.stats.values()),
1371
+ _step;
1372
+ try {
1373
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1374
+ var stats = _step.value;
1375
+ if (stats.type === 'transport' && stats.srtpCipher) {
1376
+ srtpCipher = stats.srtpCipher;
1377
+ break;
1378
+ }
1379
+ }
1380
+
1381
+ // Only emit event if srtpCipher has changed
1382
+ } catch (err) {
1383
+ _iterator.e(err);
1384
+ } finally {
1385
+ _iterator.f();
1386
+ }
1387
+ if (srtpCipher && srtpCipher !== _this.mediaProperties.srtpCipher) {
1388
+ _loggerProxy.default.logger.info("Meeting:index#setupStatsAnalyzerEventHandlers --> SRTP cipher changed from ".concat(_this.mediaProperties.srtpCipher, " to ").concat(srtpCipher));
1389
+ _this.mediaProperties.srtpCipher = srtpCipher;
1390
+ _triggerProxy.default.trigger(_this, {
1391
+ file: 'meeting/index',
1392
+ function: 'setupStatsAnalyzerEventHandlers'
1393
+ }, _constants.EVENT_TRIGGERS.MEETING_SRTP_CIPHER_UPDATED, {
1394
+ srtpCipher: srtpCipher
1395
+ });
1396
+ }
1397
+ });
1324
1398
  });
1325
1399
  /**
1326
1400
  * media failed, so collect a stats report from webrtc using the wcme connection to grab the rtc stats report
@@ -1549,9 +1623,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1549
1623
  _this.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
1550
1624
  }
1551
1625
  _this.queuedMediaUpdates = [];
1552
- _this.stopTranscription();
1553
- _this.transcription = undefined;
1554
- _this.annotation.deregisterEvents();
1626
+
1627
+ // Listener teardown (transcription, annotation, llm/mercury) runs in
1628
+ // stopListeningForMeetingEvents() before /leave and /end so events
1629
+ // received mid-teardown do not trigger Locus syncs. Calling it here
1630
+ // again would double-emit MEETING_STOPPED_RECEIVING_TRANSCRIPTION
1631
+ // because stopTranscription() always fires its trigger.
1632
+ //
1633
+ // Ownership-aware token clear is encapsulated inside clearDataChannelToken().
1555
1634
  _this.clearDataChannelToken();
1556
1635
  _context5.next = 1;
1557
1636
  return _this.cleanupLLMConneciton({
@@ -1727,7 +1806,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1727
1806
  });
1728
1807
 
1729
1808
  // @ts-ignore
1730
- _this.aiEnableRequest = new _aiEnableRequest.default({}, {
1809
+ _this.aiEnableRequest = new _aiEnableRequest.default({
1810
+ locusUrl: _this.locusUrl
1811
+ }, {
1731
1812
  parent: _this.webex
1732
1813
  });
1733
1814
 
@@ -1766,6 +1847,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1766
1847
  var _this$members$findMem2;
1767
1848
  return (_this$members$findMem2 = _this.members.findMemberByCsi(csi)) === null || _this$members$findMem2 === void 0 ? void 0 : _this$members$findMem2.id;
1768
1849
  });
1850
+
1769
1851
  /**
1770
1852
  * Object containing helper classes for managing media requests for audio/video/screenshare (for multistream media connections)
1771
1853
  * All multistream media requests sent out for this meeting have to go through them.
@@ -1777,7 +1859,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1777
1859
  return;
1778
1860
  }
1779
1861
  _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.AudioMain, mediaRequests);
1780
- }, {
1862
+ }, _this.getIngressPayloadTypeCallback.bind(_this), {
1781
1863
  // @ts-ignore - config coming from registerPlugin
1782
1864
  degradationPreferences: _this.config.degradationPreferences,
1783
1865
  kind: 'audio',
@@ -1789,7 +1871,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1789
1871
  return;
1790
1872
  }
1791
1873
  _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.VideoMain, mediaRequests);
1792
- }, {
1874
+ }, _this.getIngressPayloadTypeCallback.bind(_this), {
1793
1875
  // @ts-ignore - config coming from registerPlugin
1794
1876
  degradationPreferences: _this.config.degradationPreferences,
1795
1877
  kind: 'video',
@@ -1801,7 +1883,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1801
1883
  return;
1802
1884
  }
1803
1885
  _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.AudioSlides, mediaRequests);
1804
- }, {
1886
+ }, _this.getIngressPayloadTypeCallback.bind(_this), {
1805
1887
  // @ts-ignore - config coming from registerPlugin
1806
1888
  degradationPreferences: _this.config.degradationPreferences,
1807
1889
  kind: 'audio',
@@ -1813,11 +1895,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1813
1895
  return;
1814
1896
  }
1815
1897
  _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.VideoSlides, mediaRequests);
1816
- }, {
1898
+ }, _this.getIngressPayloadTypeCallback.bind(_this), {
1817
1899
  // @ts-ignore - config coming from registerPlugin
1818
1900
  degradationPreferences: _this.config.degradationPreferences,
1819
1901
  kind: 'video',
1820
- trimRequestsToNumOfSources: false
1902
+ trimRequestsToNumOfSources: false,
1903
+ // @ts-ignore - config coming from registerPlugin
1904
+ enableAv1: _this.config.enableAv1SlidesSupport
1821
1905
  })
1822
1906
  };
1823
1907
  /**
@@ -2325,7 +2409,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2325
2409
  */
2326
2410
  _this.controlsOptionsManager = new _controlsOptionsManager.default(_this.meetingRequest, {
2327
2411
  locusUrl: (_this$locusInfo5 = _this.locusInfo) === null || _this$locusInfo5 === void 0 ? void 0 : _this$locusInfo5.url,
2328
- displayHints: []
2412
+ displayHints: [],
2413
+ getControls: function getControls() {
2414
+ var _this$locusInfo6;
2415
+ return (_this$locusInfo6 = _this.locusInfo) === null || _this$locusInfo6 === void 0 ? void 0 : _this$locusInfo6.controls;
2416
+ },
2417
+ isWebinar: function isWebinar() {
2418
+ var _this$locusInfo7, _this$locusInfo7$info;
2419
+ return (_this$locusInfo7 = _this.locusInfo) === null || _this$locusInfo7 === void 0 ? void 0 : (_this$locusInfo7$info = _this$locusInfo7.info) === null || _this$locusInfo7$info === void 0 ? void 0 : _this$locusInfo7$info.isWebinar;
2420
+ }
2329
2421
  });
2330
2422
  _this.setUpLocusInfoListeners();
2331
2423
  _this.locusInfo.init(attrs.locus ? attrs.locus : {});
@@ -2423,12 +2515,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2423
2515
  /**
2424
2516
  * Information needed for a retry of a call to joinWithMedia
2425
2517
  * @instance
2426
- * @type {{isRetry: boolean; prevJoinResponse?: any}}
2518
+ * @type {{retryCount: number; prevJoinResponse?: any}}
2427
2519
  * @private
2428
2520
  * @memberof Meeting
2429
2521
  */
2430
2522
  _this.joinWithMediaRetryInfo = {
2431
- isRetry: false,
2523
+ retryCount: 0,
2432
2524
  prevJoinResponse: undefined
2433
2525
  };
2434
2526
 
@@ -2486,14 +2578,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2486
2578
  }
2487
2579
 
2488
2580
  /**
2489
- * Temporary func to return webex object,
2490
- * in order to access internal plugin metrics
2491
- * in the utils file.
2492
- * @internal
2493
- * @returns {object} webex object
2581
+ * Get the ingress payload type for a given media type and codec mime type
2582
+ * @param {MediaType} mediaType - The media type
2583
+ * @param {MediaCodecMimeType} codecMimeType - The codec mime type
2584
+ * @returns {number | undefined} - The ingress payload type
2585
+ * @private
2586
+ * @memberof Meeting
2494
2587
  */
2495
2588
  (0, _inherits2.default)(Meeting, _StatelessWebexPlugin);
2496
2589
  return (0, _createClass2.default)(Meeting, [{
2590
+ key: "getIngressPayloadTypeCallback",
2591
+ value: function getIngressPayloadTypeCallback(mediaType, codecMimeType) {
2592
+ if (this.isMultistream) {
2593
+ try {
2594
+ return this.mediaProperties.webrtcMediaConnection.getIngressPayloadType(mediaType, codecMimeType);
2595
+ } catch (error) {
2596
+ _loggerProxy.default.logger.info("Meeting:index#mediaRequestManager --> failed to get ingress payload type for mediaType=".concat(mediaType, ", codecMimeType=").concat(codecMimeType), error);
2597
+ return undefined;
2598
+ }
2599
+ }
2600
+ return undefined;
2601
+ }
2602
+
2603
+ /**
2604
+ * Temporary func to return webex object,
2605
+ * in order to access internal plugin metrics
2606
+ * in the utils file.
2607
+ * @internal
2608
+ * @returns {object} webex object
2609
+ */
2610
+ }, {
2497
2611
  key: "getWebexObject",
2498
2612
  value: function getWebexObject() {
2499
2613
  // @ts-ignore
@@ -3525,7 +3639,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3525
3639
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref10) {
3526
3640
  var state = _ref10.state,
3527
3641
  modifiedBy = _ref10.modifiedBy,
3528
- lastModified = _ref10.lastModified;
3642
+ lastModified = _ref10.lastModified,
3643
+ modifiedByServiceAppName = _ref10.modifiedByServiceAppName,
3644
+ modifiedByServiceAppId = _ref10.modifiedByServiceAppId;
3529
3645
  var event;
3530
3646
  switch (state) {
3531
3647
  case _constants.RECORDING_STATE.RECORDING:
@@ -3549,7 +3665,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3549
3665
  _this12.recording = {
3550
3666
  state: state === _constants.RECORDING_STATE.RESUMED ? _constants.RECORDING_STATE.RECORDING : state,
3551
3667
  modifiedBy: modifiedBy,
3552
- lastModified: lastModified
3668
+ lastModified: lastModified,
3669
+ modifiedByServiceAppName: modifiedByServiceAppName,
3670
+ modifiedByServiceAppId: modifiedByServiceAppId
3553
3671
  };
3554
3672
  _triggerProxy.default.trigger(_this12, {
3555
3673
  file: 'meeting/index',
@@ -4086,15 +4204,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4086
4204
  _this14.breakouts.locusUrlUpdate(url);
4087
4205
  _this14.simultaneousInterpretation.locusUrlUpdate(url);
4088
4206
  _this14.annotation.locusUrlUpdate(url);
4207
+ _this14.aiEnableRequest.locusUrlUpdate(url);
4089
4208
  _this14.locusUrl = url;
4090
4209
  _this14.locusId = (_this14$locusUrl = _this14.locusUrl) === null || _this14$locusUrl === void 0 ? void 0 : _this14$locusUrl.split('/').pop();
4091
4210
  _this14.recordingController.setLocusUrl(_this14.locusUrl);
4092
4211
  _this14.controlsOptionsManager.setLocusUrl(_this14.locusUrl, !!isMainLocus);
4093
4212
  _this14.webinar.locusUrlUpdate(url);
4094
- // @ts-ignore
4095
- _this14.webex.internal.llm.setRefreshHandler(function () {
4096
- return _this14.refreshDataChannelToken();
4097
- });
4098
4213
  _triggerProxy.default.trigger(_this14, {
4099
4214
  file: 'meeting/index',
4100
4215
  function: 'setUpLocusSelfListener'
@@ -4324,34 +4439,56 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4324
4439
  });
4325
4440
  _this19.updateLLMConnection();
4326
4441
  });
4327
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
4328
- var _this19$rtcMetrics;
4329
- _this19.stopKeepAlive();
4330
- if (payload) {
4331
- _triggerProxy.default.trigger(_this19, {
4332
- file: 'meeting/index',
4333
- function: 'setUpLocusInfoSelfListener'
4334
- }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
4335
- payload: payload
4336
- });
4442
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
4443
+ var _ref37 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(payload) {
4444
+ var _this19$rtcMetrics;
4445
+ var _t9;
4446
+ return _regenerator.default.wrap(function (_context1) {
4447
+ while (1) switch (_context1.prev = _context1.next) {
4448
+ case 0:
4449
+ _this19.stopKeepAlive();
4450
+ if (payload) {
4451
+ _triggerProxy.default.trigger(_this19, {
4452
+ file: 'meeting/index',
4453
+ function: 'setUpLocusInfoSelfListener'
4454
+ }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
4455
+ payload: payload
4456
+ });
4337
4457
 
4338
- // @ts-ignore
4339
- _this19.webex.internal.newMetrics.submitClientEvent({
4340
- name: 'client.lobby.exited',
4341
- options: {
4342
- meetingId: _this19.id
4458
+ // @ts-ignore
4459
+ _this19.webex.internal.newMetrics.submitClientEvent({
4460
+ name: 'client.lobby.exited',
4461
+ options: {
4462
+ meetingId: _this19.id
4463
+ }
4464
+ });
4465
+ _metrics.default.sendBehavioralMetric(_constants2.default.GUEST_EXITED_LOBBY, {
4466
+ correlation_id: _this19.correlationId
4467
+ });
4468
+ }
4469
+ (_this19$rtcMetrics = _this19.rtcMetrics) === null || _this19$rtcMetrics === void 0 ? void 0 : _this19$rtcMetrics.sendNextMetrics();
4470
+ _context1.prev = 1;
4471
+ _context1.next = 2;
4472
+ return _this19.ensureDefaultDatachannelTokenAfterAdmit();
4473
+ case 2:
4474
+ _context1.next = 4;
4475
+ break;
4476
+ case 3:
4477
+ _context1.prev = 3;
4478
+ _t9 = _context1["catch"](1);
4479
+ _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)));
4480
+ case 4:
4481
+ _this19.updateLLMConnection();
4482
+ case 5:
4483
+ case "end":
4484
+ return _context1.stop();
4343
4485
  }
4344
- });
4345
- _metrics.default.sendBehavioralMetric(_constants2.default.GUEST_EXITED_LOBBY, {
4346
- correlation_id: _this19.correlationId
4347
- });
4348
- }
4349
- (_this19$rtcMetrics = _this19.rtcMetrics) === null || _this19$rtcMetrics === void 0 ? void 0 : _this19$rtcMetrics.sendNextMetrics();
4350
- _this19.ensureDefaultDatachannelTokenAfterAdmit().catch(function (error) {
4351
- _loggerProxy.default.logger.warn("Meeting:index#setUpLocusInfoSelfListener --> failed post-admit token prefetch flow: ".concat((error === null || error === void 0 ? void 0 : error.message) || String(error)));
4352
- });
4353
- _this19.updateLLMConnection();
4354
- });
4486
+ }, _callee1, null, [[1, 3]]);
4487
+ }));
4488
+ return function (_x9) {
4489
+ return _ref37.apply(this, arguments);
4490
+ };
4491
+ }());
4355
4492
 
4356
4493
  // @ts-ignore - check if MEDIA_INACTIVITY exists
4357
4494
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
@@ -4387,6 +4524,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4387
4524
  }
4388
4525
  });
4389
4526
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE, function (payload) {
4527
+ // canViewTheParticipantList meeting action depends on this value, so we need to update meeting actions
4528
+ _this19.updateMeetingActions();
4390
4529
  _triggerProxy.default.trigger(_this19, {
4391
4530
  file: 'meeting/index',
4392
4531
  function: 'setUpLocusInfoSelfListener'
@@ -4471,49 +4610,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4471
4610
  }
4472
4611
  });
4473
4612
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4474
- var _ref37 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(payload) {
4475
- var _t9;
4476
- return _regenerator.default.wrap(function (_context1) {
4477
- while (1) switch (_context1.prev = _context1.next) {
4613
+ var _ref38 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4614
+ var _t0;
4615
+ return _regenerator.default.wrap(function (_context10) {
4616
+ while (1) switch (_context10.prev = _context10.next) {
4478
4617
  case 0:
4479
4618
  if (!_this20.wirelessShare) {
4480
- _context1.next = 2;
4619
+ _context10.next = 2;
4481
4620
  break;
4482
4621
  }
4483
4622
  if (!_this20.mediaProperties.shareVideoStream) {
4484
- _context1.next = 1;
4623
+ _context10.next = 1;
4485
4624
  break;
4486
4625
  }
4487
- _context1.next = 1;
4626
+ _context10.next = 1;
4488
4627
  return _this20.setLocalShareVideoStream(undefined);
4489
4628
  case 1:
4490
4629
  if (!_this20.mediaProperties.shareAudioStream) {
4491
- _context1.next = 2;
4630
+ _context10.next = 2;
4492
4631
  break;
4493
4632
  }
4494
- _context1.next = 2;
4633
+ _context10.next = 2;
4495
4634
  return _this20.setLocalShareAudioStream(undefined);
4496
4635
  case 2:
4497
4636
  if (!payload.shouldLeave) {
4498
- _context1.next = 7;
4637
+ _context10.next = 7;
4499
4638
  break;
4500
4639
  }
4501
- _context1.prev = 3;
4502
- _context1.next = 4;
4640
+ _context10.prev = 3;
4641
+ _context10.next = 4;
4503
4642
  return _this20.leave({
4504
4643
  reason: payload.reason
4505
4644
  });
4506
4645
  case 4:
4507
4646
  _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.');
4508
- _context1.next = 6;
4647
+ _context10.next = 6;
4509
4648
  break;
4510
4649
  case 5:
4511
- _context1.prev = 5;
4512
- _t9 = _context1["catch"](3);
4650
+ _context10.prev = 5;
4651
+ _t0 = _context10["catch"](3);
4513
4652
  // @ts-ignore
4514
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_t9));
4653
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_t0));
4515
4654
  case 6:
4516
- _context1.next = 8;
4655
+ _context10.next = 8;
4517
4656
  break;
4518
4657
  case 7:
4519
4658
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
@@ -4527,12 +4666,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4527
4666
  });
4528
4667
  case 8:
4529
4668
  case "end":
4530
- return _context1.stop();
4669
+ return _context10.stop();
4531
4670
  }
4532
- }, _callee1, null, [[3, 5]]);
4671
+ }, _callee10, null, [[3, 5]]);
4533
4672
  }));
4534
- return function (_x9) {
4535
- return _ref37.apply(this, arguments);
4673
+ return function (_x0) {
4674
+ return _ref38.apply(this, arguments);
4536
4675
  };
4537
4676
  }());
4538
4677
  }
@@ -4650,31 +4789,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4650
4789
  }, {
4651
4790
  key: "beRightBack",
4652
4791
  value: (function () {
4653
- var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(enabled) {
4792
+ var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4654
4793
  var _this22 = this;
4655
4794
  var errorMessage, error, _errorMessage, _error;
4656
- return _regenerator.default.wrap(function (_context10) {
4657
- while (1) switch (_context10.prev = _context10.next) {
4795
+ return _regenerator.default.wrap(function (_context11) {
4796
+ while (1) switch (_context11.prev = _context11.next) {
4658
4797
  case 0:
4659
4798
  if (this.isMultistream) {
4660
- _context10.next = 1;
4799
+ _context11.next = 1;
4661
4800
  break;
4662
4801
  }
4663
4802
  errorMessage = 'Meeting:index#beRightBack --> Not a multistream meeting';
4664
4803
  error = new Error(errorMessage);
4665
4804
  _loggerProxy.default.logger.error(error);
4666
- return _context10.abrupt("return", _promise.default.reject(error));
4805
+ return _context11.abrupt("return", _promise.default.reject(error));
4667
4806
  case 1:
4668
4807
  if (this.mediaProperties.webrtcMediaConnection) {
4669
- _context10.next = 2;
4808
+ _context11.next = 2;
4670
4809
  break;
4671
4810
  }
4672
4811
  _errorMessage = 'Meeting:index#beRightBack --> WebRTC media connection is not defined';
4673
4812
  _error = new Error(_errorMessage);
4674
4813
  _loggerProxy.default.logger.error(_error);
4675
- return _context10.abrupt("return", _promise.default.reject(_error));
4814
+ return _context11.abrupt("return", _promise.default.reject(_error));
4676
4815
  case 2:
4677
- return _context10.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4816
+ return _context11.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4678
4817
  if (_this22.audio && enabled) {
4679
4818
  // locus mutes the participant with brb enabled request,
4680
4819
  // so we need to explicitly update remote mute for correct logic flow
@@ -4685,11 +4824,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4685
4824
  }));
4686
4825
  case 3:
4687
4826
  case "end":
4688
- return _context10.stop();
4827
+ return _context11.stop();
4689
4828
  }
4690
- }, _callee10, this);
4829
+ }, _callee11, this);
4691
4830
  }));
4692
- function beRightBack(_x0) {
4831
+ function beRightBack(_x1) {
4693
4832
  return _beRightBack.apply(this, arguments);
4694
4833
  }
4695
4834
  return beRightBack;
@@ -4863,6 +5002,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4863
5002
  }) && ((_this$meetingInfo5 = this.meetingInfo) === null || _this$meetingInfo5 === void 0 ? void 0 : (_this$meetingInfo5$vi = _this$meetingInfo5.video) === null || _this$meetingInfo5$vi === void 0 ? void 0 : _this$meetingInfo5$vi.supportHQV) || !this.arePolicyRestrictionsSupported()
4864
5003
  });
4865
5004
  if (this.userDisplayHints !== undefined) {
5005
+ var _this$canNotViewThePa;
4866
5006
  changed = this.inMeetingActions.set({
4867
5007
  canInviteNewParticipants: _util2.default.canInviteNewParticipants(this.userDisplayHints),
4868
5008
  canAdmitParticipant: _util2.default.canAdmitParticipant(this.userDisplayHints),
@@ -5117,7 +5257,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5117
5257
  displayHints: this.userDisplayHints
5118
5258
  }),
5119
5259
  canAttendeeRequestAiAssistantEnabled: _util2.default.canAttendeeRequestAiAssistantEnabled(this.userDisplayHints, this.roles),
5120
- isAttendeeRequestAiAssistantDeclinedAll: _util2.default.attendeeRequestAiAssistantDeclinedAll(this.userDisplayHints)
5260
+ isAttendeeRequestAiAssistantDeclinedAll: _util2.default.attendeeRequestAiAssistantDeclinedAll(this.userDisplayHints),
5261
+ isAnonymizeDisplayNamesEnabled: _util2.default.isAnonymizeDisplayNamesEnabled(this.userDisplayHints),
5262
+ canViewTheParticipantList: _util2.default.canViewTheParticipantList(this.userDisplayHints, (_this$canNotViewThePa = this.canNotViewTheParticipantList) !== null && _this$canNotViewThePa !== void 0 ? _this$canNotViewThePa : false)
5121
5263
  }) || changed;
5122
5264
  }
5123
5265
  if (changed) {
@@ -5168,6 +5310,51 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5168
5310
  this.sipUri = sipUri;
5169
5311
  }
5170
5312
 
5313
+ /**
5314
+ * After initial locus setup, refreshes destination with synced locus data and optionally
5315
+ * performs deferred meeting info fetch when initial locus was incomplete.
5316
+ * @param {LocusDTO} locus
5317
+ * @returns {void}
5318
+ */
5319
+ }, {
5320
+ key: "finalizeMeetingAfterInitialLocusSetup",
5321
+ value: (function () {
5322
+ var _finalizeMeetingAfterInitialLocusSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(locus) {
5323
+ var _this$destination;
5324
+ var _t1;
5325
+ return _regenerator.default.wrap(function (_context12) {
5326
+ while (1) switch (_context12.prev = _context12.next) {
5327
+ case 0:
5328
+ if (locus && (this === null || this === void 0 ? void 0 : this.destinationType) === _constants.DESTINATION_TYPE.LOCUS_ID) {
5329
+ // destination is initialized from the initial locus snapshot in constructor,
5330
+ // so refresh it after locus sync to avoid stale partial hash-tree data.
5331
+ this.destination = locus;
5332
+ }
5333
+ 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))) {
5334
+ _context12.next = 4;
5335
+ break;
5336
+ }
5337
+ _context12.prev = 1;
5338
+ _context12.next = 2;
5339
+ return this.fetchMeetingInfo({});
5340
+ case 2:
5341
+ _context12.next = 4;
5342
+ break;
5343
+ case 3:
5344
+ _context12.prev = 3;
5345
+ _t1 = _context12["catch"](1);
5346
+ _loggerProxy.default.logger.info("Meeting:index#finalizeMeetingAfterInitialLocusSetup --> deferred fetchMeetingInfo failed: ".concat(_t1.message));
5347
+ case 4:
5348
+ case "end":
5349
+ return _context12.stop();
5350
+ }
5351
+ }, _callee12, this, [[1, 3]]);
5352
+ }));
5353
+ function finalizeMeetingAfterInitialLocusSetup(_x10) {
5354
+ return _finalizeMeetingAfterInitialLocusSetup.apply(this, arguments);
5355
+ }
5356
+ return finalizeMeetingAfterInitialLocusSetup;
5357
+ }()
5171
5358
  /**
5172
5359
  * Set the locus info the class instance. Should be called with the parsed locus
5173
5360
  * we got in the join response.
@@ -5183,6 +5370,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5183
5370
  * @private
5184
5371
  * @memberof Meeting
5185
5372
  */
5373
+ )
5186
5374
  }, {
5187
5375
  key: "setLocus",
5188
5376
  value: function setLocus(data) {
@@ -5362,11 +5550,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5362
5550
  }, {
5363
5551
  key: "setLocalAudioStream",
5364
5552
  value: (function () {
5365
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
5553
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localStream) {
5366
5554
  var _this$audio2;
5367
5555
  var oldStream;
5368
- return _regenerator.default.wrap(function (_context11) {
5369
- while (1) switch (_context11.prev = _context11.next) {
5556
+ return _regenerator.default.wrap(function (_context13) {
5557
+ while (1) switch (_context13.prev = _context13.next) {
5370
5558
  case 0:
5371
5559
  oldStream = this.mediaProperties.audioStream;
5372
5560
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -5380,21 +5568,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5380
5568
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
5381
5569
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5382
5570
  if (!(!this.isMultistream || !localStream)) {
5383
- _context11.next = 1;
5571
+ _context13.next = 1;
5384
5572
  break;
5385
5573
  }
5386
- _context11.next = 1;
5574
+ _context13.next = 1;
5387
5575
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
5388
5576
  case 1:
5389
- _context11.next = 2;
5577
+ _context13.next = 2;
5390
5578
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5391
5579
  case 2:
5392
5580
  case "end":
5393
- return _context11.stop();
5581
+ return _context13.stop();
5394
5582
  }
5395
- }, _callee11, this);
5583
+ }, _callee13, this);
5396
5584
  }));
5397
- function setLocalAudioStream(_x1) {
5585
+ function setLocalAudioStream(_x11) {
5398
5586
  return _setLocalAudioStream.apply(this, arguments);
5399
5587
  }
5400
5588
  return setLocalAudioStream;
@@ -5410,11 +5598,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5410
5598
  }, {
5411
5599
  key: "setLocalVideoStream",
5412
5600
  value: (function () {
5413
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
5601
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localStream) {
5414
5602
  var _this$video2;
5415
5603
  var oldStream;
5416
- return _regenerator.default.wrap(function (_context12) {
5417
- while (1) switch (_context12.prev = _context12.next) {
5604
+ return _regenerator.default.wrap(function (_context14) {
5605
+ while (1) switch (_context14.prev = _context14.next) {
5418
5606
  case 0:
5419
5607
  oldStream = this.mediaProperties.videoStream;
5420
5608
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -5430,21 +5618,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5430
5618
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5431
5619
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.ConstraintsChange, this.localConstraintsChangeHandler);
5432
5620
  if (!(!this.isMultistream || !localStream)) {
5433
- _context12.next = 1;
5621
+ _context14.next = 1;
5434
5622
  break;
5435
5623
  }
5436
- _context12.next = 1;
5624
+ _context14.next = 1;
5437
5625
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
5438
5626
  case 1:
5439
- _context12.next = 2;
5627
+ _context14.next = 2;
5440
5628
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5441
5629
  case 2:
5442
5630
  case "end":
5443
- return _context12.stop();
5631
+ return _context14.stop();
5444
5632
  }
5445
- }, _callee12, this);
5633
+ }, _callee14, this);
5446
5634
  }));
5447
- function setLocalVideoStream(_x10) {
5635
+ function setLocalVideoStream(_x12) {
5448
5636
  return _setLocalVideoStream.apply(this, arguments);
5449
5637
  }
5450
5638
  return setLocalVideoStream;
@@ -5461,10 +5649,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5461
5649
  }, {
5462
5650
  key: "setLocalShareVideoStream",
5463
5651
  value: (function () {
5464
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localDisplayStream) {
5652
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15(localDisplayStream) {
5465
5653
  var oldStream;
5466
- return _regenerator.default.wrap(function (_context13) {
5467
- while (1) switch (_context13.prev = _context13.next) {
5654
+ return _regenerator.default.wrap(function (_context15) {
5655
+ while (1) switch (_context15.prev = _context15.next) {
5468
5656
  case 0:
5469
5657
  oldStream = this.mediaProperties.shareVideoStream;
5470
5658
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -5476,21 +5664,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5476
5664
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5477
5665
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5478
5666
  if (!(!this.isMultistream || !localDisplayStream)) {
5479
- _context13.next = 1;
5667
+ _context15.next = 1;
5480
5668
  break;
5481
5669
  }
5482
- _context13.next = 1;
5670
+ _context15.next = 1;
5483
5671
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
5484
5672
  case 1:
5485
- _context13.next = 2;
5673
+ _context15.next = 2;
5486
5674
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5487
5675
  case 2:
5488
5676
  case "end":
5489
- return _context13.stop();
5677
+ return _context15.stop();
5490
5678
  }
5491
- }, _callee13, this);
5679
+ }, _callee15, this);
5492
5680
  }));
5493
- function setLocalShareVideoStream(_x11) {
5681
+ function setLocalShareVideoStream(_x13) {
5494
5682
  return _setLocalShareVideoStream.apply(this, arguments);
5495
5683
  }
5496
5684
  return setLocalShareVideoStream;
@@ -5506,10 +5694,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5506
5694
  }, {
5507
5695
  key: "setLocalShareAudioStream",
5508
5696
  value: (function () {
5509
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localSystemAudioStream) {
5697
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16(localSystemAudioStream) {
5510
5698
  var oldStream;
5511
- return _regenerator.default.wrap(function (_context14) {
5512
- while (1) switch (_context14.prev = _context14.next) {
5699
+ return _regenerator.default.wrap(function (_context16) {
5700
+ while (1) switch (_context16.prev = _context16.next) {
5513
5701
  case 0:
5514
5702
  oldStream = this.mediaProperties.shareAudioStream;
5515
5703
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -5519,21 +5707,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5519
5707
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5520
5708
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5521
5709
  if (!(!this.isMultistream || !localSystemAudioStream)) {
5522
- _context14.next = 1;
5710
+ _context16.next = 1;
5523
5711
  break;
5524
5712
  }
5525
- _context14.next = 1;
5713
+ _context16.next = 1;
5526
5714
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
5527
5715
  case 1:
5528
- _context14.next = 2;
5716
+ _context16.next = 2;
5529
5717
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5530
5718
  case 2:
5531
5719
  case "end":
5532
- return _context14.stop();
5720
+ return _context16.stop();
5533
5721
  }
5534
- }, _callee14, this);
5722
+ }, _callee16, this);
5535
5723
  }));
5536
- function setLocalShareAudioStream(_x12) {
5724
+ function setLocalShareAudioStream(_x14) {
5537
5725
  return _setLocalShareAudioStream.apply(this, arguments);
5538
5726
  }
5539
5727
  return setLocalShareAudioStream;
@@ -5642,8 +5830,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5642
5830
  var _this25 = this;
5643
5831
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
5644
5832
  // if the meeting has active peer connections, it should try to reconnect.
5645
- // @ts-ignore
5646
- this.webex.internal.mercury.on(_constants.ONLINE, function () {
5833
+ this.mercuryOnlineHandler = function () {
5647
5834
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
5648
5835
 
5649
5836
  // Only send restore event when it was disconnected before and for connected later
@@ -5653,15 +5840,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5653
5840
  });
5654
5841
  }
5655
5842
  _this25.hasWebsocketConnected = true;
5656
- });
5657
-
5658
- // @ts-ignore
5659
- this.webex.internal.mercury.on(_constants.OFFLINE, function () {
5843
+ };
5844
+ this.mercuryOfflineHandler = function () {
5660
5845
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
5661
5846
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
5662
5847
  correlation_id: _this25.correlationId
5663
5848
  });
5664
- });
5849
+ };
5850
+
5851
+ // @ts-ignore
5852
+ this.webex.internal.mercury.on(_constants.ONLINE, this.mercuryOnlineHandler);
5853
+ // @ts-ignore
5854
+ this.webex.internal.mercury.on(_constants.OFFLINE, this.mercuryOfflineHandler);
5855
+ }
5856
+
5857
+ /**
5858
+ * Removes this meeting's Mercury ONLINE/OFFLINE event listeners registered
5859
+ * by setMercuryListener(). Must be called before Locus /leave to avoid
5860
+ * unnecessary syncs/metrics triggered by events received while leaving
5861
+ * (per Locus team recommendation).
5862
+ *
5863
+ * Mercury is a process-wide singleton shared with other plugins, so we
5864
+ * pass the bound handler refs to .off() to avoid clearing every listener
5865
+ * for ONLINE/OFFLINE on the shared emitter.
5866
+ *
5867
+ * Idempotent: subsequent calls are no-ops because the handler refs are
5868
+ * cleared after detaching.
5869
+ * @private
5870
+ * @returns {void}
5871
+ */
5872
+ }, {
5873
+ key: "stopListeningForMercuryEvents",
5874
+ value: function stopListeningForMercuryEvents() {
5875
+ if (this.mercuryOnlineHandler) {
5876
+ // @ts-ignore
5877
+ this.webex.internal.mercury.off(_constants.ONLINE, this.mercuryOnlineHandler);
5878
+ this.mercuryOnlineHandler = undefined;
5879
+ }
5880
+ if (this.mercuryOfflineHandler) {
5881
+ // @ts-ignore
5882
+ this.webex.internal.mercury.off(_constants.OFFLINE, this.mercuryOfflineHandler);
5883
+ this.mercuryOfflineHandler = undefined;
5884
+ }
5665
5885
  }
5666
5886
 
5667
5887
  /**
@@ -5972,17 +6192,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5972
6192
  }, {
5973
6193
  key: "joinWithMedia",
5974
6194
  value: (function () {
5975
- var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
6195
+ var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
5976
6196
  var _this30 = this;
5977
6197
  var options,
5978
6198
  mediaOptions,
5979
6199
  _options$joinOptions,
5980
6200
  joinOptions,
5981
6201
  _this$joinWithMediaRe,
5982
- isRetry,
6202
+ retryCount,
5983
6203
  prevJoinResponse,
6204
+ prevError,
5984
6205
  joined,
5985
6206
  joinResponse,
6207
+ shouldJoin,
5986
6208
  turnServerInfo,
5987
6209
  turnDiscoverySkippedReason,
5988
6210
  forceTurnDiscovery,
@@ -5995,20 +6217,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5995
6217
  shouldRetry,
5996
6218
  _error2,
5997
6219
  _error3,
5998
- _args15 = arguments,
5999
- _t0,
6000
- _t1;
6001
- return _regenerator.default.wrap(function (_context15) {
6002
- while (1) switch (_context15.prev = _context15.next) {
6220
+ firstError,
6221
+ _args17 = arguments,
6222
+ _t10,
6223
+ _t11;
6224
+ return _regenerator.default.wrap(function (_context17) {
6225
+ while (1) switch (_context17.prev = _context17.next) {
6003
6226
  case 0:
6004
- options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
6227
+ options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
6005
6228
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
6006
- _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
6229
+ _this$joinWithMediaRe = this.joinWithMediaRetryInfo, retryCount = _this$joinWithMediaRe.retryCount, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse, prevError = _this$joinWithMediaRe.prevError;
6007
6230
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
6008
- _context15.next = 1;
6231
+ _context17.next = 1;
6009
6232
  break;
6010
6233
  }
6011
- return _context15.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6234
+ return _context17.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6012
6235
  case 1:
6013
6236
  this.allowMediaInLobby = true;
6014
6237
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
@@ -6020,39 +6243,44 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6020
6243
  in case WebRTC is not available at all.
6021
6244
  */
6022
6245
  if (!(_webCapabilities.WebCapabilities.supportsRTCPeerConnection() === _webCapabilities.CapabilityState.NOT_CAPABLE)) {
6023
- _context15.next = 2;
6246
+ _context17.next = 2;
6024
6247
  break;
6025
6248
  }
6026
6249
  throw new _internalMediaCore.Errors.WebrtcApiNotAvailableError('RTCPeerConnection API is not available in this environment');
6027
6250
  case 2:
6028
- _context15.prev = 2;
6251
+ shouldJoin = !joinResponse ||
6252
+ // first try, when the join response is empty
6253
+ prevError && prevError instanceof _webexErrors.UserNotJoinedError ||
6254
+ // last try failed with UserNotJoinedError
6255
+ _util2.default.isUserInLeftState(this.locusInfo); // locus dropped the connection before we can re-try addMedia
6256
+ _context17.prev = 3;
6029
6257
  forceTurnDiscovery = false;
6030
- if (joinResponse) {
6031
- _context15.next = 7;
6258
+ if (!shouldJoin) {
6259
+ _context17.next = 8;
6032
6260
  break;
6033
6261
  }
6034
- _context15.next = 3;
6262
+ _context17.next = 4;
6035
6263
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
6036
- case 3:
6037
- turnDiscoveryRequest = _context15.sent;
6264
+ case 4:
6265
+ turnDiscoveryRequest = _context17.sent;
6038
6266
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
6039
6267
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
6040
6268
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
6041
- _context15.next = 4;
6269
+ _context17.next = 5;
6042
6270
  return this.join(joinOptions);
6043
- case 4:
6044
- joinResponse = _context15.sent;
6271
+ case 5:
6272
+ joinResponse = _context17.sent;
6045
6273
  joined = true;
6046
6274
 
6047
6275
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
6048
6276
  if (!joinOptions.roapMessage) {
6049
- _context15.next = 6;
6277
+ _context17.next = 7;
6050
6278
  break;
6051
6279
  }
6052
- _context15.next = 5;
6280
+ _context17.next = 6;
6053
6281
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
6054
- case 5:
6055
- _yield$this$roap$hand = _context15.sent;
6282
+ case 6:
6283
+ _yield$this$roap$hand = _context17.sent;
6056
6284
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
6057
6285
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
6058
6286
  this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
@@ -6060,107 +6288,115 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6060
6288
  if (turnServerInfo === undefined) {
6061
6289
  this.roap.abortTurnDiscovery();
6062
6290
  }
6063
- case 6:
6064
- _context15.next = 8;
6065
- break;
6066
6291
  case 7:
6292
+ _context17.next = 9;
6293
+ break;
6294
+ case 8:
6067
6295
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
6068
6296
  // but we need to ensure that it also does a new TURN discovery
6069
6297
  forceTurnDiscovery = true;
6070
6298
  joined = true;
6071
- case 8:
6072
- _context15.next = 9;
6299
+ case 9:
6300
+ _context17.next = 10;
6073
6301
  return this.addMediaInternal(function () {
6074
- return _this30.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6302
+ // callback is not called when UserNotJoinedError is thrown
6303
+ return _this30.joinWithMediaRetryInfo.retryCount >= 1 ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6075
6304
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
6076
- case 9:
6077
- mediaResponse = _context15.sent;
6305
+ case 10:
6306
+ mediaResponse = _context17.sent;
6078
6307
  this.joinWithMediaRetryInfo = {
6079
- isRetry: false,
6308
+ retryCount: 0,
6080
6309
  prevJoinResponse: undefined
6081
6310
  };
6082
- return _context15.abrupt("return", {
6311
+ return _context17.abrupt("return", {
6083
6312
  join: joinResponse,
6084
6313
  media: mediaResponse,
6085
6314
  multistreamEnabled: this.isMultistream
6086
6315
  });
6087
- case 10:
6088
- _context15.prev = 10;
6089
- _t0 = _context15["catch"](2);
6090
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t0);
6316
+ case 11:
6317
+ _context17.prev = 11;
6318
+ _t10 = _context17["catch"](3);
6319
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t10);
6091
6320
  this.roap.abortTurnDiscovery();
6092
6321
 
6093
- // if this was the first attempt, let's do a retry
6094
- shouldRetry = !isRetry;
6095
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t0) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t0)) {
6322
+ // let's do a retry
6323
+ shouldRetry = retryCount < 1 || _t10 instanceof _webexErrors.UserNotJoinedError && retryCount < JOIN_WITH_MEDIA_RETRY_MAX_COUNT;
6324
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t10) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t10)) {
6096
6325
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
6097
6326
  // so there is no point doing a retry
6098
6327
  shouldRetry = false;
6099
6328
  }
6100
- if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t0)) {
6329
+ if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t10)) {
6101
6330
  shouldRetry = false;
6102
6331
  // eslint-disable-next-line no-ex-assign
6103
- _t0 = (0, _lodash.merge)({
6332
+ _t10 = (0, _lodash.merge)({
6104
6333
  error: {
6105
6334
  body: {
6106
- errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t0),
6107
- message: (_error2 = _t0) === null || _error2 === void 0 ? void 0 : _error2.message,
6108
- name: (_error3 = _t0) === null || _error3 === void 0 ? void 0 : _error3.name
6335
+ errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t10),
6336
+ message: (_error2 = _t10) === null || _error2 === void 0 ? void 0 : _error2.message,
6337
+ name: (_error3 = _t10) === null || _error3 === void 0 ? void 0 : _error3.name
6109
6338
  }
6110
6339
  }
6111
6340
  });
6112
6341
  }
6113
6342
 
6114
- // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
6115
- if (!(joined && (isRetry || !shouldRetry))) {
6116
- _context15.next = 14;
6343
+ // we only want to call leave if join was successful, and we won't be doing any more retries
6344
+ if (!(joined && !shouldRetry)) {
6345
+ _context17.next = 15;
6117
6346
  break;
6118
6347
  }
6119
- _context15.prev = 11;
6120
- _context15.next = 12;
6348
+ _context17.prev = 12;
6349
+ _context17.next = 13;
6121
6350
  return this.leave({
6122
6351
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
6123
6352
  reason: 'joinWithMedia failure'
6124
6353
  });
6125
- case 12:
6126
- _context15.next = 14;
6127
- break;
6128
6354
  case 13:
6129
- _context15.prev = 13;
6130
- _t1 = _context15["catch"](11);
6131
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t1);
6132
- leaveError = _t1;
6355
+ _context17.next = 15;
6356
+ break;
6133
6357
  case 14:
6358
+ _context17.prev = 14;
6359
+ _t11 = _context17["catch"](12);
6360
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t11);
6361
+ leaveError = _t11;
6362
+ case 15:
6134
6363
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
6135
6364
  correlation_id: this.correlationId,
6136
6365
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
6137
6366
  // if join fails, we may end up with no locusUrl
6138
- reason: _t0.message,
6139
- stack: _t0.stack,
6367
+ reason: _t10.message,
6368
+ stack: _t10.stack,
6140
6369
  leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
6141
- isRetry: isRetry
6370
+ isRetry: retryCount > 0
6142
6371
  }, {
6143
- type: _t0.name
6372
+ type: _t10.name
6144
6373
  });
6145
6374
  if (!shouldRetry) {
6146
- _context15.next = 15;
6375
+ _context17.next = 16;
6147
6376
  break;
6148
6377
  }
6149
6378
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
6150
- this.joinWithMediaRetryInfo.isRetry = true;
6379
+ this.joinWithMediaRetryInfo.retryCount = retryCount + 1;
6151
6380
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
6152
- return _context15.abrupt("return", this.joinWithMedia(options));
6153
- case 15:
6381
+ this.joinWithMediaRetryInfo.prevError = _t10;
6382
+ if (!this.joinWithMediaRetryInfo.firstError) {
6383
+ this.joinWithMediaRetryInfo.firstError = _t10;
6384
+ }
6385
+ return _context17.abrupt("return", this.joinWithMedia(options));
6386
+ case 16:
6387
+ firstError = this.joinWithMediaRetryInfo.firstError;
6154
6388
  this.joinWithMediaRetryInfo = {
6155
- isRetry: false,
6156
- prevJoinResponse: undefined
6389
+ retryCount: 0,
6390
+ prevJoinResponse: undefined,
6391
+ firstError: undefined,
6392
+ prevError: undefined
6157
6393
  };
6158
- throw _t0;
6159
- case 16:
6394
+ throw firstError !== null && firstError !== void 0 ? firstError : _t10;
6395
+ case 17:
6160
6396
  case "end":
6161
- return _context15.stop();
6397
+ return _context17.stop();
6162
6398
  }
6163
- }, _callee15, this, [[2, 10], [11, 13]]);
6399
+ }, _callee17, this, [[3, 11], [12, 14]]);
6164
6400
  }));
6165
6401
  function joinWithMedia() {
6166
6402
  return _joinWithMedia.apply(this, arguments);
@@ -6190,20 +6426,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6190
6426
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
6191
6427
  }
6192
6428
  this.cleanUpBeforeReconnection();
6193
- return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
6194
- return _regenerator.default.wrap(function (_context16) {
6195
- while (1) switch (_context16.prev = _context16.next) {
6429
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6430
+ return _regenerator.default.wrap(function (_context18) {
6431
+ while (1) switch (_context18.prev = _context18.next) {
6196
6432
  case 0:
6197
- _context16.next = 1;
6433
+ _context18.next = 1;
6198
6434
  return _this31.waitForRemoteSDPAnswer();
6199
6435
  case 1:
6200
- _context16.next = 2;
6436
+ _context18.next = 2;
6201
6437
  return _this31.waitForMediaConnectionConnected();
6202
6438
  case 2:
6203
6439
  case "end":
6204
- return _context16.stop();
6440
+ return _context18.stop();
6205
6441
  }
6206
- }, _callee16);
6442
+ }, _callee18);
6207
6443
  }))).then(function () {
6208
6444
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
6209
6445
  }).catch(function (error) {
@@ -6243,8 +6479,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6243
6479
  }, {
6244
6480
  key: "isReactionsSupported",
6245
6481
  value: function isReactionsSupported() {
6246
- var _this$locusInfo6, _this$locusInfo6$cont;
6247
- if ((_this$locusInfo6 = this.locusInfo) !== null && _this$locusInfo6 !== void 0 && (_this$locusInfo6$cont = _this$locusInfo6.controls) !== null && _this$locusInfo6$cont !== void 0 && _this$locusInfo6$cont.reactions.enabled) {
6482
+ var _this$locusInfo8, _this$locusInfo8$cont;
6483
+ if ((_this$locusInfo8 = this.locusInfo) !== null && _this$locusInfo8 !== void 0 && (_this$locusInfo8$cont = _this$locusInfo8.controls) !== null && _this$locusInfo8$cont !== void 0 && _this$locusInfo8$cont.reactions.enabled) {
6248
6484
  return true;
6249
6485
  }
6250
6486
  _loggerProxy.default.logger.error('Meeting:index#isReactionsSupported --> Reactions is not supported');
@@ -6344,53 +6580,75 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6344
6580
  }, {
6345
6581
  key: "startTranscription",
6346
6582
  value: (function () {
6347
- var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17(options) {
6348
- var _t10;
6349
- return _regenerator.default.wrap(function (_context17) {
6350
- while (1) switch (_context17.prev = _context17.next) {
6583
+ var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19(options) {
6584
+ var _t12;
6585
+ return _regenerator.default.wrap(function (_context19) {
6586
+ while (1) switch (_context19.prev = _context19.next) {
6351
6587
  case 0:
6352
6588
  if (!this.isJoined()) {
6353
- _context17.next = 5;
6589
+ _context19.next = 5;
6354
6590
  break;
6355
6591
  }
6356
6592
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
6357
- _context17.prev = 1;
6593
+ _context19.prev = 1;
6358
6594
  if (!this.areVoiceaEventsSetup) {
6359
6595
  this.setUpVoiceaListeners();
6360
6596
  }
6361
6597
 
6362
6598
  // @ts-ignore
6363
- _context17.next = 2;
6599
+ _context19.next = 2;
6364
6600
  return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
6365
6601
  case 2:
6366
- _context17.next = 4;
6602
+ _context19.next = 4;
6367
6603
  break;
6368
6604
  case 3:
6369
- _context17.prev = 3;
6370
- _t10 = _context17["catch"](1);
6371
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t10));
6605
+ _context19.prev = 3;
6606
+ _t12 = _context19["catch"](1);
6607
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t12));
6372
6608
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
6373
6609
  correlation_id: this.correlationId,
6374
- reason: _t10.message,
6375
- stack: _t10.stack
6610
+ reason: _t12.message,
6611
+ stack: _t12.stack
6376
6612
  });
6377
6613
  case 4:
6378
- _context17.next = 6;
6614
+ _context19.next = 6;
6379
6615
  break;
6380
6616
  case 5:
6381
6617
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
6382
6618
  throw new Error('Meeting is not joined');
6383
6619
  case 6:
6384
6620
  case "end":
6385
- return _context17.stop();
6621
+ return _context19.stop();
6386
6622
  }
6387
- }, _callee17, this, [[1, 3]]);
6623
+ }, _callee19, this, [[1, 3]]);
6388
6624
  }));
6389
- function startTranscription(_x13) {
6625
+ function startTranscription(_x15) {
6390
6626
  return _startTranscription.apply(this, arguments);
6391
6627
  }
6392
6628
  return startTranscription;
6393
6629
  }())
6630
+ }, {
6631
+ key: "isRelayEventRouteValid",
6632
+ value:
6633
+ /**
6634
+ * Verifies the relay event was delivered for the active LLM session binding.
6635
+ * @param {RelayEvent} event Event object coming from LLM Connection
6636
+ * @returns {boolean}
6637
+ */
6638
+ function isRelayEventRouteValid(event) {
6639
+ var _event$headers;
6640
+ var route = event === null || event === void 0 ? void 0 : (_event$headers = event.headers) === null || _event$headers === void 0 ? void 0 : _event$headers.route;
6641
+ if (!route) {
6642
+ return true;
6643
+ }
6644
+ var llm = this.webex.internal.llm;
6645
+ var isPracticeSession = llm.isConnected(_constants.LLM_PRACTICE_SESSION);
6646
+ var expectedBinding = isPracticeSession ? llm.getBinding(_constants.LLM_PRACTICE_SESSION) : llm.getBinding();
6647
+ if (!expectedBinding || route === expectedBinding) {
6648
+ return true;
6649
+ }
6650
+ return false;
6651
+ }
6394
6652
  }, {
6395
6653
  key: "stopTranscription",
6396
6654
  value:
@@ -6441,9 +6699,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6441
6699
  key: "restoreLLMSubscriptionsIfNeeded",
6442
6700
  value: function restoreLLMSubscriptionsIfNeeded() {
6443
6701
  try {
6444
- var _this$webex$internal$, _this$webex$internal$2;
6702
+ var _this$webex$internal$5, _this$webex$internal$6;
6445
6703
  // @ts-ignore
6446
- var isCaptionBoxOn = (_this$webex$internal$ = this.webex.internal.voicea) === null || _this$webex$internal$ === void 0 ? void 0 : (_this$webex$internal$2 = _this$webex$internal$.getIsCaptionBoxOn) === null || _this$webex$internal$2 === void 0 ? void 0 : _this$webex$internal$2.call(_this$webex$internal$);
6704
+ var isCaptionBoxOn = (_this$webex$internal$5 = this.webex.internal.voicea) === null || _this$webex$internal$5 === void 0 ? void 0 : (_this$webex$internal$6 = _this$webex$internal$5.getIsCaptionBoxOn) === null || _this$webex$internal$6 === void 0 ? void 0 : _this$webex$internal$6.call(_this$webex$internal$5);
6447
6705
  if (!isCaptionBoxOn) {
6448
6706
  return;
6449
6707
  }
@@ -6473,7 +6731,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6473
6731
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
6474
6732
  */
6475
6733
  function () {
6476
- var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6734
+ var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
6477
6735
  var _this34 = this;
6478
6736
  var options,
6479
6737
  errorMessage,
@@ -6484,26 +6742,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6484
6742
  _error4,
6485
6743
  _errorMessage3,
6486
6744
  _error5,
6487
- _args18 = arguments,
6488
- _t11;
6489
- return _regenerator.default.wrap(function (_context18) {
6490
- while (1) switch (_context18.prev = _context18.next) {
6745
+ _args20 = arguments,
6746
+ _t13;
6747
+ return _regenerator.default.wrap(function (_context20) {
6748
+ while (1) switch (_context20.prev = _context20.next) {
6491
6749
  case 0:
6492
- options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
6750
+ options = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
6493
6751
  if (this.webex.meetings.registered) {
6494
- _context18.next = 1;
6752
+ _context20.next = 1;
6495
6753
  break;
6496
6754
  }
6497
6755
  errorMessage = 'Meeting:index#join --> Device not registered';
6498
6756
  error = new Error(errorMessage);
6499
6757
  _loggerProxy.default.logger.error(errorMessage);
6500
- return _context18.abrupt("return", _promise.default.reject(error));
6758
+ return _context20.abrupt("return", _promise.default.reject(error));
6501
6759
  case 1:
6502
6760
  if (!this.deferJoin) {
6503
- _context18.next = 2;
6761
+ _context20.next = 2;
6504
6762
  break;
6505
6763
  }
6506
- return _context18.abrupt("return", this.deferJoin);
6764
+ return _context20.abrupt("return", this.deferJoin);
6507
6765
  case 2:
6508
6766
  // Create a deferred promise for a consistent resolve value from utils.
6509
6767
  // This also prevents redundant API calls.
@@ -6555,15 +6813,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6555
6813
  this.wirelessShare = true;
6556
6814
  }
6557
6815
  if (!options.meetingQuality) {
6558
- _context18.next = 6;
6816
+ _context20.next = 6;
6559
6817
  break;
6560
6818
  }
6561
6819
  if (!(typeof options.meetingQuality === 'string')) {
6562
- _context18.next = 4;
6820
+ _context20.next = 4;
6563
6821
  break;
6564
6822
  }
6565
6823
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
6566
- _context18.next = 3;
6824
+ _context20.next = 3;
6567
6825
  break;
6568
6826
  }
6569
6827
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -6571,16 +6829,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6571
6829
  _loggerProxy.default.logger.error(_errorMessage2);
6572
6830
  joinFailed(_error4);
6573
6831
  this.deferJoin = undefined;
6574
- return _context18.abrupt("return", _promise.default.reject(_error4));
6832
+ return _context20.abrupt("return", _promise.default.reject(_error4));
6575
6833
  case 3:
6576
6834
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
6577
6835
  case 4:
6578
6836
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
6579
- _context18.next = 6;
6837
+ _context20.next = 6;
6580
6838
  break;
6581
6839
  }
6582
6840
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
6583
- _context18.next = 5;
6841
+ _context20.next = 5;
6584
6842
  break;
6585
6843
  }
6586
6844
  _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -6588,42 +6846,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6588
6846
  _error5 = new Error(_errorMessage3);
6589
6847
  joinFailed(_error5);
6590
6848
  this.deferJoin = undefined;
6591
- return _context18.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6849
+ return _context20.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6592
6850
  case 5:
6593
6851
  if (options.meetingQuality.remote) {
6594
6852
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
6595
6853
  }
6596
6854
  case 6:
6597
6855
  this.isMultistream = !!options.enableMultistream;
6598
- _context18.prev = 7;
6599
- _context18.next = 8;
6856
+ _context20.prev = 7;
6857
+ _context20.next = 8;
6600
6858
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
6601
6859
  case 8:
6602
- _context18.next = 10;
6860
+ _context20.next = 10;
6603
6861
  break;
6604
6862
  case 9:
6605
- _context18.prev = 9;
6606
- _t11 = _context18["catch"](7);
6607
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t11);
6608
- if (!(_t11 instanceof _captchaError.default || _t11 instanceof _passwordError.default || _t11 instanceof _permission.default)) {
6609
- _context18.next = 10;
6863
+ _context20.prev = 9;
6864
+ _t13 = _context20["catch"](7);
6865
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t13);
6866
+ if (!(_t13 instanceof _captchaError.default || _t13 instanceof _passwordError.default || _t13 instanceof _permission.default)) {
6867
+ _context20.next = 10;
6610
6868
  break;
6611
6869
  }
6612
- this.meetingFiniteStateMachine.fail(_t11);
6870
+ this.meetingFiniteStateMachine.fail(_t13);
6613
6871
 
6614
6872
  // Upload logs on refreshpermissionToken refresh Failure
6615
6873
  _triggerProxy.default.trigger(this, {
6616
6874
  file: 'meeting/index',
6617
6875
  function: 'join'
6618
6876
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6619
- joinFailed(_t11);
6877
+ joinFailed(_t13);
6620
6878
  this.deferJoin = undefined;
6621
6879
 
6622
6880
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
6623
6881
  // and bubble it up to client
6624
- return _context18.abrupt("return", _promise.default.reject(_t11));
6882
+ return _context20.abrupt("return", _promise.default.reject(_t13));
6625
6883
  case 10:
6626
- return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6884
+ return _context20.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6627
6885
  _this34.meetingFiniteStateMachine.join();
6628
6886
  _this34.setupLocusMediaRequest();
6629
6887
 
@@ -6679,9 +6937,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6679
6937
  }));
6680
6938
  case 11:
6681
6939
  case "end":
6682
- return _context18.stop();
6940
+ return _context20.stop();
6683
6941
  }
6684
- }, _callee18, this, [[7, 9]]);
6942
+ }, _callee20, this, [[7, 9]]);
6685
6943
  }));
6686
6944
  function join() {
6687
6945
  return _join.apply(this, arguments);
@@ -6730,17 +6988,66 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6730
6988
  this.llmHealthCheckTimer = undefined;
6731
6989
  }
6732
6990
  }
6991
+
6992
+ /**
6993
+ * Removes LLM event listeners and clears the health check timer.
6994
+ * Must be called before Locus /leave to avoid unnecessary syncs triggered
6995
+ * by events received while leaving (per Locus team recommendation).
6996
+ * Idempotent: safe to call multiple times; .off() is a no-op when no
6997
+ * matching listener is registered.
6998
+ * @private
6999
+ * @returns {void}
7000
+ */
7001
+ }, {
7002
+ key: "stopListeningForLLMEvents",
7003
+ value: function stopListeningForLLMEvents() {
7004
+ // @ts-ignore - fix types
7005
+ this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
7006
+ // @ts-ignore - fix types
7007
+ this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
7008
+ this.clearLLMHealthCheckTimer();
7009
+ }
7010
+
7011
+ /**
7012
+ * Stops listening on every event bus (LLM, Mercury, voicea/transcription,
7013
+ * annotation) that could otherwise deliver events to this meeting while
7014
+ * Locus is processing /leave or /end. Per the Locus team recommendation,
7015
+ * this must run before the Locus request is dispatched to avoid
7016
+ * unnecessary syncs triggered by in-flight events.
7017
+ *
7018
+ * Voicea (transcription) subscribes to llm 'event:relay.event' internally,
7019
+ * and the annotation plugin subscribes to both mercury and llm, so both
7020
+ * must be torn down alongside the direct LLM/Mercury listeners.
7021
+ *
7022
+ * Idempotent: safe to call multiple times; .off() is a no-op when no
7023
+ * matching listener is registered, and stopTranscription is guarded.
7024
+ * @private
7025
+ * @returns {void}
7026
+ */
7027
+ }, {
7028
+ key: "stopListeningForMeetingEvents",
7029
+ value: function stopListeningForMeetingEvents() {
7030
+ this.stopListeningForLLMEvents();
7031
+ this.stopListeningForMercuryEvents();
7032
+ if (this.transcription) {
7033
+ this.stopTranscription();
7034
+ this.transcription = undefined;
7035
+ }
7036
+ this.annotation.deregisterEvents();
7037
+ }
6733
7038
  }, {
6734
7039
  key: "clearDataChannelToken",
6735
7040
  value:
6736
7041
  /**
6737
- * Clears all data channel tokens stored in LLM.
6738
- * Called during meeting cleanup to ensure stale tokens are not reused.
7042
+ * Clears data channel tokens associated with this meeting ownership.
7043
+ * Ownership checks are enforced in internal-plugin-llm.
6739
7044
  * @returns {void}
6740
7045
  */
6741
7046
  function clearDataChannelToken() {
6742
7047
  // @ts-ignore
6743
- this.webex.internal.llm.resetDatachannelTokens();
7048
+ this.webex.internal.llm.clearDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id);
7049
+ // @ts-ignore
7050
+ this.webex.internal.llm.clearDatachannelToken(_constants.LLM_PRACTICE_SESSION, this.id);
6744
7051
  }
6745
7052
 
6746
7053
  /**
@@ -6757,11 +7064,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6757
7064
  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;
6758
7065
  if (datachannelToken) {
6759
7066
  // @ts-ignore
6760
- this.webex.internal.llm.setDatachannelToken(datachannelToken, _internalPluginLlm.DataChannelTokenType.Default);
7067
+ this.webex.internal.llm.setDatachannelToken(datachannelToken, _constants.LLM_DEFAULT_SESSION, this.id);
6761
7068
  }
6762
7069
  if (practiceSessionDatachannelToken) {
6763
7070
  // @ts-ignore
6764
- this.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _internalPluginLlm.DataChannelTokenType.PracticeSession);
7071
+ this.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION, this.id);
6765
7072
  }
6766
7073
  }
6767
7074
 
@@ -6773,55 +7080,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6773
7080
  }, {
6774
7081
  key: "ensureDefaultDatachannelTokenAfterAdmit",
6775
7082
  value: (function () {
6776
- var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
6777
- var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t12;
6778
- return _regenerator.default.wrap(function (_context19) {
6779
- while (1) switch (_context19.prev = _context19.next) {
7083
+ var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
7084
+ var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t14;
7085
+ return _regenerator.default.wrap(function (_context21) {
7086
+ while (1) switch (_context21.prev = _context21.next) {
6780
7087
  case 0:
6781
- _context19.prev = 0;
7088
+ _context21.prev = 0;
6782
7089
  // @ts-ignore
6783
- datachannelToken = this.webex.internal.llm.getDatachannelToken(); // @ts-ignore
6784
- _context19.next = 1;
7090
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id); // @ts-ignore
7091
+ _context21.next = 1;
6785
7092
  return this.webex.internal.llm.isDataChannelTokenEnabled();
6786
7093
  case 1:
6787
- isDataChannelTokenEnabled = _context19.sent;
7094
+ isDataChannelTokenEnabled = _context21.sent;
6788
7095
  if (!(!isDataChannelTokenEnabled || datachannelToken)) {
6789
- _context19.next = 2;
7096
+ _context21.next = 2;
6790
7097
  break;
6791
7098
  }
6792
- return _context19.abrupt("return", false);
7099
+ return _context21.abrupt("return", false);
6793
7100
  case 2:
6794
- _context19.next = 3;
7101
+ _context21.next = 3;
6795
7102
  return this.meetingRequest.fetchDatachannelToken({
6796
7103
  locusUrl: this.locusUrl,
6797
7104
  requestingParticipantId: this.members.selfId,
6798
7105
  isPracticeSession: false
6799
7106
  });
6800
7107
  case 3:
6801
- response = _context19.sent;
7108
+ response = _context21.sent;
6802
7109
  fetchedDatachannelToken = response === null || response === void 0 ? void 0 : (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.datachannelToken;
6803
7110
  if (fetchedDatachannelToken) {
6804
- _context19.next = 4;
7111
+ _context21.next = 4;
6805
7112
  break;
6806
7113
  }
6807
- return _context19.abrupt("return", false);
7114
+ return _context21.abrupt("return", false);
6808
7115
  case 4:
6809
7116
  // @ts-ignore
6810
- this.webex.internal.llm.setDatachannelToken(fetchedDatachannelToken, _internalPluginLlm.DataChannelTokenType.Default);
6811
- return _context19.abrupt("return", true);
7117
+ this.webex.internal.llm.setDatachannelToken(fetchedDatachannelToken, _constants.LLM_DEFAULT_SESSION, this.id);
7118
+ return _context21.abrupt("return", true);
6812
7119
  case 5:
6813
- _context19.prev = 5;
6814
- _t12 = _context19["catch"](0);
6815
- msg = (_t12 === null || _t12 === void 0 ? void 0 : _t12.message) || String(_t12);
7120
+ _context21.prev = 5;
7121
+ _t14 = _context21["catch"](0);
7122
+ msg = (_t14 === null || _t14 === void 0 ? void 0 : _t14.message) || String(_t14);
6816
7123
  _loggerProxy.default.logger.warn("Meeting:index#ensureDefaultDatachannelTokenAfterAdmit --> failed to proactively fetch default data channel token after admit: ".concat(msg), {
6817
- statusCode: _t12 === null || _t12 === void 0 ? void 0 : _t12.statusCode
7124
+ statusCode: _t14 === null || _t14 === void 0 ? void 0 : _t14.statusCode
6818
7125
  });
6819
- return _context19.abrupt("return", false);
7126
+ return _context21.abrupt("return", false);
6820
7127
  case 6:
6821
7128
  case "end":
6822
- return _context19.stop();
7129
+ return _context21.stop();
6823
7130
  }
6824
- }, _callee19, this, [[0, 5]]);
7131
+ }, _callee21, this, [[0, 5]]);
6825
7132
  }));
6826
7133
  function ensureDefaultDatachannelTokenAfterAdmit() {
6827
7134
  return _ensureDefaultDatachannelTokenAfterAdmit.apply(this, arguments);
@@ -6837,43 +7144,120 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6837
7144
  }, {
6838
7145
  key: "updateLLMConnection",
6839
7146
  value: (function () {
6840
- var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
7147
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
6841
7148
  var _this36 = this;
6842
- var _ref39, _ref39$url, url, _ref39$info, _ref39$info2, _ref39$info2$datachan, datachannelUrl, isJoined, datachannelToken, dataChannelUrl;
6843
- return _regenerator.default.wrap(function (_context20) {
6844
- while (1) switch (_context20.prev = _context20.next) {
7149
+ var _ref40, _ref40$url, url, _ref40$info, _ref40$info2, _ref40$info2$datachan, datachannelUrl, isJoined, dataChannelUrl, _this$webex$internal$7, currentOwner, wasConnected, datachannelToken, refreshHandlerOwnerMeetingId, shouldAlignRefreshHandlerAfterOwnershipClaim;
7150
+ return _regenerator.default.wrap(function (_context22) {
7151
+ while (1) switch (_context22.prev = _context22.next) {
6845
7152
  case 0:
6846
7153
  // @ts-ignore - Fix type
6847
- _ref39 = this.locusInfo || {}, _ref39$url = _ref39.url, url = _ref39$url === void 0 ? undefined : _ref39$url, _ref39$info = _ref39.info, _ref39$info2 = _ref39$info === void 0 ? {} : _ref39$info, _ref39$info2$datachan = _ref39$info2.datachannelUrl, datachannelUrl = _ref39$info2$datachan === void 0 ? undefined : _ref39$info2$datachan;
6848
- isJoined = this.isJoined(); // @ts-ignore
6849
- datachannelToken = this.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.Default);
6850
- dataChannelUrl = datachannelUrl; // @ts-ignore - Fix type
6851
- if (!this.webex.internal.llm.isConnected()) {
6852
- _context20.next = 2;
7154
+ _ref40 = this.locusInfo || {}, _ref40$url = _ref40.url, url = _ref40$url === void 0 ? undefined : _ref40$url, _ref40$info = _ref40.info, _ref40$info2 = _ref40$info === void 0 ? {} : _ref40$info, _ref40$info2$datachan = _ref40$info2.datachannelUrl, datachannelUrl = _ref40$info2$datachan === void 0 ? undefined : _ref40$info2$datachan;
7155
+ isJoined = this.isJoined();
7156
+ dataChannelUrl = datachannelUrl; // Ownership guard: when the default LLM session is already connected and
7157
+ // owned by a *different* Meeting instance, do not disconnect or reconfigure
7158
+ // it. Another meeting's `updateLLMConnection` must be ignored here to
7159
+ // avoid killing the socket it relies on. We only proceed to manage the
7160
+ // connection when this meeting is the current owner, or when no owner is
7161
+ // set yet (first claim).
7162
+ // @ts-ignore - Fix type
7163
+ _this$webex$internal$7 = this.webex.internal.llm.resolveSessionOwnership(this.id, _constants.LLM_DEFAULT_SESSION), currentOwner = _this$webex$internal$7.currentOwner; // Capture connectivity before any reconnect attempt. If LLM was already
7164
+ // connected, we must respect current ownership. If it was disconnected,
7165
+ // this flow may reclaim stale owner tags after a fresh connect.
7166
+ // @ts-ignore - Fix type
7167
+ wasConnected = this.webex.internal.llm.isConnected(); // Prefer ownership-scoped token read. For disconnected stale-owner reclaim
7168
+ // flows, fallback to ownerless read so initial register can still carry a
7169
+ // token and recover from stale ownership without 401/403 dead-end.
7170
+ // @ts-ignore - Fix type
7171
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION, this.id);
7172
+ if (!datachannelToken && !wasConnected && currentOwner && currentOwner !== this.id) {
7173
+ // @ts-ignore - Fix type
7174
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(_constants.LLM_DEFAULT_SESSION);
7175
+ }
7176
+
7177
+ // @ts-ignore - Fix type
7178
+ if (!wasConnected) {
7179
+ _context22.next = 3;
6853
7180
  break;
6854
7181
  }
7182
+ if (!(currentOwner && currentOwner !== this.id)) {
7183
+ _context22.next = 1;
7184
+ break;
7185
+ }
7186
+ // Another meeting owns the live LLM socket. We must not disconnect
7187
+ // or reconfigure it -- doing so would tear down a session the
7188
+ // owning meeting still relies on. Locus/datachannel URL mismatch is
7189
+ // expected here (each meeting has its own locus URL) and is NOT a
7190
+ // valid signal of staleness, so we never reclaim from this path.
7191
+ // The only safe reclaim mechanism is the `finally`-block owner-tag
7192
+ // release in `cleanupLLMConneciton`, which fires when this meeting
7193
+ // itself is being torn down.
7194
+ _loggerProxy.default.logger.info("Meeting:index#updateLLMConnection --> skipping; LLM owned by meeting ".concat(currentOwner, ", not ").concat(this.id));
7195
+ return _context22.abrupt("return", undefined);
7196
+ case 1:
6855
7197
  if (!(
6856
7198
  // @ts-ignore - Fix type
6857
7199
  url === this.webex.internal.llm.getLocusUrl() &&
6858
7200
  // @ts-ignore - Fix type
6859
7201
  dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
6860
- _context20.next = 1;
7202
+ _context22.next = 2;
6861
7203
  break;
6862
7204
  }
6863
- return _context20.abrupt("return", undefined);
6864
- case 1:
6865
- _context20.next = 2;
7205
+ return _context22.abrupt("return", undefined);
7206
+ case 2:
7207
+ _context22.next = 3;
6866
7208
  return this.cleanupLLMConneciton({
6867
7209
  removeOnlineListener: false
6868
7210
  });
6869
- case 2:
7211
+ case 3:
6870
7212
  if (isJoined) {
6871
- _context20.next = 3;
7213
+ _context22.next = 4;
6872
7214
  break;
6873
7215
  }
6874
- return _context20.abrupt("return", undefined);
6875
- case 3:
6876
- return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
7216
+ return _context22.abrupt("return", undefined);
7217
+ case 4:
7218
+ // Bind refresh handler before registration so interceptor-triggered token
7219
+ // refresh during register POST can resolve a valid handler.
7220
+ // Prefer this meeting as owner, but allow owner-less fallback when a stale
7221
+ // foreign owner tag is present on a disconnected session.
7222
+ refreshHandlerOwnerMeetingId = currentOwner && currentOwner !== this.id ? undefined : this.id;
7223
+ shouldAlignRefreshHandlerAfterOwnershipClaim = refreshHandlerOwnerMeetingId !== this.id; // @ts-ignore - Fix type
7224
+ this.webex.internal.llm.setRefreshHandler(function () {
7225
+ return _this36.refreshDataChannelToken();
7226
+ }, _constants.LLM_DEFAULT_SESSION, refreshHandlerOwnerMeetingId);
7227
+
7228
+ // @ts-ignore - Fix type
7229
+ return _context22.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
7230
+ _this36.locusInfo.syncAllHashTreeDatasets({
7231
+ onlyLLM: true
7232
+ });
7233
+ // Record ownership of the default LLM session for this meeting so
7234
+ // subsequent cross-meeting `updateLLMConnection` / `cleanupLLMConneciton`
7235
+ // calls can detect and skip work that doesn't belong to them.
7236
+ // @ts-ignore - Fix type
7237
+ var _this36$webex$interna = _this36.webex.internal.llm.resolveSessionOwnership(_this36.id, _constants.LLM_DEFAULT_SESSION),
7238
+ isOwner = _this36$webex$interna.isOwner;
7239
+ var canReclaimAfterDisconnectedStart = !wasConnected;
7240
+
7241
+ // Refresh handler is pre-bound before registerAndConnect so token
7242
+ // refresh can work even during the registration request itself.
7243
+ if (isOwner || canReclaimAfterDisconnectedStart) {
7244
+ var _this36$webex$interna2, _this36$webex$interna3;
7245
+ // Record ownership of the default LLM session for this meeting so
7246
+ // subsequent cross-meeting `updateLLMConnection` / `cleanupLLMConneciton`
7247
+ // calls can detect and skip work that doesn't belong to them.
7248
+ // @ts-ignore - Fix type
7249
+ (_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);
7250
+
7251
+ // If we pre-bound refresh ownerlessly (stale-owner reclaim path),
7252
+ // align the handler with the newly claimed owner immediately after
7253
+ // ownership is updated.
7254
+ if (shouldAlignRefreshHandlerAfterOwnershipClaim) {
7255
+ // @ts-ignore - Fix type
7256
+ _this36.webex.internal.llm.setRefreshHandler(function () {
7257
+ return _this36.refreshDataChannelToken();
7258
+ }, _constants.LLM_DEFAULT_SESSION, _this36.id);
7259
+ }
7260
+ }
6877
7261
  // @ts-ignore - Fix type
6878
7262
  _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
6879
7263
  // @ts-ignore - Fix type
@@ -6886,11 +7270,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6886
7270
  _this36.startLLMHealthCheckTimer();
6887
7271
  return _promise.default.resolve(registerAndConnectResult);
6888
7272
  }));
6889
- case 4:
7273
+ case 5:
6890
7274
  case "end":
6891
- return _context20.stop();
7275
+ return _context22.stop();
6892
7276
  }
6893
- }, _callee20, this);
7277
+ }, _callee22, this);
6894
7278
  }));
6895
7279
  function updateLLMConnection() {
6896
7280
  return _updateLLMConnection.apply(this, arguments);
@@ -7076,17 +7460,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7076
7460
  meetingId: this.id
7077
7461
  }
7078
7462
  });
7079
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
7080
- var mediaSettings, _t13;
7081
- return _regenerator.default.wrap(function (_context21) {
7082
- while (1) switch (_context21.prev = _context21.next) {
7463
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
7464
+ var mediaSettings, _t15;
7465
+ return _regenerator.default.wrap(function (_context23) {
7466
+ while (1) switch (_context23.prev = _context23.next) {
7083
7467
  case 0:
7084
- _context21.prev = 0;
7468
+ _context23.prev = 0;
7085
7469
  if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
7086
- _context21.next = 1;
7470
+ _context23.next = 1;
7087
7471
  break;
7088
7472
  }
7089
- _context21.next = 1;
7473
+ _context23.next = 1;
7090
7474
  return _this40.releaseScreenShareFloor();
7091
7475
  case 1:
7092
7476
  mediaSettings = {
@@ -7105,23 +7489,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7105
7489
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the device answers the meeting
7106
7490
  // once the device answers we close the old connection and create new media server connection with only share enabled
7107
7491
  if (!_this40.statsAnalyzer) {
7108
- _context21.next = 2;
7492
+ _context23.next = 2;
7109
7493
  break;
7110
7494
  }
7111
- _context21.next = 2;
7495
+ _context23.next = 2;
7112
7496
  return _this40.statsAnalyzer.stopAnalyzer();
7113
7497
  case 2:
7114
- _context21.next = 3;
7498
+ _context23.next = 3;
7115
7499
  return _this40.closeRemoteStreams();
7116
7500
  case 3:
7117
- _context21.next = 4;
7501
+ _context23.next = 4;
7118
7502
  return _this40.closePeerConnections();
7119
7503
  case 4:
7120
7504
  _this40.cleanupLocalStreams();
7121
7505
  _this40.unsetRemoteStreams();
7122
7506
  _this40.unsetPeerConnections();
7123
7507
  _this40.reconnectionManager.cleanUp();
7124
- _context21.next = 5;
7508
+ _context23.next = 5;
7125
7509
  return _this40.addMedia({
7126
7510
  audioEnabled: false,
7127
7511
  videoEnabled: false,
@@ -7130,24 +7514,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7130
7514
  case 5:
7131
7515
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
7132
7516
  _this40.isMoveToInProgress = false;
7133
- _context21.next = 7;
7517
+ _context23.next = 7;
7134
7518
  break;
7135
7519
  case 6:
7136
- _context21.prev = 6;
7137
- _t13 = _context21["catch"](0);
7138
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t13);
7520
+ _context23.prev = 6;
7521
+ _t15 = _context23["catch"](0);
7522
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t15);
7139
7523
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
7140
7524
  correlation_id: _this40.correlationId,
7141
7525
  locus_id: _this40.locusUrl.split('/').pop(),
7142
- reason: _t13.message,
7143
- stack: _t13.stack
7526
+ reason: _t15.message,
7527
+ stack: _t15.stack
7144
7528
  });
7145
7529
  _this40.isMoveToInProgress = false;
7146
7530
  case 7:
7147
7531
  case "end":
7148
- return _context21.stop();
7532
+ return _context23.stop();
7149
7533
  }
7150
- }, _callee21, null, [[0, 6]]);
7534
+ }, _callee23, null, [[0, 6]]);
7151
7535
  })));
7152
7536
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
7153
7537
 
@@ -7235,10 +7619,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7235
7619
  }, {
7236
7620
  key: "createMediaConnection",
7237
7621
  value: (function () {
7238
- var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22(turnServerInfo, bundlePolicy) {
7622
+ var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(turnServerInfo, bundlePolicy) {
7239
7623
  var mc, audioEnabled, videoEnabled, shareEnabled;
7240
- return _regenerator.default.wrap(function (_context22) {
7241
- while (1) switch (_context22.prev = _context22.next) {
7624
+ return _regenerator.default.wrap(function (_context24) {
7625
+ while (1) switch (_context24.prev = _context24.next) {
7242
7626
  case 0:
7243
7627
  this.rtcMetrics = this.isMultistream ?
7244
7628
  // @ts-ignore
@@ -7264,6 +7648,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7264
7648
  disableAudioMainDtx: this.config.experimental.disableAudioMainDtx,
7265
7649
  // @ts-ignore - config coming from registerPlugin
7266
7650
  enableAudioTwcc: this.config.enableAudioTwccForMultistream,
7651
+ // @ts-ignore - config coming from registerPlugin
7652
+ enableAv1SlidesSupport: this.config.enableAv1SlidesSupport,
7267
7653
  stopIceGatheringAfterFirstRelayCandidate:
7268
7654
  // @ts-ignore - config coming from registerPlugin
7269
7655
  this.config.stopIceGatheringAfterFirstRelayCandidate
@@ -7280,42 +7666,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7280
7666
 
7281
7667
  // publish the streams
7282
7668
  if (!this.mediaProperties.audioStream) {
7283
- _context22.next = 1;
7669
+ _context24.next = 1;
7284
7670
  break;
7285
7671
  }
7286
7672
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
7287
- _context22.next = 1;
7673
+ _context24.next = 1;
7288
7674
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
7289
7675
  case 1:
7290
7676
  if (!this.mediaProperties.videoStream) {
7291
- _context22.next = 2;
7677
+ _context24.next = 2;
7292
7678
  break;
7293
7679
  }
7294
- _context22.next = 2;
7680
+ _context24.next = 2;
7295
7681
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
7296
7682
  case 2:
7297
7683
  if (!this.mediaProperties.shareVideoStream) {
7298
- _context22.next = 3;
7684
+ _context24.next = 3;
7299
7685
  break;
7300
7686
  }
7301
- _context22.next = 3;
7687
+ _context24.next = 3;
7302
7688
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
7303
7689
  case 3:
7304
7690
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
7305
- _context22.next = 4;
7691
+ _context24.next = 4;
7306
7692
  break;
7307
7693
  }
7308
- _context22.next = 4;
7694
+ _context24.next = 4;
7309
7695
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
7310
7696
  case 4:
7311
- return _context22.abrupt("return", mc);
7697
+ return _context24.abrupt("return", mc);
7312
7698
  case 5:
7313
7699
  case "end":
7314
- return _context22.stop();
7700
+ return _context24.stop();
7315
7701
  }
7316
- }, _callee22, this);
7702
+ }, _callee24, this);
7317
7703
  }));
7318
- function createMediaConnection(_x14, _x15) {
7704
+ function createMediaConnection(_x16, _x17) {
7319
7705
  return _createMediaConnection.apply(this, arguments);
7320
7706
  }
7321
7707
  return createMediaConnection;
@@ -7353,11 +7739,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7353
7739
  }, {
7354
7740
  key: "setUpLocalStreamReferences",
7355
7741
  value: (function () {
7356
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23(localStreams) {
7742
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25(localStreams) {
7357
7743
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
7358
- var setUpStreamPromises, _t14;
7359
- return _regenerator.default.wrap(function (_context23) {
7360
- while (1) switch (_context23.prev = _context23.next) {
7744
+ var setUpStreamPromises, _t16;
7745
+ return _regenerator.default.wrap(function (_context25) {
7746
+ while (1) switch (_context25.prev = _context25.next) {
7361
7747
  case 0:
7362
7748
  setUpStreamPromises = [];
7363
7749
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$microph = localStreams.microphone) === null || _localStreams$microph === void 0 ? void 0 : _localStreams$microph.readyState) !== 'ended') {
@@ -7372,24 +7758,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7372
7758
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS4 = localStreams.screenShare) !== null && _localStreams$screenS4 !== void 0 && _localStreams$screenS4.audio && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS5 = localStreams.screenShare) === null || _localStreams$screenS5 === void 0 ? void 0 : (_localStreams$screenS6 = _localStreams$screenS5.audio) === null || _localStreams$screenS6 === void 0 ? void 0 : _localStreams$screenS6.readyState) !== 'ended') {
7373
7759
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
7374
7760
  }
7375
- _context23.prev = 1;
7376
- _context23.next = 2;
7761
+ _context25.prev = 1;
7762
+ _context25.next = 2;
7377
7763
  return _promise.default.all(setUpStreamPromises);
7378
7764
  case 2:
7379
- _context23.next = 4;
7765
+ _context25.next = 4;
7380
7766
  break;
7381
7767
  case 3:
7382
- _context23.prev = 3;
7383
- _t14 = _context23["catch"](1);
7384
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t14);
7385
- throw _t14;
7768
+ _context25.prev = 3;
7769
+ _t16 = _context25["catch"](1);
7770
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t16);
7771
+ throw _t16;
7386
7772
  case 4:
7387
7773
  case "end":
7388
- return _context23.stop();
7774
+ return _context25.stop();
7389
7775
  }
7390
- }, _callee23, this, [[1, 3]]);
7776
+ }, _callee25, this, [[1, 3]]);
7391
7777
  }));
7392
- function setUpLocalStreamReferences(_x16) {
7778
+ function setUpLocalStreamReferences(_x18) {
7393
7779
  return _setUpLocalStreamReferences.apply(this, arguments);
7394
7780
  }
7395
7781
  return setUpLocalStreamReferences;
@@ -7404,72 +7790,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7404
7790
  }, {
7405
7791
  key: "waitForMediaConnectionConnected",
7406
7792
  value: (function () {
7407
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
7408
- var iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, timedOutError, _t15, _t16, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29;
7409
- return _regenerator.default.wrap(function (_context24) {
7410
- while (1) switch (_context24.prev = _context24.next) {
7793
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
7794
+ var iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, timedOutError, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31;
7795
+ return _regenerator.default.wrap(function (_context26) {
7796
+ while (1) switch (_context26.prev = _context26.next) {
7411
7797
  case 0:
7412
- _context24.prev = 0;
7413
- _context24.next = 1;
7798
+ _context26.prev = 0;
7799
+ _context26.next = 1;
7414
7800
  return this.mediaProperties.waitForMediaConnectionConnected(this.correlationId);
7415
7801
  case 1:
7416
- _context24.next = 5;
7802
+ _context26.next = 5;
7417
7803
  break;
7418
7804
  case 2:
7419
- _context24.prev = 2;
7420
- _t15 = _context24["catch"](0);
7421
- iceConnected = _t15.iceConnected;
7805
+ _context26.prev = 2;
7806
+ _t17 = _context26["catch"](0);
7807
+ iceConnected = _t17.iceConnected;
7422
7808
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
7423
- _context24.next = 4;
7809
+ _context26.next = 4;
7424
7810
  break;
7425
7811
  }
7426
- _t16 = this.webex.internal.newMetrics;
7427
- _t17 = !this.turnServerUsed;
7428
- _t18 = this.addMediaData.icePhaseCallback();
7429
- _t19 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7430
- _t20 = _internalPluginMetrics.CallDiagnosticUtils;
7431
- _t21 = ((_this$mediaProperties9 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties9 === void 0 ? void 0 : (_this$mediaProperties0 = _this$mediaProperties9.multistreamConnection) === null || _this$mediaProperties0 === void 0 ? void 0 : (_this$mediaProperties1 = _this$mediaProperties0.pc) === null || _this$mediaProperties1 === void 0 ? void 0 : (_this$mediaProperties10 = _this$mediaProperties1.pc) === null || _this$mediaProperties10 === void 0 ? void 0 : _this$mediaProperties10.signalingState) || ((_this$mediaProperties11 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.mediaConnection) === null || _this$mediaProperties12 === void 0 ? void 0 : (_this$mediaProperties13 = _this$mediaProperties12.pc) === null || _this$mediaProperties13 === void 0 ? void 0 : _this$mediaProperties13.signalingState) || 'unknown';
7432
- _t22 = iceConnected;
7433
- _t23 = this.turnServerUsed;
7434
- _context24.next = 3;
7812
+ _t18 = this.webex.internal.newMetrics;
7813
+ _t19 = !this.turnServerUsed;
7814
+ _t20 = this.addMediaData.icePhaseCallback();
7815
+ _t21 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7816
+ _t22 = _internalPluginMetrics.CallDiagnosticUtils;
7817
+ _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';
7818
+ _t24 = iceConnected;
7819
+ _t25 = this.turnServerUsed;
7820
+ _context26.next = 3;
7435
7821
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
7436
7822
  return false;
7437
7823
  });
7438
7824
  case 3:
7439
- _t24 = _context24.sent;
7440
- _t25 = _t20.generateClientErrorCodeForIceFailure.call(_t20, {
7441
- signalingState: _t21,
7442
- iceConnected: _t22,
7443
- turnServerUsed: _t23,
7444
- unreachable: _t24
7825
+ _t26 = _context26.sent;
7826
+ _t27 = _t22.generateClientErrorCodeForIceFailure.call(_t22, {
7827
+ signalingState: _t23,
7828
+ iceConnected: _t24,
7829
+ turnServerUsed: _t25,
7830
+ unreachable: _t26
7445
7831
  });
7446
- _t26 = _t19.getErrorPayloadForClientErrorCode.call(_t19, {
7447
- clientErrorCode: _t25
7832
+ _t28 = _t21.getErrorPayloadForClientErrorCode.call(_t21, {
7833
+ clientErrorCode: _t27
7448
7834
  });
7449
- _t27 = [_t26];
7450
- _t28 = {
7451
- canProceed: _t17,
7452
- icePhase: _t18,
7453
- errors: _t27
7835
+ _t29 = [_t28];
7836
+ _t30 = {
7837
+ canProceed: _t19,
7838
+ icePhase: _t20,
7839
+ errors: _t29
7454
7840
  };
7455
- _t29 = {
7841
+ _t31 = {
7456
7842
  meetingId: this.id,
7457
- rawError: _t15
7843
+ rawError: _t17
7458
7844
  };
7459
- _t16.submitClientEvent.call(_t16, {
7845
+ _t18.submitClientEvent.call(_t18, {
7460
7846
  name: 'client.ice.end',
7461
- payload: _t28,
7462
- options: _t29
7847
+ payload: _t30,
7848
+ options: _t31
7463
7849
  });
7464
7850
  case 4:
7465
7851
  timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
7466
- timedOutError.cause = _t15;
7852
+ timedOutError.cause = _t17;
7467
7853
  throw timedOutError;
7468
7854
  case 5:
7469
7855
  case "end":
7470
- return _context24.stop();
7856
+ return _context26.stop();
7471
7857
  }
7472
- }, _callee24, this, [[0, 2]]);
7858
+ }, _callee26, this, [[0, 2]]);
7473
7859
  }));
7474
7860
  function waitForMediaConnectionConnected() {
7475
7861
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -7536,19 +7922,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7536
7922
  }, {
7537
7923
  key: "waitForRemoteSDPAnswer",
7538
7924
  value: (function () {
7539
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
7925
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
7540
7926
  var _this44 = this;
7541
7927
  var LOG_HEADER, deferSDPAnswer;
7542
- return _regenerator.default.wrap(function (_context25) {
7543
- while (1) switch (_context25.prev = _context25.next) {
7928
+ return _regenerator.default.wrap(function (_context27) {
7929
+ while (1) switch (_context27.prev = _context27.next) {
7544
7930
  case 0:
7545
7931
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
7546
7932
  if (this.deferSDPAnswer) {
7547
- _context25.next = 1;
7933
+ _context27.next = 1;
7548
7934
  break;
7549
7935
  }
7550
7936
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
7551
- return _context25.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7937
+ return _context27.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7552
7938
  case 1:
7553
7939
  deferSDPAnswer = this.deferSDPAnswer;
7554
7940
  this.sdpResponseTimer = setTimeout(function () {
@@ -7574,12 +7960,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7574
7960
  deferSDPAnswer.reject(error);
7575
7961
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
7576
7962
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
7577
- return _context25.abrupt("return", deferSDPAnswer.promise);
7963
+ return _context27.abrupt("return", deferSDPAnswer.promise);
7578
7964
  case 2:
7579
7965
  case "end":
7580
- return _context25.stop();
7966
+ return _context27.stop();
7581
7967
  }
7582
- }, _callee25, this);
7968
+ }, _callee27, this);
7583
7969
  }));
7584
7970
  function waitForRemoteSDPAnswer() {
7585
7971
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -7598,30 +7984,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7598
7984
  }, {
7599
7985
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
7600
7986
  value: (function () {
7601
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
7602
- var LOG_HEADER, _t30;
7603
- return _regenerator.default.wrap(function (_context26) {
7604
- while (1) switch (_context26.prev = _context26.next) {
7987
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy) {
7988
+ var LOG_HEADER, _t32;
7989
+ return _regenerator.default.wrap(function (_context28) {
7990
+ while (1) switch (_context28.prev = _context28.next) {
7605
7991
  case 0:
7606
7992
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
7607
- _context26.prev = 1;
7608
- _context26.next = 2;
7993
+ _context28.prev = 1;
7994
+ _context28.next = 2;
7609
7995
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
7610
7996
  case 2:
7611
- _context26.next = 4;
7997
+ _context28.next = 4;
7612
7998
  break;
7613
7999
  case 3:
7614
- _context26.prev = 3;
7615
- _t30 = _context26["catch"](1);
7616
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t30);
7617
- throw _t30;
8000
+ _context28.prev = 3;
8001
+ _t32 = _context28["catch"](1);
8002
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t32);
8003
+ throw _t32;
7618
8004
  case 4:
7619
8005
  case "end":
7620
- return _context26.stop();
8006
+ return _context28.stop();
7621
8007
  }
7622
- }, _callee26, this, [[1, 3]]);
8008
+ }, _callee28, this, [[1, 3]]);
7623
8009
  }));
7624
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x17, _x18) {
8010
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
7625
8011
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
7626
8012
  }
7627
8013
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -7639,14 +8025,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7639
8025
  }, {
7640
8026
  key: "retryWithForcedTurnDiscovery",
7641
8027
  value: (function () {
7642
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27(remoteMediaManagerConfig, bundlePolicy) {
8028
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy) {
7643
8029
  var LOG_HEADER;
7644
- return _regenerator.default.wrap(function (_context27) {
7645
- while (1) switch (_context27.prev = _context27.next) {
8030
+ return _regenerator.default.wrap(function (_context29) {
8031
+ while (1) switch (_context29.prev = _context29.next) {
7646
8032
  case 0:
7647
8033
  this.addMediaData.retriedWithTurnServer = true;
7648
8034
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
7649
- _context27.next = 1;
8035
+ _context29.next = 1;
7650
8036
  return this.cleanUpBeforeRetryWithTurnServer();
7651
8037
  case 1:
7652
8038
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -7656,24 +8042,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7656
8042
  reason: 'forcingTurnTls'
7657
8043
  });
7658
8044
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
7659
- _context27.next = 2;
8045
+ _context29.next = 2;
7660
8046
  break;
7661
8047
  }
7662
8048
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
7663
- _context27.next = 2;
8049
+ _context29.next = 2;
7664
8050
  return this.join({
7665
8051
  rejoin: true
7666
8052
  });
7667
8053
  case 2:
7668
- _context27.next = 3;
8054
+ _context29.next = 3;
7669
8055
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
7670
8056
  case 3:
7671
8057
  case "end":
7672
- return _context27.stop();
8058
+ return _context29.stop();
7673
8059
  }
7674
- }, _callee27, this);
8060
+ }, _callee29, this);
7675
8061
  }));
7676
- function retryWithForcedTurnDiscovery(_x19, _x20) {
8062
+ function retryWithForcedTurnDiscovery(_x21, _x22) {
7677
8063
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
7678
8064
  }
7679
8065
  return retryWithForcedTurnDiscovery;
@@ -7693,32 +8079,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7693
8079
  }, {
7694
8080
  key: "handleWaitForMediaConnectionConnectedError",
7695
8081
  value: (function () {
7696
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(error, remoteMediaManagerConfig, bundlePolicy) {
8082
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(error, remoteMediaManagerConfig, bundlePolicy) {
7697
8083
  var LOG_HEADER;
7698
- return _regenerator.default.wrap(function (_context28) {
7699
- while (1) switch (_context28.prev = _context28.next) {
8084
+ return _regenerator.default.wrap(function (_context30) {
8085
+ while (1) switch (_context30.prev = _context30.next) {
7700
8086
  case 0:
7701
8087
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
7702
8088
  if (this.turnServerUsed) {
7703
- _context28.next = 2;
8089
+ _context30.next = 2;
7704
8090
  break;
7705
8091
  }
7706
8092
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
7707
- _context28.next = 1;
8093
+ _context30.next = 1;
7708
8094
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
7709
8095
  case 1:
7710
- _context28.next = 3;
8096
+ _context30.next = 3;
7711
8097
  break;
7712
8098
  case 2:
7713
8099
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
7714
8100
  throw new _webexErrors.AddMediaFailed(error);
7715
8101
  case 3:
7716
8102
  case "end":
7717
- return _context28.stop();
8103
+ return _context30.stop();
7718
8104
  }
7719
- }, _callee28, this);
8105
+ }, _callee30, this);
7720
8106
  }));
7721
- function handleWaitForMediaConnectionConnectedError(_x21, _x22, _x23) {
8107
+ function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
7722
8108
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
7723
8109
  }
7724
8110
  return handleWaitForMediaConnectionConnectedError;
@@ -7734,20 +8120,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7734
8120
  }, {
7735
8121
  key: "doTurnDiscovery",
7736
8122
  value: (function () {
7737
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(isReconnecting, isForced) {
8123
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(isReconnecting, isForced) {
7738
8124
  var cdl, turnDiscoveryResult;
7739
- return _regenerator.default.wrap(function (_context29) {
7740
- while (1) switch (_context29.prev = _context29.next) {
8125
+ return _regenerator.default.wrap(function (_context31) {
8126
+ while (1) switch (_context31.prev = _context31.next) {
7741
8127
  case 0:
7742
8128
  // @ts-ignore
7743
8129
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
7744
8130
  this.webex.internal.newMetrics.submitInternalEvent({
7745
8131
  name: 'internal.client.add-media.turn-discovery.start'
7746
8132
  });
7747
- _context29.next = 1;
8133
+ _context31.next = 1;
7748
8134
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
7749
8135
  case 1:
7750
- turnDiscoveryResult = _context29.sent;
8136
+ turnDiscoveryResult = _context31.sent;
7751
8137
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
7752
8138
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
7753
8139
 
@@ -7763,14 +8149,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7763
8149
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
7764
8150
  });
7765
8151
  }
7766
- return _context29.abrupt("return", turnDiscoveryResult);
8152
+ return _context31.abrupt("return", turnDiscoveryResult);
7767
8153
  case 2:
7768
8154
  case "end":
7769
- return _context29.stop();
8155
+ return _context31.stop();
7770
8156
  }
7771
- }, _callee29, this);
8157
+ }, _callee31, this);
7772
8158
  }));
7773
- function doTurnDiscovery(_x24, _x25) {
8159
+ function doTurnDiscovery(_x26, _x27) {
7774
8160
  return _doTurnDiscovery.apply(this, arguments);
7775
8161
  }
7776
8162
  return doTurnDiscovery;
@@ -7789,35 +8175,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7789
8175
  }, {
7790
8176
  key: "establishMediaConnection",
7791
8177
  value: (function () {
7792
- var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
8178
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
7793
8179
  var _this$locusMediaReque;
7794
- var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t31, _t32;
7795
- return _regenerator.default.wrap(function (_context30) {
7796
- while (1) switch (_context30.prev = _context30.next) {
8180
+ var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t33, _t34;
8181
+ return _regenerator.default.wrap(function (_context32) {
8182
+ while (1) switch (_context32.prev = _context32.next) {
7797
8183
  case 0:
7798
8184
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
7799
8185
  isReconnecting = this.isMoveToInProgress || !!((_this$locusMediaReque = this.locusMediaRequest) !== null && _this$locusMediaReque !== void 0 && _this$locusMediaReque.isConfluenceCreated()); // We are forcing turn discovery if the case is moveTo and a turn server was used already
7800
8186
  if (this.isMoveToInProgress && this.turnServerUsed) {
7801
8187
  isForced = true;
7802
8188
  }
7803
- _context30.prev = 1;
8189
+ _context32.prev = 1;
7804
8190
  if (turnServerInfo) {
7805
- _context30.next = 3;
8191
+ _context32.next = 3;
7806
8192
  break;
7807
8193
  }
7808
- _context30.next = 2;
8194
+ _context32.next = 2;
7809
8195
  return this.doTurnDiscovery(isReconnecting, isForced);
7810
8196
  case 2:
7811
- _yield$this$doTurnDis = _context30.sent;
8197
+ _yield$this$doTurnDis = _context32.sent;
7812
8198
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
7813
8199
  case 3:
7814
- _context30.next = 4;
8200
+ _context32.next = 4;
7815
8201
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
7816
8202
  case 4:
7817
- mc = _context30.sent;
8203
+ mc = _context32.sent;
7818
8204
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
7819
8205
  if (!this.isMultistream) {
7820
- _context30.next = 5;
8206
+ _context32.next = 5;
7821
8207
  break;
7822
8208
  }
7823
8209
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -7825,42 +8211,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7825
8211
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
7826
8212
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
7827
8213
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
7828
- _context30.next = 5;
8214
+ _context32.next = 5;
7829
8215
  return this.remoteMediaManager.start();
7830
8216
  case 5:
7831
- _context30.next = 6;
8217
+ _context32.next = 6;
7832
8218
  return mc.initiateOffer();
7833
8219
  case 6:
7834
- _context30.next = 7;
8220
+ _context32.next = 7;
7835
8221
  return this.waitForRemoteSDPAnswer();
7836
8222
  case 7:
7837
8223
  this.handleMediaLogging(this.mediaProperties);
7838
- _context30.next = 9;
8224
+ _context32.next = 9;
7839
8225
  break;
7840
8226
  case 8:
7841
- _context30.prev = 8;
7842
- _t31 = _context30["catch"](1);
7843
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t31);
7844
- throw _t31;
8227
+ _context32.prev = 8;
8228
+ _t33 = _context32["catch"](1);
8229
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t33);
8230
+ throw _t33;
7845
8231
  case 9:
7846
- _context30.prev = 9;
7847
- _context30.next = 10;
8232
+ _context32.prev = 9;
8233
+ _context32.next = 10;
7848
8234
  return this.waitForMediaConnectionConnected();
7849
8235
  case 10:
7850
- _context30.next = 12;
8236
+ _context32.next = 12;
7851
8237
  break;
7852
8238
  case 11:
7853
- _context30.prev = 11;
7854
- _t32 = _context30["catch"](9);
7855
- _context30.next = 12;
7856
- return this.handleWaitForMediaConnectionConnectedError(_t32, remoteMediaManagerConfig, bundlePolicy);
8239
+ _context32.prev = 11;
8240
+ _t34 = _context32["catch"](9);
8241
+ _context32.next = 12;
8242
+ return this.handleWaitForMediaConnectionConnectedError(_t34, remoteMediaManagerConfig, bundlePolicy);
7857
8243
  case 12:
7858
8244
  case "end":
7859
- return _context30.stop();
8245
+ return _context32.stop();
7860
8246
  }
7861
- }, _callee30, this, [[1, 8], [9, 11]]);
8247
+ }, _callee32, this, [[1, 8], [9, 11]]);
7862
8248
  }));
7863
- function establishMediaConnection(_x26, _x27, _x28, _x29) {
8249
+ function establishMediaConnection(_x28, _x29, _x30, _x31) {
7864
8250
  return _establishMediaConnection.apply(this, arguments);
7865
8251
  }
7866
8252
  return establishMediaConnection;
@@ -7875,16 +8261,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7875
8261
  }, {
7876
8262
  key: "cleanUpOnAddMediaFailure",
7877
8263
  value: (function () {
7878
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
8264
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
7879
8265
  var _this$networkQualityM, _this$statsMonitor;
7880
- return _regenerator.default.wrap(function (_context31) {
7881
- while (1) switch (_context31.prev = _context31.next) {
8266
+ return _regenerator.default.wrap(function (_context33) {
8267
+ while (1) switch (_context33.prev = _context33.next) {
7882
8268
  case 0:
7883
8269
  if (!this.statsAnalyzer) {
7884
- _context31.next = 1;
8270
+ _context33.next = 1;
7885
8271
  break;
7886
8272
  }
7887
- _context31.next = 1;
8273
+ _context33.next = 1;
7888
8274
  return this.statsAnalyzer.stopAnalyzer();
7889
8275
  case 1:
7890
8276
  this.statsAnalyzer = null;
@@ -7895,7 +8281,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7895
8281
 
7896
8282
  // when media fails, we want to upload a webrtc dump to see whats going on
7897
8283
  // this function is async, but returns once the stats have been gathered
7898
- _context31.next = 2;
8284
+ _context33.next = 2;
7899
8285
  return this.forceSendStatsReport({
7900
8286
  callFrom: 'addMedia'
7901
8287
  });
@@ -7906,9 +8292,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7906
8292
  }
7907
8293
  case 3:
7908
8294
  case "end":
7909
- return _context31.stop();
8295
+ return _context33.stop();
7910
8296
  }
7911
- }, _callee31, this);
8297
+ }, _callee33, this);
7912
8298
  }));
7913
8299
  function cleanUpOnAddMediaFailure() {
7914
8300
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -7926,16 +8312,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7926
8312
  }, {
7927
8313
  key: "downgradeFromMultistreamToTranscoded",
7928
8314
  value: (function () {
7929
- var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
8315
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
7930
8316
  var _this$networkQualityM2, _this$statsMonitor2, _this$locusMediaReque2;
7931
- return _regenerator.default.wrap(function (_context32) {
7932
- while (1) switch (_context32.prev = _context32.next) {
8317
+ return _regenerator.default.wrap(function (_context34) {
8318
+ while (1) switch (_context34.prev = _context34.next) {
7933
8319
  case 0:
7934
8320
  if (!this.statsAnalyzer) {
7935
- _context32.next = 1;
8321
+ _context34.next = 1;
7936
8322
  break;
7937
8323
  }
7938
- _context32.next = 1;
8324
+ _context34.next = 1;
7939
8325
  return this.statsAnalyzer.stopAnalyzer();
7940
8326
  case 1:
7941
8327
  this.statsAnalyzer = null;
@@ -7953,9 +8339,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7953
8339
  this.createStatsAnalyzer();
7954
8340
  case 2:
7955
8341
  case "end":
7956
- return _context32.stop();
8342
+ return _context34.stop();
7957
8343
  }
7958
- }, _callee32, this);
8344
+ }, _callee34, this);
7959
8345
  }));
7960
8346
  function downgradeFromMultistreamToTranscoded() {
7961
8347
  return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
@@ -7973,11 +8359,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7973
8359
  }, {
7974
8360
  key: "cleanUpBeforeRetryWithTurnServer",
7975
8361
  value: (function () {
7976
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
7977
- return _regenerator.default.wrap(function (_context33) {
7978
- while (1) switch (_context33.prev = _context33.next) {
8362
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8363
+ return _regenerator.default.wrap(function (_context35) {
8364
+ while (1) switch (_context35.prev = _context35.next) {
7979
8365
  case 0:
7980
- _context33.next = 1;
8366
+ _context35.next = 1;
7981
8367
  return this.forceSendStatsReport({
7982
8368
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
7983
8369
  });
@@ -7997,9 +8383,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7997
8383
  }
7998
8384
  case 2:
7999
8385
  case "end":
8000
- return _context33.stop();
8386
+ return _context35.stop();
8001
8387
  }
8002
- }, _callee33, this);
8388
+ }, _callee35, this);
8003
8389
  }));
8004
8390
  function cleanUpBeforeRetryWithTurnServer() {
8005
8391
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -8009,35 +8395,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8009
8395
  }, {
8010
8396
  key: "cleanUpBeforeReconnection",
8011
8397
  value: function () {
8012
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8013
- var _t33;
8014
- return _regenerator.default.wrap(function (_context34) {
8015
- while (1) switch (_context34.prev = _context34.next) {
8398
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
8399
+ var _t35;
8400
+ return _regenerator.default.wrap(function (_context36) {
8401
+ while (1) switch (_context36.prev = _context36.next) {
8016
8402
  case 0:
8017
- _context34.prev = 0;
8018
- _context34.next = 1;
8403
+ _context36.prev = 0;
8404
+ _context36.next = 1;
8019
8405
  return this.forceSendStatsReport({
8020
8406
  callFrom: 'cleanUpBeforeReconnection'
8021
8407
  });
8022
8408
  case 1:
8023
8409
  if (!this.statsAnalyzer) {
8024
- _context34.next = 2;
8410
+ _context36.next = 2;
8025
8411
  break;
8026
8412
  }
8027
- _context34.next = 2;
8413
+ _context36.next = 2;
8028
8414
  return this.statsAnalyzer.stopAnalyzer();
8029
8415
  case 2:
8030
- _context34.next = 4;
8416
+ _context36.next = 4;
8031
8417
  break;
8032
8418
  case 3:
8033
- _context34.prev = 3;
8034
- _t33 = _context34["catch"](0);
8035
- _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t33);
8419
+ _context36.prev = 3;
8420
+ _t35 = _context36["catch"](0);
8421
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t35);
8036
8422
  case 4:
8037
8423
  case "end":
8038
- return _context34.stop();
8424
+ return _context36.stop();
8039
8425
  }
8040
- }, _callee34, this, [[0, 3]]);
8426
+ }, _callee36, this, [[0, 3]]);
8041
8427
  }));
8042
8428
  function cleanUpBeforeReconnection() {
8043
8429
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -8105,7 +8491,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8105
8491
  }, {
8106
8492
  key: "addMediaInternal",
8107
8493
  value: (function () {
8108
- var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8494
+ var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8109
8495
  var options,
8110
8496
  LOG_HEADER,
8111
8497
  localStreams,
@@ -8167,26 +8553,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8167
8553
  _selectedCandidatePairChanges,
8168
8554
  _numTransports,
8169
8555
  _iceCandidateErrors,
8170
- _args35 = arguments,
8171
- _t34,
8172
- _t35;
8173
- return _regenerator.default.wrap(function (_context35) {
8174
- while (1) switch (_context35.prev = _context35.next) {
8556
+ _args37 = arguments,
8557
+ _t36,
8558
+ _t37;
8559
+ return _regenerator.default.wrap(function (_context37) {
8560
+ while (1) switch (_context37.prev = _context37.next) {
8175
8561
  case 0:
8176
- options = _args35.length > 3 && _args35[3] !== undefined ? _args35[3] : {};
8562
+ options = _args37.length > 3 && _args37[3] !== undefined ? _args37[3] : {};
8177
8563
  this.addMediaData.retriedWithTurnServer = false;
8178
8564
  this.addMediaData.icePhaseCallback = icePhaseCallback;
8179
8565
  this.hasMediaConnectionConnectedAtLeastOnce = false;
8180
8566
  LOG_HEADER = 'Meeting:index#addMedia -->';
8181
8567
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
8182
8568
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
8183
- _context35.next = 1;
8569
+ _context37.next = 1;
8184
8570
  break;
8185
8571
  }
8186
8572
  throw new _webexErrors.MeetingNotActiveError();
8187
8573
  case 1:
8188
8574
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
8189
- _context35.next = 2;
8575
+ _context37.next = 2;
8190
8576
  break;
8191
8577
  }
8192
8578
  throw new _webexErrors.UserNotJoinedError();
@@ -8203,7 +8589,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8203
8589
  ipver = _util2.default.getIpVersion(this.webex); // used just for metrics
8204
8590
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
8205
8591
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
8206
- _context35.next = 3;
8592
+ _context37.next = 3;
8207
8593
  break;
8208
8594
  }
8209
8595
  throw new _webexErrors.UserInLobbyError();
@@ -8247,62 +8633,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8247
8633
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
8248
8634
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
8249
8635
  this.brbState = (0, _brbState.createBrbState)(this, false);
8250
- _context35.prev = 4;
8636
+ _context37.prev = 4;
8251
8637
  if (!(allowPublishMediaInLobby || !this.isUserUnadmitted)) {
8252
- _context35.next = 5;
8638
+ _context37.next = 5;
8253
8639
  break;
8254
8640
  }
8255
- _context35.next = 5;
8641
+ _context37.next = 5;
8256
8642
  return this.setUpLocalStreamReferences(localStreams);
8257
8643
  case 5:
8258
8644
  this.setMercuryListener();
8259
8645
  this.createStatsAnalyzer();
8260
- _context35.prev = 6;
8261
- _context35.next = 7;
8646
+ _context37.prev = 6;
8647
+ _context37.next = 7;
8262
8648
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
8263
8649
  case 7:
8264
- _context35.next = 12;
8650
+ _context37.next = 12;
8265
8651
  break;
8266
8652
  case 8:
8267
- _context35.prev = 8;
8268
- _t34 = _context35["catch"](6);
8269
- if (!(_t34 instanceof _multistreamNotSupportedError.default)) {
8270
- _context35.next = 11;
8653
+ _context37.prev = 8;
8654
+ _t36 = _context37["catch"](6);
8655
+ if (!(_t36 instanceof _multistreamNotSupportedError.default)) {
8656
+ _context37.next = 11;
8271
8657
  break;
8272
8658
  }
8273
8659
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
8274
- _context35.next = 9;
8660
+ _context37.next = 9;
8275
8661
  return this.downgradeFromMultistreamToTranscoded();
8276
8662
  case 9:
8277
- _context35.next = 10;
8663
+ _context37.next = 10;
8278
8664
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
8279
8665
  case 10:
8280
- _context35.next = 12;
8666
+ _context37.next = 12;
8281
8667
  break;
8282
8668
  case 11:
8283
- throw _t34;
8669
+ throw _t36;
8284
8670
  case 12:
8285
8671
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
8286
8672
  if (!this.mediaProperties.hasLocalShareStream()) {
8287
- _context35.next = 13;
8673
+ _context37.next = 13;
8288
8674
  break;
8289
8675
  }
8290
- _context35.next = 13;
8676
+ _context37.next = 13;
8291
8677
  return this.enqueueScreenShareFloorRequest();
8292
8678
  case 13:
8293
- _context35.next = 14;
8679
+ _context37.next = 14;
8294
8680
  return this.mediaProperties.getCurrentConnectionInfo();
8295
8681
  case 14:
8296
- _yield$this$mediaProp = _context35.sent;
8682
+ _yield$this$mediaProp = _context37.sent;
8297
8683
  connectionType = _yield$this$mediaProp.connectionType;
8298
8684
  ipVersion = _yield$this$mediaProp.ipVersion;
8299
8685
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
8300
8686
  numTransports = _yield$this$mediaProp.numTransports;
8301
8687
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8302
- _context35.next = 15;
8688
+ _context37.next = 15;
8303
8689
  return this.getMediaReachabilityMetricFields();
8304
8690
  case 15:
8305
- reachabilityMetrics = _context35.sent;
8691
+ reachabilityMetrics = _context37.sent;
8306
8692
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
8307
8693
  correlation_id: this.correlationId,
8308
8694
  locus_id: this.locusUrl.split('/').pop(),
@@ -8313,7 +8699,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8313
8699
  numTransports: numTransports,
8314
8700
  isMultistream: this.isMultistream,
8315
8701
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
8316
- isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry
8702
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.retryCount > 0
8317
8703
  }, reachabilityMetrics), iceCandidateErrors), {}, {
8318
8704
  iceCandidatesCount: this.iceCandidatesCount
8319
8705
  }));
@@ -8332,38 +8718,38 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8332
8718
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
8333
8719
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
8334
8720
  this.startPeriodicLogUpload();
8335
- _context35.next = 20;
8721
+ _context37.next = 20;
8336
8722
  break;
8337
8723
  case 16:
8338
- _context35.prev = 16;
8339
- _t35 = _context35["catch"](4);
8340
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t35);
8724
+ _context37.prev = 16;
8725
+ _t37 = _context37["catch"](4);
8726
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t37);
8341
8727
 
8342
8728
  // @ts-ignore
8343
- _context35.next = 17;
8729
+ _context37.next = 17;
8344
8730
  return this.getMediaReachabilityMetricFields();
8345
8731
  case 17:
8346
- _reachabilityMetrics = _context35.sent;
8347
- _context35.next = 18;
8732
+ _reachabilityMetrics = _context37.sent;
8733
+ _context37.next = 18;
8348
8734
  return this.mediaProperties.getCurrentConnectionInfo();
8349
8735
  case 18:
8350
- _yield$this$mediaProp2 = _context35.sent;
8736
+ _yield$this$mediaProp2 = _context37.sent;
8351
8737
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
8352
8738
  _numTransports = _yield$this$mediaProp2.numTransports;
8353
8739
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8354
8740
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
8355
8741
  correlation_id: this.correlationId,
8356
8742
  locus_id: this.locusUrl.split('/').pop(),
8357
- reason: _t35.message,
8358
- stack: _t35.stack,
8359
- code: _t35.code,
8743
+ reason: _t37.message,
8744
+ stack: _t37.stack,
8745
+ code: _t37.code,
8360
8746
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
8361
8747
  numTransports: _numTransports,
8362
8748
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
8363
8749
  turnServerUsed: this.turnServerUsed,
8364
8750
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
8365
8751
  isMultistream: this.isMultistream,
8366
- isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry,
8752
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.retryCount > 0,
8367
8753
  signalingState: ((_this$mediaProperties14 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties14 === void 0 ? void 0 : (_this$mediaProperties15 = _this$mediaProperties14.multistreamConnection) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.pc) === null || _this$mediaProperties16 === void 0 ? void 0 : (_this$mediaProperties17 = _this$mediaProperties16.pc) === null || _this$mediaProperties17 === void 0 ? void 0 : _this$mediaProperties17.signalingState) || ((_this$mediaProperties18 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties18 === void 0 ? void 0 : (_this$mediaProperties19 = _this$mediaProperties18.mediaConnection) === null || _this$mediaProperties19 === void 0 ? void 0 : (_this$mediaProperties20 = _this$mediaProperties19.pc) === null || _this$mediaProperties20 === void 0 ? void 0 : _this$mediaProperties20.signalingState) || 'unknown',
8368
8754
  connectionState: ((_this$mediaProperties21 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties21 === void 0 ? void 0 : (_this$mediaProperties22 = _this$mediaProperties21.multistreamConnection) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.pc) === null || _this$mediaProperties23 === void 0 ? void 0 : (_this$mediaProperties24 = _this$mediaProperties23.pc) === null || _this$mediaProperties24 === void 0 ? void 0 : _this$mediaProperties24.connectionState) || ((_this$mediaProperties25 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties25 === void 0 ? void 0 : (_this$mediaProperties26 = _this$mediaProperties25.mediaConnection) === null || _this$mediaProperties26 === void 0 ? void 0 : (_this$mediaProperties27 = _this$mediaProperties26.pc) === null || _this$mediaProperties27 === void 0 ? void 0 : _this$mediaProperties27.connectionState) || 'unknown',
8369
8755
  iceConnectionState: ((_this$mediaProperties28 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.multistreamConnection) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : (_this$mediaProperties31 = _this$mediaProperties30.pc) === null || _this$mediaProperties31 === void 0 ? void 0 : _this$mediaProperties31.iceConnectionState) || ((_this$mediaProperties32 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.mediaConnection) === null || _this$mediaProperties33 === void 0 ? void 0 : (_this$mediaProperties34 = _this$mediaProperties33.pc) === null || _this$mediaProperties34 === void 0 ? void 0 : _this$mediaProperties34.iceConnectionState) || 'unknown'
@@ -8371,7 +8757,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8371
8757
  iceCandidatesCount: this.iceCandidatesCount,
8372
8758
  ipver: ipver
8373
8759
  }));
8374
- _context35.next = 19;
8760
+ _context37.next = 19;
8375
8761
  return this.cleanUpOnAddMediaFailure();
8376
8762
  case 19:
8377
8763
  // Upload logs on error while adding media
@@ -8379,23 +8765,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8379
8765
  file: 'meeting/index',
8380
8766
  function: 'addMedia'
8381
8767
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
8382
- if (_t35 instanceof _internalMediaCore.Errors.SdpError) {
8768
+ if (_t37 instanceof _internalMediaCore.Errors.SdpError) {
8383
8769
  this.leave({
8384
8770
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
8385
8771
  });
8386
8772
  }
8387
- throw _t35;
8773
+ throw _t37;
8388
8774
  case 20:
8389
- _context35.prev = 20;
8775
+ _context37.prev = 20;
8390
8776
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
8391
- return _context35.finish(20);
8777
+ return _context37.finish(20);
8392
8778
  case 21:
8393
8779
  case "end":
8394
- return _context35.stop();
8780
+ return _context37.stop();
8395
8781
  }
8396
- }, _callee35, this, [[4, 16, 20, 21], [6, 8]]);
8782
+ }, _callee37, this, [[4, 16, 20, 21], [6, 8]]);
8397
8783
  }));
8398
- function addMediaInternal(_x30, _x31, _x32) {
8784
+ function addMediaInternal(_x32, _x33, _x34) {
8399
8785
  return _addMediaInternal.apply(this, arguments);
8400
8786
  }
8401
8787
  return addMediaInternal;
@@ -8461,35 +8847,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8461
8847
  * @memberof Meeting
8462
8848
  */
8463
8849
  function () {
8464
- var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36(options) {
8850
+ var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(options) {
8465
8851
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
8466
- return _regenerator.default.wrap(function (_context36) {
8467
- while (1) switch (_context36.prev = _context36.next) {
8852
+ return _regenerator.default.wrap(function (_context38) {
8853
+ while (1) switch (_context38.prev = _context38.next) {
8468
8854
  case 0:
8469
8855
  this.checkMediaConnection();
8470
8856
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
8471
8857
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
8472
8858
  if (this.canUpdateMedia()) {
8473
- _context36.next = 1;
8859
+ _context38.next = 1;
8474
8860
  break;
8475
8861
  }
8476
- return _context36.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8862
+ return _context38.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8477
8863
  case 1:
8478
8864
  if (!this.isMultistream) {
8479
- _context36.next = 3;
8865
+ _context38.next = 3;
8480
8866
  break;
8481
8867
  }
8482
8868
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
8483
- _context36.next = 2;
8869
+ _context38.next = 2;
8484
8870
  break;
8485
8871
  }
8486
8872
  throw new Error('toggling shareAudioEnabled or shareVideoEnabled in a multistream meeting is not supported, to control receiving screen share call meeting.remoteMediaManager.setLayout() with appropriate layout');
8487
8873
  case 2:
8488
- _context36.next = 4;
8874
+ _context38.next = 4;
8489
8875
  break;
8490
8876
  case 3:
8491
8877
  if (!(shareAudioEnabled !== undefined)) {
8492
- _context36.next = 4;
8878
+ _context38.next = 4;
8493
8879
  break;
8494
8880
  }
8495
8881
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -8514,20 +8900,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8514
8900
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
8515
8901
  }
8516
8902
  if (this.isMultistream) {
8517
- _context36.next = 5;
8903
+ _context38.next = 5;
8518
8904
  break;
8519
8905
  }
8520
- _context36.next = 5;
8906
+ _context38.next = 5;
8521
8907
  return this.updateTranscodedMediaConnection();
8522
8908
  case 5:
8523
- return _context36.abrupt("return", undefined);
8909
+ return _context38.abrupt("return", undefined);
8524
8910
  case 6:
8525
8911
  case "end":
8526
- return _context36.stop();
8912
+ return _context38.stop();
8527
8913
  }
8528
- }, _callee36, this);
8914
+ }, _callee38, this);
8529
8915
  }));
8530
- function updateMedia(_x33) {
8916
+ function updateMedia(_x35) {
8531
8917
  return _updateMedia.apply(this, arguments);
8532
8918
  }
8533
8919
  return updateMedia;
@@ -8667,15 +9053,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8667
9053
  );
8668
9054
  };
8669
9055
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
9056
+ this.stopListeningForMeetingEvents();
8670
9057
  return _util2.default.leaveMeeting(this, options).then(/*#__PURE__*/function () {
8671
- var _ref41 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(leave) {
8672
- return _regenerator.default.wrap(function (_context37) {
8673
- while (1) switch (_context37.prev = _context37.next) {
9058
+ var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(leave) {
9059
+ return _regenerator.default.wrap(function (_context39) {
9060
+ while (1) switch (_context39.prev = _context39.next) {
8674
9061
  case 0:
8675
9062
  // CA team recommends submitting this *after* locus /leave
8676
9063
  submitLeaveMetric();
8677
9064
  _this49.meetingFiniteStateMachine.leave();
8678
- _context37.next = 1;
9065
+ _context39.next = 1;
8679
9066
  return _this49.clearMeetingData();
8680
9067
  case 1:
8681
9068
  // upload logs on leave irrespective of meeting delete
@@ -8696,15 +9083,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8696
9083
  });
8697
9084
  }
8698
9085
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
8699
- return _context37.abrupt("return", leave);
9086
+ return _context39.abrupt("return", leave);
8700
9087
  case 2:
8701
9088
  case "end":
8702
- return _context37.stop();
9089
+ return _context39.stop();
8703
9090
  }
8704
- }, _callee37);
9091
+ }, _callee39);
8705
9092
  }));
8706
- return function (_x34) {
8707
- return _ref41.apply(this, arguments);
9093
+ return function (_x36) {
9094
+ return _ref42.apply(this, arguments);
8708
9095
  };
8709
9096
  }()).catch(function (error) {
8710
9097
  // CA team recommends submitting this *after* locus /leave
@@ -9368,13 +9755,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9368
9755
  correlation_id: this.correlationId,
9369
9756
  locus_id: this.locusId
9370
9757
  });
9758
+ this.stopListeningForMeetingEvents();
9371
9759
  return _util2.default.endMeetingForAll(this).then(/*#__PURE__*/function () {
9372
- var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(end) {
9373
- return _regenerator.default.wrap(function (_context38) {
9374
- while (1) switch (_context38.prev = _context38.next) {
9760
+ var _ref43 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(end) {
9761
+ return _regenerator.default.wrap(function (_context40) {
9762
+ while (1) switch (_context40.prev = _context40.next) {
9375
9763
  case 0:
9376
9764
  _this56.meetingFiniteStateMachine.end();
9377
- _context38.next = 1;
9765
+ _context40.next = 1;
9378
9766
  return _this56.clearMeetingData();
9379
9767
  case 1:
9380
9768
  // upload logs on leave irrespective of meeting delete
@@ -9382,15 +9770,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9382
9770
  file: 'meeting/index',
9383
9771
  function: 'endMeetingForAll'
9384
9772
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
9385
- return _context38.abrupt("return", end);
9773
+ return _context40.abrupt("return", end);
9386
9774
  case 2:
9387
9775
  case "end":
9388
- return _context38.stop();
9776
+ return _context40.stop();
9389
9777
  }
9390
- }, _callee38);
9778
+ }, _callee40);
9391
9779
  }));
9392
- return function (_x35) {
9393
- return _ref42.apply(this, arguments);
9780
+ return function (_x37) {
9781
+ return _ref43.apply(this, arguments);
9394
9782
  };
9395
9783
  }()).catch(function (error) {
9396
9784
  _this56.meetingFiniteStateMachine.fail(error);
@@ -9423,13 +9811,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9423
9811
  * @memberof Meeting
9424
9812
  */
9425
9813
  function sendReaction(reactionType, skinToneType) {
9426
- var _this$locusInfo7, _this$locusInfo7$cont, _this$locusInfo7$cont2;
9427
- var reactionChannelUrl = (_this$locusInfo7 = this.locusInfo) === null || _this$locusInfo7 === void 0 ? void 0 : (_this$locusInfo7$cont = _this$locusInfo7.controls) === null || _this$locusInfo7$cont === void 0 ? void 0 : (_this$locusInfo7$cont2 = _this$locusInfo7$cont.reactions) === null || _this$locusInfo7$cont2 === void 0 ? void 0 : _this$locusInfo7$cont2.reactionChannelUrl;
9814
+ var _this$locusInfo9, _this$locusInfo9$cont, _this$locusInfo9$cont2;
9815
+ var reactionChannelUrl = (_this$locusInfo9 = this.locusInfo) === null || _this$locusInfo9 === void 0 ? void 0 : (_this$locusInfo9$cont = _this$locusInfo9.controls) === null || _this$locusInfo9$cont === void 0 ? void 0 : (_this$locusInfo9$cont2 = _this$locusInfo9$cont.reactions) === null || _this$locusInfo9$cont2 === void 0 ? void 0 : _this$locusInfo9$cont2.reactionChannelUrl;
9428
9816
  var participantId = this.members.selfId;
9429
- var reactionData = _reactions.Reactions[reactionType];
9430
- if (!reactionData) {
9431
- return _promise.default.reject(new Error("".concat(reactionType, " is not a valid reaction.")));
9432
- }
9817
+ var reactionData = _reactions.Reactions[reactionType] || {
9818
+ type: reactionType
9819
+ };
9433
9820
  var skinToneData = _reactions.SkinTones[skinToneType] || _reactions.SkinTones.normal;
9434
9821
  var reaction = _objectSpread(_objectSpread({}, reactionData), {}, {
9435
9822
  tone: skinToneData
@@ -9454,12 +9841,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9454
9841
  */
9455
9842
  }, {
9456
9843
  key: "extendMeeting",
9457
- value: function extendMeeting(_ref43) {
9458
- var meetingPolicyUrl = _ref43.meetingPolicyUrl,
9459
- meetingInstanceId = _ref43.meetingInstanceId,
9460
- participantId = _ref43.participantId,
9461
- _ref43$extensionMinut = _ref43.extensionMinutes,
9462
- extensionMinutes = _ref43$extensionMinut === void 0 ? 30 : _ref43$extensionMinut;
9844
+ value: function extendMeeting(_ref44) {
9845
+ var meetingPolicyUrl = _ref44.meetingPolicyUrl,
9846
+ meetingInstanceId = _ref44.meetingInstanceId,
9847
+ participantId = _ref44.participantId,
9848
+ _ref44$extensionMinut = _ref44.extensionMinutes,
9849
+ extensionMinutes = _ref44$extensionMinut === void 0 ? 30 : _ref44$extensionMinut;
9463
9850
  if (!meetingInstanceId || !participantId) {
9464
9851
  return _promise.default.reject(new Error('Missing meetingInstanceId or participantId'));
9465
9852
  }
@@ -9485,8 +9872,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9485
9872
  }, {
9486
9873
  key: "toggleReactions",
9487
9874
  value: function toggleReactions(enable) {
9488
- var _this$locusInfo8, _this$locusInfo8$cont, _this$locusInfo8$cont2;
9489
- var isEnabled = (_this$locusInfo8 = this.locusInfo) === null || _this$locusInfo8 === void 0 ? void 0 : (_this$locusInfo8$cont = _this$locusInfo8.controls) === null || _this$locusInfo8$cont === void 0 ? void 0 : (_this$locusInfo8$cont2 = _this$locusInfo8$cont.reactions) === null || _this$locusInfo8$cont2 === void 0 ? void 0 : _this$locusInfo8$cont2.enabled;
9875
+ var _this$locusInfo0, _this$locusInfo0$cont, _this$locusInfo0$cont2;
9876
+ var isEnabled = (_this$locusInfo0 = this.locusInfo) === null || _this$locusInfo0 === void 0 ? void 0 : (_this$locusInfo0$cont = _this$locusInfo0.controls) === null || _this$locusInfo0$cont === void 0 ? void 0 : (_this$locusInfo0$cont2 = _this$locusInfo0$cont.reactions) === null || _this$locusInfo0$cont2 === void 0 ? void 0 : _this$locusInfo0$cont2.enabled;
9490
9877
  if (isEnabled && enable || !isEnabled && !enable) {
9491
9878
  return _promise.default.resolve("Reactions are already ".concat(isEnabled ? 'enabled' : 'disabled', "."));
9492
9879
  }
@@ -9540,39 +9927,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9540
9927
  }, {
9541
9928
  key: "enableMusicMode",
9542
9929
  value: (function () {
9543
- var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(shouldEnableMusicMode) {
9544
- return _regenerator.default.wrap(function (_context39) {
9545
- while (1) switch (_context39.prev = _context39.next) {
9930
+ var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(shouldEnableMusicMode) {
9931
+ return _regenerator.default.wrap(function (_context41) {
9932
+ while (1) switch (_context41.prev = _context41.next) {
9546
9933
  case 0:
9547
9934
  this.checkMediaConnection();
9548
9935
  if (this.isMultistream) {
9549
- _context39.next = 1;
9936
+ _context41.next = 1;
9550
9937
  break;
9551
9938
  }
9552
9939
  throw new Error('enableMusicMode() only supported with multistream');
9553
9940
  case 1:
9554
9941
  if (!shouldEnableMusicMode) {
9555
- _context39.next = 3;
9942
+ _context41.next = 3;
9556
9943
  break;
9557
9944
  }
9558
- _context39.next = 2;
9945
+ _context41.next = 2;
9559
9946
  return this.sendSlotManager.setCustomCodecParameters(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, {
9560
9947
  maxaveragebitrate: '64000',
9561
9948
  maxplaybackrate: '48000'
9562
9949
  });
9563
9950
  case 2:
9564
- _context39.next = 4;
9951
+ _context41.next = 4;
9565
9952
  break;
9566
9953
  case 3:
9567
- _context39.next = 4;
9954
+ _context41.next = 4;
9568
9955
  return this.sendSlotManager.markCustomCodecParametersForDeletion(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, ['maxaveragebitrate', 'maxplaybackrate']);
9569
9956
  case 4:
9570
9957
  case "end":
9571
- return _context39.stop();
9958
+ return _context41.stop();
9572
9959
  }
9573
- }, _callee39, this);
9960
+ }, _callee41, this);
9574
9961
  }));
9575
- function enableMusicMode(_x36) {
9962
+ function enableMusicMode(_x38) {
9576
9963
  return _enableMusicMode.apply(this, arguments);
9577
9964
  }
9578
9965
  return enableMusicMode;
@@ -9663,25 +10050,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9663
10050
  }, {
9664
10051
  key: "publishStream",
9665
10052
  value: (function () {
9666
- var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(mediaType, stream) {
9667
- return _regenerator.default.wrap(function (_context40) {
9668
- while (1) switch (_context40.prev = _context40.next) {
10053
+ var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(mediaType, stream) {
10054
+ return _regenerator.default.wrap(function (_context42) {
10055
+ while (1) switch (_context42.prev = _context42.next) {
9669
10056
  case 0:
9670
10057
  if (stream) {
9671
- _context40.next = 1;
10058
+ _context42.next = 1;
9672
10059
  break;
9673
10060
  }
9674
- return _context40.abrupt("return");
10061
+ return _context42.abrupt("return");
9675
10062
  case 1:
9676
10063
  if (!this.mediaProperties.webrtcMediaConnection) {
9677
- _context40.next = 3;
10064
+ _context42.next = 3;
9678
10065
  break;
9679
10066
  }
9680
10067
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
9681
- _context40.next = 2;
10068
+ _context42.next = 2;
9682
10069
  break;
9683
10070
  }
9684
- _context40.next = 2;
10071
+ _context42.next = 2;
9685
10072
  return this.sendSlotManager.publishStream(mediaType, stream);
9686
10073
  case 2:
9687
10074
  this.emitPublishStateChangeEvent({
@@ -9692,11 +10079,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9692
10079
  });
9693
10080
  case 3:
9694
10081
  case "end":
9695
- return _context40.stop();
10082
+ return _context42.stop();
9696
10083
  }
9697
- }, _callee40, this);
10084
+ }, _callee42, this);
9698
10085
  }));
9699
- function publishStream(_x37, _x38) {
10086
+ function publishStream(_x39, _x40) {
9700
10087
  return _publishStream.apply(this, arguments);
9701
10088
  }
9702
10089
  return publishStream;
@@ -9712,21 +10099,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9712
10099
  }, {
9713
10100
  key: "unpublishStream",
9714
10101
  value: (function () {
9715
- var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(mediaType, stream) {
9716
- return _regenerator.default.wrap(function (_context41) {
9717
- while (1) switch (_context41.prev = _context41.next) {
10102
+ var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(mediaType, stream) {
10103
+ return _regenerator.default.wrap(function (_context43) {
10104
+ while (1) switch (_context43.prev = _context43.next) {
9718
10105
  case 0:
9719
10106
  if (stream) {
9720
- _context41.next = 1;
10107
+ _context43.next = 1;
9721
10108
  break;
9722
10109
  }
9723
- return _context41.abrupt("return");
10110
+ return _context43.abrupt("return");
9724
10111
  case 1:
9725
10112
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
9726
- _context41.next = 2;
10113
+ _context43.next = 2;
9727
10114
  break;
9728
10115
  }
9729
- _context41.next = 2;
10116
+ _context43.next = 2;
9730
10117
  return this.sendSlotManager.unpublishStream(mediaType);
9731
10118
  case 2:
9732
10119
  this.emitPublishStateChangeEvent({
@@ -9737,11 +10124,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9737
10124
  });
9738
10125
  case 3:
9739
10126
  case "end":
9740
- return _context41.stop();
10127
+ return _context43.stop();
9741
10128
  }
9742
- }, _callee41, this);
10129
+ }, _callee43, this);
9743
10130
  }));
9744
- function unpublishStream(_x39, _x40) {
10131
+ function unpublishStream(_x41, _x42) {
9745
10132
  return _unpublishStream.apply(this, arguments);
9746
10133
  }
9747
10134
  return unpublishStream;
@@ -9756,19 +10143,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9756
10143
  }, {
9757
10144
  key: "publishStreams",
9758
10145
  value: (function () {
9759
- var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(streams) {
10146
+ var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(streams) {
9760
10147
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
9761
10148
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
9762
- return _regenerator.default.wrap(function (_context42) {
9763
- while (1) switch (_context42.prev = _context42.next) {
10149
+ return _regenerator.default.wrap(function (_context44) {
10150
+ while (1) switch (_context44.prev = _context44.next) {
9764
10151
  case 0:
9765
10152
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
9766
10153
  this.checkMediaConnection();
9767
10154
  if (!(!streams.microphone && !streams.camera && !((_streams$screenShare = streams.screenShare) !== null && _streams$screenShare !== void 0 && _streams$screenShare.audio) && !((_streams$screenShare2 = streams.screenShare) !== null && _streams$screenShare2 !== void 0 && _streams$screenShare2.video))) {
9768
- _context42.next = 1;
10155
+ _context44.next = 1;
9769
10156
  break;
9770
10157
  }
9771
- return _context42.abrupt("return");
10158
+ return _context44.abrupt("return");
9772
10159
  case 1:
9773
10160
  streamChecks = [{
9774
10161
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -9786,62 +10173,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9786
10173
  _i = 0, _streamChecks = streamChecks;
9787
10174
  case 2:
9788
10175
  if (!(_i < _streamChecks.length)) {
9789
- _context42.next = 4;
10176
+ _context44.next = 4;
9790
10177
  break;
9791
10178
  }
9792
10179
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
9793
10180
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
9794
- _context42.next = 3;
10181
+ _context44.next = 3;
9795
10182
  break;
9796
10183
  }
9797
10184
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
9798
10185
  case 3:
9799
10186
  _i++;
9800
- _context42.next = 2;
10187
+ _context44.next = 2;
9801
10188
  break;
9802
10189
  case 4:
9803
10190
  floorRequestNeeded = false; // Screenshare Audio is supported only in multi stream. So we check for screenshare audio presence only if it's a multi stream meeting
9804
10191
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
9805
- _context42.next = 6;
10192
+ _context44.next = 6;
9806
10193
  break;
9807
10194
  }
9808
- _context42.next = 5;
10195
+ _context44.next = 5;
9809
10196
  return this.setLocalShareAudioStream(streams.screenShare.audio);
9810
10197
  case 5:
9811
10198
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
9812
10199
  case 6:
9813
10200
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
9814
- _context42.next = 8;
10201
+ _context44.next = 8;
9815
10202
  break;
9816
10203
  }
9817
- _context42.next = 7;
10204
+ _context44.next = 7;
9818
10205
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
9819
10206
  case 7:
9820
10207
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
9821
10208
  case 8:
9822
10209
  if (!streams.microphone) {
9823
- _context42.next = 9;
10210
+ _context44.next = 9;
9824
10211
  break;
9825
10212
  }
9826
- _context42.next = 9;
10213
+ _context44.next = 9;
9827
10214
  return this.setLocalAudioStream(streams.microphone);
9828
10215
  case 9:
9829
10216
  if (!streams.camera) {
9830
- _context42.next = 10;
10217
+ _context44.next = 10;
9831
10218
  break;
9832
10219
  }
9833
- _context42.next = 10;
10220
+ _context44.next = 10;
9834
10221
  return this.setLocalVideoStream(streams.camera);
9835
10222
  case 10:
9836
10223
  if (this.isMultistream) {
9837
- _context42.next = 11;
10224
+ _context44.next = 11;
9838
10225
  break;
9839
10226
  }
9840
- _context42.next = 11;
10227
+ _context44.next = 11;
9841
10228
  return this.updateTranscodedMediaConnection();
9842
10229
  case 11:
9843
10230
  if (!floorRequestNeeded) {
9844
- _context42.next = 12;
10231
+ _context44.next = 12;
9845
10232
  break;
9846
10233
  }
9847
10234
  this.localShareInstanceId = _uuid.default.v4();
@@ -9872,15 +10259,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9872
10259
  // we're sending the http request to Locus to request the screen share floor
9873
10260
  // only after the SDP update, because that's how it's always been done for transcoded meetings
9874
10261
  // and also if sharing from the start, we need confluence to have been created
9875
- _context42.next = 12;
10262
+ _context44.next = 12;
9876
10263
  return this.enqueueScreenShareFloorRequest();
9877
10264
  case 12:
9878
10265
  case "end":
9879
- return _context42.stop();
10266
+ return _context44.stop();
9880
10267
  }
9881
- }, _callee42, this);
10268
+ }, _callee44, this);
9882
10269
  }));
9883
- function publishStreams(_x41) {
10270
+ function publishStreams(_x43) {
9884
10271
  return _publishStreams.apply(this, arguments);
9885
10272
  }
9886
10273
  return publishStreams;
@@ -9895,20 +10282,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9895
10282
  }, {
9896
10283
  key: "unpublishStreams",
9897
10284
  value: (function () {
9898
- var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(streams) {
9899
- var promises, _iterator, _step, stream;
9900
- return _regenerator.default.wrap(function (_context43) {
9901
- while (1) switch (_context43.prev = _context43.next) {
10285
+ var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45(streams) {
10286
+ var promises, _iterator2, _step2, stream;
10287
+ return _regenerator.default.wrap(function (_context45) {
10288
+ while (1) switch (_context45.prev = _context45.next) {
9902
10289
  case 0:
9903
10290
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
9904
10291
  this.checkMediaConnection();
9905
10292
  promises = [];
9906
- _iterator = _createForOfIteratorHelper(streams.filter(function (t) {
10293
+ _iterator2 = _createForOfIteratorHelper(streams.filter(function (t) {
9907
10294
  return !!t;
9908
10295
  }));
9909
10296
  try {
9910
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
9911
- stream = _step.value;
10297
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
10298
+ stream = _step2.value;
9912
10299
  if (stream === this.mediaProperties.shareAudioStream) {
9913
10300
  promises.push(this.setLocalShareAudioStream(undefined));
9914
10301
  }
@@ -9923,14 +10310,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9923
10310
  }
9924
10311
  }
9925
10312
  } catch (err) {
9926
- _iterator.e(err);
10313
+ _iterator2.e(err);
9927
10314
  } finally {
9928
- _iterator.f();
10315
+ _iterator2.f();
9929
10316
  }
9930
10317
  if (!this.isMultistream) {
9931
10318
  promises.push(this.updateTranscodedMediaConnection());
9932
10319
  }
9933
- _context43.next = 1;
10320
+ _context45.next = 1;
9934
10321
  return _promise.default.all(promises);
9935
10322
  case 1:
9936
10323
  // we're allowing for the SDK to support just audio share as well
@@ -9951,11 +10338,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9951
10338
  }
9952
10339
  case 2:
9953
10340
  case "end":
9954
- return _context43.stop();
10341
+ return _context45.stop();
9955
10342
  }
9956
- }, _callee43, this);
10343
+ }, _callee45, this);
9957
10344
  }));
9958
- function unpublishStreams(_x42) {
10345
+ function unpublishStreams(_x44) {
9959
10346
  return _unpublishStreams.apply(this, arguments);
9960
10347
  }
9961
10348
  return unpublishStreams;
@@ -10021,16 +10408,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10021
10408
  }, {
10022
10409
  key: "getMediaReachabilityMetricFields",
10023
10410
  value: (function () {
10024
- var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44() {
10411
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
10025
10412
  var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
10026
10413
  var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
10027
- return _regenerator.default.wrap(function (_context44) {
10028
- while (1) switch (_context44.prev = _context44.next) {
10414
+ return _regenerator.default.wrap(function (_context46) {
10415
+ while (1) switch (_context46.prev = _context46.next) {
10029
10416
  case 0:
10030
- _context44.next = 1;
10417
+ _context46.next = 1;
10031
10418
  return this.webex.meetings.reachability.getReachabilityMetrics();
10032
10419
  case 1:
10033
- reachabilityMetrics = _context44.sent;
10420
+ reachabilityMetrics = _context46.sent;
10034
10421
  successKeys = ['reachability_public_udp_success', 'reachability_public_tcp_success', 'reachability_public_xtls_success', 'reachability_vmn_udp_success', 'reachability_vmn_tcp_success', 'reachability_vmn_xtls_success'];
10035
10422
  totalSuccessCases = successKeys.reduce(function (total, key) {
10036
10423
  var value = reachabilityMetrics[key];
@@ -10047,16 +10434,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10047
10434
  this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
10048
10435
  }
10049
10436
  selectedCluster = (_this$mediaConnection = (_this$mediaConnection2 = this.mediaConnections) === null || _this$mediaConnection2 === void 0 ? void 0 : (_this$mediaConnection3 = _this$mediaConnection2[0]) === null || _this$mediaConnection3 === void 0 ? void 0 : _this$mediaConnection3.mediaAgentCluster) !== null && _this$mediaConnection !== void 0 ? _this$mediaConnection : null;
10050
- return _context44.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10437
+ return _context46.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10051
10438
  subnet_reachable: isSubnetReachable,
10052
10439
  selected_cluster: selectedCluster,
10053
10440
  selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
10054
10441
  }));
10055
10442
  case 2:
10056
10443
  case "end":
10057
- return _context44.stop();
10444
+ return _context46.stop();
10058
10445
  }
10059
- }, _callee44, this);
10446
+ }, _callee46, this);
10060
10447
  }));
10061
10448
  function getMediaReachabilityMetricFields() {
10062
10449
  return _getMediaReachabilityMetricFields.apply(this, arguments);
@@ -10073,17 +10460,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10073
10460
  }, {
10074
10461
  key: "setStage",
10075
10462
  value: function setStage() {
10076
- var _ref44 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10077
- _ref44$activeSpeakerP = _ref44.activeSpeakerProportion,
10078
- activeSpeakerProportion = _ref44$activeSpeakerP === void 0 ? 0.5 : _ref44$activeSpeakerP,
10079
- customBackground = _ref44.customBackground,
10080
- customLogo = _ref44.customLogo,
10081
- customNameLabel = _ref44.customNameLabel,
10082
- importantParticipants = _ref44.importantParticipants,
10083
- _ref44$lockAttendeeVi = _ref44.lockAttendeeViewOnStage,
10084
- lockAttendeeViewOnStage = _ref44$lockAttendeeVi === void 0 ? false : _ref44$lockAttendeeVi,
10085
- _ref44$showActiveSpea = _ref44.showActiveSpeaker,
10086
- showActiveSpeaker = _ref44$showActiveSpea === void 0 ? false : _ref44$showActiveSpea;
10463
+ var _ref45 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10464
+ _ref45$activeSpeakerP = _ref45.activeSpeakerProportion,
10465
+ activeSpeakerProportion = _ref45$activeSpeakerP === void 0 ? 0.5 : _ref45$activeSpeakerP,
10466
+ customBackground = _ref45.customBackground,
10467
+ customLogo = _ref45.customLogo,
10468
+ customNameLabel = _ref45.customNameLabel,
10469
+ importantParticipants = _ref45.importantParticipants,
10470
+ _ref45$lockAttendeeVi = _ref45.lockAttendeeViewOnStage,
10471
+ lockAttendeeViewOnStage = _ref45$lockAttendeeVi === void 0 ? false : _ref45$lockAttendeeVi,
10472
+ _ref45$showActiveSpea = _ref45.showActiveSpeaker,
10473
+ showActiveSpeaker = _ref45$showActiveSpea === void 0 ? false : _ref45$showActiveSpea;
10087
10474
  var videoLayout = {
10088
10475
  overrideDefault: true,
10089
10476
  lockAttendeeViewOnStageOnly: lockAttendeeViewOnStage,
@@ -10187,41 +10574,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10187
10574
  }, {
10188
10575
  key: "refreshDataChannelToken",
10189
10576
  value: (function () {
10190
- var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
10191
- var isPracticeSession, dataChannelTokenType, res, msg, _t36;
10192
- return _regenerator.default.wrap(function (_context45) {
10193
- while (1) switch (_context45.prev = _context45.next) {
10577
+ var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47() {
10578
+ var isPracticeSession, dataChannelTokenType, res, msg, _t38;
10579
+ return _regenerator.default.wrap(function (_context47) {
10580
+ while (1) switch (_context47.prev = _context47.next) {
10194
10581
  case 0:
10195
10582
  isPracticeSession = this.webinar.isJoinPracticeSessionDataChannel();
10196
10583
  dataChannelTokenType = this.getDataChannelTokenType();
10197
- _context45.prev = 1;
10198
- _context45.next = 2;
10584
+ _context47.prev = 1;
10585
+ _context47.next = 2;
10199
10586
  return this.meetingRequest.fetchDatachannelToken({
10200
10587
  locusUrl: this.locusUrl,
10201
10588
  requestingParticipantId: this.members.selfId,
10202
10589
  isPracticeSession: isPracticeSession
10203
10590
  });
10204
10591
  case 2:
10205
- res = _context45.sent;
10206
- return _context45.abrupt("return", {
10592
+ res = _context47.sent;
10593
+ return _context47.abrupt("return", {
10207
10594
  body: {
10208
10595
  datachannelToken: res.body.datachannelToken,
10209
10596
  dataChannelTokenType: dataChannelTokenType
10210
10597
  }
10211
10598
  });
10212
10599
  case 3:
10213
- _context45.prev = 3;
10214
- _t36 = _context45["catch"](1);
10215
- msg = (_t36 === null || _t36 === void 0 ? void 0 : _t36.message) || String(_t36);
10600
+ _context47.prev = 3;
10601
+ _t38 = _context47["catch"](1);
10602
+ msg = (_t38 === null || _t38 === void 0 ? void 0 : _t38.message) || String(_t38);
10216
10603
  _loggerProxy.default.logger.warn("Meeting:index#refreshDataChannelToken --> DataChannel token refresh failed (likely locus changed or participant left): ".concat(msg), {
10217
- statusCode: _t36 === null || _t36 === void 0 ? void 0 : _t36.statusCode
10604
+ statusCode: _t38 === null || _t38 === void 0 ? void 0 : _t38.statusCode
10218
10605
  });
10219
- return _context45.abrupt("return", null);
10606
+ return _context47.abrupt("return", null);
10220
10607
  case 4:
10221
10608
  case "end":
10222
- return _context45.stop();
10609
+ return _context47.stop();
10223
10610
  }
10224
- }, _callee45, this, [[1, 3]]);
10611
+ }, _callee47, this, [[1, 3]]);
10225
10612
  }));
10226
10613
  function refreshDataChannelToken() {
10227
10614
  return _refreshDataChannelToken.apply(this, arguments);