@webex/plugin-meetings 3.0.0-beta.74 → 3.0.0-beta.76

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 (35) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +2 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/meeting/index.js +36 -9
  6. package/dist/meeting/index.js.map +1 -1
  7. package/dist/meeting-info/meeting-info-v2.js +60 -22
  8. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  9. package/dist/meetings/index.js +2 -1
  10. package/dist/meetings/index.js.map +1 -1
  11. package/dist/metrics/constants.js +2 -1
  12. package/dist/metrics/constants.js.map +1 -1
  13. package/dist/multistream/receiveSlotManager.js +16 -0
  14. package/dist/multistream/receiveSlotManager.js.map +1 -1
  15. package/dist/statsAnalyzer/index.js +32 -23
  16. package/dist/statsAnalyzer/index.js.map +1 -1
  17. package/dist/types/constants.d.ts +1 -0
  18. package/dist/types/meeting/index.d.ts +1 -0
  19. package/dist/types/meeting-info/meeting-info-v2.d.ts +16 -0
  20. package/dist/types/metrics/constants.d.ts +1 -0
  21. package/dist/types/multistream/receiveSlotManager.d.ts +7 -0
  22. package/dist/types/statsAnalyzer/index.d.ts +6 -1
  23. package/package.json +18 -18
  24. package/src/constants.ts +1 -0
  25. package/src/meeting/index.ts +32 -3
  26. package/src/meeting-info/meeting-info-v2.ts +37 -0
  27. package/src/meetings/index.ts +6 -1
  28. package/src/metrics/constants.ts +1 -0
  29. package/src/multistream/receiveSlotManager.ts +12 -0
  30. package/src/statsAnalyzer/index.ts +54 -23
  31. package/test/unit/spec/meeting/index.js +32 -0
  32. package/test/unit/spec/meeting-info/meetinginfov2.js +47 -0
  33. package/test/unit/spec/meetings/index.js +61 -0
  34. package/test/unit/spec/multistream/receiveSlotManager.ts +11 -3
  35. package/test/unit/spec/stats-analyzer/index.js +7 -2
@@ -15,7 +15,7 @@ describe('ReceiveSlotManager', () => {
15
15
 
16
16
  beforeEach(() => {
17
17
  fakeWcmeSlot = {
18
- id: 'fake wcme slot',
18
+ id: {ssrc: 1},
19
19
  };
20
20
  fakeReceiveSlots = [];
21
21
  mockReceiveSlotCtor = sinon.stub(ReceiveSlotModule, 'ReceiveSlot').callsFake((mediaType) => {
@@ -23,6 +23,7 @@ describe('ReceiveSlotManager', () => {
23
23
  id: `fake sdk receive slot ${fakeReceiveSlots.length + 1}`,
24
24
  mediaType,
25
25
  findMemberId: sinon.stub(),
26
+ wcmeReceiveSlot: fakeWcmeSlot,
26
27
  };
27
28
 
28
29
  fakeReceiveSlots.push(fakeReceiveSlot);
@@ -168,7 +169,6 @@ describe('ReceiveSlotManager', () => {
168
169
  });
169
170
 
170
171
  describe('updateMemberIds', () => {
171
-
172
172
  it('calls findMemberId() on all allocated receive slots', async () => {
173
173
  const audioSlots: ReceiveSlot[] = [];
174
174
  const videoSlots: ReceiveSlot[] = [];
@@ -187,9 +187,17 @@ describe('ReceiveSlotManager', () => {
187
187
 
188
188
  assert.strictEqual(fakeReceiveSlots.length, audioSlots.length + videoSlots.length);
189
189
 
190
- fakeReceiveSlots.forEach(slot => {
190
+ fakeReceiveSlots.forEach((slot) => {
191
191
  assert.calledOnce(slot.findMemberId);
192
192
  });
193
193
  });
194
194
  });
195
+
196
+ describe('findReceiveSlotBySsrc', () => {
197
+ it('finds a receive slot with a specific id', async () => {
198
+ await receiveSlotManager.allocateSlot(MediaType.VideoMain);
199
+ assert.exists(receiveSlotManager.findReceiveSlotBySsrc(1));
200
+ assert.strictEqual(receiveSlotManager.findReceiveSlotBySsrc(2), undefined);
201
+ });
202
+ });
195
203
  });
@@ -53,7 +53,12 @@ describe('plugin-meetings', () => {
53
53
  beforeEach(() => {
54
54
  const networkQualityMonitor = new NetworkQualityMonitor(initialConfig);
55
55
 
56
- statsAnalyzer = new StatsAnalyzer(initialConfig, networkQualityMonitor, defaultStats);
56
+ statsAnalyzer = new StatsAnalyzer(
57
+ initialConfig,
58
+ () => ({}),
59
+ networkQualityMonitor,
60
+ defaultStats
61
+ );
57
62
 
58
63
  sandBoxSpy = sandbox.spy(
59
64
  statsAnalyzer.networkQualityMonitor,
@@ -188,7 +193,7 @@ describe('plugin-meetings', () => {
188
193
 
189
194
  networkQualityMonitor = new NetworkQualityMonitor(initialConfig);
190
195
 
191
- statsAnalyzer = new StatsAnalyzer(initialConfig, networkQualityMonitor);
196
+ statsAnalyzer = new StatsAnalyzer(initialConfig, () => ({}), networkQualityMonitor);
192
197
 
193
198
  statsAnalyzer.on(EVENTS.LOCAL_MEDIA_STARTED, (data) => {
194
199
  receivedEventsData.local.started = data;