@webex/plugin-meetings 3.12.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/manifest.json +1312 -0
- package/.sdd/templates/.source.json +30 -0
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
- package/.sdd/templates/component-repo/template-map.json +112 -0
- package/AGENTS.md +135 -0
- package/ai-docs/ARCHITECTURE.md +208 -0
- package/ai-docs/CONTRACTS.md +267 -0
- package/ai-docs/DATA_MODEL.md +64 -0
- package/ai-docs/GETTING_STARTED.md +73 -0
- package/ai-docs/GLOSSARY.md +56 -0
- package/ai-docs/REVIEW_CHECKLIST.md +45 -0
- package/ai-docs/RULES.md +79 -0
- package/ai-docs/SECURITY.md +74 -0
- package/ai-docs/SERVICE_STATE.md +59 -0
- package/ai-docs/SPEC_INDEX.md +85 -0
- package/ai-docs/TEST_INDEX.md +45 -0
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
- package/ai-docs/patterns/defensive-error-propagation.md +55 -0
- package/ai-docs/patterns/event-scope-emission.md +46 -0
- package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
- package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
- package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
- package/assets/README.md +28 -0
- package/assets/e2ee-0.0.1.js +2 -0
- package/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +55 -19
- package/dist/annotation/index.js.map +1 -1
- package/dist/assets/e2ee-0.0.1.js +2 -0
- package/dist/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +128 -7
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +4 -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/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 +322 -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/config.d.ts +4 -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/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 +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 +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/config.ts +8 -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/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 +296 -0
- package/src/meetings/index.ts +224 -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/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -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/meetinginfov2.js +88 -11
- package/test/unit/spec/meetings/index.js +586 -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/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';
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
48
49
|
import MeetingInfo from '../meeting-info';
|
|
49
50
|
import MeetingInfoV2 from '../meeting-info/meeting-info-v2';
|
|
50
|
-
import Meeting, {CallStateForMetrics} from '../meeting';
|
|
51
|
+
import Meeting, {CallStateForMetrics, storeEventForDebugging} from '../meeting';
|
|
51
52
|
import PersonalMeetingRoom from '../personal-meeting-room';
|
|
52
53
|
import Reachability from '../reachability';
|
|
53
54
|
import Request from './request';
|
|
@@ -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';
|
|
72
|
-
|
|
75
|
+
|
|
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,6 +486,17 @@ export default class Meetings extends WebexPlugin {
|
|
|
435
486
|
if (existingMeeting) {
|
|
436
487
|
return existingMeeting;
|
|
437
488
|
}
|
|
489
|
+
if (data.eventType === LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
490
|
+
// need to check if maybe this event indicates a move to/from breakout
|
|
491
|
+
const meetingForHashTreeMessage = findMeetingForHashTreeMessage(
|
|
492
|
+
data?.stateElementsMessage,
|
|
493
|
+
this.meetingCollection
|
|
494
|
+
);
|
|
495
|
+
|
|
496
|
+
if (meetingForHashTreeMessage) {
|
|
497
|
+
return meetingForHashTreeMessage;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
438
500
|
|
|
439
501
|
// if that didn't work, fallback to other fields like correlationId, sipUri, etc
|
|
440
502
|
|
|
@@ -478,6 +540,10 @@ export default class Meetings extends WebexPlugin {
|
|
|
478
540
|
*/
|
|
479
541
|
private handleLocusEvent(data: LocusEvent, useRandomDelayForInfo = false) {
|
|
480
542
|
let meeting = this.getCorrespondingMeetingByLocus(data);
|
|
543
|
+
// @ts-ignore
|
|
544
|
+
if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
|
|
545
|
+
storeEventForDebugging('mercury', data);
|
|
546
|
+
}
|
|
481
547
|
|
|
482
548
|
// Special case when locus has got replaced, This only happend once if a replace locus exists
|
|
483
549
|
// https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
|
|
@@ -492,8 +558,9 @@ export default class Meetings extends WebexPlugin {
|
|
|
492
558
|
}
|
|
493
559
|
|
|
494
560
|
if (meeting && !MeetingsUtil.isBreakoutLocusDTO(data.locus)) {
|
|
495
|
-
meeting.locusInfo.updateMainSessionLocusCache(data.locus);
|
|
561
|
+
meeting.locusInfo.updateMainSessionLocusCache(data.locus); // here data.locus will never be a complete locus
|
|
496
562
|
}
|
|
563
|
+
|
|
497
564
|
if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
|
|
498
565
|
LoggerProxy.logger.log(
|
|
499
566
|
`Meetings:index#handleLocusEvent --> doesn't need to process locus event`
|
|
@@ -567,17 +634,21 @@ export default class Meetings extends WebexPlugin {
|
|
|
567
634
|
this.create(data.locus, DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo)
|
|
568
635
|
.then(async (newMeeting) => {
|
|
569
636
|
meeting = newMeeting;
|
|
570
|
-
|
|
571
637
|
try {
|
|
572
638
|
// It's a new meeting so initialize the locus data
|
|
573
|
-
await meeting.locusInfo.initialSetup(
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
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
|
+
);
|
|
581
652
|
} catch (error) {
|
|
582
653
|
LoggerProxy.logger.warn(
|
|
583
654
|
`Meetings:index#handleLocusEvent --> Error initializing locus data: ${error.message}`
|
|
@@ -688,7 +759,14 @@ export default class Meetings extends WebexPlugin {
|
|
|
688
759
|
|
|
689
760
|
// @ts-ignore
|
|
690
761
|
this.webex.internal.mercury.on(ONLINE, () => {
|
|
691
|
-
|
|
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
|
+
});
|
|
692
770
|
});
|
|
693
771
|
|
|
694
772
|
// @ts-ignore
|
|
@@ -818,97 +896,82 @@ export default class Meetings extends WebexPlugin {
|
|
|
818
896
|
}
|
|
819
897
|
|
|
820
898
|
/**
|
|
821
|
-
* API to toggle
|
|
822
|
-
*
|
|
823
|
-
* @private
|
|
824
|
-
* @memberof Meetings
|
|
825
|
-
* @returns {undefined}
|
|
826
|
-
*/
|
|
827
|
-
private _toggleTcpReachability(newValue: boolean) {
|
|
828
|
-
if (typeof newValue !== 'boolean') {
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
// @ts-ignore
|
|
832
|
-
if (this.config.experimental.enableTcpReachability !== newValue) {
|
|
833
|
-
// @ts-ignore
|
|
834
|
-
this.config.experimental.enableTcpReachability = newValue;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* 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
|
+
*
|
|
840
901
|
* @param {Boolean} newValue
|
|
841
902
|
* @private
|
|
842
903
|
* @memberof Meetings
|
|
843
904
|
* @returns {undefined}
|
|
844
905
|
*/
|
|
845
|
-
private
|
|
906
|
+
private _toggleIpv6BackendNativeSupport(newValue: boolean) {
|
|
846
907
|
if (typeof newValue !== 'boolean') {
|
|
847
908
|
return;
|
|
848
909
|
}
|
|
849
910
|
// @ts-ignore
|
|
850
|
-
if (this.config.
|
|
911
|
+
if (this.config.backendIpv6NativeSupport !== newValue) {
|
|
851
912
|
// @ts-ignore
|
|
852
|
-
this.config.
|
|
913
|
+
this.config.backendIpv6NativeSupport = newValue;
|
|
853
914
|
}
|
|
854
915
|
}
|
|
855
916
|
|
|
856
917
|
/**
|
|
857
|
-
* API to toggle
|
|
918
|
+
* API to toggle usage of audio main DTX, needs to be called before webex.meetings.register()
|
|
858
919
|
*
|
|
859
920
|
* @param {Boolean} newValue
|
|
860
921
|
* @private
|
|
861
922
|
* @memberof Meetings
|
|
862
923
|
* @returns {undefined}
|
|
863
924
|
*/
|
|
864
|
-
private
|
|
925
|
+
private _toggleDisableAudioMainDtx(newValue: boolean) {
|
|
865
926
|
if (typeof newValue !== 'boolean') {
|
|
866
927
|
return;
|
|
867
928
|
}
|
|
929
|
+
|
|
868
930
|
// @ts-ignore
|
|
869
|
-
if (this.config.
|
|
931
|
+
if (this.config.experimental.disableAudioMainDtx !== newValue) {
|
|
870
932
|
// @ts-ignore
|
|
871
|
-
this.config.
|
|
933
|
+
this.config.experimental.disableAudioMainDtx = newValue;
|
|
872
934
|
}
|
|
873
935
|
}
|
|
874
936
|
|
|
875
937
|
/**
|
|
876
|
-
* API to toggle usage of audio
|
|
938
|
+
* API to toggle usage of audio twcc support
|
|
877
939
|
*
|
|
878
940
|
* @param {Boolean} newValue
|
|
879
941
|
* @private
|
|
880
942
|
* @memberof Meetings
|
|
881
943
|
* @returns {undefined}
|
|
882
944
|
*/
|
|
883
|
-
private
|
|
945
|
+
private _toggleEnableAudioTwccForMultistream(newValue: boolean) {
|
|
884
946
|
if (typeof newValue !== 'boolean') {
|
|
885
947
|
return;
|
|
886
948
|
}
|
|
887
949
|
|
|
888
950
|
// @ts-ignore
|
|
889
|
-
if (this.config.
|
|
951
|
+
if (this.config.enableAudioTwccForMultistream !== newValue) {
|
|
890
952
|
// @ts-ignore
|
|
891
|
-
this.config.
|
|
953
|
+
this.config.enableAudioTwccForMultistream = newValue;
|
|
892
954
|
}
|
|
893
955
|
}
|
|
894
956
|
|
|
895
957
|
/**
|
|
896
|
-
* API to toggle
|
|
958
|
+
* API to toggle AV1 codec support for video slides in multistream,
|
|
959
|
+
* needs to be called before webex.meetings.joinWithMedia()
|
|
897
960
|
*
|
|
898
961
|
* @param {Boolean} newValue
|
|
899
962
|
* @private
|
|
900
963
|
* @memberof Meetings
|
|
901
964
|
* @returns {undefined}
|
|
902
965
|
*/
|
|
903
|
-
private
|
|
966
|
+
private _toggleEnableAv1SlidesSupport(newValue: boolean) {
|
|
904
967
|
if (typeof newValue !== 'boolean') {
|
|
905
968
|
return;
|
|
906
969
|
}
|
|
907
970
|
|
|
908
971
|
// @ts-ignore
|
|
909
|
-
if (this.config.
|
|
972
|
+
if (this.config.enableAv1SlidesSupport !== newValue) {
|
|
910
973
|
// @ts-ignore
|
|
911
|
-
this.config.
|
|
974
|
+
this.config.enableAv1SlidesSupport = newValue;
|
|
912
975
|
}
|
|
913
976
|
}
|
|
914
977
|
|
|
@@ -1384,6 +1447,31 @@ export default class Meetings extends WebexPlugin {
|
|
|
1384
1447
|
return this.personalMeetingRoom;
|
|
1385
1448
|
}
|
|
1386
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
|
+
|
|
1387
1475
|
/**
|
|
1388
1476
|
* Returns basic information about a meeting that exists or
|
|
1389
1477
|
* used to exist in the MeetingCollection
|
|
@@ -1404,7 +1492,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
1404
1492
|
* @memberof Meetings
|
|
1405
1493
|
*/
|
|
1406
1494
|
private destroy(meeting: Meeting, reason: object) {
|
|
1407
|
-
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();
|
|
1408
1500
|
// keep some basic info about the deleted meeting forever
|
|
1409
1501
|
this.deletedMeetings.set(meeting.id, {
|
|
1410
1502
|
id: meeting.id,
|
|
@@ -1601,6 +1693,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1601
1693
|
});
|
|
1602
1694
|
}
|
|
1603
1695
|
});
|
|
1696
|
+
|
|
1697
|
+
this.emitWasmRuntimePerformance(createdMeeting.correlationId);
|
|
1604
1698
|
} else {
|
|
1605
1699
|
LoggerProxy.logger.error(
|
|
1606
1700
|
`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`
|
|
@@ -1746,10 +1840,14 @@ export default class Meetings extends WebexPlugin {
|
|
|
1746
1840
|
extraParams: infoExtraParams,
|
|
1747
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
|
|
1748
1842
|
};
|
|
1843
|
+
const shouldDeferMeetingInfoFetch = type === DESTINATION_TYPE.LOCUS_ID && !destination?.info;
|
|
1844
|
+
|
|
1845
|
+
const isOneOnOneCallLocus =
|
|
1846
|
+
type === DESTINATION_TYPE.LOCUS_ID && MeetingsUtil.isOneOnOneCall(destination);
|
|
1749
1847
|
|
|
1750
1848
|
if (meetingInfo) {
|
|
1751
1849
|
meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
|
|
1752
|
-
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL) {
|
|
1850
|
+
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus) {
|
|
1753
1851
|
// ignore fetchMeetingInfo for 1:1 meetings
|
|
1754
1852
|
if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
|
|
1755
1853
|
meeting.fetchMeetingInfoTimeoutId = setTimeout(
|
|
@@ -1757,8 +1855,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
1757
1855
|
waitingTime
|
|
1758
1856
|
);
|
|
1759
1857
|
meeting.parseMeetingInfo(undefined, destination);
|
|
1760
|
-
} else {
|
|
1858
|
+
} else if (!shouldDeferMeetingInfoFetch) {
|
|
1761
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
|
+
);
|
|
1762
1864
|
}
|
|
1763
1865
|
}
|
|
1764
1866
|
} catch (err) {
|
|
@@ -1792,7 +1894,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
1792
1894
|
// For type LOCUS_ID we need to parse the locus object to get the information
|
|
1793
1895
|
// about the caller and callee
|
|
1794
1896
|
// Meeting Added event will be created in `handleLocusEvent`
|
|
1795
|
-
if
|
|
1897
|
+
// Only emit MEETING_ADDED if the meeting still exists in the collection.
|
|
1898
|
+
// If fetchMeetingInfo failed and the meeting was destroyed in the catch block,
|
|
1899
|
+
// skip emitting to prevent orphaned meeting references on the consumer side.
|
|
1900
|
+
// @ts-ignore - getMeetingByType types value as object but accepts strings (same as handleLocusEvent)
|
|
1901
|
+
if (type !== DESTINATION_TYPE.LOCUS_ID && this.getMeetingByType(_ID_, meeting.id)) {
|
|
1796
1902
|
if (!meeting.sipUri) {
|
|
1797
1903
|
meeting.setSipUri(destination);
|
|
1798
1904
|
}
|
|
@@ -1861,29 +1967,35 @@ export default class Meetings extends WebexPlugin {
|
|
|
1861
1967
|
}
|
|
1862
1968
|
|
|
1863
1969
|
/**
|
|
1864
|
-
* 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.
|
|
1865
1972
|
* @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
|
|
1866
1973
|
* @returns {Promise<void>}
|
|
1867
1974
|
* @public
|
|
1868
1975
|
* @memberof Meetings
|
|
1869
1976
|
*/
|
|
1870
|
-
public syncMeetings({
|
|
1977
|
+
public async syncMeetings({
|
|
1978
|
+
keepOnlyLocusMeetings = true,
|
|
1979
|
+
skipHashTreeSync = false,
|
|
1980
|
+
} = {}): Promise<void> {
|
|
1871
1981
|
// @ts-ignore
|
|
1872
|
-
|
|
1982
|
+
const isUnverifiedGuest = Boolean(this.webex.credentials.isUnverifiedGuest);
|
|
1983
|
+
|
|
1984
|
+
if (isUnverifiedGuest) {
|
|
1873
1985
|
LoggerProxy.logger.info(
|
|
1874
|
-
'Meetings:index#syncMeetings --> skipping
|
|
1986
|
+
'Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync'
|
|
1875
1987
|
);
|
|
1876
1988
|
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
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[] = [];
|
|
1884
1995
|
|
|
1885
1996
|
if (locusArray?.loci && locusArray.loci.length > 0) {
|
|
1886
1997
|
const lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
|
|
1998
|
+
|
|
1887
1999
|
lociToUpdate.forEach((locus) => {
|
|
1888
2000
|
activeLocusUrl.push(locus.url);
|
|
1889
2001
|
this.handleLocusEvent({
|
|
@@ -1901,21 +2013,54 @@ export default class Meetings extends WebexPlugin {
|
|
|
1901
2013
|
// (they had a locusUrl previously but are no longer active) in the sync
|
|
1902
2014
|
for (const meeting of Object.values(meetingsCollection)) {
|
|
1903
2015
|
// @ts-ignore
|
|
1904
|
-
const {locusUrl} = meeting;
|
|
2016
|
+
const {locusUrl, locusInfo} = meeting;
|
|
1905
2017
|
if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
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
|
+
}
|
|
1909
2034
|
}
|
|
1910
2035
|
}
|
|
1911
2036
|
}
|
|
1912
|
-
})
|
|
1913
|
-
.catch((error) => {
|
|
2037
|
+
} catch (error) {
|
|
1914
2038
|
LoggerProxy.logger.error(
|
|
1915
2039
|
`Meetings:index#syncMeetings --> failed to sync meetings, ${error}`
|
|
1916
2040
|
);
|
|
1917
|
-
throw
|
|
1918
|
-
}
|
|
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
|
+
}
|
|
1919
2064
|
}
|
|
1920
2065
|
|
|
1921
2066
|
/**
|
|
@@ -1931,8 +2076,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1931
2076
|
this.breakoutLocusForHandleLater = [];
|
|
1932
2077
|
const lociToUpdate = [...mainLoci];
|
|
1933
2078
|
breakoutLoci.forEach((breakoutLocus) => {
|
|
1934
|
-
const associateMainLocus = mainLoci.find(
|
|
1935
|
-
(mainLocus
|
|
2079
|
+
const associateMainLocus = mainLoci.find((mainLocus) =>
|
|
2080
|
+
MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus)
|
|
1936
2081
|
);
|
|
1937
2082
|
const existCorrespondingMeeting = this.getCorrespondingMeetingByLocus({
|
|
1938
2083
|
eventType: LOCUSEVENT.SDK_NO_EVENT,
|
|
@@ -1960,7 +2105,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
1960
2105
|
* @public
|
|
1961
2106
|
* @memberof Meetings
|
|
1962
2107
|
*/
|
|
1963
|
-
checkHandleBreakoutLocus(newCreatedLocus) {
|
|
2108
|
+
checkHandleBreakoutLocus(newCreatedLocus: any) {
|
|
1964
2109
|
if (
|
|
1965
2110
|
!newCreatedLocus ||
|
|
1966
2111
|
!this.breakoutLocusForHandleLater ||
|
|
@@ -1971,9 +2116,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1971
2116
|
if (MeetingsUtil.isBreakoutLocusDTO(newCreatedLocus)) {
|
|
1972
2117
|
return;
|
|
1973
2118
|
}
|
|
1974
|
-
const existIndex = this.breakoutLocusForHandleLater.findIndex(
|
|
1975
|
-
(breakoutLocus)
|
|
1976
|
-
breakoutLocus.controls?.breakout?.url === newCreatedLocus.controls?.breakout?.url
|
|
2119
|
+
const existIndex = this.breakoutLocusForHandleLater.findIndex((breakoutLocus: any) =>
|
|
2120
|
+
MeetingsUtil.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus)
|
|
1977
2121
|
);
|
|
1978
2122
|
|
|
1979
2123
|
if (existIndex < 0) {
|
|
@@ -1982,7 +2126,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
1982
2126
|
|
|
1983
2127
|
const associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
|
|
1984
2128
|
this.handleLocusEvent({
|
|
1985
|
-
eventType: LOCUSEVENT.
|
|
2129
|
+
eventType: LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
|
|
1986
2130
|
locus: associateBreakoutLocus,
|
|
1987
2131
|
locusUrl: associateBreakoutLocus.url,
|
|
1988
2132
|
});
|
|
@@ -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
|
/**
|