@webex/plugin-meetings 3.12.0-webex-services-ready.4 → 3.13.0

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 (165) hide show
  1. package/.sdd/manifest.json +1312 -0
  2. package/.sdd/templates/.source.json +30 -0
  3. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
  4. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
  5. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
  6. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
  7. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
  8. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
  9. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
  10. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
  11. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
  12. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
  13. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
  14. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
  15. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
  16. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
  17. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
  18. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
  19. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
  20. package/.sdd/templates/component-repo/template-map.json +112 -0
  21. package/AGENTS.md +130 -4
  22. package/ai-docs/ARCHITECTURE.md +208 -0
  23. package/ai-docs/CONTRACTS.md +267 -0
  24. package/ai-docs/DATA_MODEL.md +64 -0
  25. package/ai-docs/GETTING_STARTED.md +73 -0
  26. package/ai-docs/GLOSSARY.md +56 -0
  27. package/ai-docs/REVIEW_CHECKLIST.md +45 -0
  28. package/ai-docs/RULES.md +79 -0
  29. package/ai-docs/SECURITY.md +74 -0
  30. package/ai-docs/SERVICE_STATE.md +59 -0
  31. package/ai-docs/SPEC_INDEX.md +85 -0
  32. package/ai-docs/TEST_INDEX.md +45 -0
  33. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
  34. package/ai-docs/patterns/defensive-error-propagation.md +55 -0
  35. package/ai-docs/patterns/event-scope-emission.md +46 -0
  36. package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
  37. package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
  38. package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
  39. package/assets/README.md +28 -0
  40. package/assets/e2ee-0.0.1.js +2 -0
  41. package/assets/e2ee-0.0.1.wasm +0 -0
  42. package/dist/aiEnableRequest/index.js +1 -1
  43. package/dist/annotation/index.js +55 -19
  44. package/dist/annotation/index.js.map +1 -1
  45. package/dist/assets/e2ee-0.0.1.js +2 -0
  46. package/dist/assets/e2ee-0.0.1.wasm +0 -0
  47. package/dist/breakouts/breakout.js +1 -1
  48. package/dist/breakouts/index.js +39 -5
  49. package/dist/breakouts/index.js.map +1 -1
  50. package/dist/common/errors/webex-errors.js +7 -2
  51. package/dist/common/errors/webex-errors.js.map +1 -1
  52. package/dist/config.js +1 -0
  53. package/dist/config.js.map +1 -1
  54. package/dist/constants.js +6 -5
  55. package/dist/constants.js.map +1 -1
  56. package/dist/hashTree/hashTreeParser.js +101 -48
  57. package/dist/hashTree/hashTreeParser.js.map +1 -1
  58. package/dist/index.js +1 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/interceptors/dataChannelAuthToken.js +41 -59
  61. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  62. package/dist/interceptors/locusRetry.js +1 -1
  63. package/dist/interceptors/locusRetry.js.map +1 -1
  64. package/dist/interpretation/index.js +46 -12
  65. package/dist/interpretation/index.js.map +1 -1
  66. package/dist/interpretation/siLanguage.js +1 -1
  67. package/dist/locus-info/index.js +236 -80
  68. package/dist/locus-info/index.js.map +1 -1
  69. package/dist/locus-info/types.js +2 -1
  70. package/dist/locus-info/types.js.map +1 -1
  71. package/dist/media/MediaConnectionAwaiter.js +225 -175
  72. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  73. package/dist/meeting/index.js +355 -299
  74. package/dist/meeting/index.js.map +1 -1
  75. package/dist/meeting/util.js +8 -2
  76. package/dist/meeting/util.js.map +1 -1
  77. package/dist/meeting/voicea-meeting.js +2 -1
  78. package/dist/meeting/voicea-meeting.js.map +1 -1
  79. package/dist/meeting-info/meeting-info-v2.js +10 -3
  80. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  81. package/dist/meetings/index.js +72 -31
  82. package/dist/meetings/index.js.map +1 -1
  83. package/dist/multistream/remoteMediaManager.js +32 -4
  84. package/dist/multistream/remoteMediaManager.js.map +1 -1
  85. package/dist/multistream/sendSlotManager.js +11 -1
  86. package/dist/multistream/sendSlotManager.js.map +1 -1
  87. package/dist/types/annotation/index.d.ts +19 -0
  88. package/dist/types/common/errors/webex-errors.d.ts +6 -2
  89. package/dist/types/config.d.ts +1 -0
  90. package/dist/types/constants.d.ts +2 -1
  91. package/dist/types/hashTree/hashTreeParser.d.ts +12 -0
  92. package/dist/types/index.d.ts +1 -0
  93. package/dist/types/locus-info/index.d.ts +45 -1
  94. package/dist/types/locus-info/types.d.ts +1 -0
  95. package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -53
  96. package/dist/types/meeting/index.d.ts +49 -12
  97. package/dist/types/meeting/util.d.ts +3 -1
  98. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  99. package/dist/types/meetings/index.d.ts +2 -1
  100. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  101. package/dist/types/multistream/sendSlotManager.d.ts +5 -1
  102. package/dist/webinar/index.js +298 -255
  103. package/dist/webinar/index.js.map +1 -1
  104. package/package.json +25 -23
  105. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  106. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  107. package/src/annotation/index.ts +61 -29
  108. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  109. package/src/breakouts/index.ts +35 -2
  110. package/src/common/errors/webex-errors.ts +8 -2
  111. package/src/config.ts +5 -1
  112. package/src/constants.ts +2 -1
  113. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  114. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  115. package/src/hashTree/hashTreeParser.ts +67 -3
  116. package/src/index.ts +1 -0
  117. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  118. package/src/interceptors/dataChannelAuthToken.ts +48 -77
  119. package/src/interceptors/locusRetry.ts +1 -1
  120. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  121. package/src/interpretation/index.ts +38 -1
  122. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  123. package/src/locus-info/index.ts +156 -35
  124. package/src/locus-info/types.ts +1 -0
  125. package/src/media/MediaConnectionAwaiter.ts +223 -207
  126. package/src/media/ai-docs/media-spec.md +267 -0
  127. package/src/meeting/ai-docs/meeting-spec.md +404 -0
  128. package/src/meeting/index.ts +332 -296
  129. package/src/meeting/util.ts +7 -4
  130. package/src/meeting/voicea-meeting.ts +1 -1
  131. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  132. package/src/meeting-info/meeting-info-v2.ts +7 -2
  133. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  134. package/src/meetings/index.ts +59 -23
  135. package/src/member/ai-docs/member-spec.md +196 -0
  136. package/src/members/ai-docs/members-spec.md +256 -0
  137. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  138. package/src/multistream/ai-docs/multistream-spec.md +295 -0
  139. package/src/multistream/remoteMediaManager.ts +23 -1
  140. package/src/multistream/sendSlotManager.ts +15 -1
  141. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  142. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  143. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  144. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  145. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  146. package/src/roap/ai-docs/roap-spec.md +241 -0
  147. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  148. package/src/webinar/index.ts +168 -188
  149. package/test/unit/spec/annotation/index.ts +214 -182
  150. package/test/unit/spec/breakouts/index.ts +145 -13
  151. package/test/unit/spec/hashTree/hashTreeParser.ts +212 -1
  152. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +81 -99
  153. package/test/unit/spec/interceptors/locusRetry.ts +29 -1
  154. package/test/unit/spec/interpretation/index.ts +93 -0
  155. package/test/unit/spec/locus-info/index.js +397 -0
  156. package/test/unit/spec/media/MediaConnectionAwaiter.ts +426 -19
  157. package/test/unit/spec/media/properties.ts +3 -3
  158. package/test/unit/spec/meeting/index.js +1219 -723
  159. package/test/unit/spec/meeting/utils.js +52 -18
  160. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  161. package/test/unit/spec/meeting-info/meetinginfov2.js +69 -1
  162. package/test/unit/spec/meetings/index.js +145 -43
  163. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  164. package/test/unit/spec/multistream/sendSlotManager.ts +30 -2
  165. package/test/unit/spec/webinar/index.ts +886 -718
