@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.
@@ -157,107 +157,182 @@ var Webinar = _webexCore.WebexPlugin.extend({
157
157
  }))();
158
158
  },
159
159
  /**
160
- * Connects to low latency mercury and reconnects if the address has changed
161
- * It will also disconnect if called when the meeting has ended
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
- updatePSDataChannel: function updatePSDataChannel() {
164
+ ensurePracticeSessionDatachannelToken: function ensurePracticeSessionDatachannelToken(meeting) {
165
165
  var _this2 = this;
166
166
  return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
167
- var meeting, isPracticeSession, _ref2, _ref2$url, url, _ref2$info, _ref2$info2, _ref2$info2$practiceS, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, isCaptionBoxOn, _onDefaultSessionConnected;
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
- meeting = _this2.webex.meetings.getMeetingByType(_constants._ID_, _this2.meetingId);
172
- isPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this2.isJoinPracticeSessionDataChannel();
173
- if (isPracticeSession) {
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 - Fix type
183
- _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; // @ts-ignore
184
- practiceSessionDatachannelToken = _this2.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.PracticeSession);
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", undefined);
187
+ return _context2.abrupt("return", cachedToken);
191
188
  case 3:
192
- if (!_this2.webex.internal.llm.isConnected(_constants.LLM_PRACTICE_SESSION)) {
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 === _this2.webex.internal.llm.getLocusUrl(_constants.LLM_PRACTICE_SESSION) &&
257
+ url === _this3.webex.internal.llm.getLocusUrl(_constants.LLM_PRACTICE_SESSION) &&
199
258
  // @ts-ignore - Fix type
200
- practiceSessionDatachannelUrl === _this2.webex.internal.llm.getDatachannelUrl(_constants.LLM_PRACTICE_SESSION))) {
201
- _context2.next = 4;
259
+ practiceSessionDatachannelUrl === _this3.webex.internal.llm.getDatachannelUrl(_constants.LLM_PRACTICE_SESSION))) {
260
+ _context3.next = 4;
202
261
  break;
203
262
  }
204
- return _context2.abrupt("return", undefined);
263
+ return _context3.abrupt("return", undefined);
205
264
  case 4:
206
- _context2.next = 5;
207
- return _this2.cleanupPSDataChannel();
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 (!_this2._pendingOnlineListener) {
271
+ if (!_this3._pendingOnlineListener) {
213
272
  _onDefaultSessionConnected = function onDefaultSessionConnected() {
214
- _this2._pendingOnlineListener = null;
273
+ _this3._pendingOnlineListener = null;
215
274
  // @ts-ignore - Fix type
216
- _this2.webex.internal.llm.off('online', _onDefaultSessionConnected);
217
- _this2.updatePSDataChannel();
275
+ _this3.webex.internal.llm.off('online', _onDefaultSessionConnected);
276
+ _this3.updatePSDataChannel();
218
277
  };
219
- _this2._pendingOnlineListener = _onDefaultSessionConnected;
278
+ _this3._pendingOnlineListener = _onDefaultSessionConnected;
220
279
  // @ts-ignore - Fix type
221
- _this2.webex.internal.llm.on('online', _onDefaultSessionConnected);
280
+ _this3.webex.internal.llm.on('online', _onDefaultSessionConnected);
222
281
  }
223
282
 
224
283
  // @ts-ignore - Fix type
225
- if (_this2.webex.internal.llm.isConnected()) {
226
- _context2.next = 6;
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 _context2.abrupt("return", undefined);
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 (_this2._pendingOnlineListener) {
292
+ if (_this3._pendingOnlineListener) {
234
293
  // @ts-ignore - Fix type
235
- _this2.webex.internal.llm.off('online', _this2._pendingOnlineListener);
236
- _this2._pendingOnlineListener = null;
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 _context2.abrupt("return", _this2.webex.internal.llm.registerAndConnect(url, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION).then(function (registerAndConnectResult) {
241
- var _this2$webex$internal, _this2$webex$internal2;
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
- _this2.webex.internal.llm.off("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
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
- _this2.webex.internal.llm.on("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
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
- (_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);
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
- _this2.webex.internal.voicea.updateSubchannelSubscriptions({
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 7:
331
+ case 9:
257
332
  case "end":
258
- return _context2.stop();
333
+ return _context3.stop();
259
334
  }
260
- }, _callee2);
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 _this3 = this;
299
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
300
- var _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8;
301
- return _regenerator.default.wrap(function (_context3) {
302
- while (1) switch (_context3.prev = _context3.next) {
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
- _context3.next = 1;
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
- _t = _this3;
312
- _t2 = _constants.HTTP_VERBS.PUT;
313
- _t3 = "".concat(_this3.webcastInstanceUrl, "/streaming");
314
- _t4 = _defineProperty2.default;
315
- _context3.next = 2;
316
- return _this3.webex.credentials.getUserToken();
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
- _t5 = _context3.sent;
319
- _t6 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
320
- _t7 = _t4({
321
- authorization: _t5,
322
- trackingId: _t6
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
- _t8 = {
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 _context3.abrupt("return", _t.request.call(_t, {
333
- method: _t2,
334
- uri: _t3,
335
- headers: _t7,
336
- body: _t8
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 _context3.stop();
418
+ return _context4.stop();
344
419
  }
345
- }, _callee3);
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 _this4 = this;
354
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
355
- var _t9, _t0, _t1, _t10, _t11, _t12, _t13, _t14;
356
- return _regenerator.default.wrap(function (_context4) {
357
- while (1) switch (_context4.prev = _context4.next) {
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
- _t9 = _this4;
360
- _t0 = _constants.HTTP_VERBS.PUT;
361
- _t1 = "".concat(_this4.webcastInstanceUrl, "/streaming");
362
- _t10 = _defineProperty2.default;
363
- _context4.next = 1;
364
- return _this4.webex.credentials.getUserToken();
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
- _t11 = _context4.sent;
367
- _t12 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
368
- _t13 = _t10({
369
- authorization: _t11,
370
- trackingId: _t12
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
- _t14 = {
447
+ _t15 = {
373
448
  action: 'stop'
374
449
  };
375
- return _context4.abrupt("return", _t9.request.call(_t9, {
376
- method: _t0,
377
- uri: _t1,
378
- headers: _t13,
379
- body: _t14
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 _context4.stop();
461
+ return _context5.stop();
387
462
  }
388
- }, _callee4);
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 _this5 = this;
397
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
398
- var _t15, _t16, _t17, _t18, _t19, _t20;
399
- return _regenerator.default.wrap(function (_context5) {
400
- while (1) switch (_context5.prev = _context5.next) {
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
- _t15 = _this5;
403
- _t16 = _constants.HTTP_VERBS.GET;
404
- _t17 = "".concat(_this5.webcastInstanceUrl, "/layout");
405
- _context5.next = 1;
406
- return _this5.webex.credentials.getUserToken();
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
- _t18 = _context5.sent;
409
- _t19 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
410
- _t20 = {
411
- authorization: _t18,
412
- trackingId: _t19
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 _context5.abrupt("return", _t15.request.call(_t15, {
415
- method: _t16,
416
- uri: _t17,
417
- headers: _t20
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 _context5.stop();
499
+ return _context6.stop();
425
500
  }
426
- }, _callee5);
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 _this6 = this;
436
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
437
- var _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28;
438
- return _regenerator.default.wrap(function (_context6) {
439
- while (1) switch (_context6.prev = _context6.next) {
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
- _t21 = _this6;
442
- _t22 = _constants.HTTP_VERBS.PUT;
443
- _t23 = "".concat(_this6.webcastInstanceUrl, "/layout");
444
- _t24 = _defineProperty2.default;
445
- _context6.next = 1;
446
- return _this6.webex.credentials.getUserToken();
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
- _t25 = _context6.sent;
449
- _t26 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
450
- _t27 = _t24({
451
- authorization: _t25,
452
- trackingId: _t26
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
- _t28 = {
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 _context6.abrupt("return", _t21.request.call(_t21, {
461
- method: _t22,
462
- uri: _t23,
463
- headers: _t27,
464
- body: _t28
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 _context6.stop();
546
+ return _context7.stop();
472
547
  }
473
- }, _callee6);
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 _this7 = this;
482
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
483
- var _t29, _t30, _t31, _t32, _t33, _t34;
484
- return _regenerator.default.wrap(function (_context7) {
485
- while (1) switch (_context7.prev = _context7.next) {
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
- _t29 = _this7;
488
- _t30 = _constants.HTTP_VERBS.GET;
489
- _t31 = "".concat(_this7.webcastInstanceUrl, "/attendees");
490
- _context7.next = 1;
491
- return _this7.webex.credentials.getUserToken();
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
- _t32 = _context7.sent;
494
- _t33 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
495
- _t34 = {
496
- authorization: _t32,
497
- trackingId: _t33
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 _context7.abrupt("return", _t29.request.call(_t29, {
500
- method: _t30,
501
- uri: _t31,
502
- headers: _t34
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 _context7.stop();
584
+ return _context8.stop();
510
585
  }
511
- }, _callee7);
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
- _this8 = this;
522
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
523
- var queryString, _t35, _t36, _t37, _t38, _t39, _t40;
524
- return _regenerator.default.wrap(function (_context8) {
525
- while (1) switch (_context8.prev = _context8.next) {
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
- _t35 = _this8;
529
- _t36 = _constants.HTTP_VERBS.GET;
530
- _t37 = "".concat(_this8.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
531
- _context8.next = 1;
532
- return _this8.webex.credentials.getUserToken();
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
- _t38 = _context8.sent;
535
- _t39 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
536
- _t40 = {
537
- authorization: _t38,
538
- trackingId: _t39
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 _context8.abrupt("return", _t35.request.call(_t35, {
541
- method: _t36,
542
- uri: _t37,
543
- headers: _t40
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 _context8.stop();
625
+ return _context9.stop();
551
626
  }
552
- }, _callee8);
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 _this9 = this;
562
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
563
- var _t41, _t42, _t43, _t44, _t45, _t46;
564
- return _regenerator.default.wrap(function (_context9) {
565
- while (1) switch (_context9.prev = _context9.next) {
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
- _t41 = _this9;
568
- _t42 = _constants.HTTP_VERBS.DELETE;
569
- _t43 = "".concat(_this9.webcastInstanceUrl, "/attendees/").concat(participantId);
570
- _context9.next = 1;
571
- return _this9.webex.credentials.getUserToken();
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
- _t44 = _context9.sent;
574
- _t45 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
575
- _t46 = {
576
- authorization: _t44,
577
- trackingId: _t45
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 _context9.abrupt("return", _t41.request.call(_t41, {
580
- method: _t42,
581
- uri: _t43,
582
- headers: _t46
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 _context9.stop();
664
+ return _context0.stop();
590
665
  }
591
- }, _callee9);
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 _this0 = this;
604
- return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
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, _t47, _t48, _t49, _t50, _t51, _t52;
607
- return _regenerator.default.wrap(function (_context0) {
608
- while (1) switch (_context0.prev = _context0.next) {
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 = _this0.webex.meetings.getMeetingByType(_constants._ID_, _this0.meetingId);
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
- _context0.next = 1;
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
- _t47 = _this0;
625
- _t48 = _constants.HTTP_VERBS.GET;
626
- _t49 = "".concat(attendeeSearchUrl, "?").concat(new URLSearchParams((0, _utils.sanitizeParams)(rawParams)).toString());
627
- _context0.next = 2;
628
- return _this0.webex.credentials.getUserToken();
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
- _t50 = _context0.sent;
631
- _t51 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
632
- _t52 = {
633
- authorization: _t50,
634
- trackingId: _t51
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 _context0.abrupt("return", _t47.request.call(_t47, {
637
- method: _t48,
638
- uri: _t49,
639
- headers: _t52
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 _context0.stop();
721
+ return _context1.stop();
647
722
  }
648
- }, _callee0);
723
+ }, _callee1);
649
724
  }))();
650
725
  },
651
- version: "3.12.0-next.6"
726
+ version: "3.12.0-next.7"
652
727
  });
653
728
  var _default = exports.default = Webinar;
654
729
  //# sourceMappingURL=index.js.map