@webex/plugin-meetings 3.12.0-next.6 → 3.12.0-next.7
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/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +370 -290
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/meeting/index.d.ts +11 -0
- package/dist/webinar/index.js +301 -226
- package/dist/webinar/index.js.map +1 -1
- package/package.json +1 -1
- package/src/meeting/index.ts +84 -3
- package/src/webinar/index.ts +75 -1
- package/test/unit/spec/meeting/index.js +43 -28
- package/test/unit/spec/webinar/index.ts +60 -0
package/dist/webinar/index.js
CHANGED
|
@@ -157,107 +157,182 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
157
157
|
}))();
|
|
158
158
|
},
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* @returns {Promise}
|
|
160
|
+
* Ensures practice-session token exists before registering the practice LLM channel.
|
|
161
|
+
* @param {object} meeting
|
|
162
|
+
* @returns {Promise<string|undefined>}
|
|
163
163
|
*/
|
|
164
|
-
|
|
164
|
+
ensurePracticeSessionDatachannelToken: function ensurePracticeSessionDatachannelToken(meeting) {
|
|
165
165
|
var _this2 = this;
|
|
166
166
|
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
167
|
-
var
|
|
167
|
+
var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, dataChannelTokenType, _t;
|
|
168
168
|
return _regenerator.default.wrap(function (_context2) {
|
|
169
169
|
while (1) switch (_context2.prev = _context2.next) {
|
|
170
170
|
case 0:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
_context2.next = 1;
|
|
172
|
+
return _this2.webex.internal.llm.isDataChannelTokenEnabled();
|
|
173
|
+
case 1:
|
|
174
|
+
isDataChannelTokenEnabled = _context2.sent;
|
|
175
|
+
if (isDataChannelTokenEnabled) {
|
|
174
176
|
_context2.next = 2;
|
|
175
177
|
break;
|
|
176
178
|
}
|
|
177
|
-
_context2.next = 1;
|
|
178
|
-
return _this2.cleanupPSDataChannel();
|
|
179
|
-
case 1:
|
|
180
179
|
return _context2.abrupt("return", undefined);
|
|
181
180
|
case 2:
|
|
182
|
-
// @ts-ignore
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
isCaptionBoxOn = _this2.webex.internal.voicea.getIsCaptionBoxOn();
|
|
186
|
-
if (practiceSessionDatachannelUrl) {
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
cachedToken = _this2.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.PracticeSession);
|
|
183
|
+
if (!cachedToken) {
|
|
187
184
|
_context2.next = 3;
|
|
188
185
|
break;
|
|
189
186
|
}
|
|
190
|
-
return _context2.abrupt("return",
|
|
187
|
+
return _context2.abrupt("return", cachedToken);
|
|
191
188
|
case 3:
|
|
192
|
-
|
|
189
|
+
_context2.prev = 3;
|
|
190
|
+
_context2.next = 4;
|
|
191
|
+
return meeting.refreshDataChannelToken();
|
|
192
|
+
case 4:
|
|
193
|
+
refreshResponse = _context2.sent;
|
|
194
|
+
_ref2 = (_refreshResponse$body = refreshResponse === null || refreshResponse === void 0 ? void 0 : refreshResponse.body) !== null && _refreshResponse$body !== void 0 ? _refreshResponse$body : {}, datachannelToken = _ref2.datachannelToken, dataChannelTokenType = _ref2.dataChannelTokenType;
|
|
195
|
+
if (datachannelToken) {
|
|
193
196
|
_context2.next = 5;
|
|
194
197
|
break;
|
|
195
198
|
}
|
|
199
|
+
return _context2.abrupt("return", undefined);
|
|
200
|
+
case 5:
|
|
201
|
+
// @ts-ignore
|
|
202
|
+
_this2.webex.internal.llm.setDatachannelToken(datachannelToken, dataChannelTokenType || _internalPluginLlm.DataChannelTokenType.PracticeSession);
|
|
203
|
+
return _context2.abrupt("return", datachannelToken);
|
|
204
|
+
case 6:
|
|
205
|
+
_context2.prev = 6;
|
|
206
|
+
_t = _context2["catch"](3);
|
|
207
|
+
_loggerProxy.default.logger.warn("Webinar:index#ensurePracticeSessionDatachannelToken --> failed to proactively refresh practice-session token: ".concat((_t === null || _t === void 0 ? void 0 : _t.message) || String(_t)));
|
|
208
|
+
return _context2.abrupt("return", undefined);
|
|
209
|
+
case 7:
|
|
210
|
+
case "end":
|
|
211
|
+
return _context2.stop();
|
|
212
|
+
}
|
|
213
|
+
}, _callee2, null, [[3, 6]]);
|
|
214
|
+
}))();
|
|
215
|
+
},
|
|
216
|
+
/**
|
|
217
|
+
* Connects to low latency mercury and reconnects if the address has changed
|
|
218
|
+
* It will also disconnect if called when the meeting has ended
|
|
219
|
+
* @returns {Promise}
|
|
220
|
+
*/
|
|
221
|
+
updatePSDataChannel: function updatePSDataChannel() {
|
|
222
|
+
var _this3 = this;
|
|
223
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
224
|
+
var invocationSequence, meeting, isPracticeSession, _ref3, _ref3$url, url, _ref3$info, _ref3$info2, _ref3$info2$practiceS, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, isCaptionBoxOn, _onDefaultSessionConnected, refreshedPracticeSessionToken, latestPracticeSessionDatachannelUrl, isStillPracticeSession;
|
|
225
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
226
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
227
|
+
case 0:
|
|
228
|
+
_this3._updatePSDataChannelSequence = (_this3._updatePSDataChannelSequence || 0) + 1;
|
|
229
|
+
invocationSequence = _this3._updatePSDataChannelSequence;
|
|
230
|
+
meeting = _this3.webex.meetings.getMeetingByType(_constants._ID_, _this3.meetingId);
|
|
231
|
+
isPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel();
|
|
232
|
+
if (isPracticeSession) {
|
|
233
|
+
_context3.next = 2;
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
_context3.next = 1;
|
|
237
|
+
return _this3.cleanupPSDataChannel();
|
|
238
|
+
case 1:
|
|
239
|
+
return _context3.abrupt("return", undefined);
|
|
240
|
+
case 2:
|
|
241
|
+
// @ts-ignore - Fix type
|
|
242
|
+
_ref3 = (meeting === null || meeting === void 0 ? void 0 : meeting.locusInfo) || {}, _ref3$url = _ref3.url, url = _ref3$url === void 0 ? undefined : _ref3$url, _ref3$info = _ref3.info, _ref3$info2 = _ref3$info === void 0 ? {} : _ref3$info, _ref3$info2$practiceS = _ref3$info2.practiceSessionDatachannelUrl, practiceSessionDatachannelUrl = _ref3$info2$practiceS === void 0 ? undefined : _ref3$info2$practiceS; // @ts-ignore
|
|
243
|
+
practiceSessionDatachannelToken = _this3.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.PracticeSession);
|
|
244
|
+
isCaptionBoxOn = _this3.webex.internal.voicea.getIsCaptionBoxOn();
|
|
245
|
+
if (practiceSessionDatachannelUrl) {
|
|
246
|
+
_context3.next = 3;
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
return _context3.abrupt("return", undefined);
|
|
250
|
+
case 3:
|
|
251
|
+
if (!_this3.webex.internal.llm.isConnected(_constants.LLM_PRACTICE_SESSION)) {
|
|
252
|
+
_context3.next = 5;
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
196
255
|
if (!(
|
|
197
256
|
// @ts-ignore - Fix type
|
|
198
|
-
url ===
|
|
257
|
+
url === _this3.webex.internal.llm.getLocusUrl(_constants.LLM_PRACTICE_SESSION) &&
|
|
199
258
|
// @ts-ignore - Fix type
|
|
200
|
-
practiceSessionDatachannelUrl ===
|
|
201
|
-
|
|
259
|
+
practiceSessionDatachannelUrl === _this3.webex.internal.llm.getDatachannelUrl(_constants.LLM_PRACTICE_SESSION))) {
|
|
260
|
+
_context3.next = 4;
|
|
202
261
|
break;
|
|
203
262
|
}
|
|
204
|
-
return
|
|
263
|
+
return _context3.abrupt("return", undefined);
|
|
205
264
|
case 4:
|
|
206
|
-
|
|
207
|
-
return
|
|
265
|
+
_context3.next = 5;
|
|
266
|
+
return _this3.cleanupPSDataChannel();
|
|
208
267
|
case 5:
|
|
209
268
|
// Ensure the default session data channel is connected before connecting the practice session.
|
|
210
269
|
// Subscribe before checking isConnected() to avoid a race where the 'online' event fires
|
|
211
270
|
// between the check and the subscription — Mercury does not replay missed events.
|
|
212
|
-
if (!
|
|
271
|
+
if (!_this3._pendingOnlineListener) {
|
|
213
272
|
_onDefaultSessionConnected = function onDefaultSessionConnected() {
|
|
214
|
-
|
|
273
|
+
_this3._pendingOnlineListener = null;
|
|
215
274
|
// @ts-ignore - Fix type
|
|
216
|
-
|
|
217
|
-
|
|
275
|
+
_this3.webex.internal.llm.off('online', _onDefaultSessionConnected);
|
|
276
|
+
_this3.updatePSDataChannel();
|
|
218
277
|
};
|
|
219
|
-
|
|
278
|
+
_this3._pendingOnlineListener = _onDefaultSessionConnected;
|
|
220
279
|
// @ts-ignore - Fix type
|
|
221
|
-
|
|
280
|
+
_this3.webex.internal.llm.on('online', _onDefaultSessionConnected);
|
|
222
281
|
}
|
|
223
282
|
|
|
224
283
|
// @ts-ignore - Fix type
|
|
225
|
-
if (
|
|
226
|
-
|
|
284
|
+
if (_this3.webex.internal.llm.isConnected()) {
|
|
285
|
+
_context3.next = 6;
|
|
227
286
|
break;
|
|
228
287
|
}
|
|
229
288
|
_loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> default session not yet connected, deferring practice session connect.');
|
|
230
|
-
return
|
|
289
|
+
return _context3.abrupt("return", undefined);
|
|
231
290
|
case 6:
|
|
232
291
|
// Default session is already connected — cancel the pending listener and proceed
|
|
233
|
-
if (
|
|
292
|
+
if (_this3._pendingOnlineListener) {
|
|
234
293
|
// @ts-ignore - Fix type
|
|
235
|
-
|
|
236
|
-
|
|
294
|
+
_this3.webex.internal.llm.off('online', _this3._pendingOnlineListener);
|
|
295
|
+
_this3._pendingOnlineListener = null;
|
|
296
|
+
}
|
|
297
|
+
_context3.next = 7;
|
|
298
|
+
return _this3.ensurePracticeSessionDatachannelToken(meeting);
|
|
299
|
+
case 7:
|
|
300
|
+
refreshedPracticeSessionToken = _context3.sent;
|
|
301
|
+
latestPracticeSessionDatachannelUrl = (0, _lodash.get)(meeting, 'locusInfo.info.practiceSessionDatachannelUrl');
|
|
302
|
+
isStillPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel(); // Skip stale invocations after async refresh to avoid reconnecting a session
|
|
303
|
+
// that was already updated/cleaned by a newer state transition.
|
|
304
|
+
if (!(invocationSequence !== _this3._updatePSDataChannelSequence || !isStillPracticeSession || !latestPracticeSessionDatachannelUrl || latestPracticeSessionDatachannelUrl !== practiceSessionDatachannelUrl)) {
|
|
305
|
+
_context3.next = 8;
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
return _context3.abrupt("return", undefined);
|
|
309
|
+
case 8:
|
|
310
|
+
if (refreshedPracticeSessionToken) {
|
|
311
|
+
practiceSessionDatachannelToken = refreshedPracticeSessionToken;
|
|
237
312
|
}
|
|
238
313
|
|
|
239
314
|
// @ts-ignore - Fix type
|
|
240
|
-
return
|
|
241
|
-
var
|
|
315
|
+
return _context3.abrupt("return", _this3.webex.internal.llm.registerAndConnect(url, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION).then(function (registerAndConnectResult) {
|
|
316
|
+
var _this3$webex$internal, _this3$webex$internal2;
|
|
242
317
|
// @ts-ignore - Fix type
|
|
243
|
-
|
|
318
|
+
_this3.webex.internal.llm.off("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
|
|
244
319
|
// @ts-ignore - Fix type
|
|
245
|
-
|
|
320
|
+
_this3.webex.internal.llm.on("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
|
|
246
321
|
// @ts-ignore - Fix type
|
|
247
|
-
(
|
|
322
|
+
(_this3$webex$internal = _this3.webex.internal.voicea) === null || _this3$webex$internal === void 0 ? void 0 : (_this3$webex$internal2 = _this3$webex$internal.announce) === null || _this3$webex$internal2 === void 0 ? void 0 : _this3$webex$internal2.call(_this3$webex$internal);
|
|
248
323
|
if (isCaptionBoxOn) {
|
|
249
|
-
|
|
324
|
+
_this3.webex.internal.voicea.updateSubchannelSubscriptions({
|
|
250
325
|
subscribe: ['transcription']
|
|
251
326
|
});
|
|
252
327
|
}
|
|
253
328
|
_loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> enabled to receive relay events for default session for ".concat(_constants.LLM_PRACTICE_SESSION, "!"));
|
|
254
329
|
return _promise.default.resolve(registerAndConnectResult);
|
|
255
330
|
}));
|
|
256
|
-
case
|
|
331
|
+
case 9:
|
|
257
332
|
case "end":
|
|
258
|
-
return
|
|
333
|
+
return _context3.stop();
|
|
259
334
|
}
|
|
260
|
-
},
|
|
335
|
+
}, _callee3);
|
|
261
336
|
}))();
|
|
262
337
|
},
|
|
263
338
|
/**
|
|
@@ -295,33 +370,33 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
295
370
|
* @returns {Promise}
|
|
296
371
|
*/
|
|
297
372
|
startWebcast: function startWebcast(meeting, layout) {
|
|
298
|
-
var
|
|
299
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
300
|
-
var
|
|
301
|
-
return _regenerator.default.wrap(function (
|
|
302
|
-
while (1) switch (
|
|
373
|
+
var _this4 = this;
|
|
374
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
375
|
+
var _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9;
|
|
376
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
377
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
303
378
|
case 0:
|
|
304
379
|
if (meeting) {
|
|
305
|
-
|
|
380
|
+
_context4.next = 1;
|
|
306
381
|
break;
|
|
307
382
|
}
|
|
308
383
|
_loggerProxy.default.logger.error("Meeting:webinar#startWebcast failed --> meeting parameter : ".concat(meeting));
|
|
309
384
|
throw new Error('Meeting parameter does not meet expectations');
|
|
310
385
|
case 1:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
return
|
|
386
|
+
_t2 = _this4;
|
|
387
|
+
_t3 = _constants.HTTP_VERBS.PUT;
|
|
388
|
+
_t4 = "".concat(_this4.webcastInstanceUrl, "/streaming");
|
|
389
|
+
_t5 = _defineProperty2.default;
|
|
390
|
+
_context4.next = 2;
|
|
391
|
+
return _this4.webex.credentials.getUserToken();
|
|
317
392
|
case 2:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
authorization:
|
|
322
|
-
trackingId:
|
|
393
|
+
_t6 = _context4.sent;
|
|
394
|
+
_t7 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
395
|
+
_t8 = _t5({
|
|
396
|
+
authorization: _t6,
|
|
397
|
+
trackingId: _t7
|
|
323
398
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
324
|
-
|
|
399
|
+
_t9 = {
|
|
325
400
|
action: 'start',
|
|
326
401
|
meetingInfo: {
|
|
327
402
|
locusId: meeting.locusId,
|
|
@@ -329,20 +404,20 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
329
404
|
},
|
|
330
405
|
layout: layout
|
|
331
406
|
};
|
|
332
|
-
return
|
|
333
|
-
method:
|
|
334
|
-
uri:
|
|
335
|
-
headers:
|
|
336
|
-
body:
|
|
407
|
+
return _context4.abrupt("return", _t2.request.call(_t2, {
|
|
408
|
+
method: _t3,
|
|
409
|
+
uri: _t4,
|
|
410
|
+
headers: _t8,
|
|
411
|
+
body: _t9
|
|
337
412
|
}).catch(function (error) {
|
|
338
413
|
_loggerProxy.default.logger.error('Meeting:webinar#startWebcast failed', error);
|
|
339
414
|
throw error;
|
|
340
415
|
}));
|
|
341
416
|
case 3:
|
|
342
417
|
case "end":
|
|
343
|
-
return
|
|
418
|
+
return _context4.stop();
|
|
344
419
|
}
|
|
345
|
-
},
|
|
420
|
+
}, _callee4);
|
|
346
421
|
}))();
|
|
347
422
|
},
|
|
348
423
|
/**
|
|
@@ -350,42 +425,42 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
350
425
|
* @returns {Promise}
|
|
351
426
|
*/
|
|
352
427
|
stopWebcast: function stopWebcast() {
|
|
353
|
-
var
|
|
354
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
355
|
-
var
|
|
356
|
-
return _regenerator.default.wrap(function (
|
|
357
|
-
while (1) switch (
|
|
428
|
+
var _this5 = this;
|
|
429
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
430
|
+
var _t0, _t1, _t10, _t11, _t12, _t13, _t14, _t15;
|
|
431
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
432
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
358
433
|
case 0:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
return
|
|
434
|
+
_t0 = _this5;
|
|
435
|
+
_t1 = _constants.HTTP_VERBS.PUT;
|
|
436
|
+
_t10 = "".concat(_this5.webcastInstanceUrl, "/streaming");
|
|
437
|
+
_t11 = _defineProperty2.default;
|
|
438
|
+
_context5.next = 1;
|
|
439
|
+
return _this5.webex.credentials.getUserToken();
|
|
365
440
|
case 1:
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
authorization:
|
|
370
|
-
trackingId:
|
|
441
|
+
_t12 = _context5.sent;
|
|
442
|
+
_t13 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
443
|
+
_t14 = _t11({
|
|
444
|
+
authorization: _t12,
|
|
445
|
+
trackingId: _t13
|
|
371
446
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
372
|
-
|
|
447
|
+
_t15 = {
|
|
373
448
|
action: 'stop'
|
|
374
449
|
};
|
|
375
|
-
return
|
|
376
|
-
method:
|
|
377
|
-
uri:
|
|
378
|
-
headers:
|
|
379
|
-
body:
|
|
450
|
+
return _context5.abrupt("return", _t0.request.call(_t0, {
|
|
451
|
+
method: _t1,
|
|
452
|
+
uri: _t10,
|
|
453
|
+
headers: _t14,
|
|
454
|
+
body: _t15
|
|
380
455
|
}).catch(function (error) {
|
|
381
456
|
_loggerProxy.default.logger.error('Meeting:webinar#stopWebcast failed', error);
|
|
382
457
|
throw error;
|
|
383
458
|
}));
|
|
384
459
|
case 2:
|
|
385
460
|
case "end":
|
|
386
|
-
return
|
|
461
|
+
return _context5.stop();
|
|
387
462
|
}
|
|
388
|
-
},
|
|
463
|
+
}, _callee5);
|
|
389
464
|
}))();
|
|
390
465
|
},
|
|
391
466
|
/**
|
|
@@ -393,37 +468,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
393
468
|
* @returns {Promise}
|
|
394
469
|
*/
|
|
395
470
|
queryWebcastLayout: function queryWebcastLayout() {
|
|
396
|
-
var
|
|
397
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
398
|
-
var
|
|
399
|
-
return _regenerator.default.wrap(function (
|
|
400
|
-
while (1) switch (
|
|
471
|
+
var _this6 = this;
|
|
472
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
473
|
+
var _t16, _t17, _t18, _t19, _t20, _t21;
|
|
474
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
475
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
401
476
|
case 0:
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
return
|
|
477
|
+
_t16 = _this6;
|
|
478
|
+
_t17 = _constants.HTTP_VERBS.GET;
|
|
479
|
+
_t18 = "".concat(_this6.webcastInstanceUrl, "/layout");
|
|
480
|
+
_context6.next = 1;
|
|
481
|
+
return _this6.webex.credentials.getUserToken();
|
|
407
482
|
case 1:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
authorization:
|
|
412
|
-
trackingId:
|
|
483
|
+
_t19 = _context6.sent;
|
|
484
|
+
_t20 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
485
|
+
_t21 = {
|
|
486
|
+
authorization: _t19,
|
|
487
|
+
trackingId: _t20
|
|
413
488
|
};
|
|
414
|
-
return
|
|
415
|
-
method:
|
|
416
|
-
uri:
|
|
417
|
-
headers:
|
|
489
|
+
return _context6.abrupt("return", _t16.request.call(_t16, {
|
|
490
|
+
method: _t17,
|
|
491
|
+
uri: _t18,
|
|
492
|
+
headers: _t21
|
|
418
493
|
}).catch(function (error) {
|
|
419
494
|
_loggerProxy.default.logger.error('Meeting:webinar#queryWebcastLayout failed', error);
|
|
420
495
|
throw error;
|
|
421
496
|
}));
|
|
422
497
|
case 2:
|
|
423
498
|
case "end":
|
|
424
|
-
return
|
|
499
|
+
return _context6.stop();
|
|
425
500
|
}
|
|
426
|
-
},
|
|
501
|
+
}, _callee6);
|
|
427
502
|
}))();
|
|
428
503
|
},
|
|
429
504
|
/**
|
|
@@ -432,45 +507,45 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
432
507
|
* @returns {Promise}
|
|
433
508
|
*/
|
|
434
509
|
updateWebcastLayout: function updateWebcastLayout(layout) {
|
|
435
|
-
var
|
|
436
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
437
|
-
var
|
|
438
|
-
return _regenerator.default.wrap(function (
|
|
439
|
-
while (1) switch (
|
|
510
|
+
var _this7 = this;
|
|
511
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
512
|
+
var _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29;
|
|
513
|
+
return _regenerator.default.wrap(function (_context7) {
|
|
514
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
440
515
|
case 0:
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
return
|
|
516
|
+
_t22 = _this7;
|
|
517
|
+
_t23 = _constants.HTTP_VERBS.PUT;
|
|
518
|
+
_t24 = "".concat(_this7.webcastInstanceUrl, "/layout");
|
|
519
|
+
_t25 = _defineProperty2.default;
|
|
520
|
+
_context7.next = 1;
|
|
521
|
+
return _this7.webex.credentials.getUserToken();
|
|
447
522
|
case 1:
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
authorization:
|
|
452
|
-
trackingId:
|
|
523
|
+
_t26 = _context7.sent;
|
|
524
|
+
_t27 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
525
|
+
_t28 = _t25({
|
|
526
|
+
authorization: _t26,
|
|
527
|
+
trackingId: _t27
|
|
453
528
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
454
|
-
|
|
529
|
+
_t29 = {
|
|
455
530
|
videoLayout: layout.videoLayout,
|
|
456
531
|
contentLayout: layout.contentLayout,
|
|
457
532
|
syncStageLayout: layout.syncStageLayout,
|
|
458
533
|
syncStageInMeeting: layout.syncStageInMeeting
|
|
459
534
|
};
|
|
460
|
-
return
|
|
461
|
-
method:
|
|
462
|
-
uri:
|
|
463
|
-
headers:
|
|
464
|
-
body:
|
|
535
|
+
return _context7.abrupt("return", _t22.request.call(_t22, {
|
|
536
|
+
method: _t23,
|
|
537
|
+
uri: _t24,
|
|
538
|
+
headers: _t28,
|
|
539
|
+
body: _t29
|
|
465
540
|
}).catch(function (error) {
|
|
466
541
|
_loggerProxy.default.logger.error('Meeting:webinar#updateWebcastLayout failed', error);
|
|
467
542
|
throw error;
|
|
468
543
|
}));
|
|
469
544
|
case 2:
|
|
470
545
|
case "end":
|
|
471
|
-
return
|
|
546
|
+
return _context7.stop();
|
|
472
547
|
}
|
|
473
|
-
},
|
|
548
|
+
}, _callee7);
|
|
474
549
|
}))();
|
|
475
550
|
},
|
|
476
551
|
/**
|
|
@@ -478,37 +553,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
478
553
|
* @returns {Promise}
|
|
479
554
|
*/
|
|
480
555
|
viewAllWebcastAttendees: function viewAllWebcastAttendees() {
|
|
481
|
-
var
|
|
482
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
483
|
-
var
|
|
484
|
-
return _regenerator.default.wrap(function (
|
|
485
|
-
while (1) switch (
|
|
556
|
+
var _this8 = this;
|
|
557
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
558
|
+
var _t30, _t31, _t32, _t33, _t34, _t35;
|
|
559
|
+
return _regenerator.default.wrap(function (_context8) {
|
|
560
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
486
561
|
case 0:
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
return
|
|
562
|
+
_t30 = _this8;
|
|
563
|
+
_t31 = _constants.HTTP_VERBS.GET;
|
|
564
|
+
_t32 = "".concat(_this8.webcastInstanceUrl, "/attendees");
|
|
565
|
+
_context8.next = 1;
|
|
566
|
+
return _this8.webex.credentials.getUserToken();
|
|
492
567
|
case 1:
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
authorization:
|
|
497
|
-
trackingId:
|
|
568
|
+
_t33 = _context8.sent;
|
|
569
|
+
_t34 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
570
|
+
_t35 = {
|
|
571
|
+
authorization: _t33,
|
|
572
|
+
trackingId: _t34
|
|
498
573
|
};
|
|
499
|
-
return
|
|
500
|
-
method:
|
|
501
|
-
uri:
|
|
502
|
-
headers:
|
|
574
|
+
return _context8.abrupt("return", _t30.request.call(_t30, {
|
|
575
|
+
method: _t31,
|
|
576
|
+
uri: _t32,
|
|
577
|
+
headers: _t35
|
|
503
578
|
}).catch(function (error) {
|
|
504
579
|
_loggerProxy.default.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);
|
|
505
580
|
throw error;
|
|
506
581
|
}));
|
|
507
582
|
case 2:
|
|
508
583
|
case "end":
|
|
509
|
-
return
|
|
584
|
+
return _context8.stop();
|
|
510
585
|
}
|
|
511
|
-
},
|
|
586
|
+
}, _callee8);
|
|
512
587
|
}))();
|
|
513
588
|
},
|
|
514
589
|
/**
|
|
@@ -518,38 +593,38 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
518
593
|
*/
|
|
519
594
|
searchWebcastAttendees: function searchWebcastAttendees() {
|
|
520
595
|
var _arguments = arguments,
|
|
521
|
-
|
|
522
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
523
|
-
var queryString,
|
|
524
|
-
return _regenerator.default.wrap(function (
|
|
525
|
-
while (1) switch (
|
|
596
|
+
_this9 = this;
|
|
597
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
598
|
+
var queryString, _t36, _t37, _t38, _t39, _t40, _t41;
|
|
599
|
+
return _regenerator.default.wrap(function (_context9) {
|
|
600
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
526
601
|
case 0:
|
|
527
602
|
queryString = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : '';
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
return
|
|
603
|
+
_t36 = _this9;
|
|
604
|
+
_t37 = _constants.HTTP_VERBS.GET;
|
|
605
|
+
_t38 = "".concat(_this9.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
|
|
606
|
+
_context9.next = 1;
|
|
607
|
+
return _this9.webex.credentials.getUserToken();
|
|
533
608
|
case 1:
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
authorization:
|
|
538
|
-
trackingId:
|
|
609
|
+
_t39 = _context9.sent;
|
|
610
|
+
_t40 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
611
|
+
_t41 = {
|
|
612
|
+
authorization: _t39,
|
|
613
|
+
trackingId: _t40
|
|
539
614
|
};
|
|
540
|
-
return
|
|
541
|
-
method:
|
|
542
|
-
uri:
|
|
543
|
-
headers:
|
|
615
|
+
return _context9.abrupt("return", _t36.request.call(_t36, {
|
|
616
|
+
method: _t37,
|
|
617
|
+
uri: _t38,
|
|
618
|
+
headers: _t41
|
|
544
619
|
}).catch(function (error) {
|
|
545
620
|
_loggerProxy.default.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);
|
|
546
621
|
throw error;
|
|
547
622
|
}));
|
|
548
623
|
case 2:
|
|
549
624
|
case "end":
|
|
550
|
-
return
|
|
625
|
+
return _context9.stop();
|
|
551
626
|
}
|
|
552
|
-
},
|
|
627
|
+
}, _callee9);
|
|
553
628
|
}))();
|
|
554
629
|
},
|
|
555
630
|
/**
|
|
@@ -558,37 +633,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
558
633
|
* @returns {Promise}
|
|
559
634
|
*/
|
|
560
635
|
expelWebcastAttendee: function expelWebcastAttendee(participantId) {
|
|
561
|
-
var
|
|
562
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
563
|
-
var
|
|
564
|
-
return _regenerator.default.wrap(function (
|
|
565
|
-
while (1) switch (
|
|
636
|
+
var _this0 = this;
|
|
637
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
638
|
+
var _t42, _t43, _t44, _t45, _t46, _t47;
|
|
639
|
+
return _regenerator.default.wrap(function (_context0) {
|
|
640
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
566
641
|
case 0:
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
return
|
|
642
|
+
_t42 = _this0;
|
|
643
|
+
_t43 = _constants.HTTP_VERBS.DELETE;
|
|
644
|
+
_t44 = "".concat(_this0.webcastInstanceUrl, "/attendees/").concat(participantId);
|
|
645
|
+
_context0.next = 1;
|
|
646
|
+
return _this0.webex.credentials.getUserToken();
|
|
572
647
|
case 1:
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
authorization:
|
|
577
|
-
trackingId:
|
|
648
|
+
_t45 = _context0.sent;
|
|
649
|
+
_t46 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
650
|
+
_t47 = {
|
|
651
|
+
authorization: _t45,
|
|
652
|
+
trackingId: _t46
|
|
578
653
|
};
|
|
579
|
-
return
|
|
580
|
-
method:
|
|
581
|
-
uri:
|
|
582
|
-
headers:
|
|
654
|
+
return _context0.abrupt("return", _t42.request.call(_t42, {
|
|
655
|
+
method: _t43,
|
|
656
|
+
uri: _t44,
|
|
657
|
+
headers: _t47
|
|
583
658
|
}).catch(function (error) {
|
|
584
659
|
_loggerProxy.default.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);
|
|
585
660
|
throw error;
|
|
586
661
|
}));
|
|
587
662
|
case 2:
|
|
588
663
|
case "end":
|
|
589
|
-
return
|
|
664
|
+
return _context0.stop();
|
|
590
665
|
}
|
|
591
|
-
},
|
|
666
|
+
}, _callee0);
|
|
592
667
|
}))();
|
|
593
668
|
},
|
|
594
669
|
/**
|
|
@@ -600,14 +675,14 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
600
675
|
* @returns {Promise}
|
|
601
676
|
*/
|
|
602
677
|
searchLargeScaleWebinarAttendees: function searchLargeScaleWebinarAttendees(payload) {
|
|
603
|
-
var
|
|
604
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
678
|
+
var _this1 = this;
|
|
679
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
|
|
605
680
|
var _payload$limit, _meeting$locusInfo3, _meeting$locusInfo3$l, _meeting$locusInfo3$l2, _meeting$locusInfo3$l3;
|
|
606
|
-
var meeting, rawParams, attendeeSearchUrl,
|
|
607
|
-
return _regenerator.default.wrap(function (
|
|
608
|
-
while (1) switch (
|
|
681
|
+
var meeting, rawParams, attendeeSearchUrl, _t48, _t49, _t50, _t51, _t52, _t53;
|
|
682
|
+
return _regenerator.default.wrap(function (_context1) {
|
|
683
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
609
684
|
case 0:
|
|
610
|
-
meeting =
|
|
685
|
+
meeting = _this1.webex.meetings.getMeetingByType(_constants._ID_, _this1.meetingId);
|
|
611
686
|
rawParams = {
|
|
612
687
|
search_text: payload === null || payload === void 0 ? void 0 : payload.queryString,
|
|
613
688
|
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,
|
|
@@ -615,40 +690,40 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
615
690
|
};
|
|
616
691
|
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;
|
|
617
692
|
if (attendeeSearchUrl) {
|
|
618
|
-
|
|
693
|
+
_context1.next = 1;
|
|
619
694
|
break;
|
|
620
695
|
}
|
|
621
696
|
_loggerProxy.default.logger.error("Meeting:webinar5k#searchLargeScaleWebinarAttendees failed");
|
|
622
697
|
throw new Error('Meeting:webinar5k#Attendee search url is not available');
|
|
623
698
|
case 1:
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return
|
|
699
|
+
_t48 = _this1;
|
|
700
|
+
_t49 = _constants.HTTP_VERBS.GET;
|
|
701
|
+
_t50 = "".concat(attendeeSearchUrl, "?").concat(new URLSearchParams((0, _utils.sanitizeParams)(rawParams)).toString());
|
|
702
|
+
_context1.next = 2;
|
|
703
|
+
return _this1.webex.credentials.getUserToken();
|
|
629
704
|
case 2:
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
authorization:
|
|
634
|
-
trackingId:
|
|
705
|
+
_t51 = _context1.sent;
|
|
706
|
+
_t52 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
707
|
+
_t53 = {
|
|
708
|
+
authorization: _t51,
|
|
709
|
+
trackingId: _t52
|
|
635
710
|
};
|
|
636
|
-
return
|
|
637
|
-
method:
|
|
638
|
-
uri:
|
|
639
|
-
headers:
|
|
711
|
+
return _context1.abrupt("return", _t48.request.call(_t48, {
|
|
712
|
+
method: _t49,
|
|
713
|
+
uri: _t50,
|
|
714
|
+
headers: _t53
|
|
640
715
|
}).catch(function (error) {
|
|
641
716
|
_loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed', error);
|
|
642
717
|
throw error;
|
|
643
718
|
}));
|
|
644
719
|
case 3:
|
|
645
720
|
case "end":
|
|
646
|
-
return
|
|
721
|
+
return _context1.stop();
|
|
647
722
|
}
|
|
648
|
-
},
|
|
723
|
+
}, _callee1);
|
|
649
724
|
}))();
|
|
650
725
|
},
|
|
651
|
-
version: "3.12.0-next.
|
|
726
|
+
version: "3.12.0-next.7"
|
|
652
727
|
});
|
|
653
728
|
var _default = exports.default = Webinar;
|
|
654
729
|
//# sourceMappingURL=index.js.map
|