@@ -22,16 +22,6 @@ var _utils = require("./utils");
22
22
  * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.
23
23
  */
24
24
 
25
- var PS_LLM_EVENTS = [{
26
- event: "event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION),
27
- listenerKey: 'relay',
28
- handlerKey: 'processRelayEvent'
29
- }, {
30
- event: "".concat(_constants.LOCUS_LLM_EVENT, ":").concat(_constants.LLM_PRACTICE_SESSION),
31
- listenerKey: 'locusLLM',
32
- handlerKey: 'processLocusLLMEvent'
33
- }];
34
-
35
25
  /**
36
26
  * @class Webinar
37
27
  */
@@ -55,6 +45,19 @@ var Webinar = _webexCore.WebexPlugin.extend({
55
45
  // practice session enabled
56
46
  meetingId: 'string'
57
47
  },
48
+ /**
49
+ * LLM channel for practice session, owned by this webinar instance.
50
+ * @private
51
+ * @type {LLMChannel|undefined}
52
+ */
53
+ _practiceSessionLLMChannel: undefined,
54
+ /**
55
+ * Pending practice session datachannel token, saved from join response.
56
+ * Used when creating the practice session LLM channel.
57
+ * @private
58
+ * @type {string|undefined}
59
+ */
60
+ _pendingPracticeSessionDatachannelToken: undefined,
58
61
  /**
59
62
  * Calls this to clean up listeners
60
63
  * @returns {void}
@@ -160,70 +163,119 @@ var Webinar = _webexCore.WebexPlugin.extend({
160
163
  return this.selfIsPanelist && this.practiceSessionEnabled;
161
164
  },
162
165
  /**
163
- * Disconnects the practice session data channel and removes its relay listener.
164
- * The listener reference removed here is the exact callback captured at subscribe
165
- * time (see updatePSDataChannel) so that cleanup is correct even if the underlying
166
- * meeting can no longer be resolved (e.g. locusUrl mismatch).
166
+ * Returns the practice session LLM channel binding, if connected.
167
+ * @returns {string|undefined}
168
+ */
169
+ getPracticeSessionBinding: function getPracticeSessionBinding() {
170
+ var _this$_practiceSessio;
171
+ return (_this$_practiceSessio = this._practiceSessionLLMChannel) === null || _this$_practiceSessio === void 0 ? void 0 : _this$_practiceSessio.getBinding();
172
+ },
173
+ /**
174
+ * Returns whether the practice session LLM channel is connected.
175
+ * @returns {boolean}
176
+ */
177
+ isPracticeSessionLLMChannelConnected: function isPracticeSessionLLMChannelConnected() {
178
+ var _this$_practiceSessio2, _this$_practiceSessio3;
179
+ return (_this$_practiceSessio2 = (_this$_practiceSessio3 = this._practiceSessionLLMChannel) === null || _this$_practiceSessio3 === void 0 ? void 0 : _this$_practiceSessio3.isConnected()) !== null && _this$_practiceSessio2 !== void 0 ? _this$_practiceSessio2 : false;
180
+ },
181
+ /**
182
+ * Returns the practice session LLM channel's locus URL, if available.
183
+ * @returns {string|undefined}
184
+ */
185
+ getPracticeSessionLocusUrl: function getPracticeSessionLocusUrl() {
186
+ var _this$_practiceSessio4;
187
+ return (_this$_practiceSessio4 = this._practiceSessionLLMChannel) === null || _this$_practiceSessio4 === void 0 ? void 0 : _this$_practiceSessio4.getLocusUrl();
188
+ },
189
+ /**
190
+ * Stores the practice session datachannel token for later use when
191
+ * creating the practice session LLM channel.
192
+ * @param {string} token - The datachannel token to store
193
+ * @returns {void}
194
+ */
195
+ setPracticeSessionDatachannelToken: function setPracticeSessionDatachannelToken(token) {
196
+ this._pendingPracticeSessionDatachannelToken = token;
197
+ },
198
+ /**
199
+ * Disconnects the practice session LLM channel and cleans up listeners.
167
200
  * @returns {Promise<void>}
168
201
  */
169
202
  cleanupPSDataChannel: function cleanupPSDataChannel() {
170
203
  var _this = this;
171
204
  return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
172
- var _this$webex$internal$, isOwner, disconnected, _this$webex$internal$2, _this$webex$internal$3, _i, _PS_LLM_EVENTS, _PS_LLM_EVENTS$_i, event, listenerKey, _t;
205
+ var _meeting$llmChannel, _meeting, meeting, _this$_practiceSessio5, _this$_practiceSessio6, _this$_practiceSessio7, _t;
173
206
  return _regenerator.default.wrap(function (_context) {
174
207
  while (1) switch (_context.prev = _context.next) {
175
208
  case 0:
176
- _this$webex$internal$ = _this.webex.internal.llm.resolveSessionOwnership(_this.meetingId, _constants.LLM_PRACTICE_SESSION), isOwner = _this$webex$internal$.isOwner;
177
- _this.llmListeners = _this.llmListeners || {};
209
+ // Remove pending online listener if any
178
210
  if (_this._pendingOnlineListener) {
179
- // @ts-ignore - Fix type
180
- _this.webex.internal.llm.off('online', _this._pendingOnlineListener);
211
+ _meeting = _this.getValidatedWebinarMeeting();
212
+ _meeting === null || _meeting === void 0 ? void 0 : (_meeting$llmChannel = _meeting.llmChannel) === null || _meeting$llmChannel === void 0 ? void 0 : _meeting$llmChannel.off('online', _this._pendingOnlineListener);
181
213
  _this._pendingOnlineListener = null;
182
214
  }
183
- _context.prev = 1;
184
- _context.next = 2;
185
- return _this.webex.internal.llm.disconnectLLM({
186
- code: 3050,
187
- reason: 'done (permanent)'
188
- }, _constants.LLM_PRACTICE_SESSION, _this.meetingId);
189
- case 2:
190
- disconnected = _context.sent;
191
- if (!disconnected) {
192
- _loggerProxy.default.logger.info("Webinar:index#cleanupPSDataChannel --> skipping disconnect; practice-session LLM is not owned by meeting ".concat(_this.meetingId));
215
+ meeting = _this.getValidatedWebinarMeeting();
216
+ if (_this._practiceSessionLLMChannel) {
217
+ _context.next = 3;
218
+ break;
193
219
  }
194
- _context.next = 4;
195
- break;
220
+ if (!(meeting !== null && meeting !== void 0 && meeting.voiceaChannel && meeting !== null && meeting !== void 0 && meeting.llmChannel)) {
221
+ _context.next = 2;
222
+ break;
223
+ }
224
+ _context.next = 1;
225
+ return meeting.voiceaChannel.switchLLMChannel(meeting.llmChannel);
226
+ case 1:
227
+ meeting.startTranscriptionIfNeeded();
228
+ case 2:
229
+ return _context.abrupt("return");
196
230
  case 3:
197
231
  _context.prev = 3;
198
- _t = _context["catch"](1);
199
- // disconnectLLM clears ownership only on success; release a stale owner
200
- // tag here so other meeting instances can reclaim practice-session LLM.
201
- if (isOwner) {
202
- // @ts-ignore - Fix type
203
- (_this$webex$internal$2 = (_this$webex$internal$3 = _this.webex.internal.llm).setOwnerMeetingId) === null || _this$webex$internal$2 === void 0 ? void 0 : _this$webex$internal$2.call(_this$webex$internal$3, undefined, _constants.LLM_PRACTICE_SESSION);
204
- }
205
- throw _t;
232
+ _context.next = 4;
233
+ return _this._practiceSessionLLMChannel.disconnect({
234
+ code: 3050,
235
+ reason: 'done (permanent)'
236
+ });
206
237
  case 4:
207
- _context.prev = 4;
208
- if (_this._practiceSessionRelayListener) {
209
- // @ts-ignore - Fix type
210
- _this.webex.internal.llm.off("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), _this._practiceSessionRelayListener);
211
- }
212
- _this._practiceSessionRelayListener = null;
213
- for (_i = 0, _PS_LLM_EVENTS = PS_LLM_EVENTS; _i < _PS_LLM_EVENTS.length; _i++) {
214
- _PS_LLM_EVENTS$_i = _PS_LLM_EVENTS[_i], event = _PS_LLM_EVENTS$_i.event, listenerKey = _PS_LLM_EVENTS$_i.listenerKey;
215
- if (_this.llmListeners[listenerKey]) {
216
- // @ts-ignore - Fix type
217
- _this.webex.internal.llm.off(event, _this.llmListeners[listenerKey]);
218
- _this.llmListeners[listenerKey] = null;
238
+ _context.next = 6;
239
+ break;
240
+ case 5:
241
+ _context.prev = 5;
242
+ _t = _context["catch"](3);
243
+ _loggerProxy.default.logger.error('Webinar:index#cleanupPSDataChannel --> Failed to disconnect practice session LLM channel', _t);
244
+ throw _t;
245
+ case 6:
246
+ _context.prev = 6;
247
+ // Remove listeners from the channel
248
+ if (meeting) {
249
+ (_this$_practiceSessio5 = _this._practiceSessionLLMChannel) === null || _this$_practiceSessio5 === void 0 ? void 0 : _this$_practiceSessio5.off('event:relay.event', meeting.processRelayEvent);
250
+ (_this$_practiceSessio6 = _this._practiceSessionLLMChannel) === null || _this$_practiceSessio6 === void 0 ? void 0 : _this$_practiceSessio6.off(_constants.LOCUS_LLM_EVENT, meeting.processLocusLLMEvent);
251
+ (_this$_practiceSessio7 = _this._practiceSessionLLMChannel) === null || _this$_practiceSessio7 === void 0 ? void 0 : _this$_practiceSessio7.off('online', meeting.handleLLMOnline);
252
+
253
+ // Switch annotation back to the meeting's default channel
254
+ if (meeting.llmChannel) {
255
+ meeting.annotation.registerChannel(meeting.llmChannel);
219
256
  }
220
257
  }
221
- return _context.finish(4);
222
- case 5:
258
+ _this._practiceSessionLLMChannel = undefined;
259
+
260
+ // Switch voicea to current main channel. Switching after disconnect ensures:
261
+ // - If main channel was replaced during disconnect (concurrent updateLLMConnection),
262
+ // meeting.llmChannel will be the new channel
263
+ // - If the channel is still connecting, switchLLMChannel waits for it to come online
264
+ if (!(meeting !== null && meeting !== void 0 && meeting.voiceaChannel && meeting !== null && meeting !== void 0 && meeting.llmChannel)) {
265
+ _context.next = 8;
266
+ break;
267
+ }
268
+ _context.next = 7;
269
+ return meeting.voiceaChannel.switchLLMChannel(meeting.llmChannel);
270
+ case 7:
271
+ meeting.startTranscriptionIfNeeded();
272
+ case 8:
273
+ return _context.finish(6);
274
+ case 9:
223
275
  case "end":
224
276
  return _context.stop();
225
277
  }
226
- }, _callee, null, [[1, 3, 4, 5]]);
278
+ }, _callee, null, [[3, 5, 6, 9]]);
227
279
  }))();
228
280
  },
