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