@webex/plugin-meetings 3.12.0 → 3.13.0-next.10
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/babel.config.js +17 -1
- 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/common/wasm-loader.js +174 -0
- package/dist/common/wasm-loader.js.map +1 -0
- package/dist/config.js +5 -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/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/e2ee/E2eeManager.js +91 -0
- package/dist/e2ee/E2eeManager.js.map +1 -0
- package/dist/e2ee/E2eeSignaling.js +200 -0
- package/dist/e2ee/E2eeSignaling.js.map +1 -0
- package/dist/e2ee/MediaEncryptionService.js +75 -0
- package/dist/e2ee/MediaEncryptionService.js.map +1 -0
- package/dist/e2ee/mls.js +558 -0
- package/dist/e2ee/mls.js.map +1 -0
- package/dist/e2ee/types.js +59 -0
- package/dist/e2ee/types.js.map +1 -0
- package/dist/e2ee/wasm.d.js +7 -0
- package/dist/e2ee/wasm.d.js.map +1 -0
- package/dist/hashTree/constants.js +13 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1245 -404
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +42 -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 +914 -196
- 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 +1931 -887
- 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 -3
- 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 +342 -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 +11 -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 +127 -3
- 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/common/wasm-loader.d.ts +55 -0
- package/dist/types/config.d.ts +5 -2
- package/dist/types/constants.d.ts +15 -2
- 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/e2ee/E2eeManager.d.ts +23 -0
- package/dist/types/e2ee/E2eeSignaling.d.ts +94 -0
- package/dist/types/e2ee/MediaEncryptionService.d.ts +27 -0
- package/dist/types/e2ee/mls.d.ts +191 -0
- package/dist/types/e2ee/types.d.ts +104 -0
- package/dist/types/hashTree/constants.d.ts +2 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +230 -18
- package/dist/types/hashTree/utils.d.ts +18 -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 +151 -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 +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 +247 -13
- 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 +44 -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 +10 -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 +28 -2
- 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 +539 -245
- 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/common/wasm-loader.ts +124 -0
- package/src/config.ts +9 -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/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/e2ee/E2eeManager.ts +58 -0
- package/src/e2ee/E2eeSignaling.ts +215 -0
- package/src/e2ee/MediaEncryptionService.ts +41 -0
- package/src/e2ee/mls.ts +548 -0
- package/src/e2ee/types.ts +114 -0
- package/src/e2ee/wasm.d.ts +153 -0
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/constants.ts +16 -0
- package/src/hashTree/hashTreeParser.ts +1021 -214
- package/src/hashTree/utils.ts +36 -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 +907 -184
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +33 -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 +1237 -254
- 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 -8
- 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 +298 -0
- package/src/meetings/index.ts +242 -80
- 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 +11 -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 +112 -4
- 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 +333 -73
- 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/common/wasm-loader.ts +171 -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/e2ee/E2eeManager.ts +82 -0
- package/test/unit/spec/e2ee/E2eeSignaling.ts +172 -0
- package/test/unit/spec/e2ee/MediaEncryptionService.ts +43 -0
- package/test/unit/spec/e2ee/mls.ts +765 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +3126 -238
- package/test/unit/spec/hashTree/utils.ts +125 -1
- 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 +1880 -136
- 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 +3697 -501
- 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 +206 -16
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/index.js +2 -3
- package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
- package/test/unit/spec/meetings/index.js +606 -53
- 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 +165 -38
- 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 +982 -328
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,108 +163,354 @@ 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:
|
|
138
|
-
|
|
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
|
+
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
|
+
}
|
|
139
224
|
_context.next = 1;
|
|
140
|
-
return
|
|
141
|
-
code: 3050,
|
|
142
|
-
reason: 'done (permanent)'
|
|
143
|
-
}, _constants.LLM_PRACTICE_SESSION);
|
|
225
|
+
return meeting.voiceaChannel.switchLLMChannel(meeting.llmChannel);
|
|
144
226
|
case 1:
|
|
145
|
-
|
|
146
|
-
_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();
|
|
147
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:
|
|
148
275
|
case "end":
|
|
149
276
|
return _context.stop();
|
|
150
277
|
}
|
|
151
|
-
}, _callee);
|
|
278
|
+
}, _callee, null, [[3, 5, 6, 9]]);
|
|
152
279
|
}))();
|
|
153
280
|
},
|
|
154
281
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
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.
|
|
285
|
+
* @param {object} meeting
|
|
286
|
+
* @returns {Promise<string|undefined>}
|
|
158
287
|
*/
|
|
159
|
-
|
|
288
|
+
ensurePracticeSessionDatachannelToken: function ensurePracticeSessionDatachannelToken(meeting) {
|
|
160
289
|
var _this2 = this;
|
|
161
290
|
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
162
|
-
var
|
|
291
|
+
var _this2$_practiceSessi, _this2$_practiceSessi2;
|
|
292
|
+
var isDataChannelTokenEnabled, cachedToken, _refreshResponse$body, refreshResponse, _ref2, datachannelToken, _t2;
|
|
163
293
|
return _regenerator.default.wrap(function (_context2) {
|
|
164
294
|
while (1) switch (_context2.prev = _context2.next) {
|
|
165
295
|
case 0:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
296
|
+
_context2.next = 1;
|
|
297
|
+
return _this2.webex.internal.llm.isDataChannelTokenEnabled();
|
|
298
|
+
case 1:
|
|
299
|
+
isDataChannelTokenEnabled = _context2.sent;
|
|
300
|
+
if (isDataChannelTokenEnabled) {
|
|
169
301
|
_context2.next = 2;
|
|
170
302
|
break;
|
|
171
303
|
}
|
|
172
|
-
_context2.next = 1;
|
|
173
|
-
return _this2.cleanupPSDataChannel();
|
|
174
|
-
case 1:
|
|
175
304
|
return _context2.abrupt("return", undefined);
|
|
176
305
|
case 2:
|
|
177
|
-
//
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
finalToken = currentToken !== null && currentToken !== void 0 ? currentToken : practiceSessionDatachannelToken;
|
|
181
|
-
isCaptionBoxOn = _this2.webex.internal.voicea.getIsCaptionBoxOn();
|
|
182
|
-
if (!currentToken && practiceSessionDatachannelToken) {
|
|
183
|
-
// @ts-ignore
|
|
184
|
-
_this2.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _internalPluginLlm.DataChannelTokenType.PracticeSession);
|
|
185
|
-
}
|
|
186
|
-
if (practiceSessionDatachannelUrl) {
|
|
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;
|
|
308
|
+
if (!cachedToken) {
|
|
187
309
|
_context2.next = 3;
|
|
188
310
|
break;
|
|
189
311
|
}
|
|
190
|
-
return _context2.abrupt("return",
|
|
312
|
+
return _context2.abrupt("return", cachedToken);
|
|
191
313
|
case 3:
|
|
192
|
-
|
|
314
|
+
_context2.prev = 3;
|
|
315
|
+
_context2.next = 4;
|
|
316
|
+
return meeting.refreshDataChannelToken();
|
|
317
|
+
case 4:
|
|
318
|
+
refreshResponse = _context2.sent;
|
|
319
|
+
_ref2 = (_refreshResponse$body = refreshResponse === null || refreshResponse === void 0 ? void 0 : refreshResponse.body) !== null && _refreshResponse$body !== void 0 ? _refreshResponse$body : {}, datachannelToken = _ref2.datachannelToken;
|
|
320
|
+
if (datachannelToken) {
|
|
193
321
|
_context2.next = 5;
|
|
194
322
|
break;
|
|
195
323
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
324
|
+
return _context2.abrupt("return", undefined);
|
|
325
|
+
case 5:
|
|
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
|
+
}
|
|
332
|
+
return _context2.abrupt("return", datachannelToken);
|
|
333
|
+
case 6:
|
|
334
|
+
_context2.prev = 6;
|
|
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)));
|
|
337
|
+
return _context2.abrupt("return", undefined);
|
|
338
|
+
case 7:
|
|
339
|
+
case "end":
|
|
340
|
+
return _context2.stop();
|
|
341
|
+
}
|
|
342
|
+
}, _callee2, null, [[3, 6]]);
|
|
343
|
+
}))();
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
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.
|
|
349
|
+
* @returns {Promise}
|
|
350
|
+
*/
|
|
351
|
+
updatePSDataChannel: function updatePSDataChannel() {
|
|
352
|
+
var _this3 = this;
|
|
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) {
|
|
358
|
+
case 0:
|
|
359
|
+
_this3._updatePSDataChannelSequence = (_this3._updatePSDataChannelSequence || 0) + 1;
|
|
360
|
+
invocationSequence = _this3._updatePSDataChannelSequence;
|
|
361
|
+
meeting = _this3.getValidatedWebinarMeeting();
|
|
362
|
+
isPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel();
|
|
363
|
+
if (isPracticeSession) {
|
|
364
|
+
_context4.next = 2;
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
_context4.next = 1;
|
|
368
|
+
return _this3.cleanupPSDataChannel();
|
|
369
|
+
case 1:
|
|
370
|
+
return _context4.abrupt("return", undefined);
|
|
371
|
+
case 2:
|
|
199
372
|
// @ts-ignore - Fix type
|
|
200
|
-
|
|
201
|
-
|
|
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;
|
|
374
|
+
if (practiceSessionDatachannelUrl) {
|
|
375
|
+
_context4.next = 3;
|
|
202
376
|
break;
|
|
203
377
|
}
|
|
204
|
-
return
|
|
378
|
+
return _context4.abrupt("return", undefined);
|
|
379
|
+
case 3:
|
|
380
|
+
if (!((_this3$_practiceSessi = _this3._practiceSessionLLMChannel) !== null && _this3$_practiceSessi !== void 0 && _this3$_practiceSessi.isConnected())) {
|
|
381
|
+
_context4.next = 5;
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
if (!(url === _this3._practiceSessionLLMChannel.getLocusUrl() && practiceSessionDatachannelUrl === _this3._practiceSessionLLMChannel.getDatachannelUrl())) {
|
|
385
|
+
_context4.next = 4;
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
return _context4.abrupt("return", undefined);
|
|
205
389
|
case 4:
|
|
206
|
-
|
|
207
|
-
return
|
|
390
|
+
_context4.next = 5;
|
|
391
|
+
return _this3.cleanupPSDataChannel();
|
|
208
392
|
case 5:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
393
|
+
// Ensure the default session LLM channel is connected before connecting the practice session.
|
|
394
|
+
// Subscribe before checking isConnected() to avoid a race where the 'online' event fires
|
|
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) {
|
|
397
|
+
_onDefaultSessionConnected = function onDefaultSessionConnected() {
|
|
398
|
+
var _meeting$llmChannel2;
|
|
399
|
+
_this3._pendingOnlineListener = null;
|
|
400
|
+
(_meeting$llmChannel2 = meeting.llmChannel) === null || _meeting$llmChannel2 === void 0 ? void 0 : _meeting$llmChannel2.off('online', _onDefaultSessionConnected);
|
|
401
|
+
_this3.updatePSDataChannel();
|
|
402
|
+
};
|
|
403
|
+
_this3._pendingOnlineListener = _onDefaultSessionConnected;
|
|
404
|
+
meeting.llmChannel.on('online', _onDefaultSessionConnected);
|
|
405
|
+
}
|
|
406
|
+
if (meeting !== null && meeting !== void 0 && (_meeting$llmChannel3 = meeting.llmChannel) !== null && _meeting$llmChannel3 !== void 0 && _meeting$llmChannel3.isConnected()) {
|
|
407
|
+
_context4.next = 6;
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
_loggerProxy.default.logger.info('Webinar:index#updatePSDataChannel --> default session not yet connected, deferring practice session connect.');
|
|
411
|
+
return _context4.abrupt("return", undefined);
|
|
412
|
+
case 6:
|
|
413
|
+
// Default session is already connected — cancel the pending listener and proceed
|
|
414
|
+
if (_this3._pendingOnlineListener) {
|
|
415
|
+
meeting.llmChannel.off('online', _this3._pendingOnlineListener);
|
|
416
|
+
_this3._pendingOnlineListener = null;
|
|
417
|
+
}
|
|
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;
|
|
422
|
+
return _this3.ensurePracticeSessionDatachannelToken(meeting);
|
|
423
|
+
case 7:
|
|
424
|
+
refreshedToken = _context4.sent;
|
|
425
|
+
latestPracticeSessionDatachannelUrl = (0, _lodash.get)(meeting, 'locusInfo.info.practiceSessionDatachannelUrl');
|
|
426
|
+
isStillPracticeSession = (meeting === null || meeting === void 0 ? void 0 : meeting.isJoined()) && _this3.isJoinPracticeSessionDataChannel(); // Skip stale invocations after async refresh to avoid reconnecting a session
|
|
427
|
+
// that was already updated/cleaned by a newer state transition.
|
|
428
|
+
if (!(invocationSequence !== _this3._updatePSDataChannelSequence || !isStillPracticeSession || !latestPracticeSessionDatachannelUrl || latestPracticeSessionDatachannelUrl !== practiceSessionDatachannelUrl)) {
|
|
429
|
+
_context4.next = 8;
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
return _context4.abrupt("return", undefined);
|
|
433
|
+
case 8:
|
|
434
|
+
if (refreshedToken) {
|
|
435
|
+
practiceSessionDatachannelToken = refreshedToken;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// Create a new practice session LLM channel
|
|
439
|
+
// @ts-ignore - Fix type
|
|
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;
|
|
221
506
|
}
|
|
222
|
-
|
|
223
|
-
return _promise.default.resolve(registerAndConnectResult);
|
|
507
|
+
throw error;
|
|
224
508
|
}));
|
|
225
|
-
case
|
|
509
|
+
case 9:
|
|
226
510
|
case "end":
|
|
227
|
-
return
|
|
511
|
+
return _context4.stop();
|
|
228
512
|
}
|
|
229
|
-
},
|
|
513
|
+
}, _callee4);
|
|
230
514
|
}))();
|
|
231
515
|
},
|
|
232
516
|
/**
|
|
@@ -235,6 +519,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
235
519
|
* @returns {Promise}
|
|
236
520
|
*/
|
|
237
521
|
setPracticeSessionState: function setPracticeSessionState(enabled) {
|
|
522
|
+
var meeting = this.getValidatedWebinarMeeting();
|
|
238
523
|
return this.request({
|
|
239
524
|
method: _constants.HTTP_VERBS.PATCH,
|
|
240
525
|
uri: "".concat(this.locusUrl, "/controls"),
|
|
@@ -243,6 +528,9 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
243
528
|
enabled: enabled
|
|
244
529
|
}
|
|
245
530
|
}
|
|
531
|
+
}).then(function (response) {
|
|
532
|
+
_util.default.updateLocusFromApiResponse(meeting, response);
|
|
533
|
+
return response;
|
|
246
534
|
}).catch(function (error) {
|
|
247
535
|
_loggerProxy.default.logger.error('Meeting:webinar#setPracticeSessionState failed', error);
|
|
248
536
|
throw error;
|
|
@@ -264,33 +552,33 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
264
552
|
* @returns {Promise}
|
|
265
553
|
*/
|
|
266
554
|
startWebcast: function startWebcast(meeting, layout) {
|
|
267
|
-
var
|
|
268
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
269
|
-
var
|
|
270
|
-
return _regenerator.default.wrap(function (
|
|
271
|
-
while (1) switch (
|
|
555
|
+
var _this4 = this;
|
|
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) {
|
|
272
560
|
case 0:
|
|
273
561
|
if (meeting) {
|
|
274
|
-
|
|
562
|
+
_context5.next = 1;
|
|
275
563
|
break;
|
|
276
564
|
}
|
|
277
565
|
_loggerProxy.default.logger.error("Meeting:webinar#startWebcast failed --> meeting parameter : ".concat(meeting));
|
|
278
566
|
throw new Error('Meeting parameter does not meet expectations');
|
|
279
567
|
case 1:
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return
|
|
568
|
+
_t3 = _this4;
|
|
569
|
+
_t4 = _constants.HTTP_VERBS.PUT;
|
|
570
|
+
_t5 = "".concat(_this4.webcastInstanceUrl, "/streaming");
|
|
571
|
+
_t6 = _defineProperty2.default;
|
|
572
|
+
_context5.next = 2;
|
|
573
|
+
return _this4.webex.credentials.getUserToken();
|
|
286
574
|
case 2:
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
authorization:
|
|
291
|
-
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
|
|
292
580
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
293
|
-
|
|
581
|
+
_t0 = {
|
|
294
582
|
action: 'start',
|
|
295
583
|
meetingInfo: {
|
|
296
584
|
locusId: meeting.locusId,
|
|
@@ -298,20 +586,20 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
298
586
|
},
|
|
299
587
|
layout: layout
|
|
300
588
|
};
|
|
301
|
-
return
|
|
302
|
-
method:
|
|
303
|
-
uri:
|
|
304
|
-
headers:
|
|
305
|
-
body:
|
|
589
|
+
return _context5.abrupt("return", _t3.request.call(_t3, {
|
|
590
|
+
method: _t4,
|
|
591
|
+
uri: _t5,
|
|
592
|
+
headers: _t9,
|
|
593
|
+
body: _t0
|
|
306
594
|
}).catch(function (error) {
|
|
307
595
|
_loggerProxy.default.logger.error('Meeting:webinar#startWebcast failed', error);
|
|
308
596
|
throw error;
|
|
309
597
|
}));
|
|
310
598
|
case 3:
|
|
311
599
|
case "end":
|
|
312
|
-
return
|
|
600
|
+
return _context5.stop();
|
|
313
601
|
}
|
|
314
|
-
},
|
|
602
|
+
}, _callee5);
|
|
315
603
|
}))();
|
|
316
604
|
},
|
|
317
605
|
/**
|
|
@@ -319,42 +607,42 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
319
607
|
* @returns {Promise}
|
|
320
608
|
*/
|
|
321
609
|
stopWebcast: function stopWebcast() {
|
|
322
|
-
var
|
|
323
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
324
|
-
var
|
|
325
|
-
return _regenerator.default.wrap(function (
|
|
326
|
-
while (1) switch (
|
|
610
|
+
var _this5 = this;
|
|
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) {
|
|
327
615
|
case 0:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
return
|
|
616
|
+
_t1 = _this5;
|
|
617
|
+
_t10 = _constants.HTTP_VERBS.PUT;
|
|
618
|
+
_t11 = "".concat(_this5.webcastInstanceUrl, "/streaming");
|
|
619
|
+
_t12 = _defineProperty2.default;
|
|
620
|
+
_context6.next = 1;
|
|
621
|
+
return _this5.webex.credentials.getUserToken();
|
|
334
622
|
case 1:
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
authorization:
|
|
339
|
-
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
|
|
340
628
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
341
|
-
|
|
629
|
+
_t16 = {
|
|
342
630
|
action: 'stop'
|
|
343
631
|
};
|
|
344
|
-
return
|
|
345
|
-
method:
|
|
346
|
-
uri:
|
|
347
|
-
headers:
|
|
348
|
-
body:
|
|
632
|
+
return _context6.abrupt("return", _t1.request.call(_t1, {
|
|
633
|
+
method: _t10,
|
|
634
|
+
uri: _t11,
|
|
635
|
+
headers: _t15,
|
|
636
|
+
body: _t16
|
|
349
637
|
}).catch(function (error) {
|
|
350
638
|
_loggerProxy.default.logger.error('Meeting:webinar#stopWebcast failed', error);
|
|
351
639
|
throw error;
|
|
352
640
|
}));
|
|
353
641
|
case 2:
|
|
354
642
|
case "end":
|
|
355
|
-
return
|
|
643
|
+
return _context6.stop();
|
|
356
644
|
}
|
|
357
|
-
},
|
|
645
|
+
}, _callee6);
|
|
358
646
|
}))();
|
|
359
647
|
},
|
|
360
648
|
/**
|
|
@@ -362,37 +650,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
362
650
|
* @returns {Promise}
|
|
363
651
|
*/
|
|
364
652
|
queryWebcastLayout: function queryWebcastLayout() {
|
|
365
|
-
var
|
|
366
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
367
|
-
var
|
|
368
|
-
return _regenerator.default.wrap(function (
|
|
369
|
-
while (1) switch (
|
|
653
|
+
var _this6 = this;
|
|
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) {
|
|
370
658
|
case 0:
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
return
|
|
659
|
+
_t17 = _this6;
|
|
660
|
+
_t18 = _constants.HTTP_VERBS.GET;
|
|
661
|
+
_t19 = "".concat(_this6.webcastInstanceUrl, "/layout");
|
|
662
|
+
_context7.next = 1;
|
|
663
|
+
return _this6.webex.credentials.getUserToken();
|
|
376
664
|
case 1:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
authorization:
|
|
381
|
-
trackingId:
|
|
665
|
+
_t20 = _context7.sent;
|
|
666
|
+
_t21 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
667
|
+
_t22 = {
|
|
668
|
+
authorization: _t20,
|
|
669
|
+
trackingId: _t21
|
|
382
670
|
};
|
|
383
|
-
return
|
|
384
|
-
method:
|
|
385
|
-
uri:
|
|
386
|
-
headers:
|
|
671
|
+
return _context7.abrupt("return", _t17.request.call(_t17, {
|
|
672
|
+
method: _t18,
|
|
673
|
+
uri: _t19,
|
|
674
|
+
headers: _t22
|
|
387
675
|
}).catch(function (error) {
|
|
388
676
|
_loggerProxy.default.logger.error('Meeting:webinar#queryWebcastLayout failed', error);
|
|
389
677
|
throw error;
|
|
390
678
|
}));
|
|
391
679
|
case 2:
|
|
392
680
|
case "end":
|
|
393
|
-
return
|
|
681
|
+
return _context7.stop();
|
|
394
682
|
}
|
|
395
|
-
},
|
|
683
|
+
}, _callee7);
|
|
396
684
|
}))();
|
|
397
685
|
},
|
|
398
686
|
/**
|
|
@@ -401,84 +689,83 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
401
689
|
* @returns {Promise}
|
|
402
690
|
*/
|
|
403
691
|
updateWebcastLayout: function updateWebcastLayout(layout) {
|
|
404
|
-
var
|
|
405
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
406
|
-
var
|
|
407
|
-
return _regenerator.default.wrap(function (
|
|
408
|
-
while (1) switch (
|
|
692
|
+
var _this7 = this;
|
|
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) {
|
|
409
697
|
case 0:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
return
|
|
698
|
+
_t23 = _this7;
|
|
699
|
+
_t24 = _constants.HTTP_VERBS.PUT;
|
|
700
|
+
_t25 = "".concat(_this7.webcastInstanceUrl, "/layout");
|
|
701
|
+
_t26 = _defineProperty2.default;
|
|
702
|
+
_context8.next = 1;
|
|
703
|
+
return _this7.webex.credentials.getUserToken();
|
|
416
704
|
case 1:
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
authorization:
|
|
421
|
-
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
|
|
422
710
|
}, _constants.HEADERS.CONTENT_TYPE, _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON);
|
|
423
|
-
|
|
711
|
+
_t30 = {
|
|
424
712
|
videoLayout: layout.videoLayout,
|
|
425
713
|
contentLayout: layout.contentLayout,
|
|
426
714
|
syncStageLayout: layout.syncStageLayout,
|
|
427
715
|
syncStageInMeeting: layout.syncStageInMeeting
|
|
428
716
|
};
|
|
429
|
-
return
|
|
430
|
-
method:
|
|
431
|
-
uri:
|
|
432
|
-
headers:
|
|
433
|
-
body:
|
|
717
|
+
return _context8.abrupt("return", _t23.request.call(_t23, {
|
|
718
|
+
method: _t24,
|
|
719
|
+
uri: _t25,
|
|
720
|
+
headers: _t29,
|
|
721
|
+
body: _t30
|
|
434
722
|
}).catch(function (error) {
|
|
435
723
|
_loggerProxy.default.logger.error('Meeting:webinar#updateWebcastLayout failed', error);
|
|
436
724
|
throw error;
|
|
437
725
|
}));
|
|
438
726
|
case 2:
|
|
439
727
|
case "end":
|
|
440
|
-
return
|
|
728
|
+
return _context8.stop();
|
|
441
729
|
}
|
|
442
|
-
},
|
|
730
|
+
}, _callee8);
|
|
443
731
|
}))();
|
|
444
732
|
},
|
|
445
733
|
/**
|
|
446
734
|
* view all webcast attendees
|
|
447
|
-
* @param {string} queryString
|
|
448
735
|
* @returns {Promise}
|
|
449
736
|
*/
|
|
450
737
|
viewAllWebcastAttendees: function viewAllWebcastAttendees() {
|
|
451
|
-
var
|
|
452
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
453
|
-
var
|
|
454
|
-
return _regenerator.default.wrap(function (
|
|
455
|
-
while (1) switch (
|
|
738
|
+
var _this8 = this;
|
|
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) {
|
|
456
743
|
case 0:
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
return
|
|
744
|
+
_t31 = _this8;
|
|
745
|
+
_t32 = _constants.HTTP_VERBS.GET;
|
|
746
|
+
_t33 = "".concat(_this8.webcastInstanceUrl, "/attendees");
|
|
747
|
+
_context9.next = 1;
|
|
748
|
+
return _this8.webex.credentials.getUserToken();
|
|
462
749
|
case 1:
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
authorization:
|
|
467
|
-
trackingId:
|
|
750
|
+
_t34 = _context9.sent;
|
|
751
|
+
_t35 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
752
|
+
_t36 = {
|
|
753
|
+
authorization: _t34,
|
|
754
|
+
trackingId: _t35
|
|
468
755
|
};
|
|
469
|
-
return
|
|
470
|
-
method:
|
|
471
|
-
uri:
|
|
472
|
-
headers:
|
|
756
|
+
return _context9.abrupt("return", _t31.request.call(_t31, {
|
|
757
|
+
method: _t32,
|
|
758
|
+
uri: _t33,
|
|
759
|
+
headers: _t36
|
|
473
760
|
}).catch(function (error) {
|
|
474
761
|
_loggerProxy.default.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);
|
|
475
762
|
throw error;
|
|
476
763
|
}));
|
|
477
764
|
case 2:
|
|
478
765
|
case "end":
|
|
479
|
-
return
|
|
766
|
+
return _context9.stop();
|
|
480
767
|
}
|
|
481
|
-
},
|
|
768
|
+
}, _callee9);
|
|
482
769
|
}))();
|
|
483
770
|
},
|
|
484
771
|
/**
|
|
@@ -488,38 +775,38 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
488
775
|
*/
|
|
489
776
|
searchWebcastAttendees: function searchWebcastAttendees() {
|
|
490
777
|
var _arguments = arguments,
|
|
491
|
-
|
|
492
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
493
|
-
var queryString,
|
|
494
|
-
return _regenerator.default.wrap(function (
|
|
495
|
-
while (1) switch (
|
|
778
|
+
_this9 = this;
|
|
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) {
|
|
496
783
|
case 0:
|
|
497
784
|
queryString = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : '';
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
return
|
|
785
|
+
_t37 = _this9;
|
|
786
|
+
_t38 = _constants.HTTP_VERBS.GET;
|
|
787
|
+
_t39 = "".concat(_this9.webcastInstanceUrl, "/attendees?keyword=").concat(encodeURIComponent(queryString));
|
|
788
|
+
_context0.next = 1;
|
|
789
|
+
return _this9.webex.credentials.getUserToken();
|
|
503
790
|
case 1:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
authorization:
|
|
508
|
-
trackingId:
|
|
791
|
+
_t40 = _context0.sent;
|
|
792
|
+
_t41 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
793
|
+
_t42 = {
|
|
794
|
+
authorization: _t40,
|
|
795
|
+
trackingId: _t41
|
|
509
796
|
};
|
|
510
|
-
return
|
|
511
|
-
method:
|
|
512
|
-
uri:
|
|
513
|
-
headers:
|
|
797
|
+
return _context0.abrupt("return", _t37.request.call(_t37, {
|
|
798
|
+
method: _t38,
|
|
799
|
+
uri: _t39,
|
|
800
|
+
headers: _t42
|
|
514
801
|
}).catch(function (error) {
|
|
515
802
|
_loggerProxy.default.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);
|
|
516
803
|
throw error;
|
|
517
804
|
}));
|
|
518
805
|
case 2:
|
|
519
806
|
case "end":
|
|
520
|
-
return
|
|
807
|
+
return _context0.stop();
|
|
521
808
|
}
|
|
522
|
-
},
|
|
809
|
+
}, _callee0);
|
|
523
810
|
}))();
|
|
524
811
|
},
|
|
525
812
|
/**
|
|
@@ -528,37 +815,37 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
528
815
|
* @returns {Promise}
|
|
529
816
|
*/
|
|
530
817
|
expelWebcastAttendee: function expelWebcastAttendee(participantId) {
|
|
531
|
-
var
|
|
532
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
533
|
-
var
|
|
534
|
-
return _regenerator.default.wrap(function (
|
|
535
|
-
while (1) switch (
|
|
818
|
+
var _this0 = this;
|
|
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) {
|
|
536
823
|
case 0:
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
return
|
|
824
|
+
_t43 = _this0;
|
|
825
|
+
_t44 = _constants.HTTP_VERBS.DELETE;
|
|
826
|
+
_t45 = "".concat(_this0.webcastInstanceUrl, "/attendees/").concat(participantId);
|
|
827
|
+
_context1.next = 1;
|
|
828
|
+
return _this0.webex.credentials.getUserToken();
|
|
542
829
|
case 1:
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
authorization:
|
|
547
|
-
trackingId:
|
|
830
|
+
_t46 = _context1.sent;
|
|
831
|
+
_t47 = "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString());
|
|
832
|
+
_t48 = {
|
|
833
|
+
authorization: _t46,
|
|
834
|
+
trackingId: _t47
|
|
548
835
|
};
|
|
549
|
-
return
|
|
550
|
-
method:
|
|
551
|
-
uri:
|
|
552
|
-
headers:
|
|
836
|
+
return _context1.abrupt("return", _t43.request.call(_t43, {
|
|
837
|
+
method: _t44,
|
|
838
|
+
uri: _t45,
|
|
839
|
+
headers: _t48
|
|
553
840
|
}).catch(function (error) {
|
|
554
841
|
_loggerProxy.default.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);
|
|
555
842
|
throw error;
|
|
556
843
|
}));
|
|
557
844
|
case 2:
|
|
558
845
|
case "end":
|
|
559
|
-
return
|
|
846
|
+
return _context1.stop();
|
|
560
847
|
}
|
|
561
|
-
},
|
|
848
|
+
}, _callee1);
|
|
562
849
|
}))();
|
|
563
850
|
},
|
|
564
851
|
/**
|
|
@@ -570,14 +857,21 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
570
857
|
* @returns {Promise}
|
|
571
858
|
*/
|
|
572
859
|
searchLargeScaleWebinarAttendees: function searchLargeScaleWebinarAttendees(payload) {
|
|
573
|
-
var
|
|
574
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
860
|
+
var _this1 = this;
|
|
861
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
575
862
|
var _payload$limit, _meeting$locusInfo3, _meeting$locusInfo3$l, _meeting$locusInfo3$l2, _meeting$locusInfo3$l3;
|
|
576
|
-
var meeting, rawParams, attendeeSearchUrl,
|
|
577
|
-
return _regenerator.default.wrap(function (
|
|
578
|
-
while (1) switch (
|
|
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) {
|
|
579
866
|
case 0:
|
|
580
|
-
meeting =
|
|
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:
|
|
581
875
|
rawParams = {
|
|
582
876
|
search_text: payload === null || payload === void 0 ? void 0 : payload.queryString,
|
|
583
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,
|
|
@@ -585,40 +879,40 @@ var Webinar = _webexCore.WebexPlugin.extend({
|
|
|
585
879
|
};
|
|
586
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;
|
|
587
881
|
if (attendeeSearchUrl) {
|
|
588
|
-
|
|
882
|
+
_context10.next = 2;
|
|
589
883
|
break;
|
|
590
884
|
}
|
|
591
|
-
_loggerProxy.default.logger.error(
|
|
885
|
+
_loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> attendee search url unavailable');
|
|
592
886
|
throw new Error('Meeting:webinar5k#Attendee search url is not available');
|
|
593
|
-
case 1:
|
|
594
|
-
_t47 = _this0;
|
|
595
|
-
_t48 = _constants.HTTP_VERBS.GET;
|
|
596
|
-
_t49 = "".concat(attendeeSearchUrl, "?").concat(new URLSearchParams((0, _utils.sanitizeParams)(rawParams)).toString());
|
|
597
|
-
_context0.next = 2;
|
|
598
|
-
return _this0.webex.credentials.getUserToken();
|
|
599
887
|
case 2:
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
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
|
|
605
899
|
};
|
|
606
|
-
return
|
|
607
|
-
method:
|
|
608
|
-
uri:
|
|
609
|
-
headers:
|
|
900
|
+
return _context10.abrupt("return", _t49.request.call(_t49, {
|
|
901
|
+
method: _t50,
|
|
902
|
+
uri: _t51,
|
|
903
|
+
headers: _t54
|
|
610
904
|
}).catch(function (error) {
|
|
611
905
|
_loggerProxy.default.logger.error('Meeting:webinar5k#searchLargeScaleWebinarAttendees failed', error);
|
|
612
906
|
throw error;
|
|
613
907
|
}));
|
|
614
|
-
case
|
|
908
|
+
case 4:
|
|
615
909
|
case "end":
|
|
616
|
-
return
|
|
910
|
+
return _context10.stop();
|
|
617
911
|
}
|
|
618
|
-
},
|
|
912
|
+
}, _callee10);
|
|
619
913
|
}))();
|
|
620
914
|
},
|
|
621
|
-
version: "3.
|
|
915
|
+
version: "3.13.0-next.10"
|
|
622
916
|
});
|
|
623
917
|
var _default = exports.default = Webinar;
|
|
624
918
|
//# sourceMappingURL=index.js.map
|