@webex/plugin-meetings 3.8.0-next.8 → 3.8.0-web-workers-keepalive.1

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.
Files changed (64) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/config.js +1 -0
  4. package/dist/config.js.map +1 -1
  5. package/dist/interpretation/index.js +1 -1
  6. package/dist/interpretation/siLanguage.js +1 -1
  7. package/dist/locus-info/controlsUtils.js +1 -1
  8. package/dist/locus-info/controlsUtils.js.map +1 -1
  9. package/dist/meeting/index.js +51 -5
  10. package/dist/meeting/index.js.map +1 -1
  11. package/dist/meeting/util.js +4 -1
  12. package/dist/meeting/util.js.map +1 -1
  13. package/dist/meeting-info/meeting-info-v2.js +359 -60
  14. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  15. package/dist/meetings/index.js +60 -1
  16. package/dist/meetings/index.js.map +1 -1
  17. package/dist/member/index.js +10 -0
  18. package/dist/member/index.js.map +1 -1
  19. package/dist/member/util.js +3 -0
  20. package/dist/member/util.js.map +1 -1
  21. package/dist/metrics/constants.js +9 -0
  22. package/dist/metrics/constants.js.map +1 -1
  23. package/dist/reachability/clusterReachability.js +52 -8
  24. package/dist/reachability/clusterReachability.js.map +1 -1
  25. package/dist/reachability/index.js +70 -45
  26. package/dist/reachability/index.js.map +1 -1
  27. package/dist/reachability/reachability.types.js +14 -0
  28. package/dist/reachability/reachability.types.js.map +1 -1
  29. package/dist/reachability/request.js +19 -3
  30. package/dist/reachability/request.js.map +1 -1
  31. package/dist/types/config.d.ts +1 -0
  32. package/dist/types/meeting/index.d.ts +8 -0
  33. package/dist/types/meeting-info/meeting-info-v2.d.ts +80 -0
  34. package/dist/types/meetings/index.d.ts +29 -0
  35. package/dist/types/member/index.d.ts +1 -0
  36. package/dist/types/metrics/constants.d.ts +9 -0
  37. package/dist/types/reachability/clusterReachability.d.ts +13 -1
  38. package/dist/types/reachability/index.d.ts +2 -1
  39. package/dist/types/reachability/reachability.types.d.ts +5 -0
  40. package/dist/webinar/index.js +1 -1
  41. package/package.json +22 -22
  42. package/src/config.ts +1 -0
  43. package/src/locus-info/controlsUtils.ts +2 -2
  44. package/src/meeting/index.ts +51 -7
  45. package/src/meeting/util.ts +2 -1
  46. package/src/meeting-info/meeting-info-v2.ts +247 -6
  47. package/src/meetings/index.ts +72 -1
  48. package/src/member/index.ts +11 -0
  49. package/src/member/util.ts +3 -0
  50. package/src/metrics/constants.ts +9 -0
  51. package/src/reachability/clusterReachability.ts +47 -1
  52. package/src/reachability/index.ts +15 -0
  53. package/src/reachability/reachability.types.ts +6 -0
  54. package/src/reachability/request.ts +7 -0
  55. package/test/unit/spec/locus-info/controlsUtils.js +8 -0
  56. package/test/unit/spec/meeting/index.js +62 -4
  57. package/test/unit/spec/meeting/utils.js +55 -0
  58. package/test/unit/spec/meeting-info/meetinginfov2.js +443 -114
  59. package/test/unit/spec/meetings/index.js +78 -1
  60. package/test/unit/spec/member/index.js +7 -0
  61. package/test/unit/spec/member/util.js +24 -0
  62. package/test/unit/spec/reachability/clusterReachability.ts +47 -1
  63. package/test/unit/spec/reachability/index.ts +12 -0
  64. package/test/unit/spec/reachability/request.js +47 -2
