@webex/plugin-meetings 3.12.0-next.12 → 3.12.0-next.121
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/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 +90 -3
- 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 +1045 -393
- 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 +10 -1
- 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 +406 -121
- 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 +19 -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 +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1667 -834
- 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 +34 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +256 -118
- 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 +189 -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 +61 -7
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +21 -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 +4 -0
- package/dist/types/meeting/index.d.ts +175 -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/meetings/index.d.ts +38 -18
- 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/index.ts +16 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +110 -1
- 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/index.ts +62 -10
- package/src/hashTree/constants.ts +7 -0
- package/src/hashTree/hashTreeParser.ts +796 -192
- package/src/hashTree/utils.ts +19 -0
- package/src/index.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/index.ts +27 -9
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +412 -130
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +25 -1
- package/src/media/MediaConnectionAwaiter.ts +21 -4
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +8 -3
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +922 -116
- 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 +46 -5
- package/src/meeting-info/meeting-info-v2.ts +4 -2
- package/src/meetings/index.ts +168 -79
- 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/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +6 -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/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/reactions.type.ts +3 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +216 -38
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- 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 +191 -2
- 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 +2299 -243
- 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 +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +643 -63
- 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 +4 -0
- package/test/unit/spec/meeting/index.js +2704 -135
- 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 +153 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
- package/test/unit/spec/meetings/index.js +479 -48
- 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,37 @@ 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
|
+
// This check is designed to swallow any probe/metrics failure so it can never break meeting
|
|
223
|
+
// creation, while still reporting the status so we can track browsers with WASM issues.
|
|
224
|
+
WasmRuntimeProbe.check()
|
|
225
|
+
.then((result) => {
|
|
226
|
+
LoggerProxy.logger.log(
|
|
227
|
+
`Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ${result.status}, ratio: ${result.ratio}, wasmMs: ${result.wasmMs}, jsMs: ${result.jsMs}`
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
return Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.WASM_RUNTIME_PERFORMANCE, {
|
|
231
|
+
status: result.status,
|
|
232
|
+
ratio: result.ratio,
|
|
233
|
+
wasmMs: result.wasmMs,
|
|
234
|
+
jsMs: result.jsMs,
|
|
235
|
+
correlation_id: correlationId,
|
|
236
|
+
});
|
|
237
|
+
})
|
|
238
|
+
.catch((error) => {
|
|
239
|
+
LoggerProxy.logger.error(
|
|
240
|
+
`Meetings:index#emitWasmRuntimePerformance --> ERROR, failed to probe or report WASM runtime performance: ${error.message}`
|
|
241
|
+
);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
|
|
209
245
|
/**
|
|
210
246
|
* Initializes the Meetings Plugin
|
|
211
247
|
* @constructor
|
|
@@ -313,7 +349,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
313
349
|
const breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
|
|
314
350
|
|
|
315
351
|
const isSelfJoined = newLocus?.self?.state === _JOINED_;
|
|
316
|
-
const isSelfMoved = newLocus
|
|
352
|
+
const isSelfMoved = MeetingsUtil.isSelfMovedOrBreakoutEnded(newLocus);
|
|
317
353
|
// @ts-ignore
|
|
318
354
|
const deviceFromNewLocus = MeetingsUtil.getThisDevice(newLocus, this.webex.internal.device.url);
|
|
319
355
|
const isResourceMovedOnThisDevice =
|
|
@@ -390,7 +426,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
390
426
|
private isNeedHandleLocusDTO(meeting: any, newLocus: any) {
|
|
391
427
|
if (newLocus) {
|
|
392
428
|
const isNewLocusAsBreakout = MeetingsUtil.isBreakoutLocusDTO(newLocus);
|
|
393
|
-
const isSelfMoved = newLocus
|
|
429
|
+
const isSelfMoved = MeetingsUtil.isSelfMovedOrBreakoutEnded(newLocus);
|
|
394
430
|
const isSelfMovedToLobby =
|
|
395
431
|
newLocus?.self?.devices[0]?.intent?.reason === _ON_HOLD_LOBBY_ &&
|
|
396
432
|
newLocus?.self?.devices[0]?.intent?.type === _WAIT_;
|
|
@@ -435,14 +471,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
435
471
|
if (existingMeeting) {
|
|
436
472
|
return existingMeeting;
|
|
437
473
|
}
|
|
438
|
-
|
|
439
474
|
if (data.eventType === LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
440
475
|
// need to check if maybe this event indicates a move to/from breakout
|
|
441
476
|
const meetingForHashTreeMessage = findMeetingForHashTreeMessage(
|
|
442
|
-
data
|
|
443
|
-
this.meetingCollection
|
|
444
|
-
// @ts-ignore
|
|
445
|
-
this.webex.internal.device.url
|
|
477
|
+
data?.stateElementsMessage,
|
|
478
|
+
this.meetingCollection
|
|
446
479
|
);
|
|
447
480
|
|
|
448
481
|
if (meetingForHashTreeMessage) {
|
|
@@ -492,7 +525,6 @@ export default class Meetings extends WebexPlugin {
|
|
|
492
525
|
*/
|
|
493
526
|
private handleLocusEvent(data: LocusEvent, useRandomDelayForInfo = false) {
|
|
494
527
|
let meeting = this.getCorrespondingMeetingByLocus(data);
|
|
495
|
-
|
|
496
528
|
// @ts-ignore
|
|
497
529
|
if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
|
|
498
530
|
storeEventForDebugging('mercury', data);
|
|
@@ -513,6 +545,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
513
545
|
if (meeting && !MeetingsUtil.isBreakoutLocusDTO(data.locus)) {
|
|
514
546
|
meeting.locusInfo.updateMainSessionLocusCache(data.locus); // here data.locus will never be a complete locus
|
|
515
547
|
}
|
|
548
|
+
|
|
516
549
|
if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
|
|
517
550
|
LoggerProxy.logger.log(
|
|
518
551
|
`Meetings:index#handleLocusEvent --> doesn't need to process locus event`
|
|
@@ -586,17 +619,21 @@ export default class Meetings extends WebexPlugin {
|
|
|
586
619
|
this.create(data.locus, DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo)
|
|
587
620
|
.then(async (newMeeting) => {
|
|
588
621
|
meeting = newMeeting;
|
|
589
|
-
|
|
590
622
|
try {
|
|
591
623
|
// It's a new meeting so initialize the locus data
|
|
592
|
-
await meeting.locusInfo.initialSetup(
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
624
|
+
await meeting.locusInfo.initialSetup(
|
|
625
|
+
{
|
|
626
|
+
trigger:
|
|
627
|
+
data.eventType === LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS
|
|
628
|
+
? 'get-loci-response'
|
|
629
|
+
: 'locus-message',
|
|
630
|
+
locus: data.locus,
|
|
631
|
+
hashTreeMessage: data.stateElementsMessage,
|
|
632
|
+
},
|
|
633
|
+
(locus: LocusDTO) => {
|
|
634
|
+
meeting.finalizeMeetingAfterInitialLocusSetup(locus);
|
|
635
|
+
}
|
|
636
|
+
);
|
|
600
637
|
} catch (error) {
|
|
601
638
|
LoggerProxy.logger.warn(
|
|
602
639
|
`Meetings:index#handleLocusEvent --> Error initializing locus data: ${error.message}`
|
|
@@ -837,97 +874,82 @@ export default class Meetings extends WebexPlugin {
|
|
|
837
874
|
}
|
|
838
875
|
|
|
839
876
|
/**
|
|
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()
|
|
877
|
+
* API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
|
|
878
|
+
*
|
|
859
879
|
* @param {Boolean} newValue
|
|
860
880
|
* @private
|
|
861
881
|
* @memberof Meetings
|
|
862
882
|
* @returns {undefined}
|
|
863
883
|
*/
|
|
864
|
-
private
|
|
884
|
+
private _toggleIpv6BackendNativeSupport(newValue: boolean) {
|
|
865
885
|
if (typeof newValue !== 'boolean') {
|
|
866
886
|
return;
|
|
867
887
|
}
|
|
868
888
|
// @ts-ignore
|
|
869
|
-
if (this.config.
|
|
889
|
+
if (this.config.backendIpv6NativeSupport !== newValue) {
|
|
870
890
|
// @ts-ignore
|
|
871
|
-
this.config.
|
|
891
|
+
this.config.backendIpv6NativeSupport = newValue;
|
|
872
892
|
}
|
|
873
893
|
}
|
|
874
894
|
|
|
875
895
|
/**
|
|
876
|
-
* API to toggle
|
|
896
|
+
* API to toggle usage of audio main DTX, needs to be called before webex.meetings.register()
|
|
877
897
|
*
|
|
878
898
|
* @param {Boolean} newValue
|
|
879
899
|
* @private
|
|
880
900
|
* @memberof Meetings
|
|
881
901
|
* @returns {undefined}
|
|
882
902
|
*/
|
|
883
|
-
private
|
|
903
|
+
private _toggleDisableAudioMainDtx(newValue: boolean) {
|
|
884
904
|
if (typeof newValue !== 'boolean') {
|
|
885
905
|
return;
|
|
886
906
|
}
|
|
907
|
+
|
|
887
908
|
// @ts-ignore
|
|
888
|
-
if (this.config.
|
|
909
|
+
if (this.config.experimental.disableAudioMainDtx !== newValue) {
|
|
889
910
|
// @ts-ignore
|
|
890
|
-
this.config.
|
|
911
|
+
this.config.experimental.disableAudioMainDtx = newValue;
|
|
891
912
|
}
|
|
892
913
|
}
|
|
893
914
|
|
|
894
915
|
/**
|
|
895
|
-
* API to toggle usage of audio
|
|
916
|
+
* API to toggle usage of audio twcc support
|
|
896
917
|
*
|
|
897
918
|
* @param {Boolean} newValue
|
|
898
919
|
* @private
|
|
899
920
|
* @memberof Meetings
|
|
900
921
|
* @returns {undefined}
|
|
901
922
|
*/
|
|
902
|
-
private
|
|
923
|
+
private _toggleEnableAudioTwccForMultistream(newValue: boolean) {
|
|
903
924
|
if (typeof newValue !== 'boolean') {
|
|
904
925
|
return;
|
|
905
926
|
}
|
|
906
927
|
|
|
907
928
|
// @ts-ignore
|
|
908
|
-
if (this.config.
|
|
929
|
+
if (this.config.enableAudioTwccForMultistream !== newValue) {
|
|
909
930
|
// @ts-ignore
|
|
910
|
-
this.config.
|
|
931
|
+
this.config.enableAudioTwccForMultistream = newValue;
|
|
911
932
|
}
|
|
912
933
|
}
|
|
913
934
|
|
|
914
935
|
/**
|
|
915
|
-
* API to toggle
|
|
936
|
+
* API to toggle AV1 codec support for video slides in multistream,
|
|
937
|
+
* needs to be called before webex.meetings.joinWithMedia()
|
|
916
938
|
*
|
|
917
939
|
* @param {Boolean} newValue
|
|
918
940
|
* @private
|
|
919
941
|
* @memberof Meetings
|
|
920
942
|
* @returns {undefined}
|
|
921
943
|
*/
|
|
922
|
-
private
|
|
944
|
+
private _toggleEnableAv1SlidesSupport(newValue: boolean) {
|
|
923
945
|
if (typeof newValue !== 'boolean') {
|
|
924
946
|
return;
|
|
925
947
|
}
|
|
926
948
|
|
|
927
949
|
// @ts-ignore
|
|
928
|
-
if (this.config.
|
|
950
|
+
if (this.config.enableAv1SlidesSupport !== newValue) {
|
|
929
951
|
// @ts-ignore
|
|
930
|
-
this.config.
|
|
952
|
+
this.config.enableAv1SlidesSupport = newValue;
|
|
931
953
|
}
|
|
932
954
|
}
|
|
933
955
|
|
|
@@ -1403,6 +1425,31 @@ export default class Meetings extends WebexPlugin {
|
|
|
1403
1425
|
return this.personalMeetingRoom;
|
|
1404
1426
|
}
|
|
1405
1427
|
|
|
1428
|
+
/**
|
|
1429
|
+
* Fetches site preferences for the provided Webex site, or the preferred Webex site.
|
|
1430
|
+
* This is used to determine capabilities of the site, such as whether scheduling a webinar is supported.
|
|
1431
|
+
*
|
|
1432
|
+
* @param {object} [options]
|
|
1433
|
+
* @param {string} [options.siteUrl] - Webex site URL. Defaults to preferredWebexSite, for example "cisco.webex.com".
|
|
1434
|
+
* @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from siteUrl, for example "cisco" for "cisco.webex.com".
|
|
1435
|
+
* @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
|
|
1436
|
+
* @returns {Promise<SitePreferencesResponse>} site preferences response body
|
|
1437
|
+
* @throws {ParameterError}
|
|
1438
|
+
* @public
|
|
1439
|
+
* @memberof Meetings
|
|
1440
|
+
* @example
|
|
1441
|
+
* const preferences = await webex.meetings.fetchSitePreferencesMeViaSite();
|
|
1442
|
+
* const supportScheduleWebinar = preferences?.scheduling?.supportScheduleWebinar;
|
|
1443
|
+
*/
|
|
1444
|
+
public fetchSitePreferencesMeViaSite(
|
|
1445
|
+
options: FetchSitePreferencesMeViaSiteOptions = {}
|
|
1446
|
+
): Promise<SitePreferencesResponse> {
|
|
1447
|
+
return this.request.fetchSitePreferencesMeViaSite({
|
|
1448
|
+
...options,
|
|
1449
|
+
siteUrl: options.siteUrl || this.preferredWebexSite,
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1406
1453
|
/**
|
|
1407
1454
|
* Returns basic information about a meeting that exists or
|
|
1408
1455
|
* used to exist in the MeetingCollection
|
|
@@ -1620,6 +1667,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1620
1667
|
});
|
|
1621
1668
|
}
|
|
1622
1669
|
});
|
|
1670
|
+
|
|
1671
|
+
this.emitWasmRuntimePerformance(createdMeeting.correlationId);
|
|
1623
1672
|
} else {
|
|
1624
1673
|
LoggerProxy.logger.error(
|
|
1625
1674
|
`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`
|
|
@@ -1765,10 +1814,14 @@ export default class Meetings extends WebexPlugin {
|
|
|
1765
1814
|
extraParams: infoExtraParams,
|
|
1766
1815
|
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
1816
|
};
|
|
1817
|
+
const shouldDeferMeetingInfoFetch = type === DESTINATION_TYPE.LOCUS_ID && !destination?.info;
|
|
1818
|
+
|
|
1819
|
+
const isOneOnOneCallLocus =
|
|
1820
|
+
type === DESTINATION_TYPE.LOCUS_ID && MeetingsUtil.isOneOnOneCall(destination);
|
|
1768
1821
|
|
|
1769
1822
|
if (meetingInfo) {
|
|
1770
1823
|
meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
|
|
1771
|
-
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL) {
|
|
1824
|
+
} else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus) {
|
|
1772
1825
|
// ignore fetchMeetingInfo for 1:1 meetings
|
|
1773
1826
|
if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
|
|
1774
1827
|
meeting.fetchMeetingInfoTimeoutId = setTimeout(
|
|
@@ -1776,8 +1829,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
1776
1829
|
waitingTime
|
|
1777
1830
|
);
|
|
1778
1831
|
meeting.parseMeetingInfo(undefined, destination);
|
|
1779
|
-
} else {
|
|
1832
|
+
} else if (!shouldDeferMeetingInfoFetch) {
|
|
1780
1833
|
await meeting.fetchMeetingInfo(meetingInfoOptions);
|
|
1834
|
+
} else {
|
|
1835
|
+
LoggerProxy.logger.info(
|
|
1836
|
+
'Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup'
|
|
1837
|
+
);
|
|
1781
1838
|
}
|
|
1782
1839
|
}
|
|
1783
1840
|
} catch (err) {
|
|
@@ -1811,7 +1868,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
1811
1868
|
// For type LOCUS_ID we need to parse the locus object to get the information
|
|
1812
1869
|
// about the caller and callee
|
|
1813
1870
|
// Meeting Added event will be created in `handleLocusEvent`
|
|
1814
|
-
if
|
|
1871
|
+
// Only emit MEETING_ADDED if the meeting still exists in the collection.
|
|
1872
|
+
// If fetchMeetingInfo failed and the meeting was destroyed in the catch block,
|
|
1873
|
+
// skip emitting to prevent orphaned meeting references on the consumer side.
|
|
1874
|
+
// @ts-ignore - getMeetingByType types value as object but accepts strings (same as handleLocusEvent)
|
|
1875
|
+
if (type !== DESTINATION_TYPE.LOCUS_ID && this.getMeetingByType(_ID_, meeting.id)) {
|
|
1815
1876
|
if (!meeting.sipUri) {
|
|
1816
1877
|
meeting.setSipUri(destination);
|
|
1817
1878
|
}
|
|
@@ -1886,23 +1947,23 @@ export default class Meetings extends WebexPlugin {
|
|
|
1886
1947
|
* @public
|
|
1887
1948
|
* @memberof Meetings
|
|
1888
1949
|
*/
|
|
1889
|
-
public syncMeetings({
|
|
1950
|
+
public async syncMeetings({
|
|
1951
|
+
keepOnlyLocusMeetings = true,
|
|
1952
|
+
skipHashTreeSync = false,
|
|
1953
|
+
} = {}): Promise<void> {
|
|
1890
1954
|
// @ts-ignore
|
|
1891
1955
|
if (this.webex.credentials.isUnverifiedGuest) {
|
|
1892
1956
|
LoggerProxy.logger.info(
|
|
1893
|
-
'Meetings:index#syncMeetings --> skipping
|
|
1957
|
+
'Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync'
|
|
1894
1958
|
);
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
return this.request
|
|
1900
|
-
.getActiveMeetings()
|
|
1901
|
-
.then((locusArray) => {
|
|
1902
|
-
const activeLocusUrl = [];
|
|
1959
|
+
} else {
|
|
1960
|
+
try {
|
|
1961
|
+
const locusArray = await this.request.getActiveMeetings();
|
|
1962
|
+
const activeLocusUrl: string[] = [];
|
|
1903
1963
|
|
|
1904
1964
|
if (locusArray?.loci && locusArray.loci.length > 0) {
|
|
1905
1965
|
const lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
|
|
1966
|
+
|
|
1906
1967
|
lociToUpdate.forEach((locus) => {
|
|
1907
1968
|
activeLocusUrl.push(locus.url);
|
|
1908
1969
|
this.handleLocusEvent({
|
|
@@ -1920,21 +1981,50 @@ export default class Meetings extends WebexPlugin {
|
|
|
1920
1981
|
// (they had a locusUrl previously but are no longer active) in the sync
|
|
1921
1982
|
for (const meeting of Object.values(meetingsCollection)) {
|
|
1922
1983
|
// @ts-ignore
|
|
1923
|
-
const {locusUrl} = meeting;
|
|
1984
|
+
const {locusUrl, locusInfo} = meeting;
|
|
1924
1985
|
if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1986
|
+
const globalMeetingId = locusInfo?.info?.globalMeetingId;
|
|
1987
|
+
|
|
1988
|
+
if (
|
|
1989
|
+
globalMeetingId &&
|
|
1990
|
+
locusArray?.loci?.some(
|
|
1991
|
+
(locus: LocusDTO) => locus.info?.globalMeetingId === globalMeetingId
|
|
1992
|
+
)
|
|
1993
|
+
) {
|
|
1994
|
+
// don't destroy the meeting as Locus API still returned some Locus that shares
|
|
1995
|
+
// the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
|
|
1996
|
+
// is in a breakout and gets moved to a different breakout while we were offline
|
|
1997
|
+
} else {
|
|
1998
|
+
// destroy function also uploads logs
|
|
1999
|
+
// @ts-ignore
|
|
2000
|
+
this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
2001
|
+
}
|
|
1928
2002
|
}
|
|
1929
2003
|
}
|
|
1930
2004
|
}
|
|
1931
|
-
})
|
|
1932
|
-
.catch((error) => {
|
|
2005
|
+
} catch (error) {
|
|
1933
2006
|
LoggerProxy.logger.error(
|
|
1934
2007
|
`Meetings:index#syncMeetings --> failed to sync meetings, ${error}`
|
|
1935
2008
|
);
|
|
1936
|
-
throw
|
|
1937
|
-
}
|
|
2009
|
+
throw error;
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
if (!skipHashTreeSync) {
|
|
2014
|
+
// Trigger hash tree syncs for all remaining meetings
|
|
2015
|
+
const remainingMeetings = this.meetingCollection.getAll();
|
|
2016
|
+
const syncPromises = [];
|
|
2017
|
+
|
|
2018
|
+
for (const meeting of Object.values(remainingMeetings) as any[]) {
|
|
2019
|
+
if (meeting.locusInfo) {
|
|
2020
|
+
syncPromises.push(meeting.locusInfo.syncAllHashTreeDatasets());
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
if (syncPromises.length > 0) {
|
|
2025
|
+
await Promise.all(syncPromises);
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
1938
2028
|
}
|
|
1939
2029
|
|
|
1940
2030
|
/**
|
|
@@ -1950,8 +2040,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1950
2040
|
this.breakoutLocusForHandleLater = [];
|
|
1951
2041
|
const lociToUpdate = [...mainLoci];
|
|
1952
2042
|
breakoutLoci.forEach((breakoutLocus) => {
|
|
1953
|
-
const associateMainLocus = mainLoci.find(
|
|
1954
|
-
(mainLocus
|
|
2043
|
+
const associateMainLocus = mainLoci.find((mainLocus) =>
|
|
2044
|
+
MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus)
|
|
1955
2045
|
);
|
|
1956
2046
|
const existCorrespondingMeeting = this.getCorrespondingMeetingByLocus({
|
|
1957
2047
|
eventType: LOCUSEVENT.SDK_NO_EVENT,
|
|
@@ -1979,7 +2069,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
1979
2069
|
* @public
|
|
1980
2070
|
* @memberof Meetings
|
|
1981
2071
|
*/
|
|
1982
|
-
checkHandleBreakoutLocus(newCreatedLocus) {
|
|
2072
|
+
checkHandleBreakoutLocus(newCreatedLocus: any) {
|
|
1983
2073
|
if (
|
|
1984
2074
|
!newCreatedLocus ||
|
|
1985
2075
|
!this.breakoutLocusForHandleLater ||
|
|
@@ -1990,9 +2080,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1990
2080
|
if (MeetingsUtil.isBreakoutLocusDTO(newCreatedLocus)) {
|
|
1991
2081
|
return;
|
|
1992
2082
|
}
|
|
1993
|
-
const existIndex = this.breakoutLocusForHandleLater.findIndex(
|
|
1994
|
-
(breakoutLocus)
|
|
1995
|
-
breakoutLocus.controls?.breakout?.url === newCreatedLocus.controls?.breakout?.url
|
|
2083
|
+
const existIndex = this.breakoutLocusForHandleLater.findIndex((breakoutLocus: any) =>
|
|
2084
|
+
MeetingsUtil.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus)
|
|
1996
2085
|
);
|
|
1997
2086
|
|
|
1998
2087
|
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
|
/**
|