@webex/plugin-meetings 3.9.0-webinar5k.1 → 3.9.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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +16 -0
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +40 -328
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +196 -160
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +5 -2
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/type.js +7 -0
- package/dist/meeting/type.js.map +1 -0
- package/dist/meeting/util.js +79 -10
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +37 -39
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/members/collection.js +0 -13
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +21 -40
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +34 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +42 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/types/constants.d.ts +16 -0
- package/dist/types/locus-info/index.d.ts +3 -102
- package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
- package/dist/types/meeting/index.d.ts +23 -28
- package/dist/types/meeting/type.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +6 -3
- package/dist/types/member/types.d.ts +0 -1
- package/dist/types/members/collection.d.ts +0 -6
- package/dist/types/members/index.d.ts +7 -16
- package/dist/types/members/util.d.ts +2 -1
- package/dist/types/multistream/remoteMedia.d.ts +20 -1
- package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -24
- package/src/constants.ts +16 -2
- package/src/locus-info/index.ts +39 -409
- package/src/meeting/in-meeting-actions.ts +13 -0
- package/src/meeting/index.ts +92 -63
- package/src/meeting/muteState.ts +6 -2
- package/src/meeting/type.ts +9 -0
- package/src/meeting/util.ts +93 -19
- package/src/meetings/index.ts +6 -19
- package/src/member/types.ts +0 -1
- package/src/members/collection.ts +0 -11
- package/src/members/index.ts +10 -33
- package/src/members/util.ts +2 -1
- package/src/multistream/mediaRequestManager.ts +7 -7
- package/src/multistream/remoteMedia.ts +34 -4
- package/src/multistream/remoteMediaGroup.ts +37 -2
- package/test/unit/spec/locus-info/index.js +8 -365
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +254 -38
- package/test/unit/spec/meeting/utils.js +122 -1
- package/test/unit/spec/meetings/index.js +2 -0
- package/test/unit/spec/members/index.js +37 -1
- package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
- package/test/unit/spec/multistream/remoteMedia.ts +66 -2
- package/dist/hashTree/constants.js +0 -23
- package/dist/hashTree/constants.js.map +0 -1
- package/dist/hashTree/hashTree.js +0 -516
- package/dist/hashTree/hashTree.js.map +0 -1
- package/dist/hashTree/hashTreeParser.js +0 -521
- package/dist/hashTree/hashTreeParser.js.map +0 -1
- package/dist/types/hashTree/constants.d.ts +0 -8
- package/dist/types/hashTree/hashTree.d.ts +0 -128
- package/dist/types/hashTree/hashTreeParser.d.ts +0 -152
- package/src/hashTree/constants.ts +0 -12
- package/src/hashTree/hashTree.ts +0 -460
- package/src/hashTree/hashTreeParser.ts +0 -556
- package/test/unit/spec/hashTree/hashTree.ts +0 -394
- package/test/unit/spec/hashTree/hashTreeParser.ts +0 -156
package/src/constants.ts
CHANGED
@@ -263,7 +263,6 @@ export const RECORDING_STATE = {
|
|
263
263
|
PAUSED: 'paused',
|
264
264
|
RESUMED: 'resumed',
|
265
265
|
};
|
266
|
-
|
267
266
|
export const SHARE_STATUS = {
|
268
267
|
NO_SHARE: 'no_share',
|
269
268
|
REMOTE_SHARE_ACTIVE: 'remote_share_active',
|
@@ -949,6 +948,9 @@ export const DISPLAY_HINTS = {
|
|
949
948
|
PREMISE_RECORDING_CONTROL_PAUSE: 'PREMISE_RECORDING_CONTROL_PAUSE',
|
950
949
|
PREMISE_RECORDING_CONTROL_STOP: 'PREMISE_RECORDING_CONTROL_STOP',
|
951
950
|
PREMISE_RECORDING_CONTROL_RESUME: 'PREMISE_RECORDING_CONTROL_RESUME',
|
951
|
+
LOCAL_RECORDING_STATUS_STARTED: 'LOCAL_RECORDING_STATUS_STARTED',
|
952
|
+
LOCAL_RECORDING_STATUS_STOPPED: 'LOCAL_RECORDING_STATUS_STOPPED',
|
953
|
+
LOCAL_RECORDING_STATUS_PAUSED: 'LOCAL_RECORDING_STATUS_PAUSED',
|
952
954
|
LOCK_CONTROL_UNLOCK: 'LOCK_CONTROL_UNLOCK',
|
953
955
|
LOCK_CONTROL_LOCK: 'LOCK_CONTROL_LOCK',
|
954
956
|
LOCK_STATUS_LOCKED: 'LOCK_STATUS_LOCKED',
|
@@ -988,7 +990,6 @@ export const DISPLAY_HINTS = {
|
|
988
990
|
CAN_RENAME_SELF_AND_OBSERVED: 'CAN_RENAME_SELF_AND_OBSERVED',
|
989
991
|
CAN_RENAME_OTHERS: 'CAN_RENAME_OTHERS',
|
990
992
|
MOVE_TO_LOBBY: 'MOVE_TO_LOBBY',
|
991
|
-
|
992
993
|
// breakout session
|
993
994
|
BREAKOUT_MANAGEMENT: 'BREAKOUT_MANAGEMENT',
|
994
995
|
BROADCAST_MESSAGE_TO_BREAKOUT: 'BROADCAST_MESSAGE_TO_BREAKOUT',
|
@@ -1189,6 +1190,7 @@ export const QUALITY_LEVELS = {
|
|
1189
1190
|
HIGH: 'HIGH',
|
1190
1191
|
'360p': '360p',
|
1191
1192
|
'480p': '480p',
|
1193
|
+
'540p': '540p',
|
1192
1194
|
'720p': '720p',
|
1193
1195
|
'1080p': '1080p',
|
1194
1196
|
};
|
@@ -1218,6 +1220,18 @@ export const AVAILABLE_RESOLUTIONS = {
|
|
1218
1220
|
},
|
1219
1221
|
},
|
1220
1222
|
},
|
1223
|
+
'540p': {
|
1224
|
+
video: {
|
1225
|
+
width: {
|
1226
|
+
max: 960,
|
1227
|
+
ideal: 960,
|
1228
|
+
},
|
1229
|
+
height: {
|
1230
|
+
max: 540,
|
1231
|
+
ideal: 540,
|
1232
|
+
},
|
1233
|
+
},
|
1234
|
+
},
|
1221
1235
|
'720p': {
|
1222
1236
|
video: {
|
1223
1237
|
width: {
|
package/src/locus-info/index.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
/* eslint-disable class-methods-use-this */
|
2
1
|
import {isEqual, assignWith, cloneDeep, isEmpty, forEach} from 'lodash';
|
3
2
|
|
4
3
|
import LoggerProxy from '../common/logs/logger-proxy';
|
@@ -31,87 +30,6 @@ import MediaSharesUtils from './mediaSharesUtils';
|
|
31
30
|
import LocusDeltaParser from './parser';
|
32
31
|
import Metrics from '../metrics';
|
33
32
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
34
|
-
import HashTreeParser, {
|
35
|
-
DataSet,
|
36
|
-
HashTreeMessage,
|
37
|
-
HashTreeObject,
|
38
|
-
HtMeta,
|
39
|
-
LocusInfoUpdateType,
|
40
|
-
ObjectType,
|
41
|
-
} from '../hashTree/hashTreeParser';
|
42
|
-
|
43
|
-
export type LocusLLMEvent = {
|
44
|
-
data: {
|
45
|
-
eventType: 'locus.state_message';
|
46
|
-
stateElementsMessage: HashTreeMessage;
|
47
|
-
};
|
48
|
-
};
|
49
|
-
|
50
|
-
export type LocusDTO = {
|
51
|
-
controls?: any;
|
52
|
-
fullState?: {
|
53
|
-
active: boolean;
|
54
|
-
count: number;
|
55
|
-
lastActive: string;
|
56
|
-
locked: boolean;
|
57
|
-
sessionId: string;
|
58
|
-
seessionIds: string[];
|
59
|
-
startTime: number;
|
60
|
-
state: string;
|
61
|
-
type: string;
|
62
|
-
};
|
63
|
-
host?: {
|
64
|
-
id: string;
|
65
|
-
incomingCallProtocols: any[];
|
66
|
-
isExternal: boolean;
|
67
|
-
name: string;
|
68
|
-
orgId: string;
|
69
|
-
};
|
70
|
-
htMeta?: HtMeta;
|
71
|
-
info?: any;
|
72
|
-
jsSdkMeta?: {
|
73
|
-
removedParticipantIds: string[]; // list of ids of participants that are removed in the last update
|
74
|
-
};
|
75
|
-
links?: any;
|
76
|
-
mediaShares?: any[];
|
77
|
-
meetings?: any[];
|
78
|
-
participants: any[];
|
79
|
-
replaces?: any[];
|
80
|
-
self?: any;
|
81
|
-
sequence?: {
|
82
|
-
dirtyParticipants: number;
|
83
|
-
entries: number[];
|
84
|
-
rangeEnd: number;
|
85
|
-
rangeStart: number;
|
86
|
-
sequenceHash: number;
|
87
|
-
sessionToken: string;
|
88
|
-
since: string;
|
89
|
-
totalParticipants: number;
|
90
|
-
};
|
91
|
-
syncUrl?: string;
|
92
|
-
url?: string;
|
93
|
-
};
|
94
|
-
|
95
|
-
export type LocusApiResponseBody = {
|
96
|
-
dataSets?: DataSet[];
|
97
|
-
locus: LocusDTO; // this LocusDTO here might not be the full one (for example it won't have all the participants, but it should have self)
|
98
|
-
};
|
99
|
-
|
100
|
-
const LocusDtoTopLevelKeys = [
|
101
|
-
'controls',
|
102
|
-
'fullState',
|
103
|
-
'host',
|
104
|
-
'info',
|
105
|
-
'links',
|
106
|
-
'mediaShares',
|
107
|
-
'meetings',
|
108
|
-
'participants',
|
109
|
-
'replaces',
|
110
|
-
'self',
|
111
|
-
'sequence',
|
112
|
-
'syncUrl',
|
113
|
-
'url',
|
114
|
-
];
|
115
33
|
|
116
34
|
/**
|
117
35
|
* @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
|
@@ -130,7 +48,6 @@ export default class LocusInfo extends EventsScope {
|
|
130
48
|
aclUrl: any;
|
131
49
|
baseSequence: any;
|
132
50
|
created: any;
|
133
|
-
deltaParticipants: any;
|
134
51
|
identities: any;
|
135
52
|
membership: any;
|
136
53
|
participants: any;
|
@@ -152,9 +69,6 @@ export default class LocusInfo extends EventsScope {
|
|
152
69
|
resources: any;
|
153
70
|
mainSessionLocusCache: any;
|
154
71
|
self: any;
|
155
|
-
hashTreeParser?: HashTreeParser;
|
156
|
-
hashTreeObjectId2ParticipantId: Map<number, string>; // mapping of hash tree object ids to participant ids
|
157
|
-
|
158
72
|
/**
|
159
73
|
* Constructor
|
160
74
|
* @param {function} updateMeeting callback to update the meeting object from an object
|
@@ -173,7 +87,6 @@ export default class LocusInfo extends EventsScope {
|
|
173
87
|
this.meetingId = meetingId;
|
174
88
|
this.updateMeeting = updateMeeting;
|
175
89
|
this.locusParser = new LocusDeltaParser();
|
176
|
-
this.hashTreeObjectId2ParticipantId = new Map();
|
177
90
|
}
|
178
91
|
|
179
92
|
/**
|
@@ -261,7 +174,7 @@ export default class LocusInfo extends EventsScope {
|
|
261
174
|
|
262
175
|
if (isDelta) {
|
263
176
|
if (res.body.baseSequence) {
|
264
|
-
meeting.locusInfo.handleLocusDelta(res.body, meeting);
|
177
|
+
meeting.locusInfo.handleLocusDelta(res.body, meeting);
|
265
178
|
|
266
179
|
return;
|
267
180
|
}
|
@@ -370,21 +283,10 @@ export default class LocusInfo extends EventsScope {
|
|
370
283
|
* @property {Object} person - Contains person data.
|
371
284
|
*/
|
372
285
|
|
373
|
-
/**
|
374
|
-
* Stored participant changes between the last event and the current event.
|
375
|
-
* All previously stored events are overwritten between events.
|
376
|
-
*
|
377
|
-
* @instance
|
378
|
-
* @type {Array<DeltaParticipant>}
|
379
|
-
* @private
|
380
|
-
* @member LocusInfo
|
381
|
-
*/
|
382
|
-
this.deltaParticipants = [];
|
383
|
-
|
384
286
|
this.updateLocusCache(locus);
|
385
287
|
// above section only updates the locusInfo object
|
386
288
|
// The below section makes sure it updates the locusInfo as well as updates the meeting object
|
387
|
-
this.updateParticipants(locus.participants
|
289
|
+
this.updateParticipants(locus.participants);
|
388
290
|
// For 1:1 space meeting the conversation Url does not exist in locus.conversation
|
389
291
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
390
292
|
this.updateControls(locus.controls, locus.self);
|
@@ -402,190 +304,17 @@ export default class LocusInfo extends EventsScope {
|
|
402
304
|
|
403
305
|
/**
|
404
306
|
* @param {Object} locus
|
405
|
-
* @param {DataSet[]} [dataSets=[]] - Array of data sets
|
406
307
|
* @returns {undefined}
|
407
308
|
* @memberof LocusInfo
|
408
309
|
*/
|
409
|
-
initialSetup(locus: object
|
310
|
+
initialSetup(locus: object) {
|
410
311
|
this.updateLocusCache(locus);
|
411
|
-
this.onFullLocus(locus
|
312
|
+
this.onFullLocus(locus);
|
412
313
|
|
413
314
|
// Change it to true after it receives it first locus object
|
414
315
|
this.emitChange = true;
|
415
316
|
}
|
416
317
|
|
417
|
-
/**
|
418
|
-
*
|
419
|
-
* @param {HashTreeObject} object data set object
|
420
|
-
* @param {any} locus
|
421
|
-
* @returns {void}
|
422
|
-
*/
|
423
|
-
updateHashTreeObjectInLocus(object: HashTreeObject, locus: LocusDTO): LocusDTO {
|
424
|
-
const type = object.htMeta.elementId.type.toLowerCase();
|
425
|
-
|
426
|
-
switch (type) {
|
427
|
-
case ObjectType.locus: {
|
428
|
-
if (!object.data) {
|
429
|
-
LoggerProxy.logger.warn(
|
430
|
-
`Locus-info:index#updateHashTreeObjectInLocus --> received LOCUS object without data, this is not supported!`
|
431
|
-
);
|
432
|
-
|
433
|
-
return locus;
|
434
|
-
}
|
435
|
-
// replace the main locus
|
436
|
-
|
437
|
-
// The Locus object from MAIN dataset has empty participants, so removing them to avoid it overriding the ones in our current locus object
|
438
|
-
// Also, it doesn't have "self". That's OK as it won't override existing locus.self and also existing SDK code can handle that missing self in Locus updates
|
439
|
-
const locusObjectFromData = object.data;
|
440
|
-
delete locusObjectFromData.participants;
|
441
|
-
|
442
|
-
locus = {...locus, ...locusObjectFromData};
|
443
|
-
locus.htMeta = object.htMeta;
|
444
|
-
break;
|
445
|
-
}
|
446
|
-
case ObjectType.participant:
|
447
|
-
LoggerProxy.logger.info(
|
448
|
-
`Locus-info:index#updateHashTreeObjectInLocus --> participant id=${
|
449
|
-
object.htMeta.elementId.id
|
450
|
-
} ${object.data ? 'updated' : 'removed'}`
|
451
|
-
);
|
452
|
-
console.log(
|
453
|
-
'marcin: hashTreeObjectId2ParticipantId=',
|
454
|
-
cloneDeep(this.hashTreeObjectId2ParticipantId)
|
455
|
-
);
|
456
|
-
if (object.data) {
|
457
|
-
if (!locus.participants) {
|
458
|
-
locus.participants = [];
|
459
|
-
}
|
460
|
-
const participantObject = object.data;
|
461
|
-
participantObject.htMeta = object.htMeta;
|
462
|
-
locus.participants.push(participantObject);
|
463
|
-
this.hashTreeObjectId2ParticipantId.set(object.htMeta.elementId.id, participantObject.id);
|
464
|
-
} else {
|
465
|
-
const participantId = this.hashTreeObjectId2ParticipantId.get(object.htMeta.elementId.id);
|
466
|
-
|
467
|
-
if (!locus.jsSdkMeta) {
|
468
|
-
locus.jsSdkMeta = {removedParticipantIds: []};
|
469
|
-
}
|
470
|
-
locus.jsSdkMeta.removedParticipantIds.push(participantId);
|
471
|
-
this.hashTreeObjectId2ParticipantId.delete(object.htMeta.elementId.id);
|
472
|
-
}
|
473
|
-
break;
|
474
|
-
case ObjectType.self:
|
475
|
-
if (!object.data) {
|
476
|
-
LoggerProxy.logger.warn(
|
477
|
-
`Locus-info:index#updateHashTreeObjectInLocus --> received SELF object without data, this is not supported!`
|
478
|
-
);
|
479
|
-
|
480
|
-
return locus;
|
481
|
-
}
|
482
|
-
locus.self = object.data;
|
483
|
-
break;
|
484
|
-
}
|
485
|
-
|
486
|
-
return locus;
|
487
|
-
}
|
488
|
-
|
489
|
-
/**
|
490
|
-
* Handles HTTP response from Locus API call when hash tree update.
|
491
|
-
* @param {Meeting} meeting meeting object
|
492
|
-
* @param {LocusApiResponseBody} responseBody body of the http reponse from Locus API call
|
493
|
-
* @returns {void}
|
494
|
-
*/
|
495
|
-
handleLocusAPIResponse(meeting, responseBody: LocusApiResponseBody): void {
|
496
|
-
console.log('marcin: locus response from API call:', responseBody);
|
497
|
-
if (responseBody.dataSets) {
|
498
|
-
if (!this.hashTreeParser) {
|
499
|
-
LoggerProxy.logger.warn(
|
500
|
-
`Locus-info:index#handleLocusAPIResponse --> received response with hash tree info from Locus API, but we don't have the hashTreeParser created`
|
501
|
-
);
|
502
|
-
|
503
|
-
return;
|
504
|
-
}
|
505
|
-
// Locus is using the new hash tree mechanism
|
506
|
-
// so update our data in the hash tree parser
|
507
|
-
this.hashTreeParser.handleLocusUpdate(responseBody);
|
508
|
-
|
509
|
-
// but the Locus object we receive in this case looks same like classic delta, so we can use existing delta method to process it
|
510
|
-
this.onDeltaLocus(responseBody.locus);
|
511
|
-
} else {
|
512
|
-
// classic Locus delta
|
513
|
-
this.handleLocusDelta(responseBody.locus, meeting);
|
514
|
-
}
|
515
|
-
}
|
516
|
-
|
517
|
-
/**
|
518
|
-
* Handles a hash tree message received from Locus.
|
519
|
-
*
|
520
|
-
* @param {Meeting} meeting - The meeting object
|
521
|
-
* @param {HashTreeMessage} message incoming hash tree message
|
522
|
-
* @returns {void}
|
523
|
-
*/
|
524
|
-
private handleHashTreeMessage(meeting: any, message: HashTreeMessage) {
|
525
|
-
if (!this.hashTreeParser) {
|
526
|
-
LoggerProxy.logger.warn(
|
527
|
-
`Locus-info:index#handleHashTreeMessage --> received hash tree message, but we don't have the hashTreeParser`
|
528
|
-
);
|
529
|
-
|
530
|
-
return;
|
531
|
-
}
|
532
|
-
if (message.locusStateElements === undefined) {
|
533
|
-
// todo: need to see in practice how exactly the heartbeat messages look like
|
534
|
-
this.hashTreeParser.handleRootHashHeartBeatMessage(message);
|
535
|
-
} else {
|
536
|
-
this.hashTreeParser.handleMessage(message);
|
537
|
-
}
|
538
|
-
}
|
539
|
-
|
540
|
-
/**
|
541
|
-
* Updates our locus info based on the data parsed by the hash tree parser.
|
542
|
-
*
|
543
|
-
* @param {LocusInfoUpdateType} updateType - The type of update received.
|
544
|
-
* @param {Object} [data] - Additional data for the update, if applicable.
|
545
|
-
* @returns {void}
|
546
|
-
*/
|
547
|
-
private updateFromHashTree(
|
548
|
-
updateType: LocusInfoUpdateType,
|
549
|
-
data?: {updatedObjects: HashTreeObject[]}
|
550
|
-
) {
|
551
|
-
switch (updateType) {
|
552
|
-
case LocusInfoUpdateType.OBJECTS_UPDATED: {
|
553
|
-
// initialize the main locus with what we currently have
|
554
|
-
// but with empty participants array
|
555
|
-
let locus: LocusDTO = {
|
556
|
-
participants: [],
|
557
|
-
jsSdkMeta: {removedParticipantIds: []},
|
558
|
-
};
|
559
|
-
|
560
|
-
LocusDtoTopLevelKeys.forEach((key) => {
|
561
|
-
if (key === 'participants') {
|
562
|
-
locus[key] = [];
|
563
|
-
} else {
|
564
|
-
locus[key] = cloneDeep(this[key]);
|
565
|
-
}
|
566
|
-
});
|
567
|
-
|
568
|
-
// apply the updates from the hash tree onto the locus
|
569
|
-
data.updatedObjects.forEach((object) => {
|
570
|
-
locus = this.updateHashTreeObjectInLocus(object, locus);
|
571
|
-
});
|
572
|
-
|
573
|
-
// update our locus info with the new locus
|
574
|
-
this.onDeltaLocus(locus);
|
575
|
-
|
576
|
-
break;
|
577
|
-
}
|
578
|
-
|
579
|
-
case LocusInfoUpdateType.MEETING_ENDED: {
|
580
|
-
LoggerProxy.logger.info(
|
581
|
-
`Locus-info:index#updateFromHashTree --> received signal that meeting ended, destroying meeting ${this.meetingId}`
|
582
|
-
);
|
583
|
-
const meeting = this.webex.meetings.meetingCollection.get(this.meetingId);
|
584
|
-
this.webex.meetings.destroy(meeting, MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
585
|
-
}
|
586
|
-
}
|
587
|
-
}
|
588
|
-
|
589
318
|
/**
|
590
319
|
* @param {Meeting} meeting
|
591
320
|
* @param {Object} data
|
@@ -593,43 +322,36 @@ export default class LocusInfo extends EventsScope {
|
|
593
322
|
* @memberof LocusInfo
|
594
323
|
*/
|
595
324
|
parse(meeting: any, data: any) {
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
break;
|
627
|
-
|
628
|
-
default:
|
629
|
-
// Why will there be a event with no eventType ????
|
630
|
-
// we may not need this, we can get full locus
|
631
|
-
this.handleLocusDelta(locus, meeting);
|
632
|
-
}
|
325
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
326
|
+
const {eventType} = data;
|
327
|
+
const locus = this.getTheLocusToUpdate(data.locus);
|
328
|
+
LoggerProxy.logger.info(`Locus-info:index#parse --> received locus data: ${eventType}`);
|
329
|
+
|
330
|
+
switch (eventType) {
|
331
|
+
case LOCUSEVENT.PARTICIPANT_JOIN:
|
332
|
+
case LOCUSEVENT.PARTICIPANT_LEFT:
|
333
|
+
case LOCUSEVENT.CONTROLS_UPDATED:
|
334
|
+
case LOCUSEVENT.PARTICIPANT_AUDIO_MUTED:
|
335
|
+
case LOCUSEVENT.PARTICIPANT_AUDIO_UNMUTED:
|
336
|
+
case LOCUSEVENT.PARTICIPANT_VIDEO_MUTED:
|
337
|
+
case LOCUSEVENT.PARTICIPANT_VIDEO_UNMUTED:
|
338
|
+
case LOCUSEVENT.SELF_CHANGED:
|
339
|
+
case LOCUSEVENT.PARTICIPANT_UPDATED:
|
340
|
+
case LOCUSEVENT.PARTICIPANT_CONTROLS_UPDATED:
|
341
|
+
case LOCUSEVENT.PARTICIPANT_ROLES_UPDATED:
|
342
|
+
case LOCUSEVENT.PARTICIPANT_DECLINED:
|
343
|
+
case LOCUSEVENT.FLOOR_GRANTED:
|
344
|
+
case LOCUSEVENT.FLOOR_RELEASED:
|
345
|
+
this.onFullLocus(locus, eventType);
|
346
|
+
break;
|
347
|
+
case LOCUSEVENT.DIFFERENCE:
|
348
|
+
this.handleLocusDelta(locus, meeting);
|
349
|
+
break;
|
350
|
+
|
351
|
+
default:
|
352
|
+
// Why will there be a event with no eventType ????
|
353
|
+
// we may not need this, we can get full locus
|
354
|
+
this.handleLocusDelta(locus, meeting);
|
633
355
|
}
|
634
356
|
}
|
635
357
|
|
@@ -648,46 +370,17 @@ export default class LocusInfo extends EventsScope {
|
|
648
370
|
* updates the locus with full locus object
|
649
371
|
* @param {object} locus locus object
|
650
372
|
* @param {string} eventType particulat locus event
|
651
|
-
* @param {DataSet[]} dataSets
|
652
373
|
* @returns {object} null
|
653
374
|
* @memberof LocusInfo
|
654
375
|
*/
|
655
|
-
onFullLocus(locus: any, eventType?: string
|
376
|
+
onFullLocus(locus: any, eventType?: string) {
|
656
377
|
if (!locus) {
|
657
378
|
LoggerProxy.logger.error(
|
658
379
|
'Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.'
|
659
380
|
);
|
660
381
|
}
|
661
382
|
|
662
|
-
if (
|
663
|
-
// this is the new hashmap Locus DTO format (only applicable to webinars for now)
|
664
|
-
if (!this.hashTreeParser) {
|
665
|
-
LoggerProxy.logger.info(`Locus-info:index#onFullLocus --> creating hash tree parser`);
|
666
|
-
LoggerProxy.logger.info(
|
667
|
-
'Locus-info:index#onFullLocus --> dataSets:',
|
668
|
-
dataSets,
|
669
|
-
' and locus:',
|
670
|
-
locus
|
671
|
-
);
|
672
|
-
this.hashTreeParser = new HashTreeParser({
|
673
|
-
initialLocus: {locus, dataSets},
|
674
|
-
webexRequest: this.webex.request.bind(this.webex),
|
675
|
-
locusInfoUpdateCallback: this.updateFromHashTree.bind(this),
|
676
|
-
debugId: `HT-${this.meetingId.substring(0, 4)}`,
|
677
|
-
});
|
678
|
-
} else {
|
679
|
-
// in this case the Locus we're getting is not necessarily the full one
|
680
|
-
// so treat it like if we just got it in a message
|
681
|
-
console.log('marcin: !!!!!!!! full DTO - this is not fully implemented/tested yet');
|
682
|
-
|
683
|
-
LoggerProxy.logger.warn(
|
684
|
-
'Locus-info:index#onFullLocus --> full DTO - this is not fully implemented/tested yet!!!!!!!!'
|
685
|
-
);
|
686
|
-
this.handleLocusAPIResponse(undefined, {dataSets, locus});
|
687
|
-
|
688
|
-
return;
|
689
|
-
}
|
690
|
-
} else if (!this.locusParser.isNewFullLocus(locus)) {
|
383
|
+
if (!this.locusParser.isNewFullLocus(locus)) {
|
691
384
|
LoggerProxy.logger.info(
|
692
385
|
`Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=${eventType}`
|
693
386
|
);
|
@@ -695,19 +388,11 @@ export default class LocusInfo extends EventsScope {
|
|
695
388
|
return;
|
696
389
|
}
|
697
390
|
|
698
|
-
this.updateParticipantDeltas(locus.participants);
|
699
391
|
this.scheduledMeeting = locus.meeting || null;
|
700
392
|
this.participants = locus.participants;
|
701
|
-
this.participants?.forEach((participant) => {
|
702
|
-
this.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
|
703
|
-
});
|
704
393
|
const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
|
705
394
|
this.updateLocusInfo(locus);
|
706
|
-
this.updateParticipants(
|
707
|
-
locus.participants,
|
708
|
-
locus.jsSdkMeta?.removedParticipantIds,
|
709
|
-
isReplaceMembers
|
710
|
-
);
|
395
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
711
396
|
this.isMeetingActive();
|
712
397
|
this.handleOneOnOneEvent(eventType);
|
713
398
|
this.updateEmbeddedApps(locus.embeddedApps);
|
@@ -769,11 +454,7 @@ export default class LocusInfo extends EventsScope {
|
|
769
454
|
const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
|
770
455
|
this.mergeParticipants(this.participants, locus.participants);
|
771
456
|
this.updateLocusInfo(locus);
|
772
|
-
this.updateParticipants(
|
773
|
-
locus.participants,
|
774
|
-
locus.jsSdkMeta?.removedParticipantIds,
|
775
|
-
isReplaceMembers
|
776
|
-
);
|
457
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
777
458
|
this.isMeetingActive();
|
778
459
|
}
|
779
460
|
|
@@ -1061,64 +742,14 @@ export default class LocusInfo extends EventsScope {
|
|
1061
742
|
}
|
1062
743
|
}
|
1063
744
|
|
1064
|
-
/**
|
1065
|
-
* Update the deltaParticipants property of this object based on a list of
|
1066
|
-
* provided participants.
|
1067
|
-
*
|
1068
|
-
* @param {Array} [participants] - The participants to update against.
|
1069
|
-
* @returns {void}
|
1070
|
-
*/
|
1071
|
-
updateParticipantDeltas(participants: Array<any> = []) {
|
1072
|
-
// Used to find a participant within a participants collection.
|
1073
|
-
const findParticipant = (participant, collection) =>
|
1074
|
-
collection.find((item) => item.person.id === participant.person.id);
|
1075
|
-
|
1076
|
-
// Generates an object that indicates which state properties have changed.
|
1077
|
-
const generateDelta = (prevState: any = {}, newState: any = {}) => {
|
1078
|
-
// Setup deltas.
|
1079
|
-
const deltas = {
|
1080
|
-
audioStatus: prevState.audioStatus !== newState.audioStatus,
|
1081
|
-
videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
|
1082
|
-
videoStatus: prevState.videoStatus !== newState.videoStatus,
|
1083
|
-
};
|
1084
|
-
|
1085
|
-
// Clean the object
|
1086
|
-
Object.keys(deltas).forEach((key) => {
|
1087
|
-
if (deltas[key] !== true) {
|
1088
|
-
delete deltas[key];
|
1089
|
-
}
|
1090
|
-
});
|
1091
|
-
|
1092
|
-
return deltas;
|
1093
|
-
};
|
1094
|
-
|
1095
|
-
this.deltaParticipants = participants.reduce((collection, participant) => {
|
1096
|
-
const existingParticipant = findParticipant(participant, this.participants || []) || {};
|
1097
|
-
|
1098
|
-
const delta = generateDelta(existingParticipant.status, participant.status);
|
1099
|
-
|
1100
|
-
const changed = Object.keys(delta).length > 0;
|
1101
|
-
|
1102
|
-
if (changed) {
|
1103
|
-
collection.push({
|
1104
|
-
person: participant.person,
|
1105
|
-
delta,
|
1106
|
-
});
|
1107
|
-
}
|
1108
|
-
|
1109
|
-
return collection;
|
1110
|
-
}, []);
|
1111
|
-
}
|
1112
|
-
|
1113
745
|
/**
|
1114
746
|
* update meeting's members
|
1115
747
|
* @param {Object} participants new participants object
|
1116
|
-
* @param {Array} removedParticipantIds list of removed participants
|
1117
748
|
* @param {Boolean} isReplace is replace the whole members
|
1118
749
|
* @returns {Array} updatedParticipants
|
1119
750
|
* @memberof LocusInfo
|
1120
751
|
*/
|
1121
|
-
updateParticipants(participants: object,
|
752
|
+
updateParticipants(participants: object, isReplace?: boolean) {
|
1122
753
|
this.emitScoped(
|
1123
754
|
{
|
1124
755
|
file: 'locus-info',
|
@@ -1127,7 +758,6 @@ export default class LocusInfo extends EventsScope {
|
|
1127
758
|
EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS,
|
1128
759
|
{
|
1129
760
|
participants,
|
1130
|
-
removedParticipantIds,
|
1131
761
|
recordingId: this.parsedLocus.controls && this.parsedLocus.controls.record?.modifiedBy,
|
1132
762
|
selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
|
1133
763
|
selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
|
@@ -38,6 +38,10 @@ interface IInMeetingActions {
|
|
38
38
|
isClosedCaptionActive?: boolean;
|
39
39
|
canStartManualCaption?: boolean;
|
40
40
|
canStopManualCaption?: boolean;
|
41
|
+
isLocalRecordingStarted?: boolean;
|
42
|
+
isLocalRecordingStopped?: boolean;
|
43
|
+
isLocalRecordingPaused?: boolean;
|
44
|
+
|
41
45
|
isManualCaptionActive?: boolean;
|
42
46
|
isSaveTranscriptsEnabled?: boolean;
|
43
47
|
isWebexAssistantActive?: boolean;
|
@@ -173,6 +177,12 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
173
177
|
|
174
178
|
canStopManualCaption = null;
|
175
179
|
|
180
|
+
isLocalRecordingStopped = null;
|
181
|
+
|
182
|
+
isLocalRecordingStarted = null;
|
183
|
+
|
184
|
+
isLocalRecordingPaused = null;
|
185
|
+
|
176
186
|
isManualCaptionActive = null;
|
177
187
|
|
178
188
|
isSaveTranscriptsEnabled = null;
|
@@ -347,6 +357,9 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
347
357
|
canStopTranscribing: this.canStopTranscribing,
|
348
358
|
isClosedCaptionActive: this.isClosedCaptionActive,
|
349
359
|
canStartManualCaption: this.canStartManualCaption,
|
360
|
+
isLocalRecordingStarted: this.isLocalRecordingStarted,
|
361
|
+
isLocalRecordingStopped: this.isLocalRecordingStopped,
|
362
|
+
isLocalRecordingPaused: this.isLocalRecordingPaused,
|
350
363
|
canStopManualCaption: this.canStopManualCaption,
|
351
364
|
isManualCaptionActive: this.isManualCaptionActive,
|
352
365
|
isSaveTranscriptsEnabled: this.isSaveTranscriptsEnabled,
|