@webex/plugin-meetings 3.12.0-next.1 → 3.12.0-next.11
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/hashTree/constants.js +10 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +56 -31
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +22 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +38 -14
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/index.js +427 -323
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/metrics/constants.js +5 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +12 -2
- package/dist/types/hashTree/utils.d.ts +11 -0
- package/dist/types/locus-info/index.d.ts +8 -3
- package/dist/types/meeting/index.d.ts +24 -1
- package/dist/types/metrics/constants.d.ts +4 -0
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/webinar/index.js +325 -220
- package/dist/webinar/index.js.map +1 -1
- package/package.json +15 -15
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTreeParser.ts +60 -36
- package/src/hashTree/utils.ts +17 -0
- package/src/locus-info/index.ts +48 -24
- package/src/meeting/index.ts +165 -57
- package/src/meeting/util.ts +1 -0
- package/src/metrics/constants.ts +5 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/webinar/index.ts +120 -18
- package/test/unit/spec/hashTree/hashTreeParser.ts +295 -30
- package/test/unit/spec/hashTree/utils.ts +88 -1
- package/test/unit/spec/locus-info/index.js +47 -22
- package/test/unit/spec/meeting/index.js +179 -48
- package/test/unit/spec/meeting/utils.js +4 -0
- package/test/unit/spec/meetings/index.js +3 -3
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/webinar/index.ts +193 -8
package/dist/webinar/index.js
CHANGED
|
@@ -135,6 +135,11 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
135
135
|
return _regenerator.default.wrap(function (_context) {
|
|
136
136
|
while (1) switch (_context.prev = _context.next) {
|
|
137
137
|
case 0:
|
|
138
|
+
if (_this._pendingOnlineListener) {
|
|
139
|
+
// @ts-ignore - Fix type
|
|
140
|
+
_this.webex.internal.llm.off('online', _this._pendingOnlineListener);
|
|
141
|
+
_this._pendingOnlineListener = null;
|
|
142
|
+
}
|
|
138
143
|
meeting = _this.webex.meetings.getMeetingByType(_constants._ID_, _this.meetingId); // @ts-ignore - Fix type
|
|
139
144
|
_context.next = 1;
|
|
140
145
|
return _this.webex.internal.llm.disconnectLLM({
|
|
@@ -152,81 +157,182 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
152
157
|
}))();
|
|
153
158
|
},
|
|
154
159
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* @returns {Promise}
|
|
160
|
+
* Ensures practice-session token exists before registering the practice LLM channel.
|
|
161
|
+
* @param {object} meeting
|
|
162
|
+
* @returns {Promise<string|undefined>}
|
|
158
163
|
*/
|
|
159
|
-
|
|
164
|
+
ensurePracticeSessionDatachannelToken: function ensurePracticeSessionDatachannelToken(meeting) {
|
|
160
165
|
var _this2 = this;
|
|
161
166
|
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
162
|
-
var
|
|
167
|
+
var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, dataChannelTokenType, _t;
|
|
163
168
|
return _regenerator.default.wrap(function (_context2) {
|
|
164
169
|
while (1) switch (_context2.prev = _context2.next) {
|
|
165
170
|
case 0:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
171
|
+
_context2.next = 1;
|
|
172
|
+
return _this2.webex.internal.llm.isDataChannelTokenEnabled();
|
|
173
|
+
case 1:
|
|
174
|
+
isDataChannelTokenEnabled = _context2.sent;
|
|
175
|
+
if (isDataChannelTokenEnabled) {
|
|
169
176
|
_context2.next = 2;
|
|
170
177
|
break;
|
|
171
178
|
}
|
|
172
|
-
_context2.next = 1;
|
|
173
|
-
return _this2.cleanupPSDataChannel();
|
|
174
|
-
case 1:
|
|
175
179
|
return _context2.abrupt("return", undefined);
|
|
176
180
|
case 2:
|
|
177
|
-
// @ts-ignore
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
finalToken = currentToken !== null && currentToken !== void 0 ? currentToken : practiceSessionDatachannelToken;
|
|
181
|
-
isCaptionBoxOn = _this2.webex.internal.voicea.getIsCaptionBoxOn();
|
|
182
|
-
if (!currentToken && practiceSessionDatachannelToken) {
|
|
183
|
-
// @ts-ignore
|
|
184
|
-
_this2.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _internalPluginLlm.DataChannelTokenType.PracticeSession);
|
|
185
|
-
}
|
|
186
|
-
if (practiceSessionDatachannelUrl) {
|
|
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
|
-
|
|
210
|
-
|
|
268
|
+
// Ensure the default session data channel is connected before connecting the practice session.
|
|
269
|
+
// Subscribe before checking isConnected() to avoid a race where the 'online' event fires
|
|
270
|
+
// between the check and the subscription — Mercury does not replay missed events.
|
|
271
|
+
if (!_this3._pendingOnlineListener) {
|
|
272
|
+
_onDefaultSessionConnected = function onDefaultSessionConnected() {
|
|
273
|
+
_this3._pendingOnlineListener = null;
|
|
274
|
+
// @ts-ignore - Fix type
|
|
275
|
+
_this3.webex.internal.llm.off('online', _onDefaultSessionConnected);
|
|
276
|
+
_this3.updatePSDataChannel();
|
|
277
|
+
};
|
|
278
|
+
_this3._pendingOnlineListener = _onDefaultSessionConnected;
|
|
211
279
|
// @ts-ignore - Fix type
|
|
212
|
-
|
|
280
|
+
_this3.webex.internal.llm.on('online', _onDefaultSessionConnected);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// @ts-ignore - Fix type
|
|
284
|
+
if (_this3.webex.internal.llm.isConnected()) {
|
|
285
|
+
_context3.next = 6;
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
_loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> default session not yet connected, deferring practice session connect.');
|
|
289
|
+
return _context3.abrupt("return", undefined);
|
|
290
|
+
case 6:
|
|
291
|
+
// Default session is already connected — cancel the pending listener and proceed
|
|
292
|
+
if (_this3._pendingOnlineListener) {
|
|
213
293
|
// @ts-ignore - Fix type
|
|
214
|
-
|
|
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;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// @ts-ignore - Fix type
|
|
315
|
+
return _context3.abrupt("return", _this3.webex.internal.llm.registerAndConnect(url, practiceSessionDatachannelUrl, practiceSessionDatachannelToken, _constants.LLM_PRACTICE_SESSION).then(function (registerAndConnectResult) {
|
|
316
|
+
var _this3$webex$internal, _this3$webex$internal2;
|
|
317
|
+
// @ts-ignore - Fix type
|
|
318
|
+
_this3.webex.internal.llm.off("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
|
|
215
319
|
// @ts-ignore - Fix type
|
|
216
|
-
|
|
320
|
+
_this3.webex.internal.llm.on("event:relay.event:".concat(_constants.LLM_PRACTICE_SESSION), meeting === null || meeting === void 0 ? void 0 : meeting.processRelayEvent);
|
|
321
|
+
// @ts-ignore - Fix type
|
|
322
|
+
(_this3$webex$internal = _this3.webex.internal.voicea) === null || _this3$webex$internal === void 0 ? void 0 : (_this3$webex$internal2 = _this3$webex$internal.announce) === null || _this3$webex$internal2 === void 0 ? void 0 : _this3$webex$internal2.call(_this3$webex$internal);
|
|
217
323
|
if (isCaptionBoxOn) {
|
|
218
|
-
|
|
324
|
+
_this3.webex.internal.voicea.updateSubchannelSubscriptions({
|
|
219
325
|
subscribe: ['transcription']
|
|
220
326
|
});
|
|
221
327
|
}
|
|
222
328
|
_loggerProxy.default.logger.info("Webinar:index#updatePSDataChannel --> enabled to receive relay events for default session for ".concat(_constants.LLM_PRACTICE_SESSION, "!"));
|
|
223
329
|
return _promise.default.resolve(registerAndConnectResult);
|
|
224
330
|
}));
|
|
225
|
-
case
|
|
331
|
+
case 9:
|
|
226
332
|
case "end":
|
|
227
|
-
return
|
|
333
|
+
return _context3.stop();
|
|
228
334
|
}
|
|
229
|
-
},
|
|
335
|
+
}, _callee3);
|
|
230
336
|
}))();
|
|
231
337
|
},
|
|
232
338
|
/**
|
|
@@ -264,33 +370,33 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
264
370
|
* @returns {Promise}
|
|
265
371
|
*/
|
|
266
372
|
startWebcast: function startWebcast(meeting, layout) {
|
|
267
|
-
var
|
|
268
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
269
|
-
var
|
|
270
|
-
return _regenerator.default.wrap(function (
|
|
271
|
-
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) {
|
|
272
378
|
case 0:
|
|
273
379
|
if (meeting) {
|
|
274
|
-
|
|
380
|
+
_context4.next = 1;
|
|
275
381
|
break;
|
|
276
382
|
}
|
|
277
383
|
_loggerProxy.default.logger.error("Meeting:webinar#startWebcast failed --> meeting parameter : ".concat(meeting));
|
|
278
384
|
throw new Error('Meeting parameter does not meet expectations');
|
|
279
385
|
case 1:
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
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();
|
|
286
392
|
case 2:
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
authorization:
|
|
291
|
-
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
|
|
292
398
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
293
|
-
|
|
399
|
+
_t9 = {
|
|
294
400
|
action: 'start',
|
|
295
401
|
meetingInfo: {
|
|
296
402
|
locusId: meeting.locusId,
|
|
@@ -298,20 +404,20 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
298
404
|
},
|
|
299
405
|
layout: layout
|
|
300
406
|
};
|
|
301
|
-
return
|
|
302
|
-
method:
|
|
303
|
-
uri:
|
|
304
|
-
headers:
|
|
305
|
-
body:
|
|
407
|
+
return _context4.abrupt("return", _t2.request.call(_t2, {
|
|
408
|
+
method: _t3,
|
|
409
|
+
uri: _t4,
|
|
410
|
+
headers: _t8,
|
|
411
|
+
body: _t9
|
|
306
412
|
}).catch(function (error) {
|
|
307
413
|
_loggerProxy.default.logger.error('Meeting:webinar#startWebcast failed', error);
|
|
308
414
|
throw error;
|
|
309
415
|
}));
|
|
310
416
|
case 3:
|
|
311
417
|
case "end":
|
|
312
|
-
return
|
|
418
|
+
return _context4.stop();
|
|
313
419
|
}
|
|
314
|
-
},
|
|
420
|
+
}, _callee4);
|
|
315
421
|
}))();
|
|
316
422
|
},
|
|
317
423
|
/**
|
|
@@ -319,42 +425,42 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
319
425
|
* @returns {Promise}
|
|
320
426
|
*/
|
|
321
427
|
stopWebcast: function stopWebcast() {
|
|
322
|
-
var
|
|
323
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
324
|
-
var
|
|
325
|
-
return _regenerator.default.wrap(function (
|
|
326
|
-
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) {
|
|
327
433
|
case 0:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
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();
|
|
334
440
|
case 1:
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
authorization:
|
|
339
|
-
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
|
|
340
446
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
341
|
-
|
|
447
|
+
_t15 = {
|
|
342
448
|
action: 'stop'
|
|
343
449
|
};
|
|
344
|
-
return
|
|
345
|
-
method:
|
|
346
|
-
uri:
|
|
347
|
-
headers:
|
|
348
|
-
body:
|
|
450
|
+
return _context5.abrupt("return", _t0.request.call(_t0, {
|
|
451
|
+
method: _t1,
|
|
452
|
+
uri: _t10,
|
|
453
|
+
headers: _t14,
|
|
454
|
+
body: _t15
|
|
349
455
|
}).catch(function (error) {
|
|
350
456
|
_loggerProxy.default.logger.error('Meeting:webinar#stopWebcast failed', error);
|
|
351
457
|
throw error;
|
|
352
458
|
}));
|
|
353
459
|
case 2:
|
|
354
460
|
case "end":
|
|
355
|
-
return
|
|
461
|
+
return _context5.stop();
|
|
356
462
|
}
|
|
357
|
-
},
|
|
463
|
+
}, _callee5);
|
|
358
464
|
}))();
|
|
359
465
|
},
|
|
360
466
|
/**
|
|
@@ -362,37 +468,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
362
468
|
* @returns {Promise}
|
|
363
469
|
*/
|
|
364
470
|
queryWebcastLayout: function queryWebcastLayout() {
|
|
365
|
-
var
|
|
366
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
367
|
-
var
|
|
368
|
-
return _regenerator.default.wrap(function (
|
|
369
|
-
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) {
|
|
370
476
|
case 0:
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
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();
|
|
376
482
|
case 1:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
authorization:
|
|
381
|
-
trackingId:
|
|
483
|
+
_t19 = _context6.sent;
|
|
484
|
+
_t20 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
485
|
+
_t21 = {
|
|
486
|
+
authorization: _t19,
|
|
487
|
+
trackingId: _t20
|
|
382
488
|
};
|
|
383
|
-
return
|
|
384
|
-
method:
|
|
385
|
-
uri:
|
|
386
|
-
headers:
|
|
489
|
+
return _context6.abrupt("return", _t16.request.call(_t16, {
|
|
490
|
+
method: _t17,
|
|
491
|
+
uri: _t18,
|
|
492
|
+
headers: _t21
|
|
387
493
|
}).catch(function (error) {
|
|
388
494
|
_loggerProxy.default.logger.error('Meeting:webinar#queryWebcastLayout failed', error);
|
|
389
495
|
throw error;
|
|
390
496
|
}));
|
|
391
497
|
case 2:
|
|
392
498
|
case "end":
|
|
393
|
-
return
|
|
499
|
+
return _context6.stop();
|
|
394
500
|
}
|
|
395
|
-
},
|
|
501
|
+
}, _callee6);
|
|
396
502
|
}))();
|
|
397
503
|
},
|
|
398
504
|
/**
|
|
@@ -401,84 +507,83 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
401
507
|
* @returns {Promise}
|
|
402
508
|
*/
|
|
403
509
|
updateWebcastLayout: function updateWebcastLayout(layout) {
|
|
404
|
-
var
|
|
405
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
406
|
-
var
|
|
407
|
-
return _regenerator.default.wrap(function (
|
|
408
|
-
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) {
|
|
409
515
|
case 0:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
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();
|
|
416
522
|
case 1:
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
authorization:
|
|
421
|
-
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
|
|
422
528
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
423
|
-
|
|
529
|
+
_t29 = {
|
|
424
530
|
videoLayout: layout.videoLayout,
|
|
425
531
|
contentLayout: layout.contentLayout,
|
|
426
532
|
syncStageLayout: layout.syncStageLayout,
|
|
427
533
|
syncStageInMeeting: layout.syncStageInMeeting
|
|
428
534
|
};
|
|
429
|
-
return
|
|
430
|
-
method:
|
|
431
|
-
uri:
|
|
432
|
-
headers:
|
|
433
|
-
body:
|
|
535
|
+
return _context7.abrupt("return", _t22.request.call(_t22, {
|
|
536
|
+
method: _t23,
|
|
537
|
+
uri: _t24,
|
|
538
|
+
headers: _t28,
|
|
539
|
+
body: _t29
|
|
434
540
|
}).catch(function (error) {
|
|
435
541
|
_loggerProxy.default.logger.error('Meeting:webinar#updateWebcastLayout failed', error);
|
|
436
542
|
throw error;
|
|
437
543
|
}));
|
|
438
544
|
case 2:
|
|
439
545
|
case "end":
|
|
440
|
-
return
|
|
546
|
+
return _context7.stop();
|
|
441
547
|
}
|
|
442
|
-
},
|
|
548
|
+
}, _callee7);
|
|
443
549
|
}))();
|
|
444
550
|
},
|
|
445
551
|
/**
|
|
446
552
|
* view all webcast attendees
|
|
447
|
-
* @param {string} queryString
|
|
448
553
|
* @returns {Promise}
|
|
449
554
|
*/
|
|
450
555
|
viewAllWebcastAttendees: function viewAllWebcastAttendees() {
|
|
451
|
-
var
|
|
452
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
453
|
-
var
|
|
454
|
-
return _regenerator.default.wrap(function (
|
|
455
|
-
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) {
|
|
456
561
|
case 0:
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
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();
|
|
462
567
|
case 1:
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
authorization:
|
|
467
|
-
trackingId:
|
|
568
|
+
_t33 = _context8.sent;
|
|
569
|
+
_t34 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
570
|
+
_t35 = {
|
|
571
|
+
authorization: _t33,
|
|
572
|
+
trackingId: _t34
|
|
468
573
|
};
|
|
469
|
-
return
|
|
470
|
-
method:
|
|
471
|
-
uri:
|
|
472
|
-
headers:
|
|
574
|
+
return _context8.abrupt("return", _t30.request.call(_t30, {
|
|
575
|
+
method: _t31,
|
|
576
|
+
uri: _t32,
|
|
577
|
+
headers: _t35
|
|
473
578
|
}).catch(function (error) {
|
|
474
579
|
_loggerProxy.default.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);
|
|
475
580
|
throw error;
|
|
476
581
|
}));
|
|
477
582
|
case 2:
|
|
478
583
|
case "end":
|
|
479
|
-
return
|
|
584
|
+
return _context8.stop();
|
|
480
585
|
}
|
|
481
|
-
},
|
|
586
|
+
}, _callee8);
|
|
482
587
|
}))();
|
|
483
588
|
},
|
|
484
589
|
/**
|
|
@@ -488,38 +593,38 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
488
593
|
*/
|
|
489
594
|
searchWebcastAttendees: function searchWebcastAttendees() {
|
|
490
595
|
var _arguments = arguments,
|
|
491
|
-
|
|
492
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
493
|
-
var queryString,
|
|
494
|
-
return _regenerator.default.wrap(function (
|
|
495
|
-
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) {
|
|
496
601
|
case 0:
|
|
497
602
|
queryString = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : '';
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
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();
|
|
503
608
|
case 1:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
authorization:
|
|
508
|
-
trackingId:
|
|
609
|
+
_t39 = _context9.sent;
|
|
610
|
+
_t40 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
611
|
+
_t41 = {
|
|
612
|
+
authorization: _t39,
|
|
613
|
+
trackingId: _t40
|
|
509
614
|
};
|
|
510
|
-
return
|
|
511
|
-
method:
|
|
512
|
-
uri:
|
|
513
|
-
headers:
|
|
615
|
+
return _context9.abrupt("return", _t36.request.call(_t36, {
|
|
616
|
+
method: _t37,
|
|
617
|
+
uri: _t38,
|
|
618
|
+
headers: _t41
|
|
514
619
|
}).catch(function (error) {
|
|
515
620
|
_loggerProxy.default.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);
|
|
516
621
|
throw error;
|
|
517
622
|
}));
|
|
518
623
|
case 2:
|
|
519
624
|
case "end":
|
|
520
|
-
return
|
|
625
|
+
return _context9.stop();
|
|
521
626
|
}
|
|
522
|
-
},
|
|
627
|
+
}, _callee9);
|
|
523
628
|
}))();
|
|
524
629
|
},
|
|
525
630
|
/**
|
|
@@ -528,37 +633,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
528
633
|
* @returns {Promise}
|
|
529
634
|
*/
|
|
530
635
|
expelWebcastAttendee: function expelWebcastAttendee(participantId) {
|
|
531
|
-
var
|
|
532
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
533
|
-
var
|
|
534
|
-
return _regenerator.default.wrap(function (
|
|
535
|
-
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) {
|
|
536
641
|
case 0:
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
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();
|
|
542
647
|
case 1:
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
authorization:
|
|
547
|
-
trackingId:
|
|
648
|
+
_t45 = _context0.sent;
|
|
649
|
+
_t46 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
650
|
+
_t47 = {
|
|
651
|
+
authorization: _t45,
|
|
652
|
+
trackingId: _t46
|
|
548
653
|
};
|
|
549
|
-
return
|
|
550
|
-
method:
|
|
551
|
-
uri:
|
|
552
|
-
headers:
|
|
654
|
+
return _context0.abrupt("return", _t42.request.call(_t42, {
|
|
655
|
+
method: _t43,
|
|
656
|
+
uri: _t44,
|
|
657
|
+
headers: _t47
|
|
553
658
|
}).catch(function (error) {
|
|
554
659
|
_loggerProxy.default.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);
|
|
555
660
|
throw error;
|
|
556
661
|
}));
|
|
557
662
|
case 2:
|
|
558
663
|
case "end":
|
|
559
|
-
return
|
|
664
|
+
return _context0.stop();
|
|
560
665
|
}
|
|
561
|
-
},
|
|
666
|
+
}, _callee0);
|
|
562
667
|
}))();
|
|
563
668
|
},
|
|
564
669
|
/**
|
|
@@ -570,14 +675,14 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
570
675
|
* @returns {Promise}
|
|
571
676
|
*/
|
|
572
677
|
searchLargeScaleWebinarAttendees: function searchLargeScaleWebinarAttendees(payload) {
|
|
573
|
-
var
|
|
574
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
678
|
+
var _this1 = this;
|
|
679
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
|
|
575
680
|
var _payload$limit, _meeting$locusInfo3, _meeting$locusInfo3$l, _meeting$locusInfo3$l2, _meeting$locusInfo3$l3;
|
|
576
|
-
var meeting, rawParams, attendeeSearchUrl,
|
|
577
|
-
return _regenerator.default.wrap(function (
|
|
578
|
-
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) {
|
|
579
684
|
case 0:
|
|
580
|
-
meeting =
|
|
685
|
+
meeting = _this1.webex.meetings.getMeetingByType(_constants._ID_, _this1.meetingId);
|
|
581
686
|
rawParams = {
|
|
582
687
|
search_text: payload === null || payload === void 0 ? void 0 : payload.queryString,
|
|
583
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,
|
|
@@ -585,40 +690,40 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
585
690
|
};
|
|
586
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;
|
|
587
692
|
if (attendeeSearchUrl) {
|
|
588
|
-
|
|
693
|
+
_context1.next = 1;
|
|
589
694
|
break;
|
|
590
695
|
}
|
|
591
696
|
_loggerProxy.default.logger.error("Meeting:webinar5k#searchLargeScaleWebinarAttendees failed");
|
|
592
697
|
throw new Error('Meeting:webinar5k#Attendee search url is not available');
|
|
593
698
|
case 1:
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
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();
|
|
599
704
|
case 2:
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
authorization:
|
|
604
|
-
trackingId:
|
|
705
|
+
_t51 = _context1.sent;
|
|
706
|
+
_t52 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
707
|
+
_t53 = {
|
|
708
|
+
authorization: _t51,
|
|
709
|
+
trackingId: _t52
|
|
605
710
|
};
|
|
606
|
-
return
|
|
607
|
-
method:
|
|
608
|
-
uri:
|
|
609
|
-
headers:
|
|
711
|
+
return _context1.abrupt("return", _t48.request.call(_t48, {
|
|
712
|
+
method: _t49,
|
|
713
|
+
uri: _t50,
|
|
714
|
+
headers: _t53
|
|
610
715
|
}).catch(function (error) {
|
|
611
716
|
_loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed', error);
|
|
612
717
|
throw error;
|
|
613
718
|
}));
|
|
614
719
|
case 3:
|
|
615
720
|
case "end":
|
|
616
|
-
return
|
|
721
|
+
return _context1.stop();
|
|
617
722
|
}
|
|
618
|
-
},
|
|
723
|
+
}, _callee1);
|
|
619
724
|
}))();
|
|
620
725
|
},
|
|
621
|
-
version: "3.12.0-next.
|
|
726
|
+
version: "3.12.0-next.11"
|
|
622
727
|
});
|
|
623
728
|
var _default = exports.default = Webinar;
|
|
624
729
|
//# sourceMappingURL=index.js.map
|