@webex/plugin-meetings 3.12.0-next.38 → 3.12.0-next.39

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.
@@ -178,7 +178,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
178
178
  method: _constants.HTTP_VERBS.PUT
179
179
  });
180
180
  },
181
- version: "3.12.0-next.38"
181
+ version: "3.12.0-next.39"
182
182
  });
183
183
  var _default = exports.default = AIEnableRequest;
184
184
  //# sourceMappingURL=index.js.map
@@ -213,7 +213,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
213
213
  sessionId: this.sessionId
214
214
  });
215
215
  },
216
- version: "3.12.0-next.38"
216
+ version: "3.12.0-next.39"
217
217
  });
218
218
  var _default = exports.default = Breakout;
219
219
  //# sourceMappingURL=breakout.js.map
@@ -1109,7 +1109,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1109
1109
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1110
1110
  }
1111
1111
  },
1112
- version: "3.12.0-next.38"
1112
+ version: "3.12.0-next.39"
1113
1113
  });
1114
1114
  var _default = exports.default = Breakouts;
1115
1115
  //# sourceMappingURL=index.js.map
@@ -372,7 +372,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
372
372
  throw error;
373
373
  });
374
374
  },
375
- version: "3.12.0-next.38"
375
+ version: "3.12.0-next.39"
376
376
  });
377
377
  var _default = exports.default = SimultaneousInterpretation;
378
378
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.12.0-next.38"
21
+ version: "3.12.0-next.39"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -496,6 +496,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
496
496
  (0, _defineProperty3.default)(_this, "floorGrantPending", void 0);
497
497
  (0, _defineProperty3.default)(_this, "hasJoinedOnce", void 0);
498
498
  (0, _defineProperty3.default)(_this, "hasWebsocketConnected", void 0);
499
+ (0, _defineProperty3.default)(_this, "mercuryOnlineHandler", void 0);
500
+ (0, _defineProperty3.default)(_this, "mercuryOfflineHandler", void 0);
499
501
  (0, _defineProperty3.default)(_this, "inMeetingActions", void 0);
500
502
  (0, _defineProperty3.default)(_this, "isLocalShareLive", void 0);
501
503
  (0, _defineProperty3.default)(_this, "isRoapInProgress", void 0);
@@ -728,11 +730,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
728
730
  // @ts-ignore - Fix type
729
731
  _this.webex.internal.llm.off('online', _this.handleLLMOnline);
730
732
  }
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();
733
+ _this.stopListeningForLLMEvents();
736
734
  return _context.finish(4);
737
735
  case 5:
738
736
  case "end":
@@ -1549,9 +1547,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1549
1547
  _this.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
1550
1548
  }
1551
1549
  _this.queuedMediaUpdates = [];
1552
- _this.stopTranscription();
1553
- _this.transcription = undefined;
1554
- _this.annotation.deregisterEvents();
1550
+
1551
+ // Listener teardown (transcription, annotation, llm/mercury) runs in
1552
+ // stopListeningForMeetingEvents() before /leave and /end so events
1553
+ // received mid-teardown do not trigger Locus syncs. Calling it here
1554
+ // again would double-emit MEETING_STOPPED_RECEIVING_TRANSCRIPTION
1555
+ // because stopTranscription() always fires its trigger.
1555
1556
  _this.clearDataChannelToken();
1556
1557
  _context5.next = 1;
1557
1558
  return _this.cleanupLLMConneciton({
@@ -5688,8 +5689,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5688
5689
  var _this25 = this;
5689
5690
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
5690
5691
  // if the meeting has active peer connections, it should try to reconnect.
5691
- // @ts-ignore
5692
- this.webex.internal.mercury.on(_constants.ONLINE, function () {
5692
+ this.mercuryOnlineHandler = function () {
5693
5693
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
5694
5694
 
5695
5695
  // Only send restore event when it was disconnected before and for connected later
@@ -5699,15 +5699,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5699
5699
  });
5700
5700
  }
5701
5701
  _this25.hasWebsocketConnected = true;
5702
- });
5703
-
5704
- // @ts-ignore
5705
- this.webex.internal.mercury.on(_constants.OFFLINE, function () {
5702
+ };
5703
+ this.mercuryOfflineHandler = function () {
5706
5704
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
5707
5705
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
5708
5706
  correlation_id: _this25.correlationId
5709
5707
  });
