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