@@ -210,6 +210,7 @@ describe('plugin-meetings', () => {
210
210
  let membersSpy;
211
211
  let meetingRequestSpy;
212
212
  let correlationId;
213
+ let isoLocalClientMeetingJoinTime;
213
214
  let uploadEvent;
214
215
 
215
216
  beforeEach(() => {
@@ -1692,10 +1693,6 @@ describe('plugin-meetings', () => {
1692
1693
  sandbox.stub(MeetingUtil, 'joinMeeting').returns(Promise.resolve(joinMeetingResult));
1693
1694
  });
1694
1695
 
1695
- afterEach(() => {
1696
- assert.exists(meeting.isoLocalClientMeetingJoinTime);
1697
- });
1698
-
1699
1696
  it('should join the meeting and return promise', async () => {
1700
1697
  const join = meeting.join({pstnAudioType: 'dial-in'});
1701
1698
  meeting.config.enableAutomaticLLM = true;
@@ -7530,6 +7527,27 @@ describe('plugin-meetings', () => {
7530
7527
  });
7531
7528
  });
7532
7529
 
7530
+ describe('#setIsoLocalClientMeetingJoinTime', () => {
7531
+ it('should fallback to system clock ISO string when given an undefined value', () => {
7532
+ const currentSystemTime = new Date().toISOString();
7533
+ meeting.isoLocalClientMeetingJoinTime = undefined;
7534
+ assert.equal(meeting.isoLocalClientMeetingJoinTime, currentSystemTime);
7535
+ });
7536
+
7537
+ it('should fallback to system clock ISO string when given an invalid value', () => {
7538
+ const currentSystemTime = new Date().toISOString();
7539
+ meeting.isoLocalClientMeetingJoinTime = 'invalid-date';
7540
+ assert.equal(meeting.isoLocalClientMeetingJoinTime, currentSystemTime);
7541
+ });
7542
+
7543
+ it('should set the isoLocalClientMeetingJoinTime correctly for a valid date string', () => {
7544
+ const validDateString = 'Tue, 01 Apr 2025 13:00:36 GMT';
7545
+ const expectedISOString = new Date(validDateString).toISOString();
7546
+ meeting.isoLocalClientMeetingJoinTime = validDateString;
7547
+ assert.equal(meeting.isoLocalClientMeetingJoinTime, expectedISOString);
7548
+ });
7549
+ });
7550
+
7533
7551
  describe('#updateCallStateForMetrics', () => {
7534
7552
  it('should update the callState, overriding existing values', () => {
7535
7553
  assert.deepEqual(meeting.callStateForMetrics, {correlationId, sessionCorrelationId: ''});
@@ -8596,13 +8614,19 @@ describe('plugin-meetings', () => {
8596
8614
  const fakeErrorMessage = 'test error';
8597
8615
  const fakeRootCauseName = 'root cause name';
8598
8616
  const fakeErrorName = 'test error name';
8617
+ let clock;
8599
8618
 
8600
8619
  beforeEach(() => {
8620
+ clock = sinon.useFakeTimers();
8601
8621
  meeting.setupMediaConnectionListeners();
8602
8622
  webex.internal.newMetrics.submitClientEvent.resetHistory();
8603
8623
  Metrics.sendBehavioralMetric.resetHistory();
8604
8624
  });
8605
8625
 
8626
+ afterEach(() => {
8627
+ clock.restore();
8628
+ });
8629
+
8606
8630
  const checkMetricSent = (event, error) => {
8607
8631
  assert.calledOnce(webex.internal.newMetrics.submitClientEvent);
8608
8632
  assert.calledWithMatch(webex.internal.newMetrics.submitClientEvent, {
@@ -8671,6 +8695,13 @@ describe('plugin-meetings', () => {
8671
8695
  });
8672
8696
 
8673
8697
  it('should send metrics for SdpAnswerHandlingError error', () => {
8698
+ meeting.sdpResponseTimer = '1234';
8699
+ meeting.deferSDPAnswer = {
8700
+ reject: sinon.stub(),
8701
+ };
8702
+
8703
+ const clearTimeoutSpy = sinon.spy(clock, 'clearTimeout');
8704
+
8674
8705
  const fakeError = new Errors.SdpAnswerHandlingError(fakeErrorMessage, {
8675
8706
  name: fakeErrorName,
8676
8707
  cause: {name: fakeRootCauseName},
@@ -8685,6 +8716,8 @@ describe('plugin-meetings', () => {
8685
8716
  fakeErrorMessage,
8686
8717
  fakeRootCauseName
8687
8718
  );
8719
+ assert.calledOnce(meeting.deferSDPAnswer.reject);
8720
+ assert.calledOnce(clearTimeoutSpy);
8688
8721
  });
8689
8722
 
8690
8723
  it('should send metrics for SdpError error', () => {
@@ -12666,6 +12699,31 @@ describe('plugin-meetings', () => {
12666
12699
  });
12667
12700
  });
12668
12701
  });
12702
+
12703
+ describe('handleShareVideoStreamMuteStateChange', () => {
12704
+ it('should emit MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE event with correct fields', () => {
12705
+ meeting.isMultistream = true;
12706
+ meeting.statsAnalyzer = {shareVideoEncoderImplementation: 'OpenH264'};
12707
+ meeting.mediaProperties.shareVideoStream = {
12708
+ getSettings: sinon.stub().returns({displaySurface: 'monitor', frameRate: 30}),
12709
+ };
12710
+
12711
+ meeting.handleShareVideoStreamMuteStateChange(true);
12712
+
12713
+ assert.calledOnceWithExactly(
12714
+ Metrics.sendBehavioralMetric,
12715
+ BEHAVIORAL_METRICS.MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE,
12716
+ {
12717
+ correlationId: meeting.correlationId,
12718
+ muted: true,
12719
+ encoderImplementation: 'OpenH264',
12720
+ displaySurface: 'monitor',
12721
+ isMultistream: true,
12722
+ frameRate: 30,
12723
+ }
12724
+ );
12725
+ });
12726
+ });
12669
12727
  });
12670
12728
 
12671
12729
  describe('#startKeepAlive', () => {
@@ -460,6 +460,50 @@ describe('plugin-meetings', () => {
460
460
  });
461
461
  });
462
462
 
463
+
464
+ it('#Should call `meetingRequest.joinMeeting and handle a date header in the response : isoLocalClientMeetingJoinedTime', async () => {
465
+ meeting.isMultistream = true;
466
+
467
+ const FAKE_REACHABILITY_REPORT = {
468
+ id: 'fake reachability report',
469
+ };
470
+ const FAKE_CLIENT_MEDIA_PREFERENCES = {
471
+ id: 'fake client media preferences',
472
+ };
473
+
474
+ webex.meetings.reachability.getReachabilityReportToAttachToRoap.resolves(FAKE_REACHABILITY_REPORT);
475
+ webex.meetings.reachability.getClientMediaPreferences.resolves(FAKE_CLIENT_MEDIA_PREFERENCES);
476
+
477
+ sinon
478
+ .stub(webex.internal.device.ipNetworkDetector, 'supportsIpV4')
479
+ .get(() => true);
480
+ sinon
481
+ .stub(webex.internal.device.ipNetworkDetector, 'supportsIpV6')
482
+ .get(() => true);
483
+
484
+ meeting.meetingRequest.joinMeeting.resolves({
485
+ headers: {
486
+ date: 'test'
487
+ },
488
+ body: {
489
+ mediaConnections: [{mediaId: 'test'}],
490
+ locus: {
491
+ url: 'test',
492
+ self: {
493
+ id: 'test'
494
+ }
495
+ }
496
+ }
497
+ })
498
+
499
+ await MeetingUtil.joinMeeting(meeting, {
500
+ reachability: 'reachability',
501
+ roapMessage: 'roapMessage',
502
+ });
503
+
504
+ assert.equal(meeting.isoLocalClientMeetingJoinTime, 'test');
505
+ });
506
+
463
507
  it('should handle failed reachability report retrieval', async () => {
464
508
  webex.meetings.reachability.getReachabilityReportToAttachToRoap.rejects(
465
509
  new Error('fake error')
@@ -516,6 +560,17 @@ describe('plugin-meetings', () => {
516
560
  assert.equal(parameter.liveAnnotationSupported, true);
517
561
  });
518
562
 
563
+ it('#Should call meetingRequest.joinMeeting with alias passed through', async () => {
564
+ await MeetingUtil.joinMeeting(meeting, {
565
+ alias: 'alias name',
566
+ });
567
+
568
+ assert.calledOnce(meeting.meetingRequest.joinMeeting);
569
+ const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
570
+
571
+ assert.equal(parameter.alias, 'alias name');
572
+ });
573
+
519
574
  it('#Should call meetingRequest.joinMeeting with locale=en_UK, deviceCapabilities=["TEST"] when they are passed in as those values', async () => {
520
575
  await MeetingUtil.joinMeeting(meeting, {
521
576
  locale: 'en_UK',