@webex/plugin-meetings 3.12.0-next.15 → 3.12.0-next.150
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/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +2 -2
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +99 -4
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +37 -10
- 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 +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +75 -15
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- 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 +15 -2
- 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 +7 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1684 -835
- 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 +37 -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 +9 -3
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +300 -128
- 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/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/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +2 -2
- package/dist/types/constants.d.ts +13 -1
- 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 +3 -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 +10 -1
- package/dist/types/media/properties.d.ts +6 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
- package/dist/types/meeting/index.d.ts +176 -11
- 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 +9 -0
- 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/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 +307 -161
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -23
- 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 +6 -4
- 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 +122 -2
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +2 -2
- package/src/constants.ts +21 -3
- 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 +6 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +25 -4
- 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 +21 -4
- 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 +12 -0
- package/src/meeting/index.ts +937 -119
- 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 +51 -7
- 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 +10 -4
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +200 -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 +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/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 +216 -38
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/annotation/index.ts +3 -3
- 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 +223 -3
- 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 +196 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- 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 +55 -0
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +2811 -117
- 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 +179 -16
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
- package/test/unit/spec/meetings/index.js +544 -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/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 +332 -31
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
|
|
@@ -1424,6 +1493,9 @@ export default class Meetings extends WebexPlugin {
|
|
|
1424
1493
|
*/
|
|
1425
1494
|
private destroy(meeting: Meeting, reason: object) {
|
|
1426
1495
|
MeetingUtil.cleanUp(meeting);
|
|
1496
|
+
// Tear down hash tree parsers here (and not in MeetingUtil.cleanUp) so they survive
|
|
1497
|
+
// leave/endMeetingForAll to consume the final sentinel END message from Locus.
|
|
1498
|
+
meeting.locusInfo?.cleanUp();
|
|
1427
1499
|
// keep some basic info about the deleted meeting forever
|
|
1428
1500
|
this.deletedMeetings.set(meeting.id, {
|
|
1429
1501
|
id: meeting.id,
|
|
@@ -1620,6 +1692,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1620
1692
|
});
|
|
1621
1693
|
}
|
|
1622
1694
|
});
|
|
1695
|
+
|
|
1696
|
+
this.emitWasmRuntimePerformance(createdMeeting.correlationId);
|
|
1623
1697
|
} else {
|
|
1624
1698
|
LoggerProxy.logger.error(
|
|
1625
1699
|
`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`
|
|
@@ -1765,10 +1839,14 @@ export default class Meetings extends WebexPlugin {
|
|
|
1765
1839
|
extraParams: infoExtraParams,
|
|
1766
1840
|
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
1841
|
};
|
|
1842
|
+
const shouldDeferMeetingInfoFetch = type === DESTINATION_TYPE.LOCUS_ID && !destination?.info;
|
|
1843
|
+
|
|
1844
|
+
const isOneOnOneCallLocus =
|
|
1845
|
+
type === DESTINATION_TYPE.LOCUS_ID && MeetingsUtil.isOneOnOneCall(destination);
|
|
1768
1846
|
|
|
1769
1847
|
if (meetingInfo) {
|
|
1770
1848
|
meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
|
|
1771
|
-
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL) {
|
|
1849
|
+
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus) {
|
|
1772
1850
|
// ignore fetchMeetingInfo for 1:1 meetings
|
|
1773
1851
|
if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
|
|
1774
1852
|
meeting.fetchMeetingInfoTimeoutId = setTimeout(
|
|
@@ -1776,8 +1854,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
1776
1854
|
waitingTime
|
|
1777
1855
|
);
|
|
1778
1856
|
meeting.parseMeetingInfo(undefined, destination);
|
|
1779
|
-
} else {
|
|
1857
|
+
} else if (!shouldDeferMeetingInfoFetch) {
|
|
1780
1858
|
await meeting.fetchMeetingInfo(meetingInfoOptions);
|
|
1859
|
+
} else {
|
|
1860
|
+
LoggerProxy.logger.info(
|
|
1861
|
+
'Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup'
|
|
1862
|
+
);
|
|
1781
1863
|
}
|
|
1782
1864
|
}
|
|
1783
1865
|
} catch (err) {
|
|
@@ -1884,29 +1966,35 @@ export default class Meetings extends WebexPlugin {
|
|
|
1884
1966
|
}
|
|
1885
1967
|
|
|
1886
1968
|
/**
|
|
1887
|
-
* Syncs all the meetings from server.
|
|
1969
|
+
* Syncs all the meetings from server. For unverified guests it skips the getActiveMeetings() call
|
|
1970
|
+
* (which Locus rejects for them) and instead resyncs each meeting individually via LocusInfo#sync.
|
|
1888
1971
|
* @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
|
|
1889
1972
|
* @returns {Promise<void>}
|
|
1890
1973
|
* @public
|
|
1891
1974
|
* @memberof Meetings
|
|
1892
1975
|
*/
|
|
1893
|
-
public syncMeetings({
|
|
1976
|
+
public async syncMeetings({
|
|
1977
|
+
keepOnlyLocusMeetings = true,
|
|
1978
|
+
skipHashTreeSync = false,
|
|
1979
|
+
} = {}): Promise<void> {
|
|
1894
1980
|
// @ts-ignore
|
|
1895
|
-
|
|
1981
|
+
const isUnverifiedGuest = Boolean(this.webex.credentials.isUnverifiedGuest);
|
|
1982
|
+
|
|
1983
|
+
if (isUnverifiedGuest) {
|
|
1896
1984
|
LoggerProxy.logger.info(
|
|
1897
|
-
'Meetings:index#syncMeetings --> skipping
|
|
1985
|
+
'Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync'
|
|
1898
1986
|
);
|
|
1899
1987
|
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
const activeLocusUrl = [];
|
|
1988
|
+
// Locus rejects getActiveMeetings() for unverified guests, so the per-meeting sync below
|
|
1989
|
+
// (with canSyncClassicLocus enabled) resyncs each classic meeting individually instead.
|
|
1990
|
+
} else {
|
|
1991
|
+
try {
|
|
1992
|
+
const locusArray = await this.request.getActiveMeetings();
|
|
1993
|
+
const activeLocusUrl: string[] = [];
|
|
1907
1994
|
|
|
1908
1995
|
if (locusArray?.loci && locusArray.loci.length > 0) {
|
|
1909
1996
|
const lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
|
|
1997
|
+
|
|
1910
1998
|
lociToUpdate.forEach((locus) => {
|
|
1911
1999
|
activeLocusUrl.push(locus.url);
|
|
1912
2000
|
this.handleLocusEvent({
|
|
@@ -1924,21 +2012,54 @@ export default class Meetings extends WebexPlugin {
|
|
|
1924
2012
|
// (they had a locusUrl previously but are no longer active) in the sync
|
|
1925
2013
|
for (const meeting of Object.values(meetingsCollection)) {
|
|
1926
2014
|
// @ts-ignore
|
|
1927
|
-
const {locusUrl} = meeting;
|
|
2015
|
+
const {locusUrl, locusInfo} = meeting;
|
|
1928
2016
|
if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
2017
|
+
const globalMeetingId = locusInfo?.info?.globalMeetingId;
|
|
2018
|
+
|
|
2019
|
+
if (
|
|
2020
|
+
globalMeetingId &&
|
|
2021
|
+
locusArray?.loci?.some(
|
|
2022
|
+
(locus: LocusDTO) => locus.info?.globalMeetingId === globalMeetingId
|
|
2023
|
+
)
|
|
2024
|
+
) {
|
|
2025
|
+
// don't destroy the meeting as Locus API still returned some Locus that shares
|
|
2026
|
+
// the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
|
|
2027
|
+
// is in a breakout and gets moved to a different breakout while we were offline
|
|
2028
|
+
} else {
|
|
2029
|
+
// destroy function also uploads logs
|
|
2030
|
+
// @ts-ignore
|
|
2031
|
+
this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
2032
|
+
}
|
|
1932
2033
|
}
|
|
1933
2034
|
}
|
|
1934
2035
|
}
|
|
1935
|
-
})
|
|
1936
|
-
.catch((error) => {
|
|
2036
|
+
} catch (error) {
|
|
1937
2037
|
LoggerProxy.logger.error(
|
|
1938
2038
|
`Meetings:index#syncMeetings --> failed to sync meetings, ${error}`
|
|
1939
2039
|
);
|
|
1940
|
-
throw
|
|
1941
|
-
}
|
|
2040
|
+
throw error;
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
// Resync each remaining meeting via LocusInfo#sync, which routes to hash tree or classic. For
|
|
2045
|
+
// signed-in users classic meetings were already synced above, so only the hash tree sync runs.
|
|
2046
|
+
const remainingMeetings = this.meetingCollection.getAll();
|
|
2047
|
+
const syncPromises = [];
|
|
2048
|
+
|
|
2049
|
+
for (const meeting of Object.values(remainingMeetings) as any[]) {
|
|
2050
|
+
if (meeting.locusInfo) {
|
|
2051
|
+
syncPromises.push(
|
|
2052
|
+
meeting.locusInfo.sync(meeting, {
|
|
2053
|
+
canSyncClassicLocus: isUnverifiedGuest,
|
|
2054
|
+
canSyncHashTree: !skipHashTreeSync,
|
|
2055
|
+
})
|
|
2056
|
+
);
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
if (syncPromises.length > 0) {
|
|
2061
|
+
await Promise.all(syncPromises);
|
|
2062
|
+
}
|
|
1942
2063
|
}
|
|
1943
2064
|
|
|
1944
2065
|
/**
|
|
@@ -1954,8 +2075,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1954
2075
|
this.breakoutLocusForHandleLater = [];
|
|
1955
2076
|
const lociToUpdate = [...mainLoci];
|
|
1956
2077
|
breakoutLoci.forEach((breakoutLocus) => {
|
|
1957
|
-
const associateMainLocus = mainLoci.find(
|
|
1958
|
-
(mainLocus
|
|
2078
|
+
const associateMainLocus = mainLoci.find((mainLocus) =>
|
|
2079
|
+
MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus)
|
|
1959
2080
|
);
|
|
1960
2081
|
const existCorrespondingMeeting = this.getCorrespondingMeetingByLocus({
|
|
1961
2082
|
eventType: LOCUSEVENT.SDK_NO_EVENT,
|
|
@@ -1983,7 +2104,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
1983
2104
|
* @public
|
|
1984
2105
|
* @memberof Meetings
|
|
1985
2106
|
*/
|
|
1986
|
-
checkHandleBreakoutLocus(newCreatedLocus) {
|
|
2107
|
+
checkHandleBreakoutLocus(newCreatedLocus: any) {
|
|
1987
2108
|
if (
|
|
1988
2109
|
!newCreatedLocus ||
|
|
1989
2110
|
!this.breakoutLocusForHandleLater ||
|
|
@@ -1994,9 +2115,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1994
2115
|
if (MeetingsUtil.isBreakoutLocusDTO(newCreatedLocus)) {
|
|
1995
2116
|
return;
|
|
1996
2117
|
}
|
|
1997
|
-
const existIndex = this.breakoutLocusForHandleLater.findIndex(
|
|
1998
|
-
(breakoutLocus)
|
|
1999
|
-
breakoutLocus.controls?.breakout?.url === newCreatedLocus.controls?.breakout?.url
|
|
2118
|
+
const existIndex = this.breakoutLocusForHandleLater.findIndex((breakoutLocus: any) =>
|
|
2119
|
+
MeetingsUtil.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus)
|
|
2000
2120
|
);
|
|
2001
2121
|
|
|
2002
2122
|
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
|
/**
|