@webex/plugin-meetings 3.12.0-next.18 → 3.12.0-next.181
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 +207 -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 +26 -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 +1844 -959
- 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/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/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 +3 -2
- 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 +401 -0
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +1085 -252
- 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 +292 -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/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 +2451 -184
- 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 +3462 -493
- 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/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/src/meetings/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint no-shadow: ["error", { "allow": ["eventType"] }] */
|
|
2
|
-
import {cloneDeep, clone, set} from 'lodash';
|
|
2
|
+
import {cloneDeep, clone, set, once} from 'lodash';
|
|
3
|
+
import {WasmRuntimeProbe} from '@webex/web-capabilities';
|
|
3
4
|
import '@webex/internal-plugin-mercury';
|
|
4
5
|
import '@webex/internal-plugin-conversation';
|
|
5
6
|
import '@webex/internal-plugin-metrics';
|
|
@@ -55,10 +56,12 @@ import PasswordError from '../common/errors/password-error';
|
|
|
55
56
|
import CaptchaError from '../common/errors/captcha-error';
|
|
56
57
|
import MeetingCollection from './collection';
|
|
57
58
|
import {
|
|
59
|
+
FetchSitePreferencesMeViaSiteOptions,
|
|
58
60
|
MEETING_KEY,
|
|
59
61
|
INoiseReductionEffect,
|
|
60
62
|
IVirtualBackgroundEffect,
|
|
61
63
|
MeetingRegistrationStatus,
|
|
64
|
+
SitePreferencesResponse,
|
|
62
65
|
} from './meetings.types';
|
|
63
66
|
import MeetingsUtil from './util';
|
|
64
67
|
import PermissionError from '../common/errors/permission';
|
|
@@ -69,7 +72,9 @@ import JoinForbiddenError from '../common/errors/join-forbidden-error';
|
|
|
69
72
|
import {HashTreeMessage} from '../hashTree/hashTreeParser';
|
|
70
73
|
import {HashTreeObject} from '../hashTree/types';
|
|
71
74
|
import {isSelf} from '../hashTree/utils';
|
|
75
|
+
|
|
72
76
|
import {createLocusFromHashTreeMessage, findMeetingForHashTreeMessage} from '../locus-info';
|
|
77
|
+
import {LocusDTO} from '../locus-info/types';
|
|
73
78
|
|
|
74
79
|
let mediaLogger;
|
|
75
80
|
|
|
@@ -206,6 +211,52 @@ export default class Meetings extends WebexPlugin {
|
|
|
206
211
|
namespace = MEETINGS;
|
|
207
212
|
registrationStatus: MeetingRegistrationStatus;
|
|
208
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Emits a metric describing how well this browser runs WebAssembly, used to spot browsers
|
|
216
|
+
* where real-time WASM effects (e.g. background noise removal) run poorly.
|
|
217
|
+
*
|
|
218
|
+
* @param {string} correlationId - correlation id to report the result against
|
|
219
|
+
* @returns {void}
|
|
220
|
+
*/
|
|
221
|
+
private emitWasmRuntimePerformance = once((correlationId: string): void => {
|
|
222
|
+
// Probe and telemetry failures must not prevent meeting creation.
|
|
223
|
+
WasmRuntimeProbe.check()
|
|
224
|
+
.then((result) => {
|
|
225
|
+
const {status, capability, reason, measurements} = result;
|
|
226
|
+
const {
|
|
227
|
+
divRatio = null,
|
|
228
|
+
sqrtRatio = null,
|
|
229
|
+
addNsPerOp = null,
|
|
230
|
+
addMedianMs = null,
|
|
231
|
+
divMedianMs = null,
|
|
232
|
+
sqrtMedianMs = null,
|
|
233
|
+
} = measurements ?? {};
|
|
234
|
+
const measurementsLog = JSON.stringify(measurements);
|
|
235
|
+
|
|
236
|
+
LoggerProxy.logger.log(
|
|
237
|
+
`Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ${status}, capability: ${capability}, reason: ${reason}, measurements: ${measurementsLog}`
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
return Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.WASM_RUNTIME_PERFORMANCE, {
|
|
241
|
+
status,
|
|
242
|
+
capability,
|
|
243
|
+
reason,
|
|
244
|
+
divRatio,
|
|
245
|
+
sqrtRatio,
|
|
246
|
+
addNsPerOp,
|
|
247
|
+
addMedianMs,
|
|
248
|
+
divMedianMs,
|
|
249
|
+
sqrtMedianMs,
|
|
250
|
+
correlation_id: correlationId,
|
|
251
|
+
});
|
|
252
|
+
})
|
|
253
|
+
.catch((error) => {
|
|
254
|
+
LoggerProxy.logger.error(
|
|
255
|
+
`Meetings:index#emitWasmRuntimePerformance --> ERROR, failed to probe or report WASM runtime performance: ${error.message}`
|
|
256
|
+
);
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
|
|
209
260
|
/**
|
|
210
261
|
* Initializes the Meetings Plugin
|
|
211
262
|
* @constructor
|
|
@@ -313,7 +364,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
313
364
|
const breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
|
|
314
365
|
|
|
315
366
|
const isSelfJoined = newLocus?.self?.state === _JOINED_;
|
|
316
|
-
const isSelfMoved = newLocus
|
|
367
|
+
const isSelfMoved = MeetingsUtil.isSelfMovedOrBreakoutEnded(newLocus);
|
|
317
368
|
// @ts-ignore
|
|
318
369
|
const deviceFromNewLocus = MeetingsUtil.getThisDevice(newLocus, this.webex.internal.device.url);
|
|
319
370
|
const isResourceMovedOnThisDevice =
|
|
@@ -390,7 +441,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
390
441
|
private isNeedHandleLocusDTO(meeting: any, newLocus: any) {
|
|
391
442
|
if (newLocus) {
|
|
392
443
|
const isNewLocusAsBreakout = MeetingsUtil.isBreakoutLocusDTO(newLocus);
|
|
393
|
-
const isSelfMoved = newLocus
|
|
444
|
+
const isSelfMoved = MeetingsUtil.isSelfMovedOrBreakoutEnded(newLocus);
|
|
394
445
|
const isSelfMovedToLobby =
|
|
395
446
|
newLocus?.self?.devices[0]?.intent?.reason === _ON_HOLD_LOBBY_ &&
|
|
396
447
|
newLocus?.self?.devices[0]?.intent?.type === _WAIT_;
|
|
@@ -435,14 +486,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
435
486
|
if (existingMeeting) {
|
|
436
487
|
return existingMeeting;
|
|
437
488
|
}
|
|
438
|
-
|
|
439
489
|
if (data.eventType === LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
440
490
|
// need to check if maybe this event indicates a move to/from breakout
|
|
441
491
|
const meetingForHashTreeMessage = findMeetingForHashTreeMessage(
|
|
442
|
-
data
|
|
443
|
-
this.meetingCollection
|
|
444
|
-
// @ts-ignore
|
|
445
|
-
this.webex.internal.device.url
|
|
492
|
+
data?.stateElementsMessage,
|
|
493
|
+
this.meetingCollection
|
|
446
494
|
);
|
|
447
495
|
|
|
448
496
|
if (meetingForHashTreeMessage) {
|
|
@@ -492,7 +540,6 @@ export default class Meetings extends WebexPlugin {
|
|
|
492
540
|
*/
|
|
493
541
|
private handleLocusEvent(data: LocusEvent, useRandomDelayForInfo = false) {
|
|
494
542
|
let meeting = this.getCorrespondingMeetingByLocus(data);
|
|
495
|
-
|
|
496
543
|
// @ts-ignore
|
|
497
544
|
if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
|
|
498
545
|
storeEventForDebugging('mercury', data);
|
|
@@ -513,6 +560,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
513
560
|
if (meeting && !MeetingsUtil.isBreakoutLocusDTO(data.locus)) {
|
|
514
561
|
meeting.locusInfo.updateMainSessionLocusCache(data.locus); // here data.locus will never be a complete locus
|
|
515
562
|
}
|
|
563
|
+
|
|
516
564
|
if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
|
|
517
565
|
LoggerProxy.logger.log(
|
|
518
566
|
`Meetings:index#handleLocusEvent --> doesn't need to process locus event`
|
|
@@ -586,17 +634,21 @@ export default class Meetings extends WebexPlugin {
|
|
|
586
634
|
this.create(data.locus, DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo)
|
|
587
635
|
.then(async (newMeeting) => {
|
|
588
636
|
meeting = newMeeting;
|
|
589
|
-
|
|
590
637
|
try {
|
|
591
638
|
// It's a new meeting so initialize the locus data
|
|
592
|
-
await meeting.locusInfo.initialSetup(
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
639
|
+
await meeting.locusInfo.initialSetup(
|
|
640
|
+
{
|
|
641
|
+
trigger:
|
|
642
|
+
data.eventType === LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS
|
|
643
|
+
? 'get-loci-response'
|
|
644
|
+
: 'locus-message',
|
|
645
|
+
locus: data.locus,
|
|
646
|
+
hashTreeMessage: data.stateElementsMessage,
|
|
647
|
+
},
|
|
648
|
+
(locus: LocusDTO) => {
|
|
649
|
+
meeting.finalizeMeetingAfterInitialLocusSetup(locus);
|
|
650
|
+
}
|
|
651
|
+
);
|
|
600
652
|
} catch (error) {
|
|
601
653
|
LoggerProxy.logger.warn(
|
|
602
654
|
`Meetings:index#handleLocusEvent --> Error initializing locus data: ${error.message}`
|
|
@@ -707,7 +759,14 @@ export default class Meetings extends WebexPlugin {
|
|
|
707
759
|
|
|
708
760
|
// @ts-ignore
|
|
709
761
|
this.webex.internal.mercury.on(ONLINE, () => {
|
|
710
|
-
|
|
762
|
+
// Fire-and-forget sync on socket recovery. Unlike the reconnection manager (which awaits and
|
|
763
|
+
// retries), nothing consumes this promise, so catch its rejection to avoid an unhandled
|
|
764
|
+
// promise rejection (a transient guest classic-sync failure would otherwise crash Node hosts).
|
|
765
|
+
this.syncMeetings({keepOnlyLocusMeetings: false}).catch((error) => {
|
|
766
|
+
LoggerProxy.logger.warn(
|
|
767
|
+
`Meetings:index#listenForEvents --> syncMeetings after ONLINE event failed: ${error}`
|
|
768
|
+
);
|
|
769
|
+
});
|
|
711
770
|
});
|
|
712
771
|
|
|
713
772
|
// @ts-ignore
|
|
@@ -837,97 +896,82 @@ export default class Meetings extends WebexPlugin {
|
|
|
837
896
|
}
|
|
838
897
|
|
|
839
898
|
/**
|
|
840
|
-
* API to toggle
|
|
841
|
-
*
|
|
842
|
-
* @private
|
|
843
|
-
* @memberof Meetings
|
|
844
|
-
* @returns {undefined}
|
|
845
|
-
*/
|
|
846
|
-
private _toggleTcpReachability(newValue: boolean) {
|
|
847
|
-
if (typeof newValue !== 'boolean') {
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
|
-
// @ts-ignore
|
|
851
|
-
if (this.config.experimental.enableTcpReachability !== newValue) {
|
|
852
|
-
// @ts-ignore
|
|
853
|
-
this.config.experimental.enableTcpReachability = newValue;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* API to toggle TLS reachability, needs to be called before webex.meetings.register()
|
|
899
|
+
* API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
|
|
900
|
+
*
|
|
859
901
|
* @param {Boolean} newValue
|
|
860
902
|
* @private
|
|
861
903
|
* @memberof Meetings
|
|
862
904
|
* @returns {undefined}
|
|
863
905
|
*/
|
|
864
|
-
private
|
|
906
|
+
private _toggleIpv6BackendNativeSupport(newValue: boolean) {
|
|
865
907
|
if (typeof newValue !== 'boolean') {
|
|
866
908
|
return;
|
|
867
909
|
}
|
|
868
910
|
// @ts-ignore
|
|
869
|
-
if (this.config.
|
|
911
|
+
if (this.config.backendIpv6NativeSupport !== newValue) {
|
|
870
912
|
// @ts-ignore
|
|
871
|
-
this.config.
|
|
913
|
+
this.config.backendIpv6NativeSupport = newValue;
|
|
872
914
|
}
|
|
873
915
|
}
|
|
874
916
|
|
|
875
917
|
/**
|
|
876
|
-
* API to toggle
|
|
918
|
+
* API to toggle usage of audio main DTX, needs to be called before webex.meetings.register()
|
|
877
919
|
*
|
|
878
920
|
* @param {Boolean} newValue
|
|
879
921
|
* @private
|
|
880
922
|
* @memberof Meetings
|
|
881
923
|
* @returns {undefined}
|
|
882
924
|
*/
|
|
883
|
-
private
|
|
925
|
+
private _toggleDisableAudioMainDtx(newValue: boolean) {
|
|
884
926
|
if (typeof newValue !== 'boolean') {
|
|
885
927
|
return;
|
|
886
928
|
}
|
|
929
|
+
|
|
887
930
|
// @ts-ignore
|
|
888
|
-
if (this.config.
|
|
931
|
+
if (this.config.experimental.disableAudioMainDtx !== newValue) {
|
|
889
932
|
// @ts-ignore
|
|
890
|
-
this.config.
|
|
933
|
+
this.config.experimental.disableAudioMainDtx = newValue;
|
|
891
934
|
}
|
|
892
935
|
}
|
|
893
936
|
|
|
894
937
|
/**
|
|
895
|
-
* API to toggle usage of audio
|
|
938
|
+
* API to toggle usage of audio twcc support
|
|
896
939
|
*
|
|
897
940
|
* @param {Boolean} newValue
|
|
898
941
|
* @private
|
|
899
942
|
* @memberof Meetings
|
|
900
943
|
* @returns {undefined}
|
|
901
944
|
*/
|
|
902
|
-
private
|
|
945
|
+
private _toggleEnableAudioTwccForMultistream(newValue: boolean) {
|
|
903
946
|
if (typeof newValue !== 'boolean') {
|
|
904
947
|
return;
|
|
905
948
|
}
|
|
906
949
|
|
|
907
950
|
// @ts-ignore
|
|
908
|
-
if (this.config.
|
|
951
|
+
if (this.config.enableAudioTwccForMultistream !== newValue) {
|
|
909
952
|
// @ts-ignore
|
|
910
|
-
this.config.
|
|
953
|
+
this.config.enableAudioTwccForMultistream = newValue;
|
|
911
954
|
}
|
|
912
955
|
}
|
|
913
956
|
|
|
914
957
|
/**
|
|
915
|
-
* API to toggle
|
|
958
|
+
* API to toggle AV1 codec support for video slides in multistream,
|
|
959
|
+
* needs to be called before webex.meetings.joinWithMedia()
|
|
916
960
|
*
|
|
917
961
|
* @param {Boolean} newValue
|
|
918
962
|
* @private
|
|
919
963
|
* @memberof Meetings
|
|
920
964
|
* @returns {undefined}
|
|
921
965
|
*/
|
|
922
|
-
private
|
|
966
|
+
private _toggleEnableAv1SlidesSupport(newValue: boolean) {
|
|
923
967
|
if (typeof newValue !== 'boolean') {
|
|
924
968
|
return;
|
|
925
969
|
}
|
|
926
970
|
|
|
927
971
|
// @ts-ignore
|
|
928
|
-
if (this.config.
|
|
972
|
+
if (this.config.enableAv1SlidesSupport !== newValue) {
|
|
929
973
|
// @ts-ignore
|
|
930
|
-
this.config.
|
|
974
|
+
this.config.enableAv1SlidesSupport = newValue;
|
|
931
975
|
}
|
|
932
976
|
}
|
|
933
977
|
|
|
@@ -1403,6 +1447,31 @@ export default class Meetings extends WebexPlugin {
|
|
|
1403
1447
|
return this.personalMeetingRoom;
|
|
1404
1448
|
}
|
|
1405
1449
|
|
|
1450
|
+
/**
|
|
1451
|
+
* Fetches site preferences for the provided Webex site, or the preferred Webex site.
|
|
1452
|
+
* This is used to determine capabilities of the site, such as whether scheduling a webinar is supported.
|
|
1453
|
+
*
|
|
1454
|
+
* @param {object} [options]
|
|
1455
|
+
* @param {string} [options.siteUrl] - Webex site URL. Defaults to preferredWebexSite, for example "cisco.webex.com".
|
|
1456
|
+
* @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from siteUrl, for example "cisco" for "cisco.webex.com".
|
|
1457
|
+
* @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
|
|
1458
|
+
* @returns {Promise<SitePreferencesResponse>} site preferences response body
|
|
1459
|
+
* @throws {ParameterError}
|
|
1460
|
+
* @public
|
|
1461
|
+
* @memberof Meetings
|
|
1462
|
+
* @example
|
|
1463
|
+
* const preferences = await webex.meetings.fetchSitePreferencesMeViaSite();
|
|
1464
|
+
* const supportScheduleWebinar = preferences?.scheduling?.supportScheduleWebinar;
|
|
1465
|
+
*/
|
|
1466
|
+
public fetchSitePreferencesMeViaSite(
|
|
1467
|
+
options: FetchSitePreferencesMeViaSiteOptions = {}
|
|
1468
|
+
): Promise<SitePreferencesResponse> {
|
|
1469
|
+
return this.request.fetchSitePreferencesMeViaSite({
|
|
1470
|
+
...options,
|
|
1471
|
+
siteUrl: options.siteUrl || this.preferredWebexSite,
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1406
1475
|
/**
|
|
1407
1476
|
* Returns basic information about a meeting that exists or
|
|
1408
1477
|
* used to exist in the MeetingCollection
|
|
@@ -1423,7 +1492,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
1423
1492
|
* @memberof Meetings
|
|
1424
1493
|
*/
|
|
1425
1494
|
private destroy(meeting: Meeting, reason: object) {
|
|
1426
|
-
MeetingUtil.cleanUp(meeting);
|
|
1495
|
+
MeetingUtil.cleanUp(meeting, {preserveVoiceaChannel: false});
|
|
1496
|
+
|
|
1497
|
+
// Tear down hash tree parsers here (and not in MeetingUtil.cleanUp) so they survive
|
|
1498
|
+
// leave/endMeetingForAll to consume the final sentinel END message from Locus.
|
|
1499
|
+
meeting.locusInfo?.cleanUp();
|
|
1427
1500
|
// keep some basic info about the deleted meeting forever
|
|
1428
1501
|
this.deletedMeetings.set(meeting.id, {
|
|
1429
1502
|
id: meeting.id,
|
|
@@ -1620,6 +1693,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1620
1693
|
});
|
|
1621
1694
|
}
|
|
1622
1695
|
});
|
|
1696
|
+
|
|
1697
|
+
this.emitWasmRuntimePerformance(createdMeeting.correlationId);
|
|
1623
1698
|
} else {
|
|
1624
1699
|
LoggerProxy.logger.error(
|
|
1625
1700
|
`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`
|
|
@@ -1765,10 +1840,14 @@ export default class Meetings extends WebexPlugin {
|
|
|
1765
1840
|
extraParams: infoExtraParams,
|
|
1766
1841
|
sendCAevents: !!callStateForMetrics?.correlationId, // if client sends correlation id as argument of public create(), then it means that this meeting creation is part of a pre-join intent from user
|
|
1767
1842
|
};
|
|
1843
|
+
const shouldDeferMeetingInfoFetch = type === DESTINATION_TYPE.LOCUS_ID && !destination?.info;
|
|
1844
|
+
|
|
1845
|
+
const isOneOnOneCallLocus =
|
|
1846
|
+
type === DESTINATION_TYPE.LOCUS_ID && MeetingsUtil.isOneOnOneCall(destination);
|
|
1768
1847
|
|
|
1769
1848
|
if (meetingInfo) {
|
|
1770
1849
|
meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
|
|
1771
|
-
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL) {
|
|
1850
|
+
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus) {
|
|
1772
1851
|
// ignore fetchMeetingInfo for 1:1 meetings
|
|
1773
1852
|
if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
|
|
1774
1853
|
meeting.fetchMeetingInfoTimeoutId = setTimeout(
|
|
@@ -1776,8 +1855,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
1776
1855
|
waitingTime
|
|
1777
1856
|
);
|
|
1778
1857
|
meeting.parseMeetingInfo(undefined, destination);
|
|
1779
|
-
} else {
|
|
1858
|
+
} else if (!shouldDeferMeetingInfoFetch) {
|
|
1780
1859
|
await meeting.fetchMeetingInfo(meetingInfoOptions);
|
|
1860
|
+
} else {
|
|
1861
|
+
LoggerProxy.logger.info(
|
|
1862
|
+
'Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup'
|
|
1863
|
+
);
|
|
1781
1864
|
}
|
|
1782
1865
|
}
|
|
1783
1866
|
} catch (err) {
|
|
@@ -1884,29 +1967,35 @@ export default class Meetings extends WebexPlugin {
|
|
|
1884
1967
|
}
|
|
1885
1968
|
|
|
1886
1969
|
/**
|
|
1887
|
-
* Syncs all the meetings from server.
|
|
1970
|
+
* Syncs all the meetings from server. For unverified guests it skips the getActiveMeetings() call
|
|
1971
|
+
* (which Locus rejects for them) and instead resyncs each meeting individually via LocusInfo#sync.
|
|
1888
1972
|
* @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
|
|
1889
1973
|
* @returns {Promise<void>}
|
|
1890
1974
|
* @public
|
|
1891
1975
|
* @memberof Meetings
|
|
1892
1976
|
*/
|
|
1893
|
-
public syncMeetings({
|
|
1977
|
+
public async syncMeetings({
|
|
1978
|
+
keepOnlyLocusMeetings = true,
|
|
1979
|
+
skipHashTreeSync = false,
|
|
1980
|
+
} = {}): Promise<void> {
|
|
1894
1981
|
// @ts-ignore
|
|
1895
|
-
|
|
1982
|
+
const isUnverifiedGuest = Boolean(this.webex.credentials.isUnverifiedGuest);
|
|
1983
|
+
|
|
1984
|
+
if (isUnverifiedGuest) {
|
|
1896
1985
|
LoggerProxy.logger.info(
|
|
1897
|
-
'Meetings:index#syncMeetings --> skipping
|
|
1986
|
+
'Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync'
|
|
1898
1987
|
);
|
|
1899
1988
|
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
const activeLocusUrl = [];
|
|
1989
|
+
// Locus rejects getActiveMeetings() for unverified guests, so the per-meeting sync below
|
|
1990
|
+
// (with canSyncClassicLocus enabled) resyncs each classic meeting individually instead.
|
|
1991
|
+
} else {
|
|
1992
|
+
try {
|
|
1993
|
+
const locusArray = await this.request.getActiveMeetings();
|
|
1994
|
+
const activeLocusUrl: string[] = [];
|
|
1907
1995
|
|
|
1908
1996
|
if (locusArray?.loci && locusArray.loci.length > 0) {
|
|
1909
1997
|
const lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
|
|
1998
|
+
|
|
1910
1999
|
lociToUpdate.forEach((locus) => {
|
|
1911
2000
|
activeLocusUrl.push(locus.url);
|
|
1912
2001
|
this.handleLocusEvent({
|
|
@@ -1924,21 +2013,54 @@ export default class Meetings extends WebexPlugin {
|
|
|
1924
2013
|
// (they had a locusUrl previously but are no longer active) in the sync
|
|
1925
2014
|
for (const meeting of Object.values(meetingsCollection)) {
|
|
1926
2015
|
// @ts-ignore
|
|
1927
|
-
const {locusUrl} = meeting;
|
|
2016
|
+
const {locusUrl, locusInfo} = meeting;
|
|
1928
2017
|
if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
2018
|
+
const globalMeetingId = locusInfo?.info?.globalMeetingId;
|
|
2019
|
+
|
|
2020
|
+
if (
|
|
2021
|
+
globalMeetingId &&
|
|
2022
|
+
locusArray?.loci?.some(
|
|
2023
|
+
(locus: LocusDTO) => locus.info?.globalMeetingId === globalMeetingId
|
|
2024
|
+
)
|
|
2025
|
+
) {
|
|
2026
|
+
// don't destroy the meeting as Locus API still returned some Locus that shares
|
|
2027
|
+
// the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
|
|
2028
|
+
// is in a breakout and gets moved to a different breakout while we were offline
|
|
2029
|
+
} else {
|
|
2030
|
+
// destroy function also uploads logs
|
|
2031
|
+
// @ts-ignore
|
|
2032
|
+
this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
2033
|
+
}
|
|
1932
2034
|
}
|
|
1933
2035
|
}
|
|
1934
2036
|
}
|
|
1935
|
-
})
|
|
1936
|
-
.catch((error) => {
|
|
2037
|
+
} catch (error) {
|
|
1937
2038
|
LoggerProxy.logger.error(
|
|
1938
2039
|
`Meetings:index#syncMeetings --> failed to sync meetings, ${error}`
|
|
1939
2040
|
);
|
|
1940
|
-
throw
|
|
1941
|
-
}
|
|
2041
|
+
throw error;
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
// Resync each remaining meeting via LocusInfo#sync, which routes to hash tree or classic. For
|
|
2046
|
+
// signed-in users classic meetings were already synced above, so only the hash tree sync runs.
|
|
2047
|
+
const remainingMeetings = this.meetingCollection.getAll();
|
|
2048
|
+
const syncPromises = [];
|
|
2049
|
+
|
|
2050
|
+
for (const meeting of Object.values(remainingMeetings) as any[]) {
|
|
2051
|
+
if (meeting.locusInfo) {
|
|
2052
|
+
syncPromises.push(
|
|
2053
|
+
meeting.locusInfo.sync(meeting, {
|
|
2054
|
+
canSyncClassicLocus: isUnverifiedGuest,
|
|
2055
|
+
canSyncHashTree: !skipHashTreeSync,
|
|
2056
|
+
})
|
|
2057
|
+
);
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
if (syncPromises.length > 0) {
|
|
2062
|
+
await Promise.all(syncPromises);
|
|
2063
|
+
}
|
|
1942
2064
|
}
|
|
1943
2065
|
|
|
1944
2066
|
/**
|
|
@@ -1954,8 +2076,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1954
2076
|
this.breakoutLocusForHandleLater = [];
|
|
1955
2077
|
const lociToUpdate = [...mainLoci];
|
|
1956
2078
|
breakoutLoci.forEach((breakoutLocus) => {
|
|
1957
|
-
const associateMainLocus = mainLoci.find(
|
|
1958
|
-
(mainLocus
|
|
2079
|
+
const associateMainLocus = mainLoci.find((mainLocus) =>
|
|
2080
|
+
MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus)
|
|
1959
2081
|
);
|
|
1960
2082
|
const existCorrespondingMeeting = this.getCorrespondingMeetingByLocus({
|
|
1961
2083
|
eventType: LOCUSEVENT.SDK_NO_EVENT,
|
|
@@ -1983,7 +2105,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
1983
2105
|
* @public
|
|
1984
2106
|
* @memberof Meetings
|
|
1985
2107
|
*/
|
|
1986
|
-
checkHandleBreakoutLocus(newCreatedLocus) {
|
|
2108
|
+
checkHandleBreakoutLocus(newCreatedLocus: any) {
|
|
1987
2109
|
if (
|
|
1988
2110
|
!newCreatedLocus ||
|
|
1989
2111
|
!this.breakoutLocusForHandleLater ||
|
|
@@ -1994,9 +2116,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1994
2116
|
if (MeetingsUtil.isBreakoutLocusDTO(newCreatedLocus)) {
|
|
1995
2117
|
return;
|
|
1996
2118
|
}
|
|
1997
|
-
const existIndex = this.breakoutLocusForHandleLater.findIndex(
|
|
1998
|
-
(breakoutLocus)
|
|
1999
|
-
breakoutLocus.controls?.breakout?.url === newCreatedLocus.controls?.breakout?.url
|
|
2119
|
+
const existIndex = this.breakoutLocusForHandleLater.findIndex((breakoutLocus: any) =>
|
|
2120
|
+
MeetingsUtil.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus)
|
|
2000
2121
|
);
|
|
2001
2122
|
|
|
2002
2123
|
if (existIndex < 0) {
|
|
@@ -31,3 +31,22 @@ export type MeetingRegistrationStatus = {
|
|
|
31
31
|
mercuryConnect: boolean;
|
|
32
32
|
checkH264Support: boolean;
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
export enum SitePreferenceSelectOption {
|
|
36
|
+
SCHEDULING = 'scheduling',
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type FetchSitePreferencesMeViaSiteOptions = {
|
|
40
|
+
siteUrl?: string;
|
|
41
|
+
siteName?: string;
|
|
42
|
+
selectOptions?: SitePreferenceSelectOption[];
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS = [SitePreferenceSelectOption.SCHEDULING];
|
|
46
|
+
|
|
47
|
+
export type SitePreferencesResponse = {
|
|
48
|
+
scheduling?: {
|
|
49
|
+
supportScheduleWebinar?: boolean;
|
|
50
|
+
webinarWebLink?: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
package/src/meetings/request.ts
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
import {StatelessWebexPlugin} from '@webex/webex-core';
|
|
3
3
|
|
|
4
4
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
5
|
+
import ParameterError from '../common/errors/parameter';
|
|
5
6
|
import {HTTP_VERBS, API, RESOURCE} from '../constants';
|
|
7
|
+
import {
|
|
8
|
+
DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS,
|
|
9
|
+
type FetchSitePreferencesMeViaSiteOptions,
|
|
10
|
+
type SitePreferencesResponse,
|
|
11
|
+
} from './meetings.types';
|
|
12
|
+
import MeetingsUtil from './util';
|
|
6
13
|
|
|
7
14
|
/**
|
|
8
15
|
* @class MeetingRequest
|
|
@@ -45,6 +52,42 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
45
52
|
return this.webex.internal.services.getMeetingPreferences();
|
|
46
53
|
}
|
|
47
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Fetches site preferences from a given site given a select option and a siteUrl with an optional siteName. If siteName is not provided, it will be derived from the siteUrl. If siteUrl is not provided, it will throw an error. If selectOptions is not provided, it will default to scheduling.
|
|
57
|
+
*
|
|
58
|
+
* @param {object} [options]
|
|
59
|
+
* @param {string} [options.siteUrl] - Webex site URL, for example "cisco.webex.com".
|
|
60
|
+
* @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from options.siteUrl, e.g., "cisco".
|
|
61
|
+
* @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
|
|
62
|
+
* @returns {Promise<SitePreferencesResponse>} site preferences response body
|
|
63
|
+
* @throws {ParameterError}
|
|
64
|
+
* @public
|
|
65
|
+
* @memberof MeetingRequest
|
|
66
|
+
*/
|
|
67
|
+
fetchSitePreferencesMeViaSite(
|
|
68
|
+
options: FetchSitePreferencesMeViaSiteOptions = {}
|
|
69
|
+
): Promise<SitePreferencesResponse> {
|
|
70
|
+
const {siteUrl, selectOptions = DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS} = options;
|
|
71
|
+
|
|
72
|
+
if (!siteUrl) {
|
|
73
|
+
throw new ParameterError(
|
|
74
|
+
'No siteUrl available. Call register() before fetching site preferences or provide options.siteUrl.'
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// @ts-ignore - config comes from registerPlugin
|
|
79
|
+
const multipartSitePrefixList = this.config.meetings.multipartSitePrefixList || [];
|
|
80
|
+
const siteName = options.siteName || MeetingsUtil.getSiteName(siteUrl, multipartSitePrefixList);
|
|
81
|
+
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
return this.request({
|
|
84
|
+
method: HTTP_VERBS.GET,
|
|
85
|
+
uri: `https://${siteUrl}/wbxappapi/v1/users/me/preference?select=${encodeURIComponent(
|
|
86
|
+
selectOptions.join(',')
|
|
87
|
+
)}&siteurl=${encodeURIComponent(siteName)}`,
|
|
88
|
+
}).then((res: any) => res.body);
|
|
89
|
+
}
|
|
90
|
+
|
|
48
91
|
// locus federation, determines and populate locus if the responseBody has remote URLs to fetch locus details
|
|
49
92
|
|
|
50
93
|
/**
|