@webex/plugin-meetings 3.12.0-next.57 → 3.12.0-next.59

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 (37) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +24 -1
  4. package/dist/breakouts/index.js.map +1 -1
  5. package/dist/config.js +1 -0
  6. package/dist/config.js.map +1 -1
  7. package/dist/interpretation/index.js +1 -1
  8. package/dist/interpretation/siLanguage.js +1 -1
  9. package/dist/media/index.js +3 -1
  10. package/dist/media/index.js.map +1 -1
  11. package/dist/meeting/index.js +37 -10
  12. package/dist/meeting/index.js.map +1 -1
  13. package/dist/meetings/index.js +23 -0
  14. package/dist/meetings/index.js.map +1 -1
  15. package/dist/multistream/codec/constants.js +63 -0
  16. package/dist/multistream/codec/constants.js.map +1 -0
  17. package/dist/multistream/mediaRequestManager.js +62 -15
  18. package/dist/multistream/mediaRequestManager.js.map +1 -1
  19. package/dist/types/config.d.ts +1 -0
  20. package/dist/types/meeting/index.d.ts +9 -0
  21. package/dist/types/meetings/index.d.ts +10 -0
  22. package/dist/types/multistream/codec/constants.d.ts +7 -0
  23. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  24. package/dist/webinar/index.js +1 -1
  25. package/package.json +1 -1
  26. package/src/breakouts/index.ts +30 -0
  27. package/src/config.ts +1 -0
  28. package/src/media/index.ts +3 -0
  29. package/src/meeting/index.ts +41 -2
  30. package/src/meetings/index.ts +21 -0
  31. package/src/multistream/codec/constants.ts +58 -0
  32. package/src/multistream/mediaRequestManager.ts +119 -28
  33. package/test/unit/spec/breakouts/index.ts +47 -0
  34. package/test/unit/spec/media/index.ts +31 -0
  35. package/test/unit/spec/meeting/index.js +154 -0
  36. package/test/unit/spec/meetings/index.js +27 -0
  37. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
@@ -420,6 +420,160 @@ describe('plugin-meetings', () => {
420
420
  assert.instanceOf(meeting.mediaRequestManagers.screenShareVideo, MediaRequestManager);
421
421
  });
422
422
 
