@webex/plugin-meetings 2.30.1 → 2.30.2

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.
@@ -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.getFullLocus({
73
- desync: true,
74
- locusUrl: meeting.locusUrl
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
- });
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(`Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ${action}`);
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('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
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 (this.parsedLocus.fullState.type === _CALL_ || this.parsedLocus.fullState.type === _SIP_BRIDGE_) {
254
- // for 1:1 bob calls alice and alice declines, notify the meeting state
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
- // trigger the event for stop ringing
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
- // trigger the event for stop ringing
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 participants.find((participant) =>
337
- (self && participant.identity !== self.identity) &&
338
- (participants.length <= 2 || (participant.type === _USER_ && !participant.removed))) || this.partner;
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 ((this.parsedLocus.fullState.type === _CALL_) || (this.parsedLocus.fullState.type === _SIP_BRIDGE_)) {
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('Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.');
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
- if (partner.state === MEETING_STATE.STATES.LEFT &&
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
- this.parsedLocus.self.state === MEETING_STATE.STATES.NOTIFIED ||
383
- this.parsedLocus.self.state === MEETING_STATE.STATES.JOINED)) {
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: this.parsedLocus.self.joinedWith && this.parsedLocus.self.joinedWith.state !== _LEFT_
413
+ shouldLeave:
414
+ this.parsedLocus.self.joinedWith && this.parsedLocus.self.joinedWith.state !== _LEFT_,
397
415
  }
398
416
  );
399
417
  }
