@webex/plugin-meetings 3.12.0-next.19 → 3.12.0-next.191

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 (312) 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 +135 -0
  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 +15 -2
  43. package/dist/aiEnableRequest/index.js.map +1 -1
  44. package/dist/annotation/index.js +55 -19
  45. package/dist/annotation/index.js.map +1 -1
  46. package/dist/assets/e2ee-0.0.1.js +2 -0
  47. package/dist/assets/e2ee-0.0.1.wasm +0 -0
  48. package/dist/breakouts/breakout.js +8 -3
  49. package/dist/breakouts/breakout.js.map +1 -1
  50. package/dist/breakouts/events.js +29 -14
  51. package/dist/breakouts/events.js.map +1 -1
  52. package/dist/breakouts/index.js +128 -7
  53. package/dist/breakouts/index.js.map +1 -1
  54. package/dist/common/errors/webex-errors.js +54 -5
  55. package/dist/common/errors/webex-errors.js.map +1 -1
  56. package/dist/config.js +3 -2
  57. package/dist/config.js.map +1 -1
  58. package/dist/constants.js +39 -11
  59. package/dist/constants.js.map +1 -1
  60. package/dist/controls-options-manager/index.js +46 -10
  61. package/dist/controls-options-manager/index.js.map +1 -1
  62. package/dist/hashTree/constants.js +4 -1
  63. package/dist/hashTree/constants.js.map +1 -1
  64. package/dist/hashTree/hashTreeParser.js +1096 -391
  65. package/dist/hashTree/hashTreeParser.js.map +1 -1
  66. package/dist/hashTree/utils.js +20 -0
  67. package/dist/hashTree/utils.js.map +1 -1
  68. package/dist/index.js +8 -0
  69. package/dist/index.js.map +1 -1
  70. package/dist/interceptors/dataChannelAuthToken.js +58 -16
  71. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  72. package/dist/interceptors/locusRetry.js +24 -9
  73. package/dist/interceptors/locusRetry.js.map +1 -1
  74. package/dist/interpretation/index.js +55 -12
  75. package/dist/interpretation/index.js.map +1 -1
  76. package/dist/interpretation/interpretation.types.js +7 -0
  77. package/dist/interpretation/interpretation.types.js.map +1 -0
  78. package/dist/interpretation/siLanguage.js +1 -1
  79. package/dist/locus-info/controlsUtils.js +4 -1
  80. package/dist/locus-info/controlsUtils.js.map +1 -1
  81. package/dist/locus-info/index.js +615 -176
  82. package/dist/locus-info/index.js.map +1 -1
  83. package/dist/locus-info/infoUtils.js +36 -5
  84. package/dist/locus-info/infoUtils.js.map +1 -1
  85. package/dist/locus-info/types.js +20 -0
  86. package/dist/locus-info/types.js.map +1 -1
  87. package/dist/media/MediaConnectionAwaiter.js +229 -166
  88. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  89. package/dist/media/index.js +8 -2
  90. package/dist/media/index.js.map +1 -1
  91. package/dist/media/properties.js +4 -5
  92. package/dist/media/properties.js.map +1 -1
  93. package/dist/meeting/in-meeting-actions.js +5 -1
  94. package/dist/meeting/in-meeting-actions.js.map +1 -1
  95. package/dist/meeting/index.js +1850 -961
  96. package/dist/meeting/index.js.map +1 -1
  97. package/dist/meeting/locusMediaRequest.js +229 -82
  98. package/dist/meeting/locusMediaRequest.js.map +1 -1
  99. package/dist/meeting/muteState.js +10 -1
  100. package/dist/meeting/muteState.js.map +1 -1
  101. package/dist/meeting/request.js +5 -2
  102. package/dist/meeting/request.js.map +1 -1
  103. package/dist/meeting/util.js +42 -4
  104. package/dist/meeting/util.js.map +1 -1
  105. package/dist/meeting/voicea-meeting.js +2 -1
  106. package/dist/meeting/voicea-meeting.js.map +1 -1
  107. package/dist/meeting-info/meeting-info-v2.js +12 -5
  108. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  109. package/dist/meetings/index.js +304 -129
  110. package/dist/meetings/index.js.map +1 -1
  111. package/dist/meetings/meetings.types.js +6 -1
  112. package/dist/meetings/meetings.types.js.map +1 -1
  113. package/dist/meetings/request.js +39 -0
  114. package/dist/meetings/request.js.map +1 -1
  115. package/dist/meetings/util.js +116 -18
  116. package/dist/meetings/util.js.map +1 -1
  117. package/dist/member/index.js +10 -0
  118. package/dist/member/index.js.map +1 -1
  119. package/dist/member/types.js.map +1 -1
  120. package/dist/member/util.js +30 -0
  121. package/dist/member/util.js.map +1 -1
  122. package/dist/members/index.js +101 -43
  123. package/dist/members/index.js.map +1 -1
  124. package/dist/members/util.js +8 -1
  125. package/dist/members/util.js.map +1 -1
  126. package/dist/metrics/constants.js +7 -1
  127. package/dist/metrics/constants.js.map +1 -1
  128. package/dist/multistream/codec/constants.js +63 -0
  129. package/dist/multistream/codec/constants.js.map +1 -0
  130. package/dist/multistream/mediaRequestManager.js +62 -15
  131. package/dist/multistream/mediaRequestManager.js.map +1 -1
  132. package/dist/multistream/receiveSlot.js +9 -0
  133. package/dist/multistream/receiveSlot.js.map +1 -1
  134. package/dist/multistream/remoteMediaManager.js +32 -4
  135. package/dist/multistream/remoteMediaManager.js.map +1 -1
  136. package/dist/multistream/sendSlotManager.js +11 -1
  137. package/dist/multistream/sendSlotManager.js.map +1 -1
  138. package/dist/reachability/clusterReachability.js.map +1 -1
  139. package/dist/reachability/index.js +121 -83
  140. package/dist/reachability/index.js.map +1 -1
  141. package/dist/reachability/reachability.types.js +2 -0
  142. package/dist/reachability/reachability.types.js.map +1 -1
  143. package/dist/reachability/util.js +45 -0
  144. package/dist/reachability/util.js.map +1 -1
  145. package/dist/reactions/reactions.type.js.map +1 -1
  146. package/dist/recording-controller/index.js +1 -3
  147. package/dist/recording-controller/index.js.map +1 -1
  148. package/dist/roap/turnDiscovery.js +8 -1
  149. package/dist/roap/turnDiscovery.js.map +1 -1
  150. package/dist/types/annotation/index.d.ts +19 -0
  151. package/dist/types/common/errors/webex-errors.d.ts +36 -2
  152. package/dist/types/config.d.ts +3 -2
  153. package/dist/types/constants.d.ts +15 -2
  154. package/dist/types/controls-options-manager/index.d.ts +16 -0
  155. package/dist/types/hashTree/constants.d.ts +1 -0
  156. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  157. package/dist/types/hashTree/utils.d.ts +7 -0
  158. package/dist/types/index.d.ts +4 -0
  159. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  160. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  161. package/dist/types/locus-info/index.d.ts +106 -8
  162. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  163. package/dist/types/locus-info/types.d.ts +22 -1
  164. package/dist/types/media/MediaConnectionAwaiter.d.ts +66 -49
  165. package/dist/types/media/properties.d.ts +6 -2
  166. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  167. package/dist/types/meeting/index.d.ts +217 -16
  168. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  169. package/dist/types/meeting/request.d.ts +1 -0
  170. package/dist/types/meeting/util.d.ts +12 -1
  171. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  172. package/dist/types/meetings/index.d.ts +40 -19
  173. package/dist/types/meetings/meetings.types.d.ts +15 -0
  174. package/dist/types/meetings/request.d.ts +14 -0
  175. package/dist/types/member/index.d.ts +1 -0
  176. package/dist/types/member/types.d.ts +1 -0
  177. package/dist/types/member/util.d.ts +9 -0
  178. package/dist/types/members/index.d.ts +15 -2
  179. package/dist/types/members/util.d.ts +1 -5
  180. package/dist/types/metrics/constants.d.ts +6 -0
  181. package/dist/types/multistream/codec/constants.d.ts +7 -0
  182. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  183. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  184. package/dist/types/multistream/sendSlotManager.d.ts +5 -1
  185. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  186. package/dist/types/reachability/index.d.ts +10 -3
  187. package/dist/types/reachability/reachability.types.d.ts +7 -0
  188. package/dist/types/reachability/util.d.ts +17 -0
  189. package/dist/types/reactions/reactions.type.d.ts +3 -0
  190. package/dist/webinar/index.js +441 -252
  191. package/dist/webinar/index.js.map +1 -1
  192. package/package.json +26 -24
  193. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  194. package/src/aiEnableRequest/index.ts +16 -0
  195. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  196. package/src/annotation/index.ts +61 -29
  197. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  198. package/src/breakouts/breakout.ts +3 -1
  199. package/src/breakouts/events.ts +33 -11
  200. package/src/breakouts/index.ts +145 -3
  201. package/src/common/errors/webex-errors.ts +56 -3
  202. package/src/config.ts +7 -3
  203. package/src/constants.ts +23 -4
  204. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  205. package/src/controls-options-manager/index.ts +62 -10
  206. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  207. package/src/hashTree/constants.ts +7 -0
  208. package/src/hashTree/hashTreeParser.ts +861 -193
  209. package/src/hashTree/utils.ts +19 -0
  210. package/src/index.ts +7 -0
  211. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  212. package/src/interceptors/dataChannelAuthToken.ts +59 -12
  213. package/src/interceptors/locusRetry.ts +26 -5
  214. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  215. package/src/interpretation/index.ts +65 -10
  216. package/src/interpretation/interpretation.types.ts +11 -0
  217. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  218. package/src/locus-info/controlsUtils.ts +3 -1
  219. package/src/locus-info/index.ts +566 -164
  220. package/src/locus-info/infoUtils.ts +41 -6
  221. package/src/locus-info/types.ts +26 -1
  222. package/src/media/MediaConnectionAwaiter.ts +229 -196
  223. package/src/media/ai-docs/media-spec.md +267 -0
  224. package/src/media/index.ts +10 -1
  225. package/src/media/properties.ts +8 -3
  226. package/src/meeting/ai-docs/meeting-spec.md +404 -0
  227. package/src/meeting/in-meeting-actions.ts +8 -0
  228. package/src/meeting/index.ts +1093 -251
  229. package/src/meeting/locusMediaRequest.ts +106 -6
  230. package/src/meeting/muteState.ts +10 -1
  231. package/src/meeting/request.ts +11 -0
  232. package/src/meeting/util.ts +53 -9
  233. package/src/meeting/voicea-meeting.ts +1 -1
  234. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  235. package/src/meeting-info/meeting-info-v2.ts +11 -4
  236. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  237. package/src/meetings/index.ts +202 -81
  238. package/src/meetings/meetings.types.ts +19 -0
  239. package/src/meetings/request.ts +43 -0
  240. package/src/meetings/util.ts +117 -4
  241. package/src/member/ai-docs/member-spec.md +196 -0
  242. package/src/member/index.ts +10 -0
  243. package/src/member/types.ts +1 -0
  244. package/src/member/util.ts +29 -0
  245. package/src/members/ai-docs/members-spec.md +256 -0
  246. package/src/members/index.ts +70 -7
  247. package/src/members/util.ts +12 -4
  248. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  249. package/src/metrics/constants.ts +6 -0
  250. package/src/multistream/ai-docs/multistream-spec.md +295 -0
  251. package/src/multistream/codec/constants.ts +58 -0
  252. package/src/multistream/mediaRequestManager.ts +119 -28
  253. package/src/multistream/receiveSlot.ts +18 -0
  254. package/src/multistream/remoteMediaManager.ts +23 -1
  255. package/src/multistream/sendSlotManager.ts +15 -1
  256. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  257. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  258. package/src/reachability/clusterReachability.ts +3 -2
  259. package/src/reachability/index.ts +47 -16
  260. package/src/reachability/reachability.types.ts +11 -0
  261. package/src/reachability/util.ts +36 -0
  262. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  263. package/src/reactions/reactions.type.ts +3 -0
  264. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  265. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  266. package/src/recording-controller/index.ts +1 -2
  267. package/src/roap/ai-docs/roap-spec.md +241 -0
  268. package/src/roap/turnDiscovery.ts +9 -1
  269. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  270. package/src/webinar/index.ts +247 -89
  271. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  272. package/test/unit/spec/annotation/index.ts +214 -182
  273. package/test/unit/spec/breakouts/breakout.ts +9 -3
  274. package/test/unit/spec/breakouts/events.ts +120 -2
  275. package/test/unit/spec/breakouts/index.ts +336 -15
  276. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  277. package/test/unit/spec/controls-options-manager/index.js +139 -32
  278. package/test/unit/spec/hashTree/hashTreeParser.ts +2360 -239
  279. package/test/unit/spec/hashTree/utils.ts +37 -0
  280. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +179 -1
  281. package/test/unit/spec/interceptors/locusRetry.ts +234 -5
  282. package/test/unit/spec/interpretation/index.ts +119 -4
  283. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  284. package/test/unit/spec/locus-info/index.js +1014 -58
  285. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  286. package/test/unit/spec/media/MediaConnectionAwaiter.ts +479 -17
  287. package/test/unit/spec/media/index.ts +92 -0
  288. package/test/unit/spec/media/properties.ts +26 -26
  289. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  290. package/test/unit/spec/meeting/index.js +3601 -536
  291. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  292. package/test/unit/spec/meeting/muteState.js +81 -0
  293. package/test/unit/spec/meeting/request.js +12 -0
  294. package/test/unit/spec/meeting/utils.js +205 -19
  295. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  296. package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
  297. package/test/unit/spec/meetings/index.js +549 -49
  298. package/test/unit/spec/meetings/request.js +141 -0
  299. package/test/unit/spec/meetings/utils.js +402 -51
  300. package/test/unit/spec/member/index.js +7 -0
  301. package/test/unit/spec/member/util.js +89 -0
  302. package/test/unit/spec/members/index.js +216 -0
  303. package/test/unit/spec/members/request.js +37 -1
  304. package/test/unit/spec/members/utils.js +63 -0
  305. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  306. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  307. package/test/unit/spec/multistream/sendSlotManager.ts +30 -2
  308. package/test/unit/spec/reachability/index.ts +128 -46
  309. package/test/unit/spec/reachability/util.ts +31 -0
  310. package/test/unit/spec/recording-controller/index.js +9 -8
  311. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  312. package/test/unit/spec/webinar/index.ts +935 -466