229
281
  /**
@@ -236,7 +288,8 @@ var Webinar = _webexCore.WebexPlugin.extend({
236
288
  ensurePracticeSessionDatachannelToken: function ensurePracticeSessionDatachannelToken(meeting) {
237
289
  var _this2 = this;
238
290
  return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
239
- var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, dataChannelTokenType, _t2;
291
+ var _this2$_practiceSessi, _this2$_practiceSessi2;
292
+ var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, _t2;
240
293
  return _regenerator.default.wrap(function (_context2) {
241
294
  while (1) switch (_context2.prev = _context2.next) {
242
295
  case 0:
@@ -250,8 +303,8 @@ var Webinar = _webexCore.WebexPlugin.extend({
250
303
  }
251
304
  return _context2.abrupt("return", undefined);
252
305
  case 2:
253
- // @ts-ignore
254
- cachedToken = _this2.webex.internal.llm.getDatachannelToken(_constants.LLM_PRACTICE_SESSION, _this2.meetingId);
306
+ // Check for cached token on the channel or pending token
307
+ cachedToken = (_this2$_practiceSessi = (_this2$_practiceSessi2 = _this2._practiceSessionLLMChannel) === null || _this2$_practiceSessi2 === void 0 ? void 0 : _this2$_practiceSessi2.getDatachannelToken()) !== null && _this2$_practiceSessi !== void 0 ? _this2$_practiceSessi : _this2._pendingPracticeSessionDatachannelToken;
255
308
  if (!cachedToken) {
256
309
  _context2.next = 3;
257
310
  break;
@@ -263,15 +316,19 @@ var Webinar = _webexCore.WebexPlugin.extend({
263
316
  return meeting.refreshDataChannelToken();
264
317
  case 4:
265
318
  refreshResponse = _context2.sent;
266
- _ref2 = (_refreshResponse$body = refreshResponse === null || refreshResponse === void 0 ? void 0 : refreshResponse.body) !== null && _refreshResponse$body !== void 0 ? _refreshResponse$body : {}, datachannelToken = _ref2.datachannelToken, dataChannelTokenType = _ref2.dataChannelTokenType;
319
+ _ref2 = (_refreshResponse$body = refreshResponse === null || refreshResponse === void 0 ? void 0 : refreshResponse.body) !== null && _refreshResponse$body !== void 0 ? _refreshResponse$body : {}, datachannelToken = _ref2.datachannelToken;
267
320
  if (datachannelToken) {
268
321
  _context2.next = 5;
269
322
  break;
270
323
  }
271
324
  return _context2.abrupt("return", undefined);
272
325
  case 5:
273
- // @ts-ignore
274
- _this2.webex.internal.llm.setDatachannelToken(datachannelToken, dataChannelTokenType || _constants.LLM_PRACTICE_SESSION, _this2.meetingId);
326
+ // Store token on the channel if it exists, otherwise save for later
327
+ if (_this2._practiceSessionLLMChannel) {
328
+ _this2._practiceSessionLLMChannel.setDatachannelToken(datachannelToken);
329
+ } else {
330
+ _this2._pendingPracticeSessionDatachannelToken = datachannelToken;
331
+ }
275
332
  return _context2.abrupt("return", datachannelToken);
276
333
  case 6:
277
334
  _context2.prev = 6;
@@ -286,188 +343,174 @@ var Webinar = _webexCore.WebexPlugin.extend({
286
343
  }))();
287
344
  },
288
345
  /**
289
- * Connects to low latency mercury and reconnects if the address has changed
290
- * It will also disconnect if called when the meeting has ended
346
+ * Connects practice session LLM channel. Creates a new channel if needed.
347
+ * Will disconnect if the meeting has ended or is no longer in practice session mode.
348
+ * Waits for the main LLM channel to be connected before connecting practice session.
291
349
  * @returns {Promise}
292
350
  */
