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