@webex/plugin-meetings 2.30.1 → 2.31.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/constants.js +7 -1
- package/dist/constants.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +9 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +7 -3
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/index.js +40 -3
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +13 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/meeting/index.js +38 -12
- package/dist/meeting/index.js.map +1 -1
- package/package.json +17 -17
- package/src/constants.ts +7 -1
- package/src/locus-info/controlsUtils.js +10 -2
- package/src/locus-info/embeddedAppsUtils.js +11 -4
- package/src/locus-info/index.js +211 -135
- package/src/locus-info/selfUtils.js +10 -1
- package/src/meeting/index.js +41 -0
- package/test/unit/spec/locus-info/controlsUtils.js +82 -0
- package/test/unit/spec/locus-info/index.js +498 -291
- package/test/unit/spec/locus-info/selfConstant.js +3 -1
- package/test/unit/spec/locus-info/selfUtils.js +74 -1
- package/test/unit/spec/meetings/index.js +82 -2
package/src/locus-info/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
_LEFT_,
|
|
16
16
|
MEETING_REMOVED_REASON,
|
|
17
17
|
CALL_REMOVED_REASON,
|
|
18
|
-
RECORDING_STATE
|
|
18
|
+
RECORDING_STATE,
|
|
19
19
|
} from '../constants';
|
|
20
20
|
import Metrics from '../metrics';
|
|
21
21
|
import {eventType} from '../metrics/config';
|
|
@@ -28,7 +28,6 @@ import EmbeddedAppsUtils from '../locus-info/embeddedAppsUtils';
|
|
|
28
28
|
import MediaSharesUtils from '../locus-info/mediaSharesUtils';
|
|
29
29
|
import LocusDeltaParser from '../locus-info/parser';
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
/**
|
|
33
32
|
* @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
|
|
34
33
|
* @export
|
|
@@ -39,7 +38,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
39
38
|
constructor(updateMeeting, webex, meetingId) {
|
|
40
39
|
super();
|
|
41
40
|
this.parsedLocus = {
|
|
42
|
-
states: []
|
|
41
|
+
states: [],
|
|
43
42
|
};
|
|
44
43
|
this.webex = webex;
|
|
45
44
|
this.emitChange = false;
|
|
@@ -49,7 +48,6 @@ export default class LocusInfo extends EventsScope {
|
|
|
49
48
|
this.locusParser = new LocusDeltaParser();
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
|
|
53
51
|
/**
|
|
54
52
|
* Apply locus delta data to meeting
|
|
55
53
|
* @param {string} action Locus delta action
|
|
@@ -69,22 +67,25 @@ export default class LocusInfo extends EventsScope {
|
|
|
69
67
|
meeting.needToGetFullLocus = false;
|
|
70
68
|
break;
|
|
71
69
|
case DESYNC:
|
|
72
|
-
meeting.meetingRequest
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
meeting.meetingRequest
|
|
71
|
+
.getFullLocus({
|
|
72
|
+
desync: true,
|
|
73
|
+
locusUrl: meeting.locusUrl,
|
|
74
|
+
})
|
|
75
|
+
.then((res) => {
|
|
76
|
+
meeting.locusInfo.onFullLocus(res.body);
|
|
77
|
+
// Notify parser to resume processing delta events
|
|
78
|
+
// now that we have full locus from DESYNC.
|
|
79
|
+
this.locusParser.resume();
|
|
80
|
+
});
|
|
81
81
|
break;
|
|
82
82
|
default:
|
|
83
|
-
LoggerProxy.logger.info(
|
|
83
|
+
LoggerProxy.logger.info(
|
|
84
|
+
`Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ${action}`
|
|
85
|
+
);
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
|
|
87
|
-
|
|
88
89
|
/**
|
|
89
90
|
* Adds locus delta to parser's queue
|
|
90
91
|
* and registers a function handler
|
|
@@ -106,7 +107,6 @@ export default class LocusInfo extends EventsScope {
|
|
|
106
107
|
this.locusParser.onDeltaEvent(locus);
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
|
|
110
110
|
/**
|
|
111
111
|
* @param {Locus} locus
|
|
112
112
|
* @returns {undefined}
|
|
@@ -230,7 +230,9 @@ export default class LocusInfo extends EventsScope {
|
|
|
230
230
|
*/
|
|
231
231
|
onFullLocus(locus, eventType) {
|
|
232
232
|
if (!locus) {
|
|
233
|
-
LoggerProxy.logger.error(
|
|
233
|
+
LoggerProxy.logger.error(
|
|
234
|
+
'Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.'
|
|
235
|
+
);
|
|
234
236
|
}
|
|
235
237
|
this.updateParticipantDeltas(locus.participants);
|
|
236
238
|
this.scheduledMeeting = locus.meeting || null;
|
|
@@ -239,6 +241,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
239
241
|
this.updateParticipants(locus.participants);
|
|
240
242
|
this.isMeetingActive();
|
|
241
243
|
this.handleOneOnOneEvent(eventType);
|
|
244
|
+
this.updateEmbeddedApps(locus.embeddedApps);
|
|
242
245
|
// set current (working copy) for parser
|
|
243
246
|
this.locusParser.workingCopy = locus;
|
|
244
247
|
}
|
|
@@ -250,34 +253,37 @@ export default class LocusInfo extends EventsScope {
|
|
|
250
253
|
* @memberof LocusInfo
|
|
251
254
|
*/
|
|
252
255
|
handleOneOnOneEvent(eventType) {
|
|
253
|
-
if (
|
|
254
|
-
|
|
256
|
+
if (
|
|
257
|
+
this.parsedLocus.fullState.type === _CALL_ ||
|
|
258
|
+
this.parsedLocus.fullState.type === _SIP_BRIDGE_
|
|
259
|
+
) {
|
|
260
|
+
// for 1:1 bob calls alice and alice declines, notify the meeting state
|
|
255
261
|
if (eventType === LOCUSEVENT.PARTICIPANT_DECLINED) {
|
|
256
|
-
|
|
262
|
+
// trigger the event for stop ringing
|
|
257
263
|
this.emitScoped(
|
|
258
264
|
{
|
|
259
265
|
file: 'locus-info',
|
|
260
|
-
function: 'handleOneonOneEvent'
|
|
266
|
+
function: 'handleOneonOneEvent',
|
|
261
267
|
},
|
|
262
268
|
EVENTS.REMOTE_RESPONSE,
|
|
263
269
|
{
|
|
264
270
|
remoteDeclined: true,
|
|
265
|
-
remoteAnswered: false
|
|
271
|
+
remoteAnswered: false,
|
|
266
272
|
}
|
|
267
273
|
);
|
|
268
274
|
}
|
|
269
275
|
// for 1:1 bob calls alice and alice answers, notify the meeting state
|
|
270
276
|
if (eventType === LOCUSEVENT.PARTICIPANT_JOIN) {
|
|
271
|
-
|
|
277
|
+
// trigger the event for stop ringing
|
|
272
278
|
this.emitScoped(
|
|
273
279
|
{
|
|
274
280
|
file: 'locus-info',
|
|
275
|
-
function: 'handleOneonOneEvent'
|
|
281
|
+
function: 'handleOneonOneEvent',
|
|
276
282
|
},
|
|
277
283
|
EVENTS.REMOTE_RESPONSE,
|
|
278
284
|
{
|
|
279
285
|
remoteDeclined: false,
|
|
280
|
-
remoteAnswered: true
|
|
286
|
+
remoteAnswered: true,
|
|
281
287
|
}
|
|
282
288
|
);
|
|
283
289
|
}
|
|
@@ -333,9 +339,14 @@ export default class LocusInfo extends EventsScope {
|
|
|
333
339
|
return null;
|
|
334
340
|
}
|
|
335
341
|
|
|
336
|
-
return
|
|
337
|
-
(
|
|
338
|
-
|
|
342
|
+
return (
|
|
343
|
+
participants.find(
|
|
344
|
+
(participant) =>
|
|
345
|
+
self &&
|
|
346
|
+
participant.identity !== self.identity &&
|
|
347
|
+
(participants.length <= 2 || (participant.type === _USER_ && !participant.removed))
|
|
348
|
+
) || this.partner
|
|
349
|
+
);
|
|
339
350
|
}
|
|
340
351
|
|
|
341
352
|
// TODO: all the leave states need to be checked
|
|
@@ -344,7 +355,10 @@ export default class LocusInfo extends EventsScope {
|
|
|
344
355
|
* @memberof LocusInfo
|
|
345
356
|
*/
|
|
346
357
|
isMeetingActive() {
|
|
347
|
-
if (
|
|
358
|
+
if (
|
|
359
|
+
this.parsedLocus.fullState.type === _CALL_ ||
|
|
360
|
+
this.parsedLocus.fullState.type === _SIP_BRIDGE_
|
|
361
|
+
) {
|
|
348
362
|
const partner = this.getLocusPartner(this.participants, this.self);
|
|
349
363
|
|
|
350
364
|
this.updateMeeting({partner});
|
|
@@ -358,86 +372,96 @@ export default class LocusInfo extends EventsScope {
|
|
|
358
372
|
|
|
359
373
|
if (this.fullState && this.fullState.state === LOCUS.STATE.INACTIVE) {
|
|
360
374
|
// TODO: update the meeting state
|
|
361
|
-
LoggerProxy.logger.warn(
|
|
375
|
+
LoggerProxy.logger.warn(
|
|
376
|
+
'Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.'
|
|
377
|
+
);
|
|
362
378
|
Metrics.postEvent({
|
|
363
379
|
event: eventType.REMOTE_ENDED,
|
|
364
|
-
meetingId: this.meetingId
|
|
380
|
+
meetingId: this.meetingId,
|
|
365
381
|
});
|
|
366
382
|
this.emitScoped(
|
|
367
383
|
{
|
|
368
384
|
file: 'locus-info',
|
|
369
|
-
function: 'isMeetingActive'
|
|
385
|
+
function: 'isMeetingActive',
|
|
370
386
|
},
|
|
371
387
|
EVENTS.DESTROY_MEETING,
|
|
372
388
|
{
|
|
373
389
|
reason: CALL_REMOVED_REASON.CALL_INACTIVE,
|
|
374
|
-
shouldLeave: false
|
|
390
|
+
shouldLeave: false,
|
|
375
391
|
}
|
|
376
392
|
);
|
|
377
393
|
}
|
|
378
|
-
else
|
|
379
|
-
|
|
394
|
+
else if (
|
|
395
|
+
partner.state === MEETING_STATE.STATES.LEFT &&
|
|
380
396
|
this.parsedLocus.self &&
|
|
381
397
|
(this.parsedLocus.self.state === MEETING_STATE.STATES.DECLINED ||
|
|
382
|
-
|
|
383
|
-
|
|
398
|
+
this.parsedLocus.self.state === MEETING_STATE.STATES.NOTIFIED ||
|
|
399
|
+
this.parsedLocus.self.state === MEETING_STATE.STATES.JOINED)
|
|
400
|
+
) {
|
|
384
401
|
Metrics.postEvent({
|
|
385
402
|
event: eventType.REMOTE_ENDED,
|
|
386
|
-
meetingId: this.meetingId
|
|
403
|
+
meetingId: this.meetingId,
|
|
387
404
|
});
|
|
388
405
|
this.emitScoped(
|
|
389
406
|
{
|
|
390
407
|
file: 'locus-info',
|
|
391
|
-
function: 'isMeetingActive'
|
|
408
|
+
function: 'isMeetingActive',
|
|
392
409
|
},
|
|
393
410
|
EVENTS.DESTROY_MEETING,
|
|
394
411
|
{
|
|
395
412
|
reason: CALL_REMOVED_REASON.PARTNER_LEFT,
|
|
396
|
-
shouldLeave:
|
|
413
|
+
shouldLeave:
|
|
414
|
+
this.parsedLocus.self.joinedWith && this.parsedLocus.self.joinedWith.state !== _LEFT_,
|
|
397
415
|
}
|
|
398
416
|
);
|
|
399
417
|
}
|
|
400
|
-
else
|
|
401
|
-
|
|
418
|
+
else if (
|
|
419
|
+
this.parsedLocus.self &&
|
|
402
420
|
this.parsedLocus.self.state === MEETING_STATE.STATES.LEFT &&
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
421
|
+
(partner.state === MEETING_STATE.STATES.LEFT ||
|
|
422
|
+
partner.state === MEETING_STATE.STATES.DECLINED ||
|
|
423
|
+
partner.state === MEETING_STATE.STATES.NOTIFIED ||
|
|
424
|
+
partner.state === MEETING_STATE.STATES.IDLE) // Happens when user just joins and adds no Media
|
|
407
425
|
) {
|
|
408
426
|
Metrics.postEvent({
|
|
409
427
|
event: eventType.REMOTE_ENDED,
|
|
410
|
-
meetingId: this.meetingId
|
|
428
|
+
meetingId: this.meetingId,
|
|
411
429
|
});
|
|
412
430
|
this.emitScoped(
|
|
413
431
|
{
|
|
414
432
|
file: 'locus-info',
|
|
415
|
-
function: 'isMeetingActive'
|
|
433
|
+
function: 'isMeetingActive',
|
|
416
434
|
},
|
|
417
435
|
EVENTS.DESTROY_MEETING,
|
|
418
436
|
{
|
|
419
437
|
reason: CALL_REMOVED_REASON.SELF_LEFT,
|
|
420
|
-
shouldLeave: false
|
|
438
|
+
shouldLeave: false,
|
|
421
439
|
}
|
|
422
440
|
);
|
|
423
441
|
}
|
|
424
442
|
}
|
|
425
443
|
else if (this.parsedLocus.fullState.type === _MEETING_) {
|
|
426
|
-
if (
|
|
427
|
-
|
|
444
|
+
if (
|
|
445
|
+
this.fullState &&
|
|
446
|
+
(this.fullState.state === LOCUS.STATE.INACTIVE ||
|
|
447
|
+
this.fullState.state === LOCUS.STATE.TERMINATING)
|
|
448
|
+
) {
|
|
449
|
+
LoggerProxy.logger.warn(
|
|
450
|
+
'Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating'
|
|
451
|
+
);
|
|
428
452
|
Metrics.postEvent({
|
|
429
453
|
event: eventType.REMOTE_ENDED,
|
|
430
|
-
meetingId: this.meetingId
|
|
454
|
+
meetingId: this.meetingId,
|
|
431
455
|
});
|
|
432
456
|
this.emitScoped(
|
|
433
457
|
{
|
|
434
458
|
file: 'locus-info',
|
|
435
|
-
function: 'isMeetingActive'
|
|
459
|
+
function: 'isMeetingActive',
|
|
436
460
|
},
|
|
437
461
|
EVENTS.DESTROY_MEETING,
|
|
438
462
|
{
|
|
439
463
|
reason: MEETING_REMOVED_REASON.MEETING_INACTIVE_TERMINATING,
|
|
440
|
-
shouldLeave: false
|
|
464
|
+
shouldLeave: false,
|
|
441
465
|
}
|
|
442
466
|
);
|
|
443
467
|
}
|
|
@@ -445,17 +469,17 @@ export default class LocusInfo extends EventsScope {
|
|
|
445
469
|
// user has been dropped from a meeting
|
|
446
470
|
Metrics.postEvent({
|
|
447
471
|
event: eventType.REMOTE_ENDED,
|
|
448
|
-
meetingId: this.meetingId
|
|
472
|
+
meetingId: this.meetingId,
|
|
449
473
|
});
|
|
450
474
|
this.emitScoped(
|
|
451
475
|
{
|
|
452
476
|
file: 'locus-info',
|
|
453
|
-
function: 'isMeetingActive'
|
|
477
|
+
function: 'isMeetingActive',
|
|
454
478
|
},
|
|
455
479
|
EVENTS.DESTROY_MEETING,
|
|
456
480
|
{
|
|
457
481
|
reason: MEETING_REMOVED_REASON.FULLSTATE_REMOVED,
|
|
458
|
-
shouldLeave: false
|
|
482
|
+
shouldLeave: false,
|
|
459
483
|
}
|
|
460
484
|
);
|
|
461
485
|
}
|
|
@@ -466,12 +490,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
466
490
|
this.emitScoped(
|
|
467
491
|
{
|
|
468
492
|
file: 'locus-info',
|
|
469
|
-
function: 'isMeetingActive'
|
|
493
|
+
function: 'isMeetingActive',
|
|
470
494
|
},
|
|
471
495
|
EVENTS.DESTROY_MEETING,
|
|
472
496
|
{
|
|
473
497
|
reason: MEETING_REMOVED_REASON.SELF_REMOVED,
|
|
474
|
-
shouldLeave: false
|
|
498
|
+
shouldLeave: false,
|
|
475
499
|
}
|
|
476
500
|
);
|
|
477
501
|
}
|
|
@@ -490,7 +514,10 @@ export default class LocusInfo extends EventsScope {
|
|
|
490
514
|
compareAndUpdate() {
|
|
491
515
|
// TODO: check with locus team on host and moderator doc
|
|
492
516
|
// use host as a validator if needed
|
|
493
|
-
if (
|
|
517
|
+
if (
|
|
518
|
+
this.compareAndUpdateFlags.compareSelfAndHost ||
|
|
519
|
+
this.compareAndUpdateFlags.compareHostAndSelf
|
|
520
|
+
) {
|
|
494
521
|
this.compareSelfAndHost();
|
|
495
522
|
}
|
|
496
523
|
}
|
|
@@ -502,15 +529,18 @@ export default class LocusInfo extends EventsScope {
|
|
|
502
529
|
*/
|
|
503
530
|
compareSelfAndHost() {
|
|
504
531
|
// In some cases the host info is not present but the moderator values changes from null to false so it triggers an update
|
|
505
|
-
if (
|
|
532
|
+
if (
|
|
533
|
+
this.parsedLocus.self.selfIdentity === this.parsedLocus.host?.hostId &&
|
|
534
|
+
this.parsedLocus.self.moderator
|
|
535
|
+
) {
|
|
506
536
|
this.emitScoped(
|
|
507
537
|
{
|
|
508
538
|
file: 'locus-info',
|
|
509
|
-
function: 'compareSelfAndHost'
|
|
539
|
+
function: 'compareSelfAndHost',
|
|
510
540
|
},
|
|
511
541
|
EVENTS.LOCUS_INFO_CAN_ASSIGN_HOST,
|
|
512
542
|
{
|
|
513
|
-
canAssignHost: true
|
|
543
|
+
canAssignHost: true,
|
|
514
544
|
}
|
|
515
545
|
);
|
|
516
546
|
}
|
|
@@ -518,11 +548,11 @@ export default class LocusInfo extends EventsScope {
|
|
|
518
548
|
this.emitScoped(
|
|
519
549
|
{
|
|
520
550
|
file: 'locus-info',
|
|
521
|
-
function: 'compareSelfAndHost'
|
|
551
|
+
function: 'compareSelfAndHost',
|
|
522
552
|
},
|
|
523
553
|
EVENTS.LOCUS_INFO_CAN_ASSIGN_HOST,
|
|
524
554
|
{
|
|
525
|
-
canAssignHost: false
|
|
555
|
+
canAssignHost: false,
|
|
526
556
|
}
|
|
527
557
|
);
|
|
528
558
|
}
|
|
@@ -546,42 +576,35 @@ export default class LocusInfo extends EventsScope {
|
|
|
546
576
|
const deltas = {
|
|
547
577
|
audioStatus: prevState.audioStatus !== newState.audioStatus,
|
|
548
578
|
videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
|
|
549
|
-
videoStatus: prevState.videoStatus !== newState.videoStatus
|
|
579
|
+
videoStatus: prevState.videoStatus !== newState.videoStatus,
|
|
550
580
|
};
|
|
551
581
|
|
|
552
582
|
// Clean the object
|
|
553
|
-
Object.keys(deltas).forEach(
|
|
554
|
-
(key)
|
|
555
|
-
|
|
556
|
-
delete deltas[key];
|
|
557
|
-
}
|
|
583
|
+
Object.keys(deltas).forEach((key) => {
|
|
584
|
+
if (deltas[key] !== true) {
|
|
585
|
+
delete deltas[key];
|
|
558
586
|
}
|
|
559
|
-
);
|
|
587
|
+
});
|
|
560
588
|
|
|
561
589
|
return deltas;
|
|
562
590
|
};
|
|
563
591
|
|
|
564
|
-
this.deltaParticipants = participants.reduce(
|
|
565
|
-
(
|
|
566
|
-
const existingParticipant = findParticipant(
|
|
567
|
-
participant,
|
|
568
|
-
this.participants || []
|
|
569
|
-
) || {};
|
|
592
|
+
this.deltaParticipants = participants.reduce((collection, participant) => {
|
|
593
|
+
const existingParticipant = findParticipant(participant, this.participants || []) || {};
|
|
570
594
|
|
|
571
|
-
|
|
595
|
+
const delta = generateDelta(existingParticipant.status, participant.status);
|
|
572
596
|
|
|
573
|
-
|
|
597
|
+
const changed = Object.keys(delta).length > 0;
|
|
574
598
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
599
|
+
if (changed) {
|
|
600
|
+
collection.push({
|
|
601
|
+
person: participant.person,
|
|
602
|
+
delta,
|
|
603
|
+
});
|
|
604
|
+
}
|
|
581
605
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
);
|
|
606
|
+
return collection;
|
|
607
|
+
}, []);
|
|
585
608
|
}
|
|
586
609
|
|
|
587
610
|
/**
|
|
@@ -595,7 +618,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
595
618
|
this.emitScoped(
|
|
596
619
|
{
|
|
597
620
|
file: 'locus-info',
|
|
598
|
-
function: 'updateParticipants'
|
|
621
|
+
function: 'updateParticipants',
|
|
599
622
|
},
|
|
600
623
|
EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS,
|
|
601
624
|
{
|
|
@@ -603,7 +626,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
603
626
|
recordingId: this.parsedLocus.controls && this.parsedLocus.controls.record?.modifiedBy,
|
|
604
627
|
selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
|
|
605
628
|
selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
|
|
606
|
-
hostId: this.parsedLocus.host && this.parsedLocus.host.hostId
|
|
629
|
+
hostId: this.parsedLocus.host && this.parsedLocus.host.hostId,
|
|
607
630
|
}
|
|
608
631
|
);
|
|
609
632
|
}
|
|
@@ -621,9 +644,10 @@ export default class LocusInfo extends EventsScope {
|
|
|
621
644
|
hasRecordingChanged,
|
|
622
645
|
hasRecordingPausedChanged,
|
|
623
646
|
hasMeetingContainerChanged,
|
|
624
|
-
hasTranscribeChanged
|
|
647
|
+
hasTranscribeChanged,
|
|
648
|
+
hasEntryExitToneChanged,
|
|
625
649
|
},
|
|
626
|
-
current
|
|
650
|
+
current,
|
|
627
651
|
} = ControlsUtils.getControls(this.controls, controls);
|
|
628
652
|
|
|
629
653
|
if (hasRecordingChanged || hasRecordingPausedChanged) {
|
|
@@ -645,13 +669,13 @@ export default class LocusInfo extends EventsScope {
|
|
|
645
669
|
this.emitScoped(
|
|
646
670
|
{
|
|
647
671
|
file: 'locus-info',
|
|
648
|
-
function: 'updateControls'
|
|
672
|
+
function: 'updateControls',
|
|
649
673
|
},
|
|
650
674
|
LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
|
|
651
675
|
{
|
|
652
676
|
state,
|
|
653
677
|
modifiedBy: current.record.modifiedBy,
|
|
654
|
-
lastModified: current.record.lastModified
|
|
678
|
+
lastModified: current.record.lastModified,
|
|
655
679
|
}
|
|
656
680
|
);
|
|
657
681
|
}
|
|
@@ -662,11 +686,11 @@ export default class LocusInfo extends EventsScope {
|
|
|
662
686
|
this.emitScoped(
|
|
663
687
|
{
|
|
664
688
|
file: 'locus-info',
|
|
665
|
-
function: 'updateControls'
|
|
689
|
+
function: 'updateControls',
|
|
666
690
|
},
|
|
667
691
|
LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
|
|
668
692
|
{
|
|
669
|
-
meetingContainerUrl
|
|
693
|
+
meetingContainerUrl,
|
|
670
694
|
}
|
|
671
695
|
);
|
|
672
696
|
}
|
|
@@ -677,13 +701,31 @@ export default class LocusInfo extends EventsScope {
|
|
|
677
701
|
this.emitScoped(
|
|
678
702
|
{
|
|
679
703
|
file: 'locus-info',
|
|
680
|
-
function: 'updateControls'
|
|
704
|
+
function: 'updateControls',
|
|
681
705
|
},
|
|
682
706
|
LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED,
|
|
683
707
|
{
|
|
684
|
-
transcribing,
|
|
708
|
+
transcribing,
|
|
709
|
+
caption,
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
if (hasEntryExitToneChanged) {
|
|
715
|
+
const {entryExitTone} = current;
|
|
716
|
+
|
|
717
|
+
this.emitScoped(
|
|
718
|
+
{
|
|
719
|
+
file: 'locus-info',
|
|
720
|
+
function: 'updateControls',
|
|
721
|
+
},
|
|
722
|
+
LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED,
|
|
723
|
+
{
|
|
724
|
+
entryExitTone
|
|
685
725
|
}
|
|
686
726
|
);
|
|
727
|
+
|
|
728
|
+
this.updateMeeting({entryExitTone});
|
|
687
729
|
}
|
|
688
730
|
|
|
689
731
|
this.controls = controls;
|
|
@@ -701,7 +743,11 @@ export default class LocusInfo extends EventsScope {
|
|
|
701
743
|
this.conversationUrl = conversationUrl;
|
|
702
744
|
this.updateMeeting({conversationUrl});
|
|
703
745
|
}
|
|
704
|
-
else if (
|
|
746
|
+
else if (
|
|
747
|
+
info &&
|
|
748
|
+
info.conversationUrl &&
|
|
749
|
+
!isEqual(this.conversationUrl, info.conversationUrl)
|
|
750
|
+
) {
|
|
705
751
|
this.conversationUrl = info.conversationUrl;
|
|
706
752
|
this.updateMeeting({conversationUrl: info.conversationUrl});
|
|
707
753
|
}
|
|
@@ -718,7 +764,6 @@ export default class LocusInfo extends EventsScope {
|
|
|
718
764
|
}
|
|
719
765
|
}
|
|
720
766
|
|
|
721
|
-
|
|
722
767
|
/**
|
|
723
768
|
* @param {Object} fullState
|
|
724
769
|
* @returns {undefined}
|
|
@@ -734,12 +779,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
734
779
|
this.emitScoped(
|
|
735
780
|
{
|
|
736
781
|
file: 'locus-info',
|
|
737
|
-
function: 'updateFullState'
|
|
782
|
+
function: 'updateFullState',
|
|
738
783
|
},
|
|
739
784
|
LOCUSINFO.EVENTS.FULL_STATE_MEETING_STATE_CHANGE,
|
|
740
785
|
{
|
|
741
786
|
previousState: result.previous && result.previous.meetingState,
|
|
742
|
-
currentState: result.current.meetingState
|
|
787
|
+
currentState: result.current.meetingState,
|
|
743
788
|
}
|
|
744
789
|
);
|
|
745
790
|
}
|
|
@@ -748,11 +793,11 @@ export default class LocusInfo extends EventsScope {
|
|
|
748
793
|
this.emitScoped(
|
|
749
794
|
{
|
|
750
795
|
file: 'locus-info',
|
|
751
|
-
function: 'updateFullState'
|
|
796
|
+
function: 'updateFullState',
|
|
752
797
|
},
|
|
753
798
|
LOCUSINFO.EVENTS.FULL_STATE_TYPE_UPDATE,
|
|
754
799
|
{
|
|
755
|
-
type: result.current.type
|
|
800
|
+
type: result.current.type,
|
|
756
801
|
}
|
|
757
802
|
);
|
|
758
803
|
}
|
|
@@ -779,12 +824,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
779
824
|
this.emitScoped(
|
|
780
825
|
{
|
|
781
826
|
file: 'locus-info',
|
|
782
|
-
function: 'updateHostInfo'
|
|
827
|
+
function: 'updateHostInfo',
|
|
783
828
|
},
|
|
784
829
|
EVENTS.LOCUS_INFO_UPDATE_HOST,
|
|
785
830
|
{
|
|
786
831
|
newHost: parsedHosts.current,
|
|
787
|
-
oldHost: parsedHosts.previous
|
|
832
|
+
oldHost: parsedHosts.previous,
|
|
788
833
|
}
|
|
789
834
|
);
|
|
790
835
|
}
|
|
@@ -802,7 +847,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
802
847
|
* @memberof LocusInfo
|
|
803
848
|
*/
|
|
804
849
|
updateMeetingInfo(info, self) {
|
|
805
|
-
if (info &&
|
|
850
|
+
if (info && !isEqual(this.info, info)) {
|
|
806
851
|
const roles = self ? SelfUtils.getRoles(self) : this.parsedLocus.self?.roles || [];
|
|
807
852
|
const isJoined = SelfUtils.isJoined(self || this.parsedLocus.self);
|
|
808
853
|
const parsedInfo = InfoUtils.getInfos(this.parsedLocus.info, info, roles, isJoined);
|
|
@@ -810,7 +855,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
810
855
|
this.emitScoped(
|
|
811
856
|
{
|
|
812
857
|
file: 'locus-info',
|
|
813
|
-
function: 'updateMeetingInfo'
|
|
858
|
+
function: 'updateMeetingInfo',
|
|
814
859
|
},
|
|
815
860
|
LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
|
|
816
861
|
{info: parsedInfo.current, self}
|
|
@@ -820,7 +865,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
820
865
|
this.emitScoped(
|
|
821
866
|
{
|
|
822
867
|
file: 'locus-info',
|
|
823
|
-
function: 'updateMeetingInfo'
|
|
868
|
+
function: 'updateMeetingInfo',
|
|
824
869
|
},
|
|
825
870
|
LOCUSINFO.EVENTS.MEETING_LOCKED,
|
|
826
871
|
info
|
|
@@ -830,7 +875,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
830
875
|
this.emitScoped(
|
|
831
876
|
{
|
|
832
877
|
file: 'locus-info',
|
|
833
|
-
function: 'updateMeetingInfo'
|
|
878
|
+
function: 'updateMeetingInfo',
|
|
834
879
|
},
|
|
835
880
|
LOCUSINFO.EVENTS.MEETING_UNLOCKED,
|
|
836
881
|
info
|
|
@@ -855,15 +900,17 @@ export default class LocusInfo extends EventsScope {
|
|
|
855
900
|
return;
|
|
856
901
|
}
|
|
857
902
|
|
|
858
|
-
|
|
903
|
+
const parsedEmbeddedApps = EmbeddedAppsUtils.parse(embeddedApps);
|
|
904
|
+
|
|
905
|
+
this.updateMeeting({embeddedApps: parsedEmbeddedApps});
|
|
859
906
|
|
|
860
907
|
this.emitScoped(
|
|
861
908
|
{
|
|
862
909
|
file: 'locus-info',
|
|
863
|
-
function: 'updateEmbeddedApps'
|
|
910
|
+
function: 'updateEmbeddedApps',
|
|
864
911
|
},
|
|
865
912
|
LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED,
|
|
866
|
-
|
|
913
|
+
parsedEmbeddedApps
|
|
867
914
|
);
|
|
868
915
|
this.embeddedApps = embeddedApps;
|
|
869
916
|
}
|
|
@@ -883,12 +930,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
883
930
|
this.emitScoped(
|
|
884
931
|
{
|
|
885
932
|
file: 'locus-info',
|
|
886
|
-
function: 'updateMediaShares'
|
|
933
|
+
function: 'updateMediaShares',
|
|
887
934
|
},
|
|
888
935
|
EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES,
|
|
889
936
|
{
|
|
890
937
|
current: parsedMediaShares.current,
|
|
891
|
-
previous: parsedMediaShares.previous
|
|
938
|
+
previous: parsedMediaShares.previous,
|
|
892
939
|
}
|
|
893
940
|
);
|
|
894
941
|
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
@@ -941,7 +988,11 @@ export default class LocusInfo extends EventsScope {
|
|
|
941
988
|
|
|
942
989
|
// TODO: check if we need to save the sipUri here as well
|
|
943
990
|
// this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
|
|
944
|
-
const result = SelfUtils.getSipUrl(
|
|
991
|
+
const result = SelfUtils.getSipUrl(
|
|
992
|
+
this.getLocusPartner(participants, self),
|
|
993
|
+
this.parsedLocus.fullState.type,
|
|
994
|
+
this.parsedLocus.info.sipUri
|
|
995
|
+
);
|
|
945
996
|
|
|
946
997
|
if (result.sipUri) {
|
|
947
998
|
this.updateMeeting(result);
|
|
@@ -958,7 +1009,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
958
1009
|
this.emitScoped(
|
|
959
1010
|
{
|
|
960
1011
|
file: 'locus-info',
|
|
961
|
-
function: 'updateSelf'
|
|
1012
|
+
function: 'updateSelf',
|
|
962
1013
|
},
|
|
963
1014
|
LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED,
|
|
964
1015
|
{layout: parsedSelves.current.layout}
|
|
@@ -969,7 +1020,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
969
1020
|
this.emitScoped(
|
|
970
1021
|
{
|
|
971
1022
|
file: 'locus-info',
|
|
972
|
-
function: 'updateSelf'
|
|
1023
|
+
function: 'updateSelf',
|
|
973
1024
|
},
|
|
974
1025
|
LOCUSINFO.EVENTS.DISCONNECT_DUE_TO_INACTIVITY,
|
|
975
1026
|
{reason: self.reason}
|
|
@@ -980,7 +1031,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
980
1031
|
this.emitScoped(
|
|
981
1032
|
{
|
|
982
1033
|
file: 'locus-info',
|
|
983
|
-
function: 'updateSelf'
|
|
1034
|
+
function: 'updateSelf',
|
|
984
1035
|
},
|
|
985
1036
|
LOCUSINFO.EVENTS.SELF_MODERATOR_CHANGED,
|
|
986
1037
|
self
|
|
@@ -990,12 +1041,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
990
1041
|
this.emitScoped(
|
|
991
1042
|
{
|
|
992
1043
|
file: 'locus-info',
|
|
993
|
-
function: 'updateSelf'
|
|
1044
|
+
function: 'updateSelf',
|
|
994
1045
|
},
|
|
995
1046
|
LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED,
|
|
996
1047
|
{
|
|
997
1048
|
muted: parsedSelves.current.remoteMuted,
|
|
998
|
-
unmuteAllowed: parsedSelves.current.unmuteAllowed
|
|
1049
|
+
unmuteAllowed: parsedSelves.current.unmuteAllowed,
|
|
999
1050
|
}
|
|
1000
1051
|
);
|
|
1001
1052
|
}
|
|
@@ -1003,12 +1054,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
1003
1054
|
this.emitScoped(
|
|
1004
1055
|
{
|
|
1005
1056
|
file: 'locus-info',
|
|
1006
|
-
function: 'updateSelf'
|
|
1057
|
+
function: 'updateSelf',
|
|
1007
1058
|
},
|
|
1008
1059
|
LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
|
|
1009
1060
|
{
|
|
1010
1061
|
muted: parsedSelves.current.remoteMuted,
|
|
1011
|
-
unmuteAllowed: parsedSelves.current.unmuteAllowed
|
|
1062
|
+
unmuteAllowed: parsedSelves.current.unmuteAllowed,
|
|
1012
1063
|
}
|
|
1013
1064
|
);
|
|
1014
1065
|
}
|
|
@@ -1016,7 +1067,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1016
1067
|
this.emitScoped(
|
|
1017
1068
|
{
|
|
1018
1069
|
file: 'locus-info',
|
|
1019
|
-
function: 'updateSelf'
|
|
1070
|
+
function: 'updateSelf',
|
|
1020
1071
|
},
|
|
1021
1072
|
LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED,
|
|
1022
1073
|
{}
|
|
@@ -1026,7 +1077,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1026
1077
|
this.emitScoped(
|
|
1027
1078
|
{
|
|
1028
1079
|
file: 'locus-info',
|
|
1029
|
-
function: 'updateSelf'
|
|
1080
|
+
function: 'updateSelf',
|
|
1030
1081
|
},
|
|
1031
1082
|
LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST,
|
|
1032
1083
|
self
|
|
@@ -1036,7 +1087,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1036
1087
|
this.emitScoped(
|
|
1037
1088
|
{
|
|
1038
1089
|
file: 'locus-info',
|
|
1039
|
-
function: 'updateSelf'
|
|
1090
|
+
function: 'updateSelf',
|
|
1040
1091
|
},
|
|
1041
1092
|
LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST,
|
|
1042
1093
|
self
|
|
@@ -1047,24 +1098,28 @@ export default class LocusInfo extends EventsScope {
|
|
|
1047
1098
|
this.emitScoped(
|
|
1048
1099
|
{
|
|
1049
1100
|
file: 'locus-info',
|
|
1050
|
-
function: 'updateSelf'
|
|
1101
|
+
function: 'updateSelf',
|
|
1051
1102
|
},
|
|
1052
1103
|
LOCUSINFO.EVENTS.MEDIA_INACTIVITY,
|
|
1053
1104
|
SelfUtils.getMediaStatus(self.mediaSessions)
|
|
1054
1105
|
);
|
|
1055
1106
|
}
|
|
1056
1107
|
|
|
1057
|
-
if (
|
|
1108
|
+
if (
|
|
1109
|
+
parsedSelves.updates.audioStateChange ||
|
|
1110
|
+
parsedSelves.updates.videoStateChange ||
|
|
1111
|
+
parsedSelves.updates.shareStateChange
|
|
1112
|
+
) {
|
|
1058
1113
|
this.emitScoped(
|
|
1059
1114
|
{
|
|
1060
1115
|
file: 'locus-info',
|
|
1061
|
-
function: 'updateSelf'
|
|
1116
|
+
function: 'updateSelf',
|
|
1062
1117
|
},
|
|
1063
1118
|
LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE,
|
|
1064
1119
|
{
|
|
1065
1120
|
audioStatus: parsedSelves.current.currentMediaStatus?.audio,
|
|
1066
1121
|
videoStatus: parsedSelves.current.currentMediaStatus?.video,
|
|
1067
|
-
shareStatus: parsedSelves.current.currentMediaStatus?.share
|
|
1122
|
+
shareStatus: parsedSelves.current.currentMediaStatus?.share,
|
|
1068
1123
|
}
|
|
1069
1124
|
);
|
|
1070
1125
|
}
|
|
@@ -1073,22 +1128,43 @@ export default class LocusInfo extends EventsScope {
|
|
|
1073
1128
|
this.emitScoped(
|
|
1074
1129
|
{
|
|
1075
1130
|
file: 'locus-info',
|
|
1076
|
-
function: 'updateSelf'
|
|
1131
|
+
function: 'updateSelf',
|
|
1077
1132
|
},
|
|
1078
1133
|
LOCUSINFO.EVENTS.SELF_OBSERVING
|
|
1079
1134
|
);
|
|
1080
1135
|
}
|
|
1081
1136
|
|
|
1137
|
+
if (parsedSelves.updates.canNotViewTheParticipantListChanged) {
|
|
1138
|
+
this.emitScoped(
|
|
1139
|
+
{
|
|
1140
|
+
file: 'locus-info',
|
|
1141
|
+
function: 'updateSelf',
|
|
1142
|
+
},
|
|
1143
|
+
LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE,
|
|
1144
|
+
{canNotViewTheParticipantList: parsedSelves.current.canNotViewTheParticipantList}
|
|
1145
|
+
);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
if (parsedSelves.updates.isSharingBlockedChanged) {
|
|
1149
|
+
this.emitScoped(
|
|
1150
|
+
{
|
|
1151
|
+
file: 'locus-info',
|
|
1152
|
+
function: 'updateSelf',
|
|
1153
|
+
},
|
|
1154
|
+
LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE,
|
|
1155
|
+
{isSharingBlocked: parsedSelves.current.isSharingBlocked}
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1082
1158
|
|
|
1083
1159
|
this.emitScoped(
|
|
1084
1160
|
{
|
|
1085
1161
|
file: 'locus-info',
|
|
1086
|
-
function: 'updateSelf'
|
|
1162
|
+
function: 'updateSelf',
|
|
1087
1163
|
},
|
|
1088
1164
|
EVENTS.LOCUS_INFO_UPDATE_SELF,
|
|
1089
1165
|
{
|
|
1090
1166
|
oldSelf: parsedSelves.previous,
|
|
1091
|
-
newSelf: parsedSelves.current
|
|
1167
|
+
newSelf: parsedSelves.current,
|
|
1092
1168
|
}
|
|
1093
1169
|
);
|
|
1094
1170
|
this.parsedLocus.self = parsedSelves.current;
|
|
@@ -1112,7 +1188,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1112
1188
|
this.emitScoped(
|
|
1113
1189
|
{
|
|
1114
1190
|
file: 'locus-info',
|
|
1115
|
-
function: 'updateLocusUrl'
|
|
1191
|
+
function: 'updateLocusUrl',
|
|
1116
1192
|
},
|
|
1117
1193
|
EVENTS.LOCUS_INFO_UPDATE_URL,
|
|
1118
1194
|
url
|