@@ -13,10 +13,10 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/
13
13
  var _webexCore = require("@webex/webex-core");
14
14
  var _uuid = _interopRequireDefault(require("uuid"));
15
15
  var _lodash = require("lodash");
16
- var _internalPluginLlm = require("@webex/internal-plugin-llm");
17
16
  var _constants = require("../constants");
18
17
  var _collection = _interopRequireDefault(require("./collection"));
19
18
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
19
+ var _util = _interopRequireDefault(require("../meeting/util"));
20
20
  var _utils = require("./utils");
21
21
  /*!
22
22
  * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.
@@ -45,6 +45,19 @@ var Webinar = _webexCore.WebexPlugin.extend({
45
45
  // practice session enabled
46
46
  meetingId: 'string'
47
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,
48
61
  /**
49
62
  * Calls this to clean up listeners
50
63
  * @returns {void}
@@ -100,6 +113,31 @@ var Webinar = _webexCore.WebexPlugin.extend({
100
113
  isDemoted: isDemoted
101
114
  };
102
115
  },
116
+ /**
117
+ * Resolves the meeting associated with this webinar instance, guarded against the
118
+ * meetingId pointer drifting onto an unrelated transient meeting (e.g. an inbound
119
+ * 1:1 call) that may exist in the meeting collection. Returns the meeting only when
120
+ * its locusUrl matches this webinar's tracked locusUrl. Returns undefined (with a
121
+ * warning) when the meeting cannot be resolved or when the webinar's locusUrl has
122
+ * not been initialized yet — callers must treat this as "no owned meeting" rather
123
+ * than fall through to an unvalidated lookup.
124
+ * @returns {object|undefined}
125
+ */
126
+ getValidatedWebinarMeeting: function getValidatedWebinarMeeting() {
127
+ var meeting = this.webex.meetings.getMeetingByType(_constants._ID_, this.meetingId);
128
+ if (!meeting) {
129
+ return undefined;
130
+ }
131
+ if (!this.locusUrl) {
132
+ _loggerProxy.default.logger.warn("Webinar:index#getValidatedWebinarMeeting --> skipping; webinar locusUrl is not yet initialized for meetingId ".concat(this.meetingId));
133
+ return undefined;
134
+ }
135
+ if (meeting.locusUrl !== this.locusUrl) {
136
+ _loggerProxy.default.logger.warn("Webinar:index#getValidatedWebinarMeeting --> skipping; meeting ".concat(this.meetingId, " locusUrl ").concat(meeting.locusUrl, " does not match webinar locusUrl ").concat(this.locusUrl));
137
+ return undefined;
138
+ }
139
+ return meeting;
140
+ },
103
141
  /**
104
142
  * should join practice session data channel or not
105
143
  * @param {Object} {isPromoted: boolean, isDemoted: boolean}} Role transition states
@@ -108,7 +146,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
108
146
  updateStatusByRole: function updateStatusByRole(_ref) {
109
147
  var isPromoted = _ref.isPromoted,
110
148
  isDemoted = _ref.isDemoted;
111
- var meeting = this.webex.meetings.getMeetingByType(_constants._ID_, this.meetingId);
149
+ var meeting = this.getValidatedWebinarMeeting();
112
150
  if (isDemoted && (meeting === null || meeting === void 0 ? void 0 : meeting.shareStatus) === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE || isPromoted) {
113
151
  var _meeting$locusInfo, _meeting$locusInfo2;
114
152
  // attendees in webinar should subscribe streaming for whiteboard sharing
@@ -125,46 +163,133 @@ var Webinar = _webexCore.WebexPlugin.extend({
125
163
  return this.selfIsPanelist && this.practiceSessionEnabled;
126
164
  },
127
165
  /**
128
- * Disconnects the practice session data channel and removes its relay listener.
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.
129
200
  * @returns {Promise<void>}
130
201
  */