293
351
  updatePSDataChannel: function updatePSDataChannel() {
294
352
  var _this3 = this;
295
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
296
- var _this3$webex$internal3, _this3$webex$internal4;
297
- var invocationSequence, meeting, isPracticeSession, _this3$webex$internal, currentOwner, isOwner, _ref3, _ref3$url, url, _ref3$info, _ref3$info2, _ref3$info2$practiceS, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, keepTranscriptionSubscribed, _onDefaultSessionConnected, refreshedPracticeSessionToken, latestPracticeSessionDatachannelUrl, isStillPracticeSession, _this3$webex$internal2, currentOwnerBeforeConnect, isOwnerBeforeConnect;
298
- return _regenerator.default.wrap(function (_context3) {
299
- while (1) switch (_context3.prev = _context3.next) {
353
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
354
+ var _this3$_practiceSessi, _meeting$llmChannel3, _this3$_pendingPracti, _this3$_practiceSessi2;
355
+ var invocationSequence, meeting, isPracticeSession, _ref3, _ref3$url, url, _ref3$info, _ref3$info2, _ref3$info2$practiceS, practiceSessionDatachannelUrl, _onDefaultSessionConnected, practiceSessionDatachannelToken, refreshedToken, latestPracticeSessionDatachannelUrl, isStillPracticeSession, psChannel;
356
+ return _regenerator.default.wrap(function (_context4) {
357
+ while (1) switch (_context4.prev = _context4.next) {
300
358
  case 0:
301
- _this3.llmListeners = _this3.llmListeners || {};
302
359
  _this3._updatePSDataChannelSequence = (_this3._updatePSDataChannelSequence || 0) + 1;
303
360
  invocationSequence = _this3._updatePSDataChannelSequence;
304
361
  meeting = _this3.getValidatedWebinarMeeting();
305
362
  isPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel();
306
- _this3$webex$internal = _this3.webex.internal.llm.resolveSessionOwnership(_this3.meetingId, _constants.LLM_PRACTICE_SESSION), currentOwner = _this3$webex$internal.currentOwner, isOwner = _this3$webex$internal.isOwner;
307
363
  if (isPracticeSession) {
308
- _context3.next = 2;
364
+ _context4.next = 2;
309
365
  break;
310
366
  }
311
- _context3.next = 1;
367
+ _context4.next = 1;
312
368
  return _this3.cleanupPSDataChannel();
313
369
  case 1:
314
- return _context3.abrupt("return", undefined);
370
+ return _context4.abrupt("return", undefined);
315
371
  case 2:
316
- if (isOwner) {
317
- _context3.next = 3;
318
- break;
319
- }
320
- _loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> skipping; practice-session LLM owned by meeting ".concat(currentOwner, ", not ").concat(_this3.meetingId));
321
- return _context3.abrupt("return", undefined);
322
- case 3:
323
372
  // @ts-ignore - Fix type
324
- _ref3 = (meeting === null || meeting === void 0 ? void 0 : meeting.locusInfo) || {}, _ref3$url = _ref3.url, url = _ref3$url === void 0 ? undefined : _ref3$url, _ref3$info = _ref3.info, _ref3$info2 = _ref3$info === void 0 ? {} : _ref3$info, _ref3$info2$practiceS = _ref3$info2.practiceSessionDatachannelUrl, practiceSessionDatachannelUrl = _ref3$info2$practiceS === void 0 ? undefined : _ref3$info2$practiceS; // @ts-ignore
325
- practiceSessionDatachannelToken = _this3.webex.internal.llm.getDatachannelToken(_constants.LLM_PRACTICE_SESSION, _this3.meetingId);
326
- keepTranscriptionSubscribed = _this3.webex.internal.voicea.getKeepTranscriptionSubscribed();
373
+ _ref3 = (meeting === null || meeting === void 0 ? void 0 : meeting.locusInfo) || {}, _ref3$url = _ref3.url, url = _ref3$url === void 0 ? undefined : _ref3$url, _ref3$info = _ref3.info, _ref3$info2 = _ref3$info === void 0 ? {} : _ref3$info, _ref3$info2$practiceS = _ref3$info2.practiceSessionDatachannelUrl, practiceSessionDatachannelUrl = _ref3$info2$practiceS === void 0 ? undefined : _ref3$info2$practiceS;
327
374
  if (practiceSessionDatachannelUrl) {
328
- _context3.next = 4;
375
+ _context4.next = 3;
329
376
  break;
330
377
  }
331
- return _context3.abrupt("return", undefined);
332
- case 4:
333
- if (!_this3.webex.internal.llm.isConnected(_constants.LLM_PRACTICE_SESSION)) {
334
- _context3.next = 6;
378
+ return _context4.abrupt("return", undefined);
379
+ case 3:
380
+ if (!((_this3$_practiceSessi = _this3._practiceSessionLLMChannel) !== null && _this3$_practiceSessi !== void 0 && _this3$_practiceSessi.isConnected())) {
381
+ _context4.next = 5;
335
382
  break;
336
383
  }
337
- if (!(
338
- // @ts-ignore - Fix type
339
- url === _this3.webex.internal.llm.getLocusUrl(_constants.LLM_PRACTICE_SESSION) &&
340
- // @ts-ignore - Fix type
341
- practiceSessionDatachannelUrl === _this3.webex.internal.llm.getDatachannelUrl(_constants.LLM_PRACTICE_SESSION))) {
342
- _context3.next = 5;
384
+ if (!(url === _this3._practiceSessionLLMChannel.getLocusUrl() && practiceSessionDatachannelUrl === _this3._practiceSessionLLMChannel.getDatachannelUrl())) {
385
+ _context4.next = 4;
343
386
  break;
344
387
  }
345
- return _context3.abrupt("return", undefined);
346
- case 5:
347
- _context3.next = 6;
388
+ return _context4.abrupt("return", undefined);
389
+ case 4:
390
+ _context4.next = 5;
348
391
  return _this3.cleanupPSDataChannel();
349
- case 6:
350
- // Ensure the default session data channel is connected before connecting the practice session.
392
+ case 5:
393
+ // Ensure the default session LLM channel is connected before connecting the practice session.
351
394
  // Subscribe before checking isConnected() to avoid a race where the 'online' event fires
352
- // between the check and the subscription — Mercury does not replay missed events.
353
- if (!_this3._pendingOnlineListener) {
395
+ // between the check and the subscription — the channel does not replay missed events.
396
+ if (!_this3._pendingOnlineListener && meeting !== null && meeting !== void 0 && meeting.llmChannel) {
354
397
  _onDefaultSessionConnected = function onDefaultSessionConnected() {
398
+ var _meeting$llmChannel2;
355
399
  _this3._pendingOnlineListener = null;
356
- // @ts-ignore - Fix type
357
- _this3.webex.internal.llm.off('online', _onDefaultSessionConnected);
400
+ (_meeting$llmChannel2 = meeting.llmChannel) === null || _meeting$llmChannel2 === void 0 ? void 0 : _meeting$llmChannel2.off('online', _onDefaultSessionConnected);
358
401
  _this3.updatePSDataChannel();
359
402
  };
360
403
  _this3._pendingOnlineListener = _onDefaultSessionConnected;
361
- // @ts-ignore - Fix type
362
- _this3.webex.internal.llm.on('online', _onDefaultSessionConnected);
404
+ meeting.llmChannel.on('online', _onDefaultSessionConnected);
363
405
  }
364
-
365
- // @ts-ignore - Fix type
366
- if (_this3.webex.internal.llm.isConnected()) {
367
- _context3.next = 7;
406
+ if (meeting !== null && meeting !== void 0 && (_meeting$llmChannel3 = meeting.llmChannel) !== null && _meeting$llmChannel3 !== void 0 && _meeting$llmChannel3.isConnected()) {
407
+ _context4.next = 6;
368
408
  break;
369
409
  }
370
410
  _loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> default session not yet connected, deferring practice session connect.');
371
- return _context3.abrupt("return", undefined);
372
- case 7:
411
+ return _context4.abrupt("return", undefined);
412
+ case 6:
373
413
  // Default session is already connected — cancel the pending listener and proceed
374
414
  if (_this3._pendingOnlineListener) {
375
- // @ts-ignore - Fix type
376
- _this3.webex.internal.llm.off('online', _this3._pendingOnlineListener);
415
+ meeting.llmChannel.off('online', _this3._pendingOnlineListener);
377
416
  _this3._pendingOnlineListener = null;
378
417
  }
379
- _context3.next = 8;
418
+
419
+ // Get token from pending or refresh if needed
420
+ practiceSessionDatachannelToken = (_this3$_pendingPracti = _this3._pendingPracticeSessionDatachannelToken) !== null && _this3$_pendingPracti !== void 0 ? _this3$_pendingPracti : (_this3$_practiceSessi2 = _this3._practiceSessionLLMChannel) === null || _this3$_practiceSessi2 === void 0 ? void 0 : _this3$_practiceSessi2.getDatachannelToken();
421
+ _context4.next = 7;
380
422
  return _this3.ensurePracticeSessionDatachannelToken(meeting);
381
- case 8:
382
- refreshedPracticeSessionToken = _context3.sent;
423
+ case 7:
424
+ refreshedToken = _context4.sent;
383
425
  latestPracticeSessionDatachannelUrl = (0, _lodash.get)(meeting, 'locusInfo.info.practiceSessionDatachannelUrl');
384
426
  isStillPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel(); // Skip stale invocations after async refresh to avoid reconnecting a session
385
427
  // that was already updated/cleaned by a newer state transition.
386
428
  if (!(invocationSequence !== _this3._updatePSDataChannelSequence || !isStillPracticeSession || !latestPracticeSessionDatachannelUrl || latestPracticeSessionDatachannelUrl !== practiceSessionDatachannelUrl)) {
387
- _context3.next = 9;
429
+ _context4.next = 8;
388
430
  break;
389
431
  }
390
- return _context3.abrupt("return", undefined);
391
- case 9:
392
- if (refreshedPracticeSessionToken) {
393
- practiceSessionDatachannelToken = refreshedPracticeSessionToken;
394
- }
395
- _this3$webex$internal2 = _this3.webex.internal.llm.resolveSessionOwnership(_this3.meetingId, _constants.LLM_PRACTICE_SESSION), currentOwnerBeforeConnect = _this3$webex$internal2.currentOwner, isOwnerBeforeConnect = _this3$webex$internal2.isOwner;
396
- if (isOwnerBeforeConnect) {
397
- _context3.next = 10;
398
- break;
432
+ return _context4.abrupt("return", undefined);
433
+ case 8:
434
+ if (refreshedToken) {
435
+ practiceSessionDatachannelToken = refreshedToken;
399
436
  }
400
- _loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> skipping pre-connect owner write; practice-session LLM owned by meeting ".concat(currentOwnerBeforeConnect, ", not ").concat(_this3.meetingId));
401
- return _context3.abrupt("return", undefined);
402
- case 10:
403
- // Ensure refresh for practice datachannel requests is routed to this
404
- // meeting only when we are actually about to connect the practice session.
405
- // This avoids claiming ownership in flows that return early (e.g. missing
406
- // practiceSessionDatachannelUrl or waiting for default session online).
437
+
438
+ // Create a new practice session LLM channel
407
439
  // @ts-ignore - Fix type
408
- _this3.webex.internal.llm.setRefreshHandler(function () {
440
+ psChannel = _this3.webex.internal.llm.createChannel();
441
+ _this3._practiceSessionLLMChannel = psChannel;
442
+
443
+ // Set up refresh handler before registration
444
+ psChannel.setRefreshHandler(function () {
409
445
  return meeting.refreshDataChannelToken();
410
- }, _constants.LLM_PRACTICE_SESSION, _this3.meetingId);
411
- // @ts-ignore - Fix type
412
- (_this3$webex$internal3 = (_this3$webex$internal4 = _this3.webex.internal.llm).setOwnerMeetingId) === null || _this3$webex$internal3 === void 0 ? void 0 : _this3$webex$internal3.call(_this3$webex$internal4, _this3.meetingId, _constants.LLM_PRACTICE_SESSION);
446
+ });
413
447
 
414
- // @ts-ignore - Fix type
415
- return _context3.abrupt("return", _this3.webex.internal.llm.registerAndConnect(url, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION).then(function (registerAndConnectResult) {
416
- var _this3$webex$internal8, _this3$webex$internal9;
417
- var _this3$webex$internal5 = _this3.webex.internal.llm.resolveSessionOwnership(_this3.meetingId, _constants.LLM_PRACTICE_SESSION),
418
- currentOwnerAfterConnect = _this3$webex$internal5.currentOwner,
419
- isOwnerAfterConnect = _this3$webex$internal5.isOwner;
420
- if (_this3.meetingId && isOwnerAfterConnect) {
421
- var _this3$webex$internal6, _this3$webex$internal7;
422
- // @ts-ignore - Fix type
423
- (_this3$webex$internal6 = (_this3$webex$internal7 = _this3.webex.internal.llm).setOwnerMeetingId) === null || _this3$webex$internal6 === void 0 ? void 0 : _this3$webex$internal6.call(_this3$webex$internal7, _this3.meetingId, _constants.LLM_PRACTICE_SESSION);
424
- } else {
425
- _loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> skipping post-connect owner write; practice-session LLM owned by meeting ".concat(currentOwnerAfterConnect, ", not ").concat(_this3.meetingId));
426
- }
448
+ // If we have a pending token, store it on the channel
449
+ if (_this3._pendingPracticeSessionDatachannelToken) {
450
+ psChannel.setDatachannelToken(_this3._pendingPracticeSessionDatachannelToken);
451
+ _this3._pendingPracticeSessionDatachannelToken = undefined;
452
+ }
453
+ return _context4.abrupt("return", psChannel.registerAndConnect(url, practiceSessionDatachannelUrl, practiceSessionDatachannelToken).then(/*#__PURE__*/function () {
454
+ var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(registerAndConnectResult) {
455
+ return _regenerator.default.wrap(function (_context3) {
456
+ while (1) switch (_context3.prev = _context3.next) {
457
+ case 0:
458
+ if (!(_this3._practiceSessionLLMChannel !== psChannel)) {
459
+ _context3.next = 1;
460
+ break;
461
+ }
462
+ psChannel.disconnect({
463
+ code: 3050,
464
+ reason: 'replaced'
465
+ }).catch(function () {});
466
+ return _context3.abrupt("return", undefined);
467
+ case 1:
468
+ // Register event listeners on the practice session channel
469
+ psChannel.off('event:relay.event', meeting.processRelayEvent);
470
+ psChannel.on('event:relay.event', meeting.processRelayEvent);
471
+ psChannel.off(_constants.LOCUS_LLM_EVENT, meeting.processLocusLLMEvent);
472
+ psChannel.on(_constants.LOCUS_LLM_EVENT, meeting.processLocusLLMEvent);
473
+ psChannel.off('online', meeting.handleLLMOnline);
474
+ psChannel.on('online', meeting.handleLLMOnline);
427
475
 
428
- // Track the exact listener references so cleanupPSDataChannel can
429
- // unsubscribe deterministically, even if the meeting can no longer
430
- // be resolved at cleanup time.
431
- for (var _i2 = 0, _PS_LLM_EVENTS2 = PS_LLM_EVENTS; _i2 < _PS_LLM_EVENTS2.length; _i2++) {
432
- var _PS_LLM_EVENTS2$_i = _PS_LLM_EVENTS2[_i2],
433
- event = _PS_LLM_EVENTS2$_i.event,
434
- listenerKey = _PS_LLM_EVENTS2$_i.listenerKey,
435
- handlerKey = _PS_LLM_EVENTS2$_i.handlerKey;
436
- if (_this3.llmListeners[listenerKey]) {
437
- // @ts-ignore - Fix type
438
- _this3.webex.internal.llm.off(event, _this3.llmListeners[listenerKey]);
439
- }
440
- _this3.llmListeners[listenerKey] = meeting === null || meeting === void 0 ? void 0 : meeting[handlerKey];
441
- // @ts-ignore - Fix type
442
- _this3.webex.internal.llm.on(event, _this3.llmListeners[listenerKey]);
443
- }
444
- // @ts-ignore - Fix type
445
- (_this3$webex$internal8 = _this3.webex.internal.voicea) === null || _this3$webex$internal8 === void 0 ? void 0 : (_this3$webex$internal9 = _this3$webex$internal8.announce) === null || _this3$webex$internal9 === void 0 ? void 0 : _this3$webex$internal9.call(_this3$webex$internal8);
446
- if (keepTranscriptionSubscribed) {
447
- _this3.webex.internal.voicea.updateSubchannelSubscriptions({
448
- subscribe: ['transcription']
449
- });
450
- }
451
- _loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> enabled to receive relay events for default session for ".concat(_constants.LLM_PRACTICE_SESSION, "!"));
452
- return _promise.default.resolve(registerAndConnectResult);
453
- }).catch(function (error) {
454
- var _this3$webex$internal0 = _this3.webex.internal.llm.resolveSessionOwnership(_this3.meetingId, _constants.LLM_PRACTICE_SESSION),
455
- currentOwnerAfterRegisterFailure = _this3$webex$internal0.currentOwner,
456
- isOwnerAfterRegisterFailure = _this3$webex$internal0.isOwner;
457
- if (isOwnerAfterRegisterFailure) {
458
- var _this3$webex$internal1, _this3$webex$internal10;
459
- // @ts-ignore - Fix type
460
- (_this3$webex$internal1 = (_this3$webex$internal10 = _this3.webex.internal.llm).setOwnerMeetingId) === null || _this3$webex$internal1 === void 0 ? void 0 : _this3$webex$internal1.call(_this3$webex$internal10, undefined, _constants.LLM_PRACTICE_SESSION);
461
- } else {
462
- _loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> skipping failure owner release; practice-session LLM owned by meeting ".concat(currentOwnerAfterRegisterFailure, ", not ").concat(_this3.meetingId));
476
+ // Switch annotation to practice session channel
477
+ meeting.annotation.registerChannel(psChannel);
478
+
479
+ // Switch meeting's voicea channel to use the PS LLM connection.
480
+ // The reconciler pattern preserves caption state and handles all timing.
481
+ // transcription is always initialized (reset to initial shape, never null).
482
+ if (!meeting.voiceaChannel) {
483
+ _context3.next = 3;
484
+ break;
485
+ }
486
+ _context3.next = 2;
487
+ return meeting.voiceaChannel.switchLLMChannel(psChannel);
488
+ case 2:
489
+ meeting.startTranscriptionIfNeeded();
490
+ case 3:
491
+ _loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> enabled to receive relay events for practice session!');
492
+ return _context3.abrupt("return", _promise.default.resolve(registerAndConnectResult));
493
+ case 4:
494
+ case "end":
495
+ return _context3.stop();
496
+ }
497
+ }, _callee3);
498
+ }));
499
+ return function (_x) {
500
+ return _ref4.apply(this, arguments);
501
+ };
502
+ }()).catch(function (error) {
503
+ // Clean up the channel on failure, but only if it's still the current one
504
+ if (_this3._practiceSessionLLMChannel === psChannel) {
505
+ _this3._practiceSessionLLMChannel = undefined;
463
506
  }
464
507
  throw error;
465
508
  }));
466
- case 11:
509
+ case 9:
467
510
  case "end":
468
- return _context3.stop();
511
+ return _context4.stop();
469
512
  }
470
- }, _callee3);
513
+ }, _callee4);
471
514
  }))();
472
515
  },
473
516
  /**
@@ -510,13 +553,13 @@ var Webinar = _webexCore.WebexPlugin.extend({
510
553
  */
511
554
  startWebcast: function startWebcast(meeting, layout) {
512
555
  var _this4 = this;
513
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
556
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
514
557
  var _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0;
515
- return _regenerator.default.wrap(function (_context4) {
516
- while (1) switch (_context4.prev = _context4.next) {
558
+ return _regenerator.default.wrap(function (_context5) {
559
+ while (1) switch (_context5.prev = _context5.next) {
517
560
  case 0:
518
561
  if (meeting) {
519
- _context4.next = 1;
562
+ _context5.next = 1;
520
563
  break;
521
564
  }
522
565
  _loggerProxy.default.logger.error("Meeting:webinar#startWebcast failed --> meeting parameter : ".concat(meeting));
@@ -526,10 +569,10 @@ var Webinar = _webexCore.WebexPlugin.extend({
526
569
  _t4 = _constants.HTTP_VERBS.PUT;
527
570
  _t5 = "".concat(_this4.webcastInstanceUrl, "/streaming");
528
571
  _t6 = _defineProperty2.default;
529
- _context4.next = 2;
572
+ _context5.next = 2;
530
573
  return _this4.webex.credentials.getUserToken();
531
574
  case 2:
532
- _t7 = _context4.sent;
575
+ _t7 = _context5.sent;
533
576
  _t8 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
534
577
  _t9 = _t6({
535
578
  authorization: _t7,
@@ -543,7 +586,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
543
586
  },
544
587
  layout: layout
545
588
  };
546
- return _context4.abrupt("return", _t3.request.call(_t3, {
589
+ return _context5.abrupt("return", _t3.request.call(_t3, {
547
590
  method: _t4,
548
591
  uri: _t5,
549
592
  headers: _t9,
@@ -554,9 +597,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
554
597
  }));
555
598
  case 3:
556
599
  case "end":
557
- return _context4.stop();
600
+ return _context5.stop();
558
601
  }
559
- }, _callee4);
602
+ }, _callee5);
560
603
  }))();
561
604
  },
562
605
  /**
@@ -565,19 +608,19 @@ var Webinar = _webexCore.WebexPlugin.extend({
565
608
  */
566
609
  stopWebcast: function stopWebcast() {
567
610
  var _this5 = this;
568
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
611
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
569
612
  var _t1, _t10, _t11, _t12, _t13, _t14, _t15, _t16;
570
- return _regenerator.default.wrap(function (_context5) {
571
- while (1) switch (_context5.prev = _context5.next) {
613
+ return _regenerator.default.wrap(function (_context6) {
614
+ while (1) switch (_context6.prev = _context6.next) {
572
615
  case 0:
573
616
  _t1 = _this5;
574
617
  _t10 = _constants.HTTP_VERBS.PUT;
575
618
  _t11 = "".concat(_this5.webcastInstanceUrl, "/streaming");
576
619
  _t12 = _defineProperty2.default;
577
- _context5.next = 1;
620
+ _context6.next = 1;
578
621
  return _this5.webex.credentials.getUserToken();
579
622
  case 1:
580
- _t13 = _context5.sent;
623
+ _t13 = _context6.sent;
581
624
  _t14 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
582
625
  _t15 = _t12({
583
626
  authorization: _t13,
@@ -586,7 +629,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
586
629
  _t16 = {
587
630
  action: 'stop'
588
631
  };
589
- return _context5.abrupt("return", _t1.request.call(_t1, {
632
+ return _context6.abrupt("return", _t1.request.call(_t1, {
590
633
  method: _t10,
591
634
  uri: _t11,
592
635
  headers: _t15,
@@ -597,9 +640,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
597
640
  }));
598
641
  case 2:
599
642
  case "end":
600
- return _context5.stop();
643
+ return _context6.stop();
601
644
  }
602
- }, _callee5);
645
+ }, _callee6);
603
646
  }))();
604
647
  },
605
648
  /**
@@ -608,24 +651,24 @@ var Webinar = _webexCore.WebexPlugin.extend({
608
651
  */
609
652
  queryWebcastLayout: function queryWebcastLayout() {
610
653
  var _this6 = this;
611
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
654
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
612
655
  var _t17, _t18, _t19, _t20, _t21, _t22;
613
- return _regenerator.default.wrap(function (_context6) {
614
- while (1) switch (_context6.prev = _context6.next) {
656
+ return _regenerator.default.wrap(function (_context7) {
657
+ while (1) switch (_context7.prev = _context7.next) {
615
658
  case 0:
616
659
  _t17 = _this6;
617
660
  _t18 = _constants.HTTP_VERBS.GET;
618
661
  _t19 = "".concat(_this6.webcastInstanceUrl, "/layout");
619
- _context6.next = 1;
662
+ _context7.next = 1;
620
663
  return _this6.webex.credentials.getUserToken();
621
664
  case 1:
622
- _t20 = _context6.sent;
665
+ _t20 = _context7.sent;
623
666
  _t21 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
624
667
  _t22 = {
625
668
  authorization: _t20,
626
669
  trackingId: _t21
627
670
  };
628
- return _context6.abrupt("return", _t17.request.call(_t17, {
671
+ return _context7.abrupt("return", _t17.request.call(_t17, {
629
672
  method: _t18,
630
673
  uri: _t19,
631
674
  headers: _t22
@@ -635,9 +678,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
635
678
  }));
636
679
  case 2:
637
680
  case "end":
638
- return _context6.stop();
681
+ return _context7.stop();
639
682
  }
640
- }, _callee6);
683
+ }, _callee7);
641
684
  }))();
642
685
  },
643
686
  /**
@@ -647,19 +690,19 @@ var Webinar = _webexCore.WebexPlugin.extend({
647
690
  */
648
691
  updateWebcastLayout: function updateWebcastLayout(layout) {
649
692
  var _this7 = this;
650
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
693
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
651
694
  var _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30;
652
- return _regenerator.default.wrap(function (_context7) {
653
- while (1) switch (_context7.prev = _context7.next) {
695
+ return _regenerator.default.wrap(function (_context8) {
696
+ while (1) switch (_context8.prev = _context8.next) {
654
697
  case 0:
655
698
  _t23 = _this7;
656
699
  _t24 = _constants.HTTP_VERBS.PUT;
657
700
  _t25 = "".concat(_this7.webcastInstanceUrl, "/layout");
658
701
  _t26 = _defineProperty2.default;
659
- _context7.next = 1;
702
+ _context8.next = 1;
660
703
  return _this7.webex.credentials.getUserToken();
661
704
  case 1:
662
- _t27 = _context7.sent;
705
+ _t27 = _context8.sent;
663
706
  _t28 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
664
707
  _t29 = _t26({
665
708
  authorization: _t27,
@@ -671,7 +714,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
671
714
  syncStageLayout: layout.syncStageLayout,
672
715
  syncStageInMeeting: layout.syncStageInMeeting
673
716
  };
674
- return _context7.abrupt("return", _t23.request.call(_t23, {
717
+ return _context8.abrupt("return", _t23.request.call(_t23, {
675
718
  method: _t24,
676
719
  uri: _t25,
677
720
  headers: _t29,
@@ -682,9 +725,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
682
725
  }));
683
726
  case 2:
684
727
  case "end":
685
- return _context7.stop();
728
+ return _context8.stop();
686
729
  }
687
- }, _callee7);
730
+ }, _callee8);
688
731
  }))();
689
732
  },
690
733
  /**
@@ -693,24 +736,24 @@ var Webinar = _webexCore.WebexPlugin.extend({
693
736
  */
694
737
  viewAllWebcastAttendees: function viewAllWebcastAttendees() {
695
738
  var _this8 = this;
696
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
739
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
697
740
  var _t31, _t32, _t33, _t34, _t35, _t36;
698
- return _regenerator.default.wrap(function (_context8) {
699
- while (1) switch (_context8.prev = _context8.next) {
741
+ return _regenerator.default.wrap(function (_context9) {
742
+ while (1) switch (_context9.prev = _context9.next) {
700
743
  case 0:
701
744
  _t31 = _this8;
702
745
  _t32 = _constants.HTTP_VERBS.GET;
703
746
  _t33 = "".concat(_this8.webcastInstanceUrl, "/attendees");
704
- _context8.next = 1;
747
+ _context9.next = 1;
705
748
  return _this8.webex.credentials.getUserToken();
706
749
  case 1:
707
- _t34 = _context8.sent;
750
+ _t34 = _context9.sent;
708
751
  _t35 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
709
752
  _t36 = {
710
753
  authorization: _t34,
711
754
  trackingId: _t35
712
755
  };
713
- return _context8.abrupt("return", _t31.request.call(_t31, {
756
+ return _context9.abrupt("return", _t31.request.call(_t31, {
714
757
  method: _t32,
715
758
  uri: _t33,
716
759
  headers: _t36
@@ -720,9 +763,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
720
763
  }));
721
764
  case 2:
722
765
  case "end":
723
- return _context8.stop();
766
+ return _context9.stop();
724
767
  }
725
- }, _callee8);
768
+ }, _callee9);
726
769
  }))();
727
770
  },
728
771
  /**
@@ -733,25 +776,25 @@ var Webinar = _webexCore.WebexPlugin.extend({
733
776
  searchWebcastAttendees: function searchWebcastAttendees() {
734
777
  var _arguments = arguments,
735
778
  _this9 = this;
736
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
779
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
737
780
  var queryString, _t37, _t38, _t39, _t40, _t41, _t42;
738
- return _regenerator.default.wrap(function (_context9) {
739
- while (1) switch (_context9.prev = _context9.next) {
781
+ return _regenerator.default.wrap(function (_context0) {
782
+ while (1) switch (_context0.prev = _context0.next) {
740
783
  case 0:
741
784
  queryString = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : '';
742
785
  _t37 = _this9;
743
786
  _t38 = _constants.HTTP_VERBS.GET;
744
787
  _t39 = "".concat(_this9.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
745
- _context9.next = 1;
788
+ _context0.next = 1;
746
789
  return _this9.webex.credentials.getUserToken();
747
790
  case 1:
748
- _t40 = _context9.sent;
791
+ _t40 = _context0.sent;
749
792
  _t41 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
750
793
  _t42 = {
751
794
  authorization: _t40,
752
795
  trackingId: _t41
753
796
  };
754
- return _context9.abrupt("return", _t37.request.call(_t37, {
797
+ return _context0.abrupt("return", _t37.request.call(_t37, {
755
798
  method: _t38,
756
799
  uri: _t39,
757
800
  headers: _t42
@@ -761,9 +804,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
761
804
  }));
762
805
  case 2:
763
806
  case "end":
764
- return _context9.stop();
807
+ return _context0.stop();
765
808
  }
766
- }, _callee9);
809
+ }, _callee0);
767
810
  }))();
768
811
  },
769
812
  /**
@@ -773,24 +816,24 @@ var Webinar = _webexCore.WebexPlugin.extend({
773
816
  */
774
817
  expelWebcastAttendee: function expelWebcastAttendee(participantId) {
775
818
  var _this0 = this;
776
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
819
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
777
820
  var _t43, _t44, _t45, _t46, _t47, _t48;
778
- return _regenerator.default.wrap(function (_context0) {
779
- while (1) switch (_context0.prev = _context0.next) {
821
+ return _regenerator.default.wrap(function (_context1) {
822
+ while (1) switch (_context1.prev = _context1.next) {
780
823
  case 0:
781
824
  _t43 = _this0;
782
825
  _t44 = _constants.HTTP_VERBS.DELETE;
783
826
  _t45 = "".concat(_this0.webcastInstanceUrl, "/attendees/").concat(participantId);
784
- _context0.next = 1;
827
+ _context1.next = 1;
785
828
  return _this0.webex.credentials.getUserToken();
786
829
  case 1:
787
- _t46 = _context0.sent;
830
+ _t46 = _context1.sent;
788
831
  _t47 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
789
832
  _t48 = {
790
833
  authorization: _t46,
791
834
  trackingId: _t47
792
835
  };
793
- return _context0.abrupt("return", _t43.request.call(_t43, {
836
+ return _context1.abrupt("return", _t43.request.call(_t43, {
794
837
  method: _t44,
795
838
  uri: _t45,
796
839
  headers: _t48
@@ -800,9 +843,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
800
843
  }));
801
844
  case 2:
802
845
  case "end":
803
- return _context0.stop();
846
+ return _context1.stop();
804
847
  }
805
- }, _callee0);
848
+ }, _callee1);
806
849
  }))();
807
850
  },
808
851
  /**
@@ -815,15 +858,15 @@ var Webinar = _webexCore.WebexPlugin.extend({
815
858
  */
816
859
  searchLargeScaleWebinarAttendees: function searchLargeScaleWebinarAttendees(payload) {
817
860
  var _this1 = this;
818
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
861
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
819
862
  var _payload$limit, _meeting$locusInfo3, _meeting$locusInfo3$l, _meeting$locusInfo3$l2, _meeting$locusInfo3$l3;
820
863
  var meeting, rawParams, attendeeSearchUrl, _t49, _t50, _t51, _t52, _t53, _t54;
821
- return _regenerator.default.wrap(function (_context1) {
822
- while (1) switch (_context1.prev = _context1.next) {
864
+ return _regenerator.default.wrap(function (_context10) {
865
+ while (1) switch (_context10.prev = _context10.next) {
823
866
  case 0:
824
867
  meeting = _this1.getValidatedWebinarMeeting();
825
868
  if (meeting) {
826
- _context1.next = 1;
869
+ _context10.next = 1;
827
870
  break;
828
871
  }
829
872
  _loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> webinar meeting could not be validated');
@@ -836,7 +879,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
836
879
  };
837
880
  attendeeSearchUrl = meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo3 = meeting.locusInfo) === null || _meeting$locusInfo3 === void 0 ? void 0 : (_meeting$locusInfo3$l = _meeting$locusInfo3.links) === null || _meeting$locusInfo3$l === void 0 ? void 0 : (_meeting$locusInfo3$l2 = _meeting$locusInfo3$l.resources) === null || _meeting$locusInfo3$l2 === void 0 ? void 0 : (_meeting$locusInfo3$l3 = _meeting$locusInfo3$l2.attendeeSearch) === null || _meeting$locusInfo3$l3 === void 0 ? void 0 : _meeting$locusInfo3$l3.url;
838
881
  if (attendeeSearchUrl) {
839
- _context1.next = 2;
882
+ _context10.next = 2;
840
883
  break;
841
884
  }
842
885
  _loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> attendee search url unavailable');
@@ -845,16 +888,16 @@ var Webinar = _webexCore.WebexPlugin.extend({
845
888
  _t49 = _this1;
846
889
  _t50 = _constants.HTTP_VERBS.GET;
847
890
  _t51 = "".concat(attendeeSearchUrl, "?").concat(new URLSearchParams((0, _utils.sanitizeParams)(rawParams)).toString());
848
- _context1.next = 3;
891
+ _context10.next = 3;
849
892
  return _this1.webex.credentials.getUserToken();
850
893
  case 3:
851
- _t52 = _context1.sent;
894
+ _t52 = _context10.sent;
852
895
  _t53 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
853
896
  _t54 = {
854
897
  authorization: _t52,
855
898
  trackingId: _t53
856
899
  };
857
- return _context1.abrupt("return", _t49.request.call(_t49, {
900
+ return _context10.abrupt("return", _t49.request.call(_t49, {
858
901
  method: _t50,
859
902
  uri: _t51,
860
903
  headers: _t54
@@ -864,12 +907,12 @@ var Webinar = _webexCore.WebexPlugin.extend({
864
907
  }));
865
908
  case 4:
866
909
  case "end":
867
- return _context1.stop();
910
+ return _context10.stop();
868
911
  }
869
- }, _callee1);
912
+ }, _callee10);
870
913
  }))();
871
914
  },
872
- version: "3.12.0-webex-services-ready.4"
915
+ version: "3.13.0"
873
916
  });
874
917
  var _default = exports.default = Webinar;
875
918
  //# sourceMappingURL=index.js.map