400
- else
401
- if (this.parsedLocus.self &&
418
+ else if (
419
+ this.parsedLocus.self &&
402
420
  this.parsedLocus.self.state === MEETING_STATE.STATES.LEFT &&
403
- (partner.state === MEETING_STATE.STATES.LEFT ||
404
- partner.state === MEETING_STATE.STATES.DECLINED ||
405
- partner.state === MEETING_STATE.STATES.NOTIFIED ||
406
- partner.state === MEETING_STATE.STATES.IDLE) // Happens when user just joins and adds no Media
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 (this.fullState && (this.fullState.state === LOCUS.STATE.INACTIVE || this.fullState.state === LOCUS.STATE.TERMINATING)) {
427
- LoggerProxy.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating');
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 (this.compareAndUpdateFlags.compareSelfAndHost || this.compareAndUpdateFlags.compareHostAndSelf) {
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 ((this.parsedLocus.self.selfIdentity === this.parsedLocus.host?.hostId) && this.parsedLocus.self.moderator) {
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
- if (deltas[key] !== true) {
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
- (collection, participant) => {
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
- const delta = generateDelta(existingParticipant.status, participant.status);
595
+ const delta = generateDelta(existingParticipant.status, participant.status);
572
596
 
573
- const changed = (Object.keys(delta).length > 0);
597
+ const changed = Object.keys(delta).length > 0;
574
598
 
575
- if (changed) {
576
- collection.push({
577
- person: participant.person,
578
- delta
579
- });
580
- }
599
+ if (changed) {
600
+ collection.push({
601
+ person: participant.person,
602
+ delta,
603
+ });
604
+ }
581
605
 
582
- return collection;
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,9 @@ export default class LocusInfo extends EventsScope {
621
644
  hasRecordingChanged,
622
645
  hasRecordingPausedChanged,
623
646
  hasMeetingContainerChanged,
624
- hasTranscribeChanged
647
+ hasTranscribeChanged,
625
648
  },
626
- current
649
+ current,
627
650
  } = ControlsUtils.getControls(this.controls, controls);
628
651
 
629
652
  if (hasRecordingChanged || hasRecordingPausedChanged) {
@@ -645,13 +668,13 @@ export default class LocusInfo extends EventsScope {
645
668
  this.emitScoped(
646
669
  {
647
670
  file: 'locus-info',
648
- function: 'updateControls'
671
+ function: 'updateControls',
649
672
  },
650
673
  LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
651
674
  {
652
675
  state,
653
676
  modifiedBy: current.record.modifiedBy,
654
- lastModified: current.record.lastModified
677
+ lastModified: current.record.lastModified,
655
678
  }
656
679
  );
657
680
  }
@@ -662,11 +685,11 @@ export default class LocusInfo extends EventsScope {
662
685
  this.emitScoped(
663
686
  {
664
687
  file: 'locus-info',
665
- function: 'updateControls'
688
+ function: 'updateControls',
666
689
  },
667
690
  LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
668
691
  {
669
- meetingContainerUrl
692
+ meetingContainerUrl,
670
693
  }
671
694
  );
672
695
  }
@@ -677,11 +700,12 @@ export default class LocusInfo extends EventsScope {
677
700
  this.emitScoped(
678
701
  {
679
702
  file: 'locus-info',
680
- function: 'updateControls'
703
+ function: 'updateControls',
681
704
  },
682
705
  LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED,
683
706
  {
684
- transcribing, caption
707
+ transcribing,
708
+ caption,
685
709
  }
686
710
  );
687
711
  }
@@ -701,7 +725,11 @@ export default class LocusInfo extends EventsScope {
701
725
  this.conversationUrl = conversationUrl;
702
726
  this.updateMeeting({conversationUrl});
703
727
  }
704
- else if (info && info.conversationUrl && !isEqual(this.conversationUrl, info.conversationUrl)) {
728
+ else if (
729
+ info &&
730
+ info.conversationUrl &&
731
+ !isEqual(this.conversationUrl, info.conversationUrl)
732
+ ) {
705
733
  this.conversationUrl = info.conversationUrl;
706
734
  this.updateMeeting({conversationUrl: info.conversationUrl});
707
735
  }
@@ -718,7 +746,6 @@ export default class LocusInfo extends EventsScope {
718
746
  }
719
747
  }
720
748
 
721
-
722
749
  /**
723
750
  * @param {Object} fullState
724
751
  * @returns {undefined}
@@ -734,12 +761,12 @@ export default class LocusInfo extends EventsScope {
734
761
  this.emitScoped(
735
762
  {
736
763
  file: 'locus-info',
737
- function: 'updateFullState'
764
+ function: 'updateFullState',
738
765
  },
739
766
  LOCUSINFO.EVENTS.FULL_STATE_MEETING_STATE_CHANGE,
740
767
  {
741
768
  previousState: result.previous && result.previous.meetingState,
742
- currentState: result.current.meetingState
769
+ currentState: result.current.meetingState,
743
770
  }
744
771
  );
745
772
  }
@@ -748,11 +775,11 @@ export default class LocusInfo extends EventsScope {
748
775
  this.emitScoped(
749
776
  {
750
777
  file: 'locus-info',
751
- function: 'updateFullState'
778
+ function: 'updateFullState',
752
779
  },
753
780
  LOCUSINFO.EVENTS.FULL_STATE_TYPE_UPDATE,
754
781
  {
755
- type: result.current.type
782
+ type: result.current.type,
756
783
  }
757
784
  );
758
785
  }
@@ -779,12 +806,12 @@ export default class LocusInfo extends EventsScope {
779
806
  this.emitScoped(
780
807
  {
781
808
  file: 'locus-info',
782
- function: 'updateHostInfo'
809
+ function: 'updateHostInfo',
783
810
  },
784
811
  EVENTS.LOCUS_INFO_UPDATE_HOST,
785
812
  {
786
813
  newHost: parsedHosts.current,
787
- oldHost: parsedHosts.previous
814
+ oldHost: parsedHosts.previous,
788
815
  }
789
816
  );
790
817
  }
@@ -802,7 +829,7 @@ export default class LocusInfo extends EventsScope {
802
829
  * @memberof LocusInfo
803
830
  */
804
831
  updateMeetingInfo(info, self) {
805
- if (info && (!isEqual(this.info, info))) {
832
+ if (info && !isEqual(this.info, info)) {
806
833
  const roles = self ? SelfUtils.getRoles(self) : this.parsedLocus.self?.roles || [];
807
834
  const isJoined = SelfUtils.isJoined(self || this.parsedLocus.self);
808
835
  const parsedInfo = InfoUtils.getInfos(this.parsedLocus.info, info, roles, isJoined);
@@ -810,7 +837,7 @@ export default class LocusInfo extends EventsScope {
810
837
  this.emitScoped(
811
838
  {
812
839
  file: 'locus-info',
813
- function: 'updateMeetingInfo'
840
+ function: 'updateMeetingInfo',
814
841
  },
815
842
  LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
816
843
  {info: parsedInfo.current, self}
@@ -820,7 +847,7 @@ export default class LocusInfo extends EventsScope {
820
847
  this.emitScoped(
821
848
  {
822
849
  file: 'locus-info',
823
- function: 'updateMeetingInfo'
850
+ function: 'updateMeetingInfo',
824
851
  },
825
852
  LOCUSINFO.EVENTS.MEETING_LOCKED,
826
853
  info
@@ -830,7 +857,7 @@ export default class LocusInfo extends EventsScope {
830
857
  this.emitScoped(
831
858
  {
832
859
  file: 'locus-info',
833
- function: 'updateMeetingInfo'
860
+ function: 'updateMeetingInfo',
834
861
  },
835
862
  LOCUSINFO.EVENTS.MEETING_UNLOCKED,
836
863
  info
@@ -855,15 +882,17 @@ export default class LocusInfo extends EventsScope {
855
882
  return;
856
883
  }
857
884
 
858
- this.parsedLocus.embeddedApps = EmbeddedAppsUtils.parse(embeddedApps);
885
+ const parsedEmbeddedApps = EmbeddedAppsUtils.parse(embeddedApps);
886
+
887
+ this.updateMeeting({embeddedApps: parsedEmbeddedApps});
859
888
 
860
889
  this.emitScoped(
861
890
  {
862
891
  file: 'locus-info',
863
- function: 'updateEmbeddedApps'
892
+ function: 'updateEmbeddedApps',
864
893
  },
865
894
  LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED,
866
- embeddedApps
895
+ parsedEmbeddedApps
867
896
  );
868
897
  this.embeddedApps = embeddedApps;
869
898
  }
@@ -883,12 +912,12 @@ export default class LocusInfo extends EventsScope {
883
912
  this.emitScoped(
884
913
  {
885
914
  file: 'locus-info',
886
- function: 'updateMediaShares'
915
+ function: 'updateMediaShares',
887
916
  },
888
917
  EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES,
889
918
  {
890
919
  current: parsedMediaShares.current,
891
- previous: parsedMediaShares.previous
920
+ previous: parsedMediaShares.previous,
892
921
  }
893
922
  );
894
923
  this.parsedLocus.mediaShares = parsedMediaShares.current;
@@ -941,7 +970,11 @@ export default class LocusInfo extends EventsScope {
941
970
 
942
971
  // TODO: check if we need to save the sipUri here as well
943
972
  // 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(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri);
973
+ const result = SelfUtils.getSipUrl(
974
+ this.getLocusPartner(participants, self),
975
+ this.parsedLocus.fullState.type,
976
+ this.parsedLocus.info.sipUri
977
+ );
945
978
 
946
979
  if (result.sipUri) {
947
980
  this.updateMeeting(result);
@@ -958,7 +991,7 @@ export default class LocusInfo extends EventsScope {
958
991
  this.emitScoped(
959
992
  {
960
993
  file: 'locus-info',
961
- function: 'updateSelf'
994
+ function: 'updateSelf',
962
995
  },
963
996
  LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED,
964
997
  {layout: parsedSelves.current.layout}
@@ -969,7 +1002,7 @@ export default class LocusInfo extends EventsScope {
969
1002
  this.emitScoped(
970
1003
  {
971
1004
  file: 'locus-info',
972
- function: 'updateSelf'
1005
+ function: 'updateSelf',
973
1006
  },
974
1007
  LOCUSINFO.EVENTS.DISCONNECT_DUE_TO_INACTIVITY,
975
1008
  {reason: self.reason}
@@ -980,7 +1013,7 @@ export default class LocusInfo extends EventsScope {
980
1013
  this.emitScoped(
981
1014
  {
982
1015
  file: 'locus-info',
983
- function: 'updateSelf'
1016
+ function: 'updateSelf',
984
1017
  },
985
1018
  LOCUSINFO.EVENTS.SELF_MODERATOR_CHANGED,
986
1019
  self
@@ -990,12 +1023,12 @@ export default class LocusInfo extends EventsScope {
990
1023
  this.emitScoped(
991
1024
  {
992
1025
  file: 'locus-info',
993
- function: 'updateSelf'
1026
+ function: 'updateSelf',
994
1027
  },
995
1028
  LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED,
996
1029
  {
997
1030
  muted: parsedSelves.current.remoteMuted,
998
- unmuteAllowed: parsedSelves.current.unmuteAllowed
1031
+ unmuteAllowed: parsedSelves.current.unmuteAllowed,
999
1032
  }
1000
1033
  );
1001
1034
  }
@@ -1003,12 +1036,12 @@ export default class LocusInfo extends EventsScope {
1003
1036
  this.emitScoped(
1004
1037
  {
1005
1038
  file: 'locus-info',
1006
- function: 'updateSelf'
1039
+ function: 'updateSelf',
1007
1040
  },
1008
1041
  LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
1009
1042
  {
1010
1043
  muted: parsedSelves.current.remoteMuted,
1011
- unmuteAllowed: parsedSelves.current.unmuteAllowed
1044
+ unmuteAllowed: parsedSelves.current.unmuteAllowed,
1012
1045
  }
1013
1046
  );
1014
1047
  }
@@ -1016,7 +1049,7 @@ export default class LocusInfo extends EventsScope {
1016
1049
  this.emitScoped(
1017
1050
  {
1018
1051
  file: 'locus-info',
1019
- function: 'updateSelf'
1052
+ function: 'updateSelf',
1020
1053
  },
1021
1054
  LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED,
1022
1055
  {}
@@ -1026,7 +1059,7 @@ export default class LocusInfo extends EventsScope {
1026
1059
  this.emitScoped(
1027
1060
  {
1028
1061
  file: 'locus-info',
1029
- function: 'updateSelf'
1062
+ function: 'updateSelf',
1030
1063
  },
1031
1064
  LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST,
1032
1065
  self
@@ -1036,7 +1069,7 @@ export default class LocusInfo extends EventsScope {
1036
1069
  this.emitScoped(
1037
1070
  {
1038
1071
  file: 'locus-info',
1039
- function: 'updateSelf'
1072
+ function: 'updateSelf',
1040
1073
  },
1041
1074
  LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST,
1042
1075
  self
@@ -1047,24 +1080,28 @@ export default class LocusInfo extends EventsScope {
1047
1080
  this.emitScoped(
1048
1081
  {
1049
1082
  file: 'locus-info',
1050
- function: 'updateSelf'
1083
+ function: 'updateSelf',
1051
1084
  },
1052
1085
  LOCUSINFO.EVENTS.MEDIA_INACTIVITY,
1053
1086
  SelfUtils.getMediaStatus(self.mediaSessions)
1054
1087
  );
1055
1088
  }
1056
1089
 
1057
- if (parsedSelves.updates.audioStateChange || parsedSelves.updates.videoStateChange || parsedSelves.updates.shareStateChange) {
1090
+ if (
1091
+ parsedSelves.updates.audioStateChange ||
1092
+ parsedSelves.updates.videoStateChange ||
1093
+ parsedSelves.updates.shareStateChange
1094
+ ) {
1058
1095
  this.emitScoped(
1059
1096
  {
1060
1097
  file: 'locus-info',
1061
- function: 'updateSelf'
1098
+ function: 'updateSelf',
1062
1099
  },
1063
1100
  LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE,
1064
1101
  {
1065
1102
  audioStatus: parsedSelves.current.currentMediaStatus?.audio,
1066
1103
  videoStatus: parsedSelves.current.currentMediaStatus?.video,
1067
- shareStatus: parsedSelves.current.currentMediaStatus?.share
1104
+ shareStatus: parsedSelves.current.currentMediaStatus?.share,
1068
1105
  }
1069
1106
  );
1070
1107
  }
@@ -1073,22 +1110,21 @@ export default class LocusInfo extends EventsScope {
1073
1110
  this.emitScoped(
1074
1111
  {
1075
1112
  file: 'locus-info',
1076
- function: 'updateSelf'
1113
+ function: 'updateSelf',
1077
1114
  },
1078
1115
  LOCUSINFO.EVENTS.SELF_OBSERVING
1079
1116
  );
1080
1117
  }
1081
1118
 
1082
-
1083
1119
  this.emitScoped(
1084
1120
  {
1085
1121
  file: 'locus-info',
1086
- function: 'updateSelf'
1122
+ function: 'updateSelf',
1087
1123
  },
1088
1124
  EVENTS.LOCUS_INFO_UPDATE_SELF,
1089
1125
  {
1090
1126
  oldSelf: parsedSelves.previous,
1091
- newSelf: parsedSelves.current
1127
+ newSelf: parsedSelves.current,
1092
1128
  }
1093
1129
  );
1094
1130
  this.parsedLocus.self = parsedSelves.current;
@@ -1112,7 +1148,7 @@ export default class LocusInfo extends EventsScope {
1112
1148
  this.emitScoped(
1113
1149
  {
1114
1150
  file: 'locus-info',
1115
- function: 'updateLocusUrl'
1151
+ function: 'updateLocusUrl',
1116
1152
  },
1117
1153
  EVENTS.LOCUS_INFO_UPDATE_URL,
1118
1154
  url