5710
- });
5708
+ };
5709
+
5710
+ // @ts-ignore
5711
+ this.webex.internal.mercury.on(_constants.ONLINE, this.mercuryOnlineHandler);
5712
+ // @ts-ignore
5713
+ this.webex.internal.mercury.on(_constants.OFFLINE, this.mercuryOfflineHandler);
5714
+ }
5715
+
5716
+ /**
5717
+ * Removes this meeting's Mercury ONLINE/OFFLINE event listeners registered
5718
+ * by setMercuryListener(). Must be called before Locus /leave to avoid
5719
+ * unnecessary syncs/metrics triggered by events received while leaving
5720
+ * (per Locus team recommendation).
5721
+ *
5722
+ * Mercury is a process-wide singleton shared with other plugins, so we
5723
+ * pass the bound handler refs to .off() to avoid clearing every listener
5724
+ * for ONLINE/OFFLINE on the shared emitter.
5725
+ *
5726
+ * Idempotent: subsequent calls are no-ops because the handler refs are
5727
+ * cleared after detaching.
5728
+ * @private
5729
+ * @returns {void}
5730
+ */
5731
+ }, {
5732
+ key: "stopListeningForMercuryEvents",
5733
+ value: function stopListeningForMercuryEvents() {
5734
+ if (this.mercuryOnlineHandler) {
5735
+ // @ts-ignore
5736
+ this.webex.internal.mercury.off(_constants.ONLINE, this.mercuryOnlineHandler);
5737
+ this.mercuryOnlineHandler = undefined;
5738
+ }
5739
+ if (this.mercuryOfflineHandler) {
5740
+ // @ts-ignore
5741
+ this.webex.internal.mercury.off(_constants.OFFLINE, this.mercuryOfflineHandler);
5742
+ this.mercuryOfflineHandler = undefined;
5743
+ }
5711
5744
  }
5712
5745
 
5713
5746
  /**
@@ -6776,6 +6809,53 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6776
6809
  this.llmHealthCheckTimer = undefined;
6777
6810
  }
6778
6811
  }
6812
+
6813
+ /**
6814
+ * Removes LLM event listeners and clears the health check timer.
6815
+ * Must be called before Locus /leave to avoid unnecessary syncs triggered
6816
+ * by events received while leaving (per Locus team recommendation).
6817
+ * Idempotent: safe to call multiple times; .off() is a no-op when no
6818
+ * matching listener is registered.
6819
+ * @private
6820
+ * @returns {void}
6821
+ */
6822
+ }, {
6823
+ key: "stopListeningForLLMEvents",
6824
+ value: function stopListeningForLLMEvents() {
6825
+ // @ts-ignore - fix types
6826
+ this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
6827
+ // @ts-ignore - fix types
6828
+ this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
6829
+ this.clearLLMHealthCheckTimer();
6830
+ }
6831
+
6832
+ /**
6833
+ * Stops listening on every event bus (LLM, Mercury, voicea/transcription,
6834
+ * annotation) that could otherwise deliver events to this meeting while
6835
+ * Locus is processing /leave or /end. Per the Locus team recommendation,
6836
+ * this must run before the Locus request is dispatched to avoid
6837
+ * unnecessary syncs triggered by in-flight events.
6838
+ *
6839
+ * Voicea (transcription) subscribes to llm 'event:relay.event' internally,
6840
+ * and the annotation plugin subscribes to both mercury and llm, so both
6841
+ * must be torn down alongside the direct LLM/Mercury listeners.
6842
+ *
6843
+ * Idempotent: safe to call multiple times; .off() is a no-op when no
6844
+ * matching listener is registered, and stopTranscription is guarded.
6845
+ * @private
6846
+ * @returns {void}
6847
+ */
6848
+ }, {
6849
+ key: "stopListeningForMeetingEvents",
6850
+ value: function stopListeningForMeetingEvents() {
6851
+ this.stopListeningForLLMEvents();
6852
+ this.stopListeningForMercuryEvents();
6853
+ if (this.transcription) {
6854
+ this.stopTranscription();
6855
+ this.transcription = undefined;
6856
+ }
6857
+ this.annotation.deregisterEvents();
6858
+ }
6779
6859
  }, {
6780
6860
  key: "clearDataChannelToken",
6781
6861
  value:
@@ -8713,6 +8793,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8713
8793
  );
8714
8794
  };
8715
8795
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
8796
+ this.stopListeningForMeetingEvents();
8716
8797
  return _util2.default.leaveMeeting(this, options).then(/*#__PURE__*/function () {
8717
8798
  var _ref41 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(leave) {
8718
8799
  return _regenerator.default.wrap(function (_context38) {
@@ -9414,6 +9495,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9414
9495
  correlation_id: this.correlationId,
9415
9496
  locus_id: this.locusId
9416
9497
  });
9498
+ this.stopListeningForMeetingEvents();
9417
9499
  return _util2.default.endMeetingForAll(this).then(/*#__PURE__*/function () {
9418
9500
  var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(end) {
9419
9501
  return _regenerator.default.wrap(function (_context39) {