@webex/plugin-meetings 3.11.0 → 3.12.0-llmrefactor.1
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +197 -0
- package/dist/aiEnableRequest/index.js.map +1 -0
- package/dist/aiEnableRequest/utils.js +36 -0
- package/dist/aiEnableRequest/utils.js.map +1 -0
- package/dist/annotation/index.js +58 -13
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +124 -7
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +8 -3
- package/dist/config.js.map +1 -1
- package/dist/constants.js +60 -11
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +16 -2
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTree.js +18 -0
- package/dist/hashTree/hashTree.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1655 -538
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +4 -2
- package/dist/hashTree/types.js.map +1 -1
- package/dist/hashTree/utils.js +52 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/constant.js +12 -0
- package/dist/interceptors/constant.js.map +1 -0
- package/dist/interceptors/dataChannelAuthToken.js +332 -0
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
- package/dist/interceptors/index.js +7 -0
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/utils.js +27 -0
- package/dist/interceptors/utils.js.map +1 -0
- package/dist/interpretation/index.js +11 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +9 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +914 -212
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +1 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +72 -3
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +8 -7
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +11 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2287 -1118
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +55 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +168 -5
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +369 -162
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +20 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +40 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +12 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +64 -68
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +11 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +139 -93
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +0 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/aiEnableRequest/index.d.ts +5 -0
- package/dist/types/aiEnableRequest/utils.d.ts +2 -0
- package/dist/types/annotation/index.d.ts +19 -0
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +6 -2
- package/dist/types/constants.d.ts +35 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +3 -0
- package/dist/types/hashTree/hashTree.d.ts +7 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +315 -30
- package/dist/types/hashTree/types.d.ts +3 -0
- package/dist/types/hashTree/utils.d.ts +24 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interceptors/constant.d.ts +5 -0
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
- package/dist/types/interceptors/index.d.ts +2 -1
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interceptors/utils.d.ts +1 -0
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +126 -15
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +28 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
- package/dist/types/media/properties.d.ts +8 -3
- package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
- package/dist/types/meeting/index.d.ts +271 -16
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +17 -1
- package/dist/types/meeting/request.type.d.ts +5 -0
- package/dist/types/meeting/util.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +42 -20
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +2 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +14 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +11 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +4 -0
- package/dist/types/webinar/utils.d.ts +6 -0
- package/dist/webinar/index.js +611 -164
- package/dist/webinar/index.js.map +1 -1
- package/dist/webinar/utils.js +25 -0
- package/dist/webinar/utils.js.map +1 -0
- package/package.json +24 -23
- package/src/aiEnableRequest/README.md +84 -0
- package/src/aiEnableRequest/index.ts +186 -0
- package/src/aiEnableRequest/utils.ts +25 -0
- package/src/annotation/index.ts +62 -12
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +143 -3
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +6 -2
- package/src/constants.ts +49 -3
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +17 -0
- package/src/hashTree/hashTree.ts +17 -0
- package/src/hashTree/hashTreeParser.ts +1482 -361
- package/src/hashTree/types.ts +4 -0
- package/src/hashTree/utils.ts +45 -0
- package/src/index.ts +14 -1
- package/src/interceptors/constant.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +217 -0
- package/src/interceptors/index.ts +2 -1
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interceptors/utils.ts +16 -0
- package/src/interpretation/index.ts +29 -11
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +14 -1
- package/src/locus-info/index.ts +976 -203
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/selfUtils.ts +1 -0
- package/src/locus-info/types.ts +33 -1
- package/src/media/MediaConnectionAwaiter.ts +62 -5
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +11 -4
- package/src/meeting/in-meeting-actions.ts +20 -0
- package/src/meeting/index.ts +1258 -222
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +53 -0
- package/src/meeting/request.type.ts +6 -0
- package/src/meeting/util.ts +207 -7
- package/src/meeting-info/meeting-info-v2.ts +4 -2
- package/src/meetings/index.ts +319 -117
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/index.ts +20 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +41 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +12 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +117 -76
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/multistream/remoteMediaManager.ts +13 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +56 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/reactions.type.ts +4 -0
- package/src/reconnection-manager/index.ts +0 -1
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +415 -11
- package/src/webinar/utils.ts +16 -0
- package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
- package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
- package/test/unit/spec/annotation/index.ts +228 -134
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +305 -18
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTree.ts +66 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +4528 -171
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +388 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interceptors/utils.ts +75 -0
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +200 -56
- package/test/unit/spec/locus-info/index.js +1861 -149
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +35 -26
- package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
- package/test/unit/spec/meeting/index.js +3694 -450
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +82 -0
- package/test/unit/spec/meeting/utils.js +595 -27
- package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
- package/test/unit/spec/meetings/index.js +1138 -86
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +35 -4
- package/test/unit/spec/member/util.js +154 -27
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
- package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/reachability/index.ts +151 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/reconnection-manager/index.js +4 -8
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +1087 -167
- package/test/unit/spec/webinar/utils.ts +39 -0
package/dist/webinar/index.js
CHANGED
|
@@ -6,6 +6,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
9
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
10
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
11
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
@@ -15,6 +16,8 @@ var _lodash = require("lodash");
|
|
|
15
16
|
var _constants = require("../constants");
|
|
16
17
|
var _collection = _interopRequireDefault(require("./collection"));
|
|
17
18
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
19
|
+
var _util = _interopRequireDefault(require("../meeting/util"));
|
|
20
|
+
var _utils = require("./utils");
|
|
18
21
|
/*!
|
|
19
22
|
* Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.
|
|
20
23
|
*/
|
|
@@ -42,6 +45,26 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
42
45
|
// practice session enabled
|
|
43
46
|
meetingId: 'string'
|
|
44
47
|
},
|
|
48
|
+
/**
|
|
49
|
+
* LLM channel for practice session, owned by this webinar instance.
|
|
50
|
+
* @private
|
|
51
|
+
* @type {LLMChannel|undefined}
|
|
52
|
+
*/
|
|
53
|
+
_practiceSessionLLMChannel: undefined,
|
|
54
|
+
/**
|
|
55
|
+
* Pending practice session datachannel token, saved from join response.
|
|
56
|
+
* Used when creating the practice session LLM channel.
|
|
57
|
+
* @private
|
|
58
|
+
* @type {string|undefined}
|
|
59
|
+
*/
|
|
60
|
+
_pendingPracticeSessionDatachannelToken: undefined,
|
|
61
|
+
/**
|
|
62
|
+
* Calls this to clean up listeners
|
|
63
|
+
* @returns {void}
|
|
64
|
+
*/
|
|
65
|
+
cleanUp: function cleanUp() {
|
|
66
|
+
this.cleanupPSDataChannel();
|
|
67
|
+
},
|
|
45
68
|
/**
|
|
46
69
|
* Update the current locus url of the webinar
|
|
47
70
|
* @param {string} locusUrl
|
|
@@ -90,6 +113,31 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
90
113
|
isDemoted: isDemoted
|
|
91
114
|
};
|
|
92
115
|
},
|
|
116
|
+
/**
|
|
117
|
+
* Resolves the meeting associated with this webinar instance, guarded against the
|
|
118
|
+
* meetingId pointer drifting onto an unrelated transient meeting (e.g. an inbound
|
|
119
|
+
* 1:1 call) that may exist in the meeting collection. Returns the meeting only when
|
|
120
|
+
* its locusUrl matches this webinar's tracked locusUrl. Returns undefined (with a
|
|
121
|
+
* warning) when the meeting cannot be resolved or when the webinar's locusUrl has
|
|
122
|
+
* not been initialized yet — callers must treat this as "no owned meeting" rather
|
|
123
|
+
* than fall through to an unvalidated lookup.
|
|
124
|
+
* @returns {object|undefined}
|
|
125
|
+
*/
|
|
126
|
+
getValidatedWebinarMeeting: function getValidatedWebinarMeeting() {
|
|
127
|
+
var meeting = this.webex.meetings.getMeetingByType(_constants._ID_, this.meetingId);
|
|
128
|
+
if (!meeting) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
if (!this.locusUrl) {
|
|
132
|
+
_loggerProxy.default.logger.warn("Webinar:index#getValidatedWebinarMeeting --> skipping; webinar locusUrl is not yet initialized for meetingId ".concat(this.meetingId));
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
if (meeting.locusUrl !== this.locusUrl) {
|
|
136
|
+
_loggerProxy.default.logger.warn("Webinar:index#getValidatedWebinarMeeting --> skipping; meeting ".concat(this.meetingId, " locusUrl ").concat(meeting.locusUrl, " does not match webinar locusUrl ").concat(this.locusUrl));
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
return meeting;
|
|
140
|
+
},
|
|
93
141
|
/**
|
|
94
142
|
* should join practice session data channel or not
|
|
95
143
|
* @param {Object} {isPromoted: boolean, isDemoted: boolean}} Role transition states
|
|
@@ -98,17 +146,14 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
98
146
|
updateStatusByRole: function updateStatusByRole(_ref) {
|
|
99
147
|
var isPromoted = _ref.isPromoted,
|
|
100
148
|
isDemoted = _ref.isDemoted;
|
|
101
|
-
var meeting = this.
|
|
149
|
+
var meeting = this.getValidatedWebinarMeeting();
|
|
102
150
|
if (isDemoted && (meeting === null || meeting === void 0 ? void 0 : meeting.shareStatus) === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE || isPromoted) {
|
|
103
151
|
var _meeting$locusInfo, _meeting$locusInfo2;
|
|
104
152
|
// attendees in webinar should subscribe streaming for whiteboard sharing
|
|
105
153
|
// while panelist still need subscribe native mode so trigger force update here
|
|
106
154
|
meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.updateMediaShares(meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo2 = meeting.locusInfo) === null || _meeting$locusInfo2 === void 0 ? void 0 : _meeting$locusInfo2.mediaShares, true);
|
|
107
155
|
}
|
|
108
|
-
|
|
109
|
-
// may need change data channel in practice session
|
|
110
|
-
meeting === null || meeting === void 0 ? void 0 : meeting.updateLLMConnection();
|
|
111
|
-
}
|
|
156
|
+
this.updatePSDataChannel();
|
|
112
157
|
},
|
|
113
158
|
/**
|
|
114
159
|
* should join practice session data channel or not
|
|
@@ -117,12 +162,347 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
117
162
|
isJoinPracticeSessionDataChannel: function isJoinPracticeSessionDataChannel() {
|
|
118
163
|
return this.selfIsPanelist && this.practiceSessionEnabled;
|
|
119
164
|
},
|
|
165
|
+
/**
|
|
166
|
+
* Returns the practice session LLM channel binding, if connected.
|
|
167
|
+
* @returns {string|undefined}
|
|
168
|
+
*/
|
|
169
|
+
getPracticeSessionBinding: function getPracticeSessionBinding() {
|
|
170
|
+
var _this$_practiceSessio;
|
|
171
|
+
return (_this$_practiceSessio = this._practiceSessionLLMChannel) === null || _this$_practiceSessio === void 0 ? void 0 : _this$_practiceSessio.getBinding();
|
|
172
|
+
},
|
|
173
|
+
/**
|
|
174
|
+
* Returns whether the practice session LLM channel is connected.
|
|
175
|
+
* @returns {boolean}
|
|
176
|
+
*/
|
|
177
|
+
isPracticeSessionLLMChannelConnected: function isPracticeSessionLLMChannelConnected() {
|
|
178
|
+
var _this$_practiceSessio2, _this$_practiceSessio3;
|
|
179
|
+
return (_this$_practiceSessio2 = (_this$_practiceSessio3 = this._practiceSessionLLMChannel) === null || _this$_practiceSessio3 === void 0 ? void 0 : _this$_practiceSessio3.isConnected()) !== null && _this$_practiceSessio2 !== void 0 ? _this$_practiceSessio2 : false;
|
|
180
|
+
},
|
|
181
|
+
/**
|
|
182
|
+
* Returns the practice session LLM channel's locus URL, if available.
|
|
183
|
+
* @returns {string|undefined}
|
|
184
|
+
*/
|
|
185
|
+
getPracticeSessionLocusUrl: function getPracticeSessionLocusUrl() {
|
|
186
|
+
var _this$_practiceSessio4;
|
|
187
|
+
return (_this$_practiceSessio4 = this._practiceSessionLLMChannel) === null || _this$_practiceSessio4 === void 0 ? void 0 : _this$_practiceSessio4.getLocusUrl();
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* Stores the practice session datachannel token for later use when
|
|
191
|
+
* creating the practice session LLM channel.
|
|
192
|
+
* @param {string} token - The datachannel token to store
|
|
193
|
+
* @returns {void}
|
|
194
|
+
*/
|
|
195
|
+
setPracticeSessionDatachannelToken: function setPracticeSessionDatachannelToken(token) {
|
|
196
|
+
this._pendingPracticeSessionDatachannelToken = token;
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
* Disconnects the practice session LLM channel and cleans up listeners.
|
|
200
|
+
* @returns {Promise<void>}
|
|
201
|
+
*/
|
|
202
|
+
cleanupPSDataChannel: function cleanupPSDataChannel() {
|
|
203
|
+
var _this = this;
|
|
204
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
205
|
+
var _meeting$llmChannel, _meeting, meeting, _this$_practiceSessio5, _this$_practiceSessio6, _this$_practiceSessio7, _t;
|
|
206
|
+
return _regenerator.default.wrap(function (_context) {
|
|
207
|
+
while (1) switch (_context.prev = _context.next) {
|
|
208
|
+
case 0:
|
|
209
|
+
// Remove pending online listener if any
|
|
210
|
+
if (_this._pendingOnlineListener) {
|
|
211
|
+
_meeting = _this.getValidatedWebinarMeeting();
|
|
212
|
+
_meeting === null || _meeting === void 0 ? void 0 : (_meeting$llmChannel = _meeting.llmChannel) === null || _meeting$llmChannel === void 0 ? void 0 : _meeting$llmChannel.off('online', _this._pendingOnlineListener);
|
|
213
|
+
_this._pendingOnlineListener = null;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Switch voicea back to main meeting LLM channel before disconnecting PS channel
|
|
217
|
+
meeting = _this.getValidatedWebinarMeeting();
|
|
218
|
+
if (!(meeting !== null && meeting !== void 0 && meeting.voiceaChannel && meeting !== null && meeting !== void 0 && meeting.llmChannel)) {
|
|
219
|
+
_context.next = 1;
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
_context.next = 1;
|
|
223
|
+
return meeting.voiceaChannel.switchLLMChannel(meeting.llmChannel);
|
|
224
|
+
case 1:
|
|
225
|
+
if (_this._practiceSessionLLMChannel) {
|
|
226
|
+
_context.next = 2;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
return _context.abrupt("return");
|
|
230
|
+
case 2:
|
|
231
|
+
_context.prev = 2;
|
|
232
|
+
_context.next = 3;
|
|
233
|
+
return _this._practiceSessionLLMChannel.disconnect({
|
|
234
|
+
code: 3050,
|
|
235
|
+
reason: 'done (permanent)'
|
|
236
|
+
});
|
|
237
|
+
case 3:
|
|
238
|
+
_context.next = 5;
|
|
239
|
+
break;
|
|
240
|
+
case 4:
|
|
241
|
+
_context.prev = 4;
|
|
242
|
+
_t = _context["catch"](2);
|
|
243
|
+
_loggerProxy.default.logger.error('Webinar:index#cleanupPSDataChannel --> Failed to disconnect practice session LLM channel', _t);
|
|
244
|
+
throw _t;
|
|
245
|
+
case 5:
|
|
246
|
+
_context.prev = 5;
|
|
247
|
+
// Remove listeners from the channel
|
|
248
|
+
if (meeting) {
|
|
249
|
+
(_this$_practiceSessio5 = _this._practiceSessionLLMChannel) === null || _this$_practiceSessio5 === void 0 ? void 0 : _this$_practiceSessio5.off('event:relay.event', meeting.processRelayEvent);
|
|
250
|
+
(_this$_practiceSessio6 = _this._practiceSessionLLMChannel) === null || _this$_practiceSessio6 === void 0 ? void 0 : _this$_practiceSessio6.off(_constants.LOCUS_LLM_EVENT, meeting.processLocusLLMEvent);
|
|
251
|
+
(_this$_practiceSessio7 = _this._practiceSessionLLMChannel) === null || _this$_practiceSessio7 === void 0 ? void 0 : _this$_practiceSessio7.off('online', meeting.handleLLMOnline);
|
|
252
|
+
|
|
253
|
+
// Switch annotation back to the meeting's default channel
|
|
254
|
+
if (meeting.llmChannel) {
|
|
255
|
+
meeting.annotation.registerChannel(meeting.llmChannel);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
_this._practiceSessionLLMChannel = undefined;
|
|
259
|
+
return _context.finish(5);
|
|
260
|
+
case 6:
|
|
261
|
+
case "end":
|
|
262
|
+
return _context.stop();
|
|
263
|
+
}
|
|
264
|
+
}, _callee, null, [[2, 4, 5, 6]]);
|
|
265
|
+
}))();
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
* Ensures practice-session token exists before registering the practice LLM channel.
|
|
269
|
+
* Caller is responsible for passing a meeting that has already been resolved via
|
|
270
|
+
* getValidatedWebinarMeeting() — this method does not re-validate ownership.
|
|
271
|
+
* @param {object} meeting
|
|
272
|
+
* @returns {Promise<string|undefined>}
|
|
273
|
+
*/
|
|
274
|
+
ensurePracticeSessionDatachannelToken: function ensurePracticeSessionDatachannelToken(meeting) {
|
|
275
|
+
var _this2 = this;
|
|
276
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
277
|
+
var _this2$_practiceSessi, _this2$_practiceSessi2;
|
|
278
|
+
var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, _t2;
|
|
279
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
280
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
281
|
+
case 0:
|
|
282
|
+
_context2.next = 1;
|
|
283
|
+
return _this2.webex.internal.llm.isDataChannelTokenEnabled();
|
|
284
|
+
case 1:
|
|
285
|
+
isDataChannelTokenEnabled = _context2.sent;
|
|
286
|
+
if (isDataChannelTokenEnabled) {
|
|
287
|
+
_context2.next = 2;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
return _context2.abrupt("return", undefined);
|
|
291
|
+
case 2:
|
|
292
|
+
// Check for cached token on the channel or pending token
|
|
293
|
+
cachedToken = (_this2$_practiceSessi = (_this2$_practiceSessi2 = _this2._practiceSessionLLMChannel) === null || _this2$_practiceSessi2 === void 0 ? void 0 : _this2$_practiceSessi2.getDatachannelToken()) !== null && _this2$_practiceSessi !== void 0 ? _this2$_practiceSessi : _this2._pendingPracticeSessionDatachannelToken;
|
|
294
|
+
if (!cachedToken) {
|
|
295
|
+
_context2.next = 3;
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
return _context2.abrupt("return", cachedToken);
|
|
299
|
+
case 3:
|
|
300
|
+
_context2.prev = 3;
|
|
301
|
+
_context2.next = 4;
|
|
302
|
+
return meeting.refreshDataChannelToken();
|
|
303
|
+
case 4:
|
|
304
|
+
refreshResponse = _context2.sent;
|
|
305
|
+
_ref2 = (_refreshResponse$body = refreshResponse === null || refreshResponse === void 0 ? void 0 : refreshResponse.body) !== null && _refreshResponse$body !== void 0 ? _refreshResponse$body : {}, datachannelToken = _ref2.datachannelToken;
|
|
306
|
+
if (datachannelToken) {
|
|
307
|
+
_context2.next = 5;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
return _context2.abrupt("return", undefined);
|
|
311
|
+
case 5:
|
|
312
|
+
// Store token on the channel if it exists, otherwise save for later
|
|
313
|
+
if (_this2._practiceSessionLLMChannel) {
|
|
314
|
+
_this2._practiceSessionLLMChannel.setDatachannelToken(datachannelToken);
|
|
315
|
+
} else {
|
|
316
|
+
_this2._pendingPracticeSessionDatachannelToken = datachannelToken;
|
|
317
|
+
}
|
|
318
|
+
return _context2.abrupt("return", datachannelToken);
|
|
319
|
+
case 6:
|
|
320
|
+
_context2.prev = 6;
|
|
321
|
+
_t2 = _context2["catch"](3);
|
|
322
|
+
_loggerProxy.default.logger.warn("Webinar:index#ensurePracticeSessionDatachannelToken --> failed to proactively refresh practice-session token: ".concat((_t2 === null || _t2 === void 0 ? void 0 : _t2.message) || String(_t2)));
|
|
323
|
+
return _context2.abrupt("return", undefined);
|
|
324
|
+
case 7:
|
|
325
|
+
case "end":
|
|
326
|
+
return _context2.stop();
|
|
327
|
+
}
|
|
328
|
+
}, _callee2, null, [[3, 6]]);
|
|
329
|
+
}))();
|
|
330
|
+
},
|
|
331
|
+
/**
|
|
332
|
+
* Connects practice session LLM channel. Creates a new channel if needed.
|
|
333
|
+
* Will disconnect if the meeting has ended or is no longer in practice session mode.
|
|
334
|
+
* Waits for the main LLM channel to be connected before connecting practice session.
|
|
335
|
+
* @returns {Promise}
|
|
336
|
+
*/
|
|
337
|
+
updatePSDataChannel: function updatePSDataChannel() {
|
|
338
|
+
var _this3 = this;
|
|
339
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
340
|
+
var _this3$_practiceSessi, _meeting$llmChannel3, _this3$_pendingPracti, _this3$_practiceSessi2;
|
|
341
|
+
var invocationSequence, meeting, isPracticeSession, _ref3, _ref3$url, url, _ref3$info, _ref3$info2, _ref3$info2$practiceS, practiceSessionDatachannelUrl, _onDefaultSessionConnected, practiceSessionDatachannelToken, refreshedToken, latestPracticeSessionDatachannelUrl, isStillPracticeSession, psChannel;
|
|
342
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
343
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
344
|
+
case 0:
|
|
345
|
+
_this3._updatePSDataChannelSequence = (_this3._updatePSDataChannelSequence || 0) + 1;
|
|
346
|
+
invocationSequence = _this3._updatePSDataChannelSequence;
|
|
347
|
+
meeting = _this3.getValidatedWebinarMeeting();
|
|
348
|
+
isPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel();
|
|
349
|
+
if (isPracticeSession) {
|
|
350
|
+
_context4.next = 2;
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
_context4.next = 1;
|
|
354
|
+
return _this3.cleanupPSDataChannel();
|
|
355
|
+
case 1:
|
|
356
|
+
return _context4.abrupt("return", undefined);
|
|
357
|
+
case 2:
|
|
358
|
+
// @ts-ignore - Fix type
|
|
359
|
+
_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;
|
|
360
|
+
if (practiceSessionDatachannelUrl) {
|
|
361
|
+
_context4.next = 3;
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
return _context4.abrupt("return", undefined);
|
|
365
|
+
case 3:
|
|
366
|
+
if (!((_this3$_practiceSessi = _this3._practiceSessionLLMChannel) !== null && _this3$_practiceSessi !== void 0 && _this3$_practiceSessi.isConnected())) {
|
|
367
|
+
_context4.next = 5;
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
if (!(url === _this3._practiceSessionLLMChannel.getLocusUrl() && practiceSessionDatachannelUrl === _this3._practiceSessionLLMChannel.getDatachannelUrl())) {
|
|
371
|
+
_context4.next = 4;
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
return _context4.abrupt("return", undefined);
|
|
375
|
+
case 4:
|
|
376
|
+
_context4.next = 5;
|
|
377
|
+
return _this3.cleanupPSDataChannel();
|
|
378
|
+
case 5:
|
|
379
|
+
// Ensure the default session LLM channel is connected before connecting the practice session.
|
|
380
|
+
// Subscribe before checking isConnected() to avoid a race where the 'online' event fires
|
|
381
|
+
// between the check and the subscription — the channel does not replay missed events.
|
|
382
|
+
if (!_this3._pendingOnlineListener && meeting !== null && meeting !== void 0 && meeting.llmChannel) {
|
|
383
|
+
_onDefaultSessionConnected = function onDefaultSessionConnected() {
|
|
384
|
+
var _meeting$llmChannel2;
|
|
385
|
+
_this3._pendingOnlineListener = null;
|
|
386
|
+
(_meeting$llmChannel2 = meeting.llmChannel) === null || _meeting$llmChannel2 === void 0 ? void 0 : _meeting$llmChannel2.off('online', _onDefaultSessionConnected);
|
|
387
|
+
_this3.updatePSDataChannel();
|
|
388
|
+
};
|
|
389
|
+
_this3._pendingOnlineListener = _onDefaultSessionConnected;
|
|
390
|
+
meeting.llmChannel.on('online', _onDefaultSessionConnected);
|
|
391
|
+
}
|
|
392
|
+
if (meeting !== null && meeting !== void 0 && (_meeting$llmChannel3 = meeting.llmChannel) !== null && _meeting$llmChannel3 !== void 0 && _meeting$llmChannel3.isConnected()) {
|
|
393
|
+
_context4.next = 6;
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
_loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> default session not yet connected, deferring practice session connect.');
|
|
397
|
+
return _context4.abrupt("return", undefined);
|
|
398
|
+
case 6:
|
|
399
|
+
// Default session is already connected — cancel the pending listener and proceed
|
|
400
|
+
if (_this3._pendingOnlineListener) {
|
|
401
|
+
meeting.llmChannel.off('online', _this3._pendingOnlineListener);
|
|
402
|
+
_this3._pendingOnlineListener = null;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Get token from pending or refresh if needed
|
|
406
|
+
practiceSessionDatachannelToken = (_this3$_pendingPracti = _this3._pendingPracticeSessionDatachannelToken) !== null && _this3$_pendingPracti !== void 0 ? _this3$_pendingPracti : (_this3$_practiceSessi2 = _this3._practiceSessionLLMChannel) === null || _this3$_practiceSessi2 === void 0 ? void 0 : _this3$_practiceSessi2.getDatachannelToken();
|
|
407
|
+
_context4.next = 7;
|
|
408
|
+
return _this3.ensurePracticeSessionDatachannelToken(meeting);
|
|
409
|
+
case 7:
|
|
410
|
+
refreshedToken = _context4.sent;
|
|
411
|
+
latestPracticeSessionDatachannelUrl = (0, _lodash.get)(meeting, 'locusInfo.info.practiceSessionDatachannelUrl');
|
|
412
|
+
isStillPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel(); // Skip stale invocations after async refresh to avoid reconnecting a session
|
|
413
|
+
// that was already updated/cleaned by a newer state transition.
|
|
414
|
+
if (!(invocationSequence !== _this3._updatePSDataChannelSequence || !isStillPracticeSession || !latestPracticeSessionDatachannelUrl || latestPracticeSessionDatachannelUrl !== practiceSessionDatachannelUrl)) {
|
|
415
|
+
_context4.next = 8;
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
return _context4.abrupt("return", undefined);
|
|
419
|
+
case 8:
|
|
420
|
+
if (refreshedToken) {
|
|
421
|
+
practiceSessionDatachannelToken = refreshedToken;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// Create a new practice session LLM channel
|
|
425
|
+
// @ts-ignore - Fix type
|
|
426
|
+
psChannel = _this3.webex.internal.llm.createChannel();
|
|
427
|
+
_this3._practiceSessionLLMChannel = psChannel;
|
|
428
|
+
|
|
429
|
+
// Set up refresh handler before registration
|
|
430
|
+
psChannel.setRefreshHandler(function () {
|
|
431
|
+
return meeting.refreshDataChannelToken();
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// If we have a pending token, store it on the channel
|
|
435
|
+
if (_this3._pendingPracticeSessionDatachannelToken) {
|
|
436
|
+
psChannel.setDatachannelToken(_this3._pendingPracticeSessionDatachannelToken);
|
|
437
|
+
_this3._pendingPracticeSessionDatachannelToken = undefined;
|
|
438
|
+
}
|
|
439
|
+
return _context4.abrupt("return", psChannel.registerAndConnect(url, practiceSessionDatachannelUrl, practiceSessionDatachannelToken).then(/*#__PURE__*/function () {
|
|
440
|
+
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(registerAndConnectResult) {
|
|
441
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
442
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
443
|
+
case 0:
|
|
444
|
+
if (!(_this3._practiceSessionLLMChannel !== psChannel)) {
|
|
445
|
+
_context3.next = 1;
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
psChannel.disconnect({
|
|
449
|
+
code: 3050,
|
|
450
|
+
reason: 'replaced'
|
|
451
|
+
}).catch(function () {});
|
|
452
|
+
return _context3.abrupt("return", undefined);
|
|
453
|
+
case 1:
|
|
454
|
+
// Register event listeners on the practice session channel
|
|
455
|
+
psChannel.off('event:relay.event', meeting.processRelayEvent);
|
|
456
|
+
psChannel.on('event:relay.event', meeting.processRelayEvent);
|
|
457
|
+
psChannel.off(_constants.LOCUS_LLM_EVENT, meeting.processLocusLLMEvent);
|
|
458
|
+
psChannel.on(_constants.LOCUS_LLM_EVENT, meeting.processLocusLLMEvent);
|
|
459
|
+
psChannel.off('online', meeting.handleLLMOnline);
|
|
460
|
+
psChannel.on('online', meeting.handleLLMOnline);
|
|
461
|
+
|
|
462
|
+
// Switch annotation to practice session channel
|
|
463
|
+
meeting.annotation.registerChannel(psChannel);
|
|
464
|
+
|
|
465
|
+
// Switch meeting's voicea channel to use the PS LLM connection
|
|
466
|
+
// This preserves caption state and re-announces automatically
|
|
467
|
+
if (!meeting.voiceaChannel) {
|
|
468
|
+
_context3.next = 2;
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
_context3.next = 2;
|
|
472
|
+
return meeting.voiceaChannel.switchLLMChannel(psChannel);
|
|
473
|
+
case 2:
|
|
474
|
+
_loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> enabled to receive relay events for practice session!');
|
|
475
|
+
return _context3.abrupt("return", _promise.default.resolve(registerAndConnectResult));
|
|
476
|
+
case 3:
|
|
477
|
+
case "end":
|
|
478
|
+
return _context3.stop();
|
|
479
|
+
}
|
|
480
|
+
}, _callee3);
|
|
481
|
+
}));
|
|
482
|
+
return function (_x) {
|
|
483
|
+
return _ref4.apply(this, arguments);
|
|
484
|
+
};
|
|
485
|
+
}()).catch(function (error) {
|
|
486
|
+
// Clean up the channel on failure, but only if it's still the current one
|
|
487
|
+
if (_this3._practiceSessionLLMChannel === psChannel) {
|
|
488
|
+
_this3._practiceSessionLLMChannel = undefined;
|
|
489
|
+
}
|
|
490
|
+
throw error;
|
|
491
|
+
}));
|
|
492
|
+
case 9:
|
|
493
|
+
case "end":
|
|
494
|
+
return _context4.stop();
|
|
495
|
+
}
|
|
496
|
+
}, _callee4);
|
|
497
|
+
}))();
|
|
498
|
+
},
|
|
120
499
|
/**
|
|
121
500
|
* start or stop practice session for webinar
|
|
122
501
|
* @param {boolean} enabled
|
|
123
502
|
* @returns {Promise}
|
|
124
503
|
*/
|
|
125
504
|
setPracticeSessionState: function setPracticeSessionState(enabled) {
|
|
505
|
+
var meeting = this.getValidatedWebinarMeeting();
|
|
126
506
|
return this.request({
|
|
127
507
|
method: _constants.HTTP_VERBS.PATCH,
|
|
128
508
|
uri: "".concat(this.locusUrl, "/controls"),
|
|
@@ -131,6 +511,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
131
511
|
enabled: enabled
|
|
132
512
|
}
|
|
133
513
|
}
|
|
514
|
+
}).then(function (response) {
|
|
515
|
+
_util.default.updateLocusFromApiResponse(meeting, response);
|
|
516
|
+
return response;
|
|
134
517
|
}).catch(function (error) {
|
|
135
518
|
_loggerProxy.default.logger.error('Meeting:webinar#setPracticeSessionState failed', error);
|
|
136
519
|
throw error;
|
|
@@ -143,6 +526,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
143
526
|
*/
|
|
144
527
|
updatePracticeSessionStatus: function updatePracticeSessionStatus(payload) {
|
|
145
528
|
this.set('practiceSessionEnabled', !!(payload !== null && payload !== void 0 && payload.enabled));
|
|
529
|
+
this.updatePSDataChannel().then(function () {});
|
|
146
530
|
},
|
|
147
531
|
/**
|
|
148
532
|
* start webcast mode for webinar
|
|
@@ -151,33 +535,33 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
151
535
|
* @returns {Promise}
|
|
152
536
|
*/
|
|
153
537
|
startWebcast: function startWebcast(meeting, layout) {
|
|
154
|
-
var
|
|
155
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
156
|
-
var
|
|
157
|
-
return _regenerator.default.wrap(function (
|
|
158
|
-
while (1) switch (
|
|
538
|
+
var _this4 = this;
|
|
539
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
540
|
+
var _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0;
|
|
541
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
542
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
159
543
|
case 0:
|
|
160
544
|
if (meeting) {
|
|
161
|
-
|
|
545
|
+
_context5.next = 1;
|
|
162
546
|
break;
|
|
163
547
|
}
|
|
164
548
|
_loggerProxy.default.logger.error("Meeting:webinar#startWebcast failed --> meeting parameter : ".concat(meeting));
|
|
165
549
|
throw new Error('Meeting parameter does not meet expectations');
|
|
166
550
|
case 1:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return
|
|
551
|
+
_t3 = _this4;
|
|
552
|
+
_t4 = _constants.HTTP_VERBS.PUT;
|
|
553
|
+
_t5 = "".concat(_this4.webcastInstanceUrl, "/streaming");
|
|
554
|
+
_t6 = _defineProperty2.default;
|
|
555
|
+
_context5.next = 2;
|
|
556
|
+
return _this4.webex.credentials.getUserToken();
|
|
173
557
|
case 2:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
authorization:
|
|
178
|
-
trackingId:
|
|
558
|
+
_t7 = _context5.sent;
|
|
559
|
+
_t8 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
560
|
+
_t9 = _t6({
|
|
561
|
+
authorization: _t7,
|
|
562
|
+
trackingId: _t8
|
|
179
563
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
180
|
-
|
|
564
|
+
_t0 = {
|
|
181
565
|
action: 'start',
|
|
182
566
|
meetingInfo: {
|
|
183
567
|
locusId: meeting.locusId,
|
|
@@ -185,20 +569,20 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
185
569
|
},
|
|
186
570
|
layout: layout
|
|
187
571
|
};
|
|
188
|
-
return
|
|
189
|
-
method:
|
|
190
|
-
uri:
|
|
191
|
-
headers:
|
|
192
|
-
body:
|
|
572
|
+
return _context5.abrupt("return", _t3.request.call(_t3, {
|
|
573
|
+
method: _t4,
|
|
574
|
+
uri: _t5,
|
|
575
|
+
headers: _t9,
|
|
576
|
+
body: _t0
|
|
193
577
|
}).catch(function (error) {
|
|
194
578
|
_loggerProxy.default.logger.error('Meeting:webinar#startWebcast failed', error);
|
|
195
579
|
throw error;
|
|
196
580
|
}));
|
|
197
581
|
case 3:
|
|
198
582
|
case "end":
|
|
199
|
-
return
|
|
583
|
+
return _context5.stop();
|
|
200
584
|
}
|
|
201
|
-
},
|
|
585
|
+
}, _callee5);
|
|
202
586
|
}))();
|
|
203
587
|
},
|
|
204
588
|
/**
|
|
@@ -206,42 +590,42 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
206
590
|
* @returns {Promise}
|
|
207
591
|
*/
|
|
208
592
|
stopWebcast: function stopWebcast() {
|
|
209
|
-
var
|
|
210
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
211
|
-
var
|
|
212
|
-
return _regenerator.default.wrap(function (
|
|
213
|
-
while (1) switch (
|
|
593
|
+
var _this5 = this;
|
|
594
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
595
|
+
var _t1, _t10, _t11, _t12, _t13, _t14, _t15, _t16;
|
|
596
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
597
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
214
598
|
case 0:
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return
|
|
599
|
+
_t1 = _this5;
|
|
600
|
+
_t10 = _constants.HTTP_VERBS.PUT;
|
|
601
|
+
_t11 = "".concat(_this5.webcastInstanceUrl, "/streaming");
|
|
602
|
+
_t12 = _defineProperty2.default;
|
|
603
|
+
_context6.next = 1;
|
|
604
|
+
return _this5.webex.credentials.getUserToken();
|
|
221
605
|
case 1:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
authorization:
|
|
226
|
-
trackingId:
|
|
606
|
+
_t13 = _context6.sent;
|
|
607
|
+
_t14 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
608
|
+
_t15 = _t12({
|
|
609
|
+
authorization: _t13,
|
|
610
|
+
trackingId: _t14
|
|
227
611
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
228
|
-
|
|
612
|
+
_t16 = {
|
|
229
613
|
action: 'stop'
|
|
230
614
|
};
|
|
231
|
-
return
|
|
232
|
-
method:
|
|
233
|
-
uri:
|
|
234
|
-
headers:
|
|
235
|
-
body:
|
|
615
|
+
return _context6.abrupt("return", _t1.request.call(_t1, {
|
|
616
|
+
method: _t10,
|
|
617
|
+
uri: _t11,
|
|
618
|
+
headers: _t15,
|
|
619
|
+
body: _t16
|
|
236
620
|
}).catch(function (error) {
|
|
237
621
|
_loggerProxy.default.logger.error('Meeting:webinar#stopWebcast failed', error);
|
|
238
622
|
throw error;
|
|
239
623
|
}));
|
|
240
624
|
case 2:
|
|
241
625
|
case "end":
|
|
242
|
-
return
|
|
626
|
+
return _context6.stop();
|
|
243
627
|
}
|
|
244
|
-
},
|
|
628
|
+
}, _callee6);
|
|
245
629
|
}))();
|
|
246
630
|
},
|
|
247
631
|
/**
|
|
@@ -249,37 +633,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
249
633
|
* @returns {Promise}
|
|
250
634
|
*/
|
|
251
635
|
queryWebcastLayout: function queryWebcastLayout() {
|
|
252
|
-
var
|
|
253
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
254
|
-
var
|
|
255
|
-
return _regenerator.default.wrap(function (
|
|
256
|
-
while (1) switch (
|
|
636
|
+
var _this6 = this;
|
|
637
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
638
|
+
var _t17, _t18, _t19, _t20, _t21, _t22;
|
|
639
|
+
return _regenerator.default.wrap(function (_context7) {
|
|
640
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
257
641
|
case 0:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
return
|
|
642
|
+
_t17 = _this6;
|
|
643
|
+
_t18 = _constants.HTTP_VERBS.GET;
|
|
644
|
+
_t19 = "".concat(_this6.webcastInstanceUrl, "/layout");
|
|
645
|
+
_context7.next = 1;
|
|
646
|
+
return _this6.webex.credentials.getUserToken();
|
|
263
647
|
case 1:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
authorization:
|
|
268
|
-
trackingId:
|
|
648
|
+
_t20 = _context7.sent;
|
|
649
|
+
_t21 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
650
|
+
_t22 = {
|
|
651
|
+
authorization: _t20,
|
|
652
|
+
trackingId: _t21
|
|
269
653
|
};
|
|
270
|
-
return
|
|
271
|
-
method:
|
|
272
|
-
uri:
|
|
273
|
-
headers:
|
|
654
|
+
return _context7.abrupt("return", _t17.request.call(_t17, {
|
|
655
|
+
method: _t18,
|
|
656
|
+
uri: _t19,
|
|
657
|
+
headers: _t22
|
|
274
658
|
}).catch(function (error) {
|
|
275
659
|
_loggerProxy.default.logger.error('Meeting:webinar#queryWebcastLayout failed', error);
|
|
276
660
|
throw error;
|
|
277
661
|
}));
|
|
278
662
|
case 2:
|
|
279
663
|
case "end":
|
|
280
|
-
return
|
|
664
|
+
return _context7.stop();
|
|
281
665
|
}
|
|
282
|
-
},
|
|
666
|
+
}, _callee7);
|
|
283
667
|
}))();
|
|
284
668
|
},
|
|
285
669
|
/**
|
|
@@ -288,84 +672,83 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
288
672
|
* @returns {Promise}
|
|
289
673
|
*/
|
|
290
674
|
updateWebcastLayout: function updateWebcastLayout(layout) {
|
|
291
|
-
var
|
|
292
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
293
|
-
var
|
|
294
|
-
return _regenerator.default.wrap(function (
|
|
295
|
-
while (1) switch (
|
|
675
|
+
var _this7 = this;
|
|
676
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
677
|
+
var _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30;
|
|
678
|
+
return _regenerator.default.wrap(function (_context8) {
|
|
679
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
296
680
|
case 0:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
return
|
|
681
|
+
_t23 = _this7;
|
|
682
|
+
_t24 = _constants.HTTP_VERBS.PUT;
|
|
683
|
+
_t25 = "".concat(_this7.webcastInstanceUrl, "/layout");
|
|
684
|
+
_t26 = _defineProperty2.default;
|
|
685
|
+
_context8.next = 1;
|
|
686
|
+
return _this7.webex.credentials.getUserToken();
|
|
303
687
|
case 1:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
authorization:
|
|
308
|
-
trackingId:
|
|
688
|
+
_t27 = _context8.sent;
|
|
689
|
+
_t28 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
690
|
+
_t29 = _t26({
|
|
691
|
+
authorization: _t27,
|
|
692
|
+
trackingId: _t28
|
|
309
693
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
310
|
-
|
|
694
|
+
_t30 = {
|
|
311
695
|
videoLayout: layout.videoLayout,
|
|
312
696
|
contentLayout: layout.contentLayout,
|
|
313
697
|
syncStageLayout: layout.syncStageLayout,
|
|
314
698
|
syncStageInMeeting: layout.syncStageInMeeting
|
|
315
699
|
};
|
|
316
|
-
return
|
|
317
|
-
method:
|
|
318
|
-
uri:
|
|
319
|
-
headers:
|
|
320
|
-
body:
|
|
700
|
+
return _context8.abrupt("return", _t23.request.call(_t23, {
|
|
701
|
+
method: _t24,
|
|
702
|
+
uri: _t25,
|
|
703
|
+
headers: _t29,
|
|
704
|
+
body: _t30
|
|
321
705
|
}).catch(function (error) {
|
|
322
706
|
_loggerProxy.default.logger.error('Meeting:webinar#updateWebcastLayout failed', error);
|
|
323
707
|
throw error;
|
|
324
708
|
}));
|
|
325
709
|
case 2:
|
|
326
710
|
case "end":
|
|
327
|
-
return
|
|
711
|
+
return _context8.stop();
|
|
328
712
|
}
|
|
329
|
-
},
|
|
713
|
+
}, _callee8);
|
|
330
714
|
}))();
|
|
331
715
|
},
|
|
332
716
|
/**
|
|
333
717
|
* view all webcast attendees
|
|
334
|
-
* @param {string} queryString
|
|
335
718
|
* @returns {Promise}
|
|
336
719
|
*/
|
|
337
720
|
viewAllWebcastAttendees: function viewAllWebcastAttendees() {
|
|
338
|
-
var
|
|
339
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
340
|
-
var
|
|
341
|
-
return _regenerator.default.wrap(function (
|
|
342
|
-
while (1) switch (
|
|
721
|
+
var _this8 = this;
|
|
722
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
723
|
+
var _t31, _t32, _t33, _t34, _t35, _t36;
|
|
724
|
+
return _regenerator.default.wrap(function (_context9) {
|
|
725
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
343
726
|
case 0:
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
return
|
|
727
|
+
_t31 = _this8;
|
|
728
|
+
_t32 = _constants.HTTP_VERBS.GET;
|
|
729
|
+
_t33 = "".concat(_this8.webcastInstanceUrl, "/attendees");
|
|
730
|
+
_context9.next = 1;
|
|
731
|
+
return _this8.webex.credentials.getUserToken();
|
|
349
732
|
case 1:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
authorization:
|
|
354
|
-
trackingId:
|
|
733
|
+
_t34 = _context9.sent;
|
|
734
|
+
_t35 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
735
|
+
_t36 = {
|
|
736
|
+
authorization: _t34,
|
|
737
|
+
trackingId: _t35
|
|
355
738
|
};
|
|
356
|
-
return
|
|
357
|
-
method:
|
|
358
|
-
uri:
|
|
359
|
-
headers:
|
|
739
|
+
return _context9.abrupt("return", _t31.request.call(_t31, {
|
|
740
|
+
method: _t32,
|
|
741
|
+
uri: _t33,
|
|
742
|
+
headers: _t36
|
|
360
743
|
}).catch(function (error) {
|
|
361
744
|
_loggerProxy.default.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);
|
|
362
745
|
throw error;
|
|
363
746
|
}));
|
|
364
747
|
case 2:
|
|
365
748
|
case "end":
|
|
366
|
-
return
|
|
749
|
+
return _context9.stop();
|
|
367
750
|
}
|
|
368
|
-
},
|
|
751
|
+
}, _callee9);
|
|
369
752
|
}))();
|
|
370
753
|
},
|
|
371
754
|
/**
|
|
@@ -375,38 +758,38 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
375
758
|
*/
|
|
376
759
|
searchWebcastAttendees: function searchWebcastAttendees() {
|
|
377
760
|
var _arguments = arguments,
|
|
378
|
-
|
|
379
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
380
|
-
var queryString,
|
|
381
|
-
return _regenerator.default.wrap(function (
|
|
382
|
-
while (1) switch (
|
|
761
|
+
_this9 = this;
|
|
762
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
763
|
+
var queryString, _t37, _t38, _t39, _t40, _t41, _t42;
|
|
764
|
+
return _regenerator.default.wrap(function (_context0) {
|
|
765
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
383
766
|
case 0:
|
|
384
767
|
queryString = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : '';
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
return
|
|
768
|
+
_t37 = _this9;
|
|
769
|
+
_t38 = _constants.HTTP_VERBS.GET;
|
|
770
|
+
_t39 = "".concat(_this9.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
|
|
771
|
+
_context0.next = 1;
|
|
772
|
+
return _this9.webex.credentials.getUserToken();
|
|
390
773
|
case 1:
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
authorization:
|
|
395
|
-
trackingId:
|
|
774
|
+
_t40 = _context0.sent;
|
|
775
|
+
_t41 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
776
|
+
_t42 = {
|
|
777
|
+
authorization: _t40,
|
|
778
|
+
trackingId: _t41
|
|
396
779
|
};
|
|
397
|
-
return
|
|
398
|
-
method:
|
|
399
|
-
uri:
|
|
400
|
-
headers:
|
|
780
|
+
return _context0.abrupt("return", _t37.request.call(_t37, {
|
|
781
|
+
method: _t38,
|
|
782
|
+
uri: _t39,
|
|
783
|
+
headers: _t42
|
|
401
784
|
}).catch(function (error) {
|
|
402
785
|
_loggerProxy.default.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);
|
|
403
786
|
throw error;
|
|
404
787
|
}));
|
|
405
788
|
case 2:
|
|
406
789
|
case "end":
|
|
407
|
-
return
|
|
790
|
+
return _context0.stop();
|
|
408
791
|
}
|
|
409
|
-
},
|
|
792
|
+
}, _callee0);
|
|
410
793
|
}))();
|
|
411
794
|
},
|
|
412
795
|
/**
|
|
@@ -415,40 +798,104 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
415
798
|
* @returns {Promise}
|
|
416
799
|
*/
|
|
417
800
|
expelWebcastAttendee: function expelWebcastAttendee(participantId) {
|
|
418
|
-
var
|
|
419
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
420
|
-
var
|
|
421
|
-
return _regenerator.default.wrap(function (
|
|
422
|
-
while (1) switch (
|
|
801
|
+
var _this0 = this;
|
|
802
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
|
|
803
|
+
var _t43, _t44, _t45, _t46, _t47, _t48;
|
|
804
|
+
return _regenerator.default.wrap(function (_context1) {
|
|
805
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
423
806
|
case 0:
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
return
|
|
807
|
+
_t43 = _this0;
|
|
808
|
+
_t44 = _constants.HTTP_VERBS.DELETE;
|
|
809
|
+
_t45 = "".concat(_this0.webcastInstanceUrl, "/attendees/").concat(participantId);
|
|
810
|
+
_context1.next = 1;
|
|
811
|
+
return _this0.webex.credentials.getUserToken();
|
|
429
812
|
case 1:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
authorization:
|
|
434
|
-
trackingId:
|
|
813
|
+
_t46 = _context1.sent;
|
|
814
|
+
_t47 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
815
|
+
_t48 = {
|
|
816
|
+
authorization: _t46,
|
|
817
|
+
trackingId: _t47
|
|
435
818
|
};
|
|
436
|
-
return
|
|
437
|
-
method:
|
|
438
|
-
uri:
|
|
439
|
-
headers:
|
|
819
|
+
return _context1.abrupt("return", _t43.request.call(_t43, {
|
|
820
|
+
method: _t44,
|
|
821
|
+
uri: _t45,
|
|
822
|
+
headers: _t48
|
|
440
823
|
}).catch(function (error) {
|
|
441
824
|
_loggerProxy.default.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);
|
|
442
825
|
throw error;
|
|
443
826
|
}));
|
|
444
827
|
case 2:
|
|
445
828
|
case "end":
|
|
446
|
-
return
|
|
829
|
+
return _context1.stop();
|
|
447
830
|
}
|
|
448
|
-
},
|
|
831
|
+
}, _callee1);
|
|
832
|
+
}))();
|
|
833
|
+
},
|
|
834
|
+
/**
|
|
835
|
+
* search large scale webinar attendees
|
|
836
|
+
* @param {object} payload
|
|
837
|
+
* @param {string} payload.queryString
|
|
838
|
+
* @param {number} payload.limit
|
|
839
|
+
* @param {string} payload.next
|
|
840
|
+
* @returns {Promise}
|
|
841
|
+
*/
|
|
842
|
+
searchLargeScaleWebinarAttendees: function searchLargeScaleWebinarAttendees(payload) {
|
|
843
|
+
var _this1 = this;
|
|
844
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
845
|
+
var _payload$limit, _meeting$locusInfo3, _meeting$locusInfo3$l, _meeting$locusInfo3$l2, _meeting$locusInfo3$l3;
|
|
846
|
+
var meeting, rawParams, attendeeSearchUrl, _t49, _t50, _t51, _t52, _t53, _t54;
|
|
847
|
+
return _regenerator.default.wrap(function (_context10) {
|
|
848
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
849
|
+
case 0:
|
|
850
|
+
meeting = _this1.getValidatedWebinarMeeting();
|
|
851
|
+
if (meeting) {
|
|
852
|
+
_context10.next = 1;
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
_loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> webinar meeting could not be validated');
|
|
856
|
+
throw new Error('Meeting:webinar5k#Webinar meeting is not resolvable for the current locus');
|
|
857
|
+
case 1:
|
|
858
|
+
rawParams = {
|
|
859
|
+
search_text: payload === null || payload === void 0 ? void 0 : payload.queryString,
|
|
860
|
+
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,
|
|
861
|
+
next: payload === null || payload === void 0 ? void 0 : payload.next
|
|
862
|
+
};
|
|
863
|
+
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;
|
|
864
|
+
if (attendeeSearchUrl) {
|
|
865
|
+
_context10.next = 2;
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
_loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> attendee search url unavailable');
|
|
869
|
+
throw new Error('Meeting:webinar5k#Attendee search url is not available');
|
|
870
|
+
case 2:
|
|
871
|
+
_t49 = _this1;
|
|
872
|
+
_t50 = _constants.HTTP_VERBS.GET;
|
|
873
|
+
_t51 = "".concat(attendeeSearchUrl, "?").concat(new URLSearchParams((0, _utils.sanitizeParams)(rawParams)).toString());
|
|
874
|
+
_context10.next = 3;
|
|
875
|
+
return _this1.webex.credentials.getUserToken();
|
|
876
|
+
case 3:
|
|
877
|
+
_t52 = _context10.sent;
|
|
878
|
+
_t53 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
879
|
+
_t54 = {
|
|
880
|
+
authorization: _t52,
|
|
881
|
+
trackingId: _t53
|
|
882
|
+
};
|
|
883
|
+
return _context10.abrupt("return", _t49.request.call(_t49, {
|
|
884
|
+
method: _t50,
|
|
885
|
+
uri: _t51,
|
|
886
|
+
headers: _t54
|
|
887
|
+
}).catch(function (error) {
|
|
888
|
+
_loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed', error);
|
|
889
|
+
throw error;
|
|
890
|
+
}));
|
|
891
|
+
case 4:
|
|
892
|
+
case "end":
|
|
893
|
+
return _context10.stop();
|
|
894
|
+
}
|
|
895
|
+
}, _callee10);
|
|
449
896
|
}))();
|
|
450
897
|
},
|
|
451
|
-
version: "
|
|
898
|
+
version: "3.12.0-llmrefactor.1"
|
|
452
899
|
});
|
|
453
900
|
var _default = exports.default = Webinar;
|
|
454
901
|
//# sourceMappingURL=index.js.map
|