131
202
  cleanupPSDataChannel: function cleanupPSDataChannel() {
132
203
  var _this = this;
133
204
  return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
134
- var meeting;
205
+ var _meeting$llmChannel, _meeting, meeting, _this$_practiceSessio5, _this$_practiceSessio6, _this$_practiceSessio7, _t;
135
206
  return _regenerator.default.wrap(function (_context) {
136
207
  while (1) switch (_context.prev = _context.next) {
137
208
  case 0:
209
+ // Remove pending online listener if any
138
210
  if (_this._pendingOnlineListener) {
139
- // @ts-ignore - Fix type
140
- _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);
141
213
  _this._pendingOnlineListener = null;
142
214
  }
143
- meeting = _this.webex.meetings.getMeetingByType(_constants._ID_, _this.meetingId); // @ts-ignore - Fix type
215
+ meeting = _this.getValidatedWebinarMeeting();
216
+ if (_this._practiceSessionLLMChannel) {
217
+ _context.next = 3;
218
+ break;
219
+ }
220
+ if (!(meeting !== null && meeting !== void 0 && meeting.voiceaChannel && meeting !== null && meeting !== void 0 && meeting.llmChannel)) {
221
+ _context.next = 2;
222
+ break;
223
+ }
144
224
  _context.next = 1;
145
- return _this.webex.internal.llm.disconnectLLM({
146
- code: 3050,
147
- reason: 'done (permanent)'
148
- }, _constants.LLM_PRACTICE_SESSION);
225
+ return meeting.voiceaChannel.switchLLMChannel(meeting.llmChannel);
149
226
  case 1:
150
- // @ts-ignore - Fix type
151
- _this.webex.internal.llm.off("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
227
+ meeting.startTranscriptionIfNeeded();
152
228
  case 2:
229
+ return _context.abrupt("return");
230
+ case 3:
231
+ _context.prev = 3;
232
+ _context.next = 4;
233
+ return _this._practiceSessionLLMChannel.disconnect({
234
+ code: 3050,
235
+ reason: 'done (permanent)'
236
+ });
237
+ case 4:
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);
256
+ }
257
+ }
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:
153
275
  case "end":
154
276
  return _context.stop();
155
277
  }