423
+ it('getIngressPayloadType on webrtcMediaConnection is invoked for H264 when sending multistream video requests', () => {
424
+ const getIngressPayloadType = sinon.stub().returns(97);
425
+
426
+ meeting.isMultistream = true;
427
+ meeting.mediaProperties.webrtcMediaConnection = {
428
+ getIngressPayloadType,
429
+ requestMedia: sinon.stub(),
430
+ };
431
+
432
+ const fakeReceiveSlot = {
433
+ on: sinon.stub(),
434
+ off: sinon.stub(),
435
+ sourceState: 'live',
436
+ mediaType: MediaType.VideoMain,
437
+ wcmeReceiveSlot: {id: 'fake-wcme-slot'},
438
+ };
439
+
440
+ meeting.mediaRequestManagers.video.addRequest(
441
+ {
442
+ policyInfo: {
443
+ policy: 'receiver-selected',
444
+ csi: 42,
445
+ },
446
+ receiveSlots: [fakeReceiveSlot],
447
+ codecInfo: {
448
+ codec: 'h264',
449
+ maxFs: 3600,
450
+ },
451
+ },
452
+ true
453
+ );
454
+
455
+ assert.calledOnceWithExactly(
456
+ getIngressPayloadType,
457
+ MediaType.VideoMain,
458
+ MediaCodecMimeType.H264
459
+ );
460
+ });
461
+
462
+ it('getIngressPayloadType on webrtcMediaConnection is invoked for H264 and AV1 for slides video when AV1 slides support is enabled', () => {
463
+ const localWebex = new MockWebex({
464
+ children: {
465
+ meetings: Meetings,
466
+ credentials: Credentials,
467
+ support: Support,
468
+ llm: LLM,
469
+ mercury: Mercury,
470
+ },
471
+ config: {
472
+ credentials: {
473
+ client_id: 'mock-client-id',
474
+ },
475
+ meetings: {
476
+ reconnection: {
477
+ enabled: false,
478
+ },
479
+ mediaSettings: {},
480
+ metrics: {},
481
+ stats: {},
482
+ experimental: {enableUnifiedMeetings: true},
483
+ degradationPreferences: {maxMacroblocksLimit: 8192},
484
+ enableAv1SlidesSupport: true,
485
+ },
486
+ metrics: {
487
+ type: ['behavioral'],
488
+ },
489
+ },
490
+ });
491
+
492
+ localWebex.internal.newMetrics.callDiagnosticMetrics.clearErrorCache = sinon.stub();
493
+ localWebex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId =
494
+ sinon.stub();
495
+ localWebex.internal.support.submitLogs = sinon.stub().returns(Promise.resolve());
496
+ localWebex.internal.services = {get: sinon.stub().returns('locus-url')};
497
+ localWebex.credentials.getOrgId = sinon.stub().returns('fake-org-id');
498
+ localWebex.internal.metrics.submitClientMetrics = sinon.stub().returns(Promise.resolve());
499
+ localWebex.meetings.uploadLogs = sinon.stub().returns(Promise.resolve());
500
+ localWebex.meetings.reachability = {
501
+ isAnyPublicClusterReachable: sinon.stub().resolves(true),
502
+ getReachabilityResults: sinon.stub().resolves(undefined),
503
+ getReachabilityMetrics: sinon.stub().resolves({}),
504
+ stopReachability: sinon.stub(),
505
+ isSubnetReachable: sinon.stub().returns(true),
506
+ };
507
+ localWebex.internal.llm.isDataChannelTokenEnabled = sinon.stub().resolves(false);
508
+ localWebex.internal.llm.on = sinon.stub();
509
+ localWebex.internal.voicea.announce = sinon.stub();
510
+ localWebex.internal.newMetrics.callDiagnosticLatencies = new CallDiagnosticLatencies(
511
+ {},
512
+ {parent: localWebex}
513
+ );
514
+
515
+ Metrics.initialSetup(localWebex);
516
+
517
+ const localMeeting = new Meeting(
518
+ {
519
+ userId: uuid1,
520
+ resource: uuid2,
521
+ deviceUrl: uuid3,
522
+ locus: {url: url1},
523
+ destination: testDestination,
524
+ destinationType: DESTINATION_TYPE.MEETING_ID,
525
+ correlationId,
526
+ selfId: uuid1,
527
+ },
528
+ {
529
+ parent: localWebex,
530
+ }
531
+ );
532
+
533
+ const getIngressPayloadType = sinon.stub().callsFake((_mediaType, codecMimeType) => {
534
+ if (codecMimeType === MediaCodecMimeType.H264) {
535
+ return 97;
536
+ }
537
+ if (codecMimeType === MediaCodecMimeType.AV1) {
538
+ return 98;
539
+ }
540
+
541
+ return undefined;
542
+ });
543
+
544
+ localMeeting.isMultistream = true;
545
+ localMeeting.mediaProperties.webrtcMediaConnection = {
546
+ getIngressPayloadType,
547
+ requestMedia: sinon.stub(),
548
+ };
549
+
550
+ const fakeReceiveSlot = {
551
+ on: sinon.stub(),
552
+ off: sinon.stub(),
553
+ sourceState: 'live',
554
+ mediaType: MediaType.VideoSlides,
555
+ wcmeReceiveSlot: {id: 'fake-wcme-slides-slot'},
556
+ };
557
+
558
+ localMeeting.mediaRequestManagers.screenShareVideo.addRequest(
559
+ {
560
+ policyInfo: {
561
+ policy: 'receiver-selected',
562
+ csi: 42,
563
+ },
564
+ receiveSlots: [fakeReceiveSlot],
565
+ codecInfo: {
566
+ codec: 'h264',
567
+ maxFs: 3600,
568
+ },
569
+ },
570
+ true
571
+ );
572
+
573
+ assert.calledWith(getIngressPayloadType, MediaType.VideoSlides, MediaCodecMimeType.H264);
574
+ assert.calledWith(getIngressPayloadType, MediaType.VideoSlides, MediaCodecMimeType.AV1);
575
+ });
576
+
423
577
  it('uses meeting id as correlation id if not provided in constructor', () => {
424
578
  const newMeeting = new Meeting(
425
579
  {
@@ -426,6 +426,33 @@ describe('plugin-meetings', () => {
426
426
  });
427
427
  });
428
428
 
429
+ describe('#_toggleEnableAv1SlidesSupport', () => {
430
+ it('should have _toggleEnableAv1SlidesSupport', () => {
431
+ assert.equal(typeof webex.meetings._toggleEnableAv1SlidesSupport, 'function');
432
+ });
433
+
434
+ describe('success', () => {
435
+ it('should update meetings config to enable AV1 slides support', () => {
436
+ webex.meetings._toggleEnableAv1SlidesSupport(true);
437
+ assert.equal(webex.meetings.config.enableAv1SlidesSupport, true);
438
+
439
+ webex.meetings._toggleEnableAv1SlidesSupport(false);
440
+ assert.equal(webex.meetings.config.enableAv1SlidesSupport, false);
441
+ });
442
+
443
+ it('should not update config when called with a non-boolean value', () => {
444
+ webex.meetings._toggleEnableAv1SlidesSupport(true);
445
+ assert.equal(webex.meetings.config.enableAv1SlidesSupport, true);
446
+
447
+ webex.meetings._toggleEnableAv1SlidesSupport('invalid');
448
+ assert.equal(webex.meetings.config.enableAv1SlidesSupport, true);
449
+
450
+ webex.meetings._toggleEnableAv1SlidesSupport(undefined);
451
+ assert.equal(webex.meetings.config.enableAv1SlidesSupport, true);
452
+ });
453
+ });
454
+ });
455
+
429
456
  describe('#_toggleStopIceGatheringAfterFirstRelayCandidate', () => {
430
457
  it('should have _toggleStopIceGatheringAfterFirstRelayCandidate', () => {
431
458
  assert.equal(