156
- }, _callee);
278
+ }, _callee, null, [[3, 5, 6, 9]]);
157
279
  }))();
158
280
  },
159
281
  /**
160
282
  * Ensures practice-session token exists before registering the practice LLM channel.
283
+ * Caller is responsible for passing a meeting that has already been resolved via
284
+ * getValidatedWebinarMeeting() — this method does not re-validate ownership.
161
285
  * @param {object} meeting
162
286
  * @returns {Promise<string|undefined>}
163
287
  */
164
288
  ensurePracticeSessionDatachannelToken: function ensurePracticeSessionDatachannelToken(meeting) {
165
289
  var _this2 = this;
166
290
  return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
167
- var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, dataChannelTokenType, _t;
291
+ var _this2$_practiceSessi, _this2$_practiceSessi2;
292
+ var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, _t2;
168
293
  return _regenerator.default.wrap(function (_context2) {
169
294
  while (1) switch (_context2.prev = _context2.next) {
170
295
  case 0:
@@ -178,8 +303,8 @@ var Webinar = _webexCore.WebexPlugin.extend({
178
303
  }
179
304
  return _context2.abrupt("return", undefined);
180
305
  case 2:
181
- // @ts-ignore
182
- cachedToken = _this2.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.PracticeSession);
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;
183
308
  if (!cachedToken) {
184
309
  _context2.next = 3;
185
310
  break;
@@ -191,20 +316,24 @@ var Webinar = _webexCore.WebexPlugin.extend({
191
316
  return meeting.refreshDataChannelToken();
192
317
  case 4:
193
318
  refreshResponse = _context2.sent;
194
- _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;
195
320
  if (datachannelToken) {
196
321
  _context2.next = 5;
197
322
  break;
198
323
  }
199
324
  return _context2.abrupt("return", undefined);
200
325
  case 5:
201
- // @ts-ignore
202
- _this2.webex.internal.llm.setDatachannelToken(datachannelToken, dataChannelTokenType || _internalPluginLlm.DataChannelTokenType.PracticeSession);
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
+ }
203
332
  return _context2.abrupt("return", datachannelToken);
204
333
  case 6:
205
334
  _context2.prev = 6;
206
- _t = _context2["catch"](3);
207
- _loggerProxy.default.logger.warn("Webinar:index#ensurePracticeSessionDatachannelToken --> failed to proactively refresh practice-session token: ".concat((_t === null || _t === void 0 ? void 0 : _t.message) || String(_t)));
335
+ _t2 = _context2["catch"](3);
336
+ _loggerProxy.default.logger.warn("Webinar:index#ensurePracticeSessionDatachannelToken --> failed to proactively refresh practice-session token: ".concat((_t2 === null || _t2 === void 0 ? void 0 : _t2.message) || String(_t2)));
208
337
  return _context2.abrupt("return", undefined);
209
338
  case 7:
210
339
  case "end":
@@ -214,125 +343,174 @@ var Webinar = _webexCore.WebexPlugin.extend({
214
343
  }))();
215
344
  },
216
345
  /**
217
- * Connects to low latency mercury and reconnects if the address has changed
218
- * 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.
219
349
  * @returns {Promise}
220
350
  */
221
351
  updatePSDataChannel: function updatePSDataChannel() {
222
352
  var _this3 = this;
223
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
224
- var invocationSequence, meeting, isPracticeSession, _ref3, _ref3$url, url, _ref3$info, _ref3$info2, _ref3$info2$practiceS, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, isCaptionBoxOn, _onDefaultSessionConnected, refreshedPracticeSessionToken, latestPracticeSessionDatachannelUrl, isStillPracticeSession;
225
- return _regenerator.default.wrap(function (_context3) {
226
- 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) {
227
358
  case 0:
228
359
  _this3._updatePSDataChannelSequence = (_this3._updatePSDataChannelSequence || 0) + 1;
229
360
  invocationSequence = _this3._updatePSDataChannelSequence;
230
- meeting = _this3.webex.meetings.getMeetingByType(_constants._ID_, _this3.meetingId);
361
+ meeting = _this3.getValidatedWebinarMeeting();
231
362
  isPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel();
232
363
  if (isPracticeSession) {
233
- _context3.next = 2;
364
+ _context4.next = 2;
234
365
  break;
235
366
  }
236
- _context3.next = 1;
367
+ _context4.next = 1;
237
368
  return _this3.cleanupPSDataChannel();
238
369
  case 1:
239
- return _context3.abrupt("return", undefined);
370
+ return _context4.abrupt("return", undefined);
240
371
  case 2:
241
372
  // @ts-ignore - Fix type
242
- _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
243
- practiceSessionDatachannelToken = _this3.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.PracticeSession);
244
- isCaptionBoxOn = _this3.webex.internal.voicea.getIsCaptionBoxOn();
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;
245
374
  if (practiceSessionDatachannelUrl) {
246
- _context3.next = 3;
375
+ _context4.next = 3;
247
376
  break;
248
377
  }
249
- return _context3.abrupt("return", undefined);
378
+ return _context4.abrupt("return", undefined);
250
379
  case 3:
251
- if (!_this3.webex.internal.llm.isConnected(_constants.LLM_PRACTICE_SESSION)) {
252
- _context3.next = 5;
380
+ if (!((_this3$_practiceSessi = _this3._practiceSessionLLMChannel) !== null && _this3$_practiceSessi !== void 0 && _this3$_practiceSessi.isConnected())) {
381
+ _context4.next = 5;
253
382
  break;
254
383
  }
255
- if (!(
256
- // @ts-ignore - Fix type
257
- url === _this3.webex.internal.llm.getLocusUrl(_constants.LLM_PRACTICE_SESSION) &&
258
- // @ts-ignore - Fix type
259
- practiceSessionDatachannelUrl === _this3.webex.internal.llm.getDatachannelUrl(_constants.LLM_PRACTICE_SESSION))) {
260
- _context3.next = 4;
384
+ if (!(url === _this3._practiceSessionLLMChannel.getLocusUrl() && practiceSessionDatachannelUrl === _this3._practiceSessionLLMChannel.getDatachannelUrl())) {
385
+ _context4.next = 4;
261
386
  break;
262
387
  }
263
- return _context3.abrupt("return", undefined);
388
+ return _context4.abrupt("return", undefined);
264
389
  case 4:
265
- _context3.next = 5;
390
+ _context4.next = 5;
266
391
  return _this3.cleanupPSDataChannel();
267
392
  case 5:
268
- // Ensure the default session data channel is connected before connecting the practice session.
393
+ // Ensure the default session LLM channel is connected before connecting the practice session.
269
394
  // Subscribe before checking isConnected() to avoid a race where the 'online' event fires
270
- // between the check and the subscription — Mercury does not replay missed events.
271
- 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) {
272
397
  _onDefaultSessionConnected = function onDefaultSessionConnected() {
398
+ var _meeting$llmChannel2;
273
399
  _this3._pendingOnlineListener = null;
274
- // @ts-ignore - Fix type
275
- _this3.webex.internal.llm.off('online', _onDefaultSessionConnected);
400
+ (_meeting$llmChannel2 = meeting.llmChannel) === null || _meeting$llmChannel2 === void 0 ? void 0 : _meeting$llmChannel2.off('online', _onDefaultSessionConnected);
276
401
  _this3.updatePSDataChannel();
277
402
  };
278
403
  _this3._pendingOnlineListener = _onDefaultSessionConnected;
279
- // @ts-ignore - Fix type
280
- _this3.webex.internal.llm.on('online', _onDefaultSessionConnected);
404
+ meeting.llmChannel.on('online', _onDefaultSessionConnected);
281
405
  }
282
-
283
- // @ts-ignore - Fix type
284
- if (_this3.webex.internal.llm.isConnected()) {
285
- _context3.next = 6;
406
+ if (meeting !== null && meeting !== void 0 && (_meeting$llmChannel3 = meeting.llmChannel) !== null && _meeting$llmChannel3 !== void 0 && _meeting$llmChannel3.isConnected()) {
407
+ _context4.next = 6;
286
408
  break;
287
409
  }
288
410
  _loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> default session not yet connected, deferring practice session connect.');
289
- return _context3.abrupt("return", undefined);
411
+ return _context4.abrupt("return", undefined);
290
412
  case 6:
291
413
  // Default session is already connected — cancel the pending listener and proceed
292
414
  if (_this3._pendingOnlineListener) {
293
- // @ts-ignore - Fix type
294
- _this3.webex.internal.llm.off('online', _this3._pendingOnlineListener);
415
+ meeting.llmChannel.off('online', _this3._pendingOnlineListener);
295
416
  _this3._pendingOnlineListener = null;
296
417
  }
297
- _context3.next = 7;
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;
298
422
  return _this3.ensurePracticeSessionDatachannelToken(meeting);
299
423
  case 7:
300
- refreshedPracticeSessionToken = _context3.sent;
424
+ refreshedToken = _context4.sent;
301
425
  latestPracticeSessionDatachannelUrl = (0, _lodash.get)(meeting, 'locusInfo.info.practiceSessionDatachannelUrl');
302
426
  isStillPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel(); // Skip stale invocations after async refresh to avoid reconnecting a session
303
427
  // that was already updated/cleaned by a newer state transition.
304
428
  if (!(invocationSequence !== _this3._updatePSDataChannelSequence || !isStillPracticeSession || !latestPracticeSessionDatachannelUrl || latestPracticeSessionDatachannelUrl !== practiceSessionDatachannelUrl)) {
305
- _context3.next = 8;
429
+ _context4.next = 8;
306
430
  break;
307
431
  }
308
- return _context3.abrupt("return", undefined);
432
+ return _context4.abrupt("return", undefined);
309
433
  case 8:
310
- if (refreshedPracticeSessionToken) {
311
- practiceSessionDatachannelToken = refreshedPracticeSessionToken;
434
+ if (refreshedToken) {
435
+ practiceSessionDatachannelToken = refreshedToken;
312
436
  }
313
437
 
438
+ // Create a new practice session LLM channel
314
439
  // @ts-ignore - Fix type
315
- return _context3.abrupt("return", _this3.webex.internal.llm.registerAndConnect(url, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION).then(function (registerAndConnectResult) {
316
- var _this3$webex$internal, _this3$webex$internal2;
317
- // @ts-ignore - Fix type
318
- _this3.webex.internal.llm.off("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
319
- // @ts-ignore - Fix type
320
- _this3.webex.internal.llm.on("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
321
- // @ts-ignore - Fix type
322
- (_this3$webex$internal = _this3.webex.internal.voicea) === null || _this3$webex$internal === void 0 ? void 0 : (_this3$webex$internal2 = _this3$webex$internal.announce) === null || _this3$webex$internal2 === void 0 ? void 0 : _this3$webex$internal2.call(_this3$webex$internal);
323
- if (isCaptionBoxOn) {
324
- _this3.webex.internal.voicea.updateSubchannelSubscriptions({
325
- subscribe: ['transcription']
326
- });
440
+ psChannel = _this3.webex.internal.llm.createChannel();
441
+ _this3._practiceSessionLLMChannel = psChannel;
442
+
443
+ // Set up refresh handler before registration
444
+ psChannel.setRefreshHandler(function () {
445
+ return meeting.refreshDataChannelToken();
446
+ });
447
+
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);
475
+
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;
327
506
  }
328
- _loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> enabled to receive relay events for default session for ".concat(_constants.LLM_PRACTICE_SESSION, "!"));
329
- return _promise.default.resolve(registerAndConnectResult);
507
+ throw error;
330
508
  }));
331
509
  case 9:
332
510
  case "end":
333
- return _context3.stop();
511
+ return _context4.stop();
334
512
  }
335
- }, _callee3);
513
+ }, _callee4);
336
514
  }))();
337
515
  },
338
516
  /**
@@ -341,6 +519,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
341
519
  * @returns {Promise}
342
520
  */
343
521
  setPracticeSessionState: function setPracticeSessionState(enabled) {
522
+ var meeting = this.getValidatedWebinarMeeting();
344
523
  return this.request({
345
524
  method: _constants.HTTP_VERBS.PATCH,
346
525
  uri: "".concat(this.locusUrl, "/controls"),
@@ -349,6 +528,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
349
528
  enabled: enabled
350
529
  }
351
530
  }
531
+ }).then(function (response) {
532
+ _util.default.updateLocusFromApiResponse(meeting, response);
533
+ return response;
352
534
  }).catch(function (error) {
353
535
  _loggerProxy.default.logger.error('Meeting:webinar#setPracticeSessionState failed', error);
354
536
  throw error;
@@ -371,32 +553,32 @@ var Webinar = _webexCore.WebexPlugin.extend({
371
553
  */
372
554
  startWebcast: function startWebcast(meeting, layout) {
373
555
  var _this4 = this;
374
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
375
- var _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9;
376
- return _regenerator.default.wrap(function (_context4) {
377
- while (1) switch (_context4.prev = _context4.next) {
556
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
557
+ var _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0;
558
+ return _regenerator.default.wrap(function (_context5) {
559
+ while (1) switch (_context5.prev = _context5.next) {
378
560
  case 0:
379
561
  if (meeting) {
380
- _context4.next = 1;
562
+ _context5.next = 1;
381
563
  break;
382
564
  }
383
565
  _loggerProxy.default.logger.error("Meeting:webinar#startWebcast failed --> meeting parameter : ".concat(meeting));
384
566
  throw new Error('Meeting parameter does not meet expectations');
385
567
  case 1:
386
- _t2 = _this4;
387
- _t3 = _constants.HTTP_VERBS.PUT;
388
- _t4 = "".concat(_this4.webcastInstanceUrl, "/streaming");
389
- _t5 = _defineProperty2.default;
390
- _context4.next = 2;
568
+ _t3 = _this4;
569
+ _t4 = _constants.HTTP_VERBS.PUT;
570
+ _t5 = "".concat(_this4.webcastInstanceUrl, "/streaming");
571
+ _t6 = _defineProperty2.default;
572
+ _context5.next = 2;
391
573
  return _this4.webex.credentials.getUserToken();
392
574
  case 2:
393
- _t6 = _context4.sent;
394
- _t7 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
395
- _t8 = _t5({
396
- authorization: _t6,
397
- trackingId: _t7
575
+ _t7 = _context5.sent;
576
+ _t8 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
577
+ _t9 = _t6({
578
+ authorization: _t7,
579
+ trackingId: _t8
398
580
  }, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
399
- _t9 = {
581
+ _t0 = {
400
582
  action: 'start',
401
583
  meetingInfo: {
402
584
  locusId: meeting.locusId,
@@ -404,20 +586,20 @@ var Webinar = _webexCore.WebexPlugin.extend({
404
586
  },
405
587
  layout: layout
406
588
  };
407
- return _context4.abrupt("return", _t2.request.call(_t2, {
408
- method: _t3,
409
- uri: _t4,
410
- headers: _t8,
411
- body: _t9
589
+ return _context5.abrupt("return", _t3.request.call(_t3, {
590
+ method: _t4,
591
+ uri: _t5,
592
+ headers: _t9,
593
+ body: _t0
412
594
  }).catch(function (error) {
413
595
  _loggerProxy.default.logger.error('Meeting:webinar#startWebcast failed', error);
414
596
  throw error;
415
597
  }));
416
598
  case 3:
417
599
  case "end":
418
- return _context4.stop();
600
+ return _context5.stop();
419
601
  }
420
- }, _callee4);
602
+ }, _callee5);
421
603
  }))();
422
604
  },
423
605
  /**
@@ -426,41 +608,41 @@ var Webinar = _webexCore.WebexPlugin.extend({
426
608
  */
427
609
  stopWebcast: function stopWebcast() {
428
610
  var _this5 = this;
429
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
430
- var _t0, _t1, _t10, _t11, _t12, _t13, _t14, _t15;
431
- return _regenerator.default.wrap(function (_context5) {
432
- while (1) switch (_context5.prev = _context5.next) {
611
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
612
+ var _t1, _t10, _t11, _t12, _t13, _t14, _t15, _t16;
613
+ return _regenerator.default.wrap(function (_context6) {
614
+ while (1) switch (_context6.prev = _context6.next) {
433
615
  case 0:
434
- _t0 = _this5;
435
- _t1 = _constants.HTTP_VERBS.PUT;
436
- _t10 = "".concat(_this5.webcastInstanceUrl, "/streaming");
437
- _t11 = _defineProperty2.default;
438
- _context5.next = 1;
616
+ _t1 = _this5;
617
+ _t10 = _constants.HTTP_VERBS.PUT;
618
+ _t11 = "".concat(_this5.webcastInstanceUrl, "/streaming");
619
+ _t12 = _defineProperty2.default;
620
+ _context6.next = 1;
439
621
  return _this5.webex.credentials.getUserToken();
440
622
  case 1:
441
- _t12 = _context5.sent;
442
- _t13 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
443
- _t14 = _t11({
444
- authorization: _t12,
445
- trackingId: _t13
623
+ _t13 = _context6.sent;
624
+ _t14 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
625
+ _t15 = _t12({
626
+ authorization: _t13,
627
+ trackingId: _t14
446
628
  }, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
447
- _t15 = {
629
+ _t16 = {
448
630
  action: 'stop'
449
631
  };
450
- return _context5.abrupt("return", _t0.request.call(_t0, {
451
- method: _t1,
452
- uri: _t10,
453
- headers: _t14,
454
- body: _t15
632
+ return _context6.abrupt("return", _t1.request.call(_t1, {
633
+ method: _t10,
634
+ uri: _t11,
635
+ headers: _t15,
636
+ body: _t16
455
637
  }).catch(function (error) {
456
638
  _loggerProxy.default.logger.error('Meeting:webinar#stopWebcast failed', error);
457
639
  throw error;
458
640
  }));
459
641
  case 2:
460
642
  case "end":
461
- return _context5.stop();
643
+ return _context6.stop();
462
644
  }
463
- }, _callee5);
645
+ }, _callee6);
464
646
  }))();
465
647
  },
466
648
  /**
@@ -469,36 +651,36 @@ var Webinar = _webexCore.WebexPlugin.extend({
469
651
  */
470
652
  queryWebcastLayout: function queryWebcastLayout() {
471
653
  var _this6 = this;
472
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
473
- var _t16, _t17, _t18, _t19, _t20, _t21;
474
- return _regenerator.default.wrap(function (_context6) {
475
- while (1) switch (_context6.prev = _context6.next) {
654
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
655
+ var _t17, _t18, _t19, _t20, _t21, _t22;
656
+ return _regenerator.default.wrap(function (_context7) {
657
+ while (1) switch (_context7.prev = _context7.next) {
476
658
  case 0:
477
- _t16 = _this6;
478
- _t17 = _constants.HTTP_VERBS.GET;
479
- _t18 = "".concat(_this6.webcastInstanceUrl, "/layout");
480
- _context6.next = 1;
659
+ _t17 = _this6;
660
+ _t18 = _constants.HTTP_VERBS.GET;
661
+ _t19 = "".concat(_this6.webcastInstanceUrl, "/layout");
662
+ _context7.next = 1;
481
663
  return _this6.webex.credentials.getUserToken();
482
664
  case 1:
483
- _t19 = _context6.sent;
484
- _t20 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
485
- _t21 = {
486
- authorization: _t19,
487
- trackingId: _t20
665
+ _t20 = _context7.sent;
666
+ _t21 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
667
+ _t22 = {
668
+ authorization: _t20,
669
+ trackingId: _t21
488
670
  };
489
- return _context6.abrupt("return", _t16.request.call(_t16, {
490
- method: _t17,
491
- uri: _t18,
492
- headers: _t21
671
+ return _context7.abrupt("return", _t17.request.call(_t17, {
672
+ method: _t18,
673
+ uri: _t19,
674
+ headers: _t22
493
675
  }).catch(function (error) {
494
676
  _loggerProxy.default.logger.error('Meeting:webinar#queryWebcastLayout failed', error);
495
677
  throw error;
496
678
  }));
497
679
  case 2:
498
680
  case "end":
499
- return _context6.stop();
681
+ return _context7.stop();
500
682
  }
501
- }, _callee6);
683
+ }, _callee7);
502
684
  }))();
503
685
  },
504
686
  /**
@@ -508,44 +690,44 @@ var Webinar = _webexCore.WebexPlugin.extend({
508
690
  */
509
691
  updateWebcastLayout: function updateWebcastLayout(layout) {
510
692
  var _this7 = this;
511
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
512
- var _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29;
513
- return _regenerator.default.wrap(function (_context7) {
514
- while (1) switch (_context7.prev = _context7.next) {
693
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
694
+ var _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30;
695
+ return _regenerator.default.wrap(function (_context8) {
696
+ while (1) switch (_context8.prev = _context8.next) {
515
697
  case 0:
516
- _t22 = _this7;
517
- _t23 = _constants.HTTP_VERBS.PUT;
518
- _t24 = "".concat(_this7.webcastInstanceUrl, "/layout");
519
- _t25 = _defineProperty2.default;
520
- _context7.next = 1;
698
+ _t23 = _this7;
699
+ _t24 = _constants.HTTP_VERBS.PUT;
700
+ _t25 = "".concat(_this7.webcastInstanceUrl, "/layout");
701
+ _t26 = _defineProperty2.default;
702
+ _context8.next = 1;
521
703
  return _this7.webex.credentials.getUserToken();
522
704
  case 1:
523
- _t26 = _context7.sent;
524
- _t27 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
525
- _t28 = _t25({
526
- authorization: _t26,
527
- trackingId: _t27
705
+ _t27 = _context8.sent;
706
+ _t28 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
707
+ _t29 = _t26({
708
+ authorization: _t27,
709
+ trackingId: _t28
528
710
  }, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
529
- _t29 = {
711
+ _t30 = {
530
712
  videoLayout: layout.videoLayout,
531
713
  contentLayout: layout.contentLayout,
532
714
  syncStageLayout: layout.syncStageLayout,
533
715
  syncStageInMeeting: layout.syncStageInMeeting
534
716
  };
535
- return _context7.abrupt("return", _t22.request.call(_t22, {
536
- method: _t23,
537
- uri: _t24,
538
- headers: _t28,
539
- body: _t29
717
+ return _context8.abrupt("return", _t23.request.call(_t23, {
718
+ method: _t24,
719
+ uri: _t25,
720
+ headers: _t29,
721
+ body: _t30
540
722
  }).catch(function (error) {
541
723
  _loggerProxy.default.logger.error('Meeting:webinar#updateWebcastLayout failed', error);
542
724
  throw error;
543
725
  }));
544
726
  case 2:
545
727
  case "end":
546
- return _context7.stop();
728
+ return _context8.stop();
547
729
  }
548
- }, _callee7);
730
+ }, _callee8);
549
731
  }))();
550
732
  },
551
733
  /**
@@ -554,36 +736,36 @@ var Webinar = _webexCore.WebexPlugin.extend({
554
736
  */
555
737
  viewAllWebcastAttendees: function viewAllWebcastAttendees() {
556
738
  var _this8 = this;
557
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
558
- var _t30, _t31, _t32, _t33, _t34, _t35;
559
- return _regenerator.default.wrap(function (_context8) {
560
- while (1) switch (_context8.prev = _context8.next) {
739
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
740
+ var _t31, _t32, _t33, _t34, _t35, _t36;
741
+ return _regenerator.default.wrap(function (_context9) {
742
+ while (1) switch (_context9.prev = _context9.next) {
561
743
  case 0:
562
- _t30 = _this8;
563
- _t31 = _constants.HTTP_VERBS.GET;
564
- _t32 = "".concat(_this8.webcastInstanceUrl, "/attendees");
565
- _context8.next = 1;
744
+ _t31 = _this8;
745
+ _t32 = _constants.HTTP_VERBS.GET;
746
+ _t33 = "".concat(_this8.webcastInstanceUrl, "/attendees");
747
+ _context9.next = 1;
566
748
  return _this8.webex.credentials.getUserToken();
567
749
  case 1:
568
- _t33 = _context8.sent;
569
- _t34 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
570
- _t35 = {
571
- authorization: _t33,
572
- trackingId: _t34
750
+ _t34 = _context9.sent;
751
+ _t35 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
752
+ _t36 = {
753
+ authorization: _t34,
754
+ trackingId: _t35
573
755
  };
574
- return _context8.abrupt("return", _t30.request.call(_t30, {
575
- method: _t31,
576
- uri: _t32,
577
- headers: _t35
756
+ return _context9.abrupt("return", _t31.request.call(_t31, {
757
+ method: _t32,
758
+ uri: _t33,
759
+ headers: _t36
578
760
  }).catch(function (error) {
579
761
  _loggerProxy.default.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);
580
762
  throw error;
581
763
  }));
582
764
  case 2:
583
765
  case "end":
584
- return _context8.stop();
766
+ return _context9.stop();
585
767
  }
586
- }, _callee8);
768
+ }, _callee9);
587
769
  }))();
588
770
  },
589
771
  /**
@@ -594,37 +776,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
594
776
  searchWebcastAttendees: function searchWebcastAttendees() {
595
777
  var _arguments = arguments,
596
778
  _this9 = this;
597
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
598
- var queryString, _t36, _t37, _t38, _t39, _t40, _t41;
599
- return _regenerator.default.wrap(function (_context9) {
600
- while (1) switch (_context9.prev = _context9.next) {
779
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
780
+ var queryString, _t37, _t38, _t39, _t40, _t41, _t42;
781
+ return _regenerator.default.wrap(function (_context0) {
782
+ while (1) switch (_context0.prev = _context0.next) {
601
783
  case 0:
602
784
  queryString = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : '';
603
- _t36 = _this9;
604
- _t37 = _constants.HTTP_VERBS.GET;
605
- _t38 = "".concat(_this9.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
606
- _context9.next = 1;
785
+ _t37 = _this9;
786
+ _t38 = _constants.HTTP_VERBS.GET;
787
+ _t39 = "".concat(_this9.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
788
+ _context0.next = 1;
607
789
  return _this9.webex.credentials.getUserToken();
608
790
  case 1:
609
- _t39 = _context9.sent;
610
- _t40 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
611
- _t41 = {
612
- authorization: _t39,
613
- trackingId: _t40
791
+ _t40 = _context0.sent;
792
+ _t41 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
793
+ _t42 = {
794
+ authorization: _t40,
795
+ trackingId: _t41
614
796
  };
615
- return _context9.abrupt("return", _t36.request.call(_t36, {
616
- method: _t37,
617
- uri: _t38,
618
- headers: _t41
797
+ return _context0.abrupt("return", _t37.request.call(_t37, {
798
+ method: _t38,
799
+ uri: _t39,
800
+ headers: _t42
619
801
  }).catch(function (error) {
620
802
  _loggerProxy.default.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);
621
803
  throw error;
622
804
  }));
623
805
  case 2:
624
806
  case "end":
625
- return _context9.stop();
807
+ return _context0.stop();
626
808
  }
627
- }, _callee9);
809
+ }, _callee0);
628
810
  }))();
629
811
  },
630
812
  /**
@@ -634,36 +816,36 @@ var Webinar = _webexCore.WebexPlugin.extend({
634
816
  */
635
817
  expelWebcastAttendee: function expelWebcastAttendee(participantId) {
636
818
  var _this0 = this;
637
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
638
- var _t42, _t43, _t44, _t45, _t46, _t47;
639
- return _regenerator.default.wrap(function (_context0) {
640
- while (1) switch (_context0.prev = _context0.next) {
819
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
820
+ var _t43, _t44, _t45, _t46, _t47, _t48;
821
+ return _regenerator.default.wrap(function (_context1) {
822
+ while (1) switch (_context1.prev = _context1.next) {
641
823
  case 0:
642
- _t42 = _this0;
643
- _t43 = _constants.HTTP_VERBS.DELETE;
644
- _t44 = "".concat(_this0.webcastInstanceUrl, "/attendees/").concat(participantId);
645
- _context0.next = 1;
824
+ _t43 = _this0;
825
+ _t44 = _constants.HTTP_VERBS.DELETE;
826
+ _t45 = "".concat(_this0.webcastInstanceUrl, "/attendees/").concat(participantId);
827
+ _context1.next = 1;
646
828
  return _this0.webex.credentials.getUserToken();
647
829
  case 1:
648
- _t45 = _context0.sent;
649
- _t46 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
650
- _t47 = {
651
- authorization: _t45,
652
- trackingId: _t46
830
+ _t46 = _context1.sent;
831
+ _t47 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
832
+ _t48 = {
833
+ authorization: _t46,
834
+ trackingId: _t47
653
835
  };
654
- return _context0.abrupt("return", _t42.request.call(_t42, {
655
- method: _t43,
656
- uri: _t44,
657
- headers: _t47
836
+ return _context1.abrupt("return", _t43.request.call(_t43, {
837
+ method: _t44,
838
+ uri: _t45,
839
+ headers: _t48
658
840
  }).catch(function (error) {
659
841
  _loggerProxy.default.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);
660
842
  throw error;
661
843
  }));
662
844
  case 2:
663
845
  case "end":
664
- return _context0.stop();
846
+ return _context1.stop();
665
847
  }
666
- }, _callee0);
848
+ }, _callee1);
667
849
  }))();
668
850
  },
669
851
  /**
@@ -676,13 +858,20 @@ var Webinar = _webexCore.WebexPlugin.extend({
676
858
  */
677
859
  searchLargeScaleWebinarAttendees: function searchLargeScaleWebinarAttendees(payload) {
678
860
  var _this1 = this;
679
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
861
+ return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
680
862
  var _payload$limit, _meeting$locusInfo3, _meeting$locusInfo3$l, _meeting$locusInfo3$l2, _meeting$locusInfo3$l3;
681
- var meeting, rawParams, attendeeSearchUrl, _t48, _t49, _t50, _t51, _t52, _t53;
682
- return _regenerator.default.wrap(function (_context1) {
683
- while (1) switch (_context1.prev = _context1.next) {
863
+ var meeting, rawParams, attendeeSearchUrl, _t49, _t50, _t51, _t52, _t53, _t54;
864
+ return _regenerator.default.wrap(function (_context10) {
865
+ while (1) switch (_context10.prev = _context10.next) {
684
866
  case 0:
685
- meeting = _this1.webex.meetings.getMeetingByType(_constants._ID_, _this1.meetingId);
867
+ meeting = _this1.getValidatedWebinarMeeting();
868
+ if (meeting) {
869
+ _context10.next = 1;
870
+ break;
871
+ }
872
+ _loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> webinar meeting could not be validated');
873
+ throw new Error('Meeting:webinar5k#Webinar meeting is not resolvable for the current locus');
874
+ case 1:
686
875
  rawParams = {
687
876
  search_text: payload === null || payload === void 0 ? void 0 : payload.queryString,
688
877
  limit: (_payload$limit = payload === null || payload === void 0 ? void 0 : payload.limit) !== null && _payload$limit !== void 0 ? _payload$limit : _constants.DEFAULT_LARGE_SCALE_WEBINAR_ATTENDEE_SEARCH_LIMIT,
@@ -690,40 +879,40 @@ var Webinar = _webexCore.WebexPlugin.extend({
690
879
  };
691
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;
692
881
  if (attendeeSearchUrl) {
693
- _context1.next = 1;
882
+ _context10.next = 2;
694
883
  break;
695
884
  }
696
- _loggerProxy.default.logger.error("Meeting:webinar5k#searchLargeScaleWebinarAttendees failed");
885
+ _loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> attendee search url unavailable');
697
886
  throw new Error('Meeting:webinar5k#Attendee search url is not available');
698
- case 1:
699
- _t48 = _this1;
700
- _t49 = _constants.HTTP_VERBS.GET;
701
- _t50 = "".concat(attendeeSearchUrl, "?").concat(new URLSearchParams((0, _utils.sanitizeParams)(rawParams)).toString());
702
- _context1.next = 2;
703
- return _this1.webex.credentials.getUserToken();
704
887
  case 2:
705
- _t51 = _context1.sent;
706
- _t52 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
707
- _t53 = {
708
- authorization: _t51,
709
- trackingId: _t52
888
+ _t49 = _this1;
889
+ _t50 = _constants.HTTP_VERBS.GET;
890
+ _t51 = "".concat(attendeeSearchUrl, "?").concat(new URLSearchParams((0, _utils.sanitizeParams)(rawParams)).toString());
891
+ _context10.next = 3;
892
+ return _this1.webex.credentials.getUserToken();
893
+ case 3:
894
+ _t52 = _context10.sent;
895
+ _t53 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
896
+ _t54 = {
897
+ authorization: _t52,
898
+ trackingId: _t53
710
899
  };
711
- return _context1.abrupt("return", _t48.request.call(_t48, {
712
- method: _t49,
713
- uri: _t50,
714
- headers: _t53
900
+ return _context10.abrupt("return", _t49.request.call(_t49, {
901
+ method: _t50,
902
+ uri: _t51,
903
+ headers: _t54
715
904
  }).catch(function (error) {
716
905
  _loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed', error);
717
906
  throw error;
718
907
  }));
719
- case 3:
908
+ case 4:
720
909
  case "end":
721
- return _context1.stop();
910
+ return _context10.stop();
722
911
  }
723
- }, _callee1);
912
+ }, _callee10);
724
913
  }))();
725
914
  },
726
- version: "3.12.0-next.19"
915
+ version: "3.12.0-next.191"
727
916
  });
728
917
  var _default = exports.default = Webinar;
729
918
  //# sourceMappingURL=index.js.map