@webex/plugin-meetings 2.60.0-next.9 → 2.60.1-next.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 (55) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/config.d.ts +1 -0
  4. package/dist/config.js +2 -1
  5. package/dist/config.js.map +1 -1
  6. package/dist/index.js +5 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/interceptors/index.d.ts +2 -0
  9. package/dist/interceptors/index.js +15 -0
  10. package/dist/interceptors/index.js.map +1 -0
  11. package/dist/interceptors/locusRetry.d.ts +27 -0
  12. package/dist/interceptors/locusRetry.js +94 -0
  13. package/dist/interceptors/locusRetry.js.map +1 -0
  14. package/dist/interpretation/index.js +1 -1
  15. package/dist/interpretation/siLanguage.js +1 -1
  16. package/dist/meeting/index.js +6 -2
  17. package/dist/meeting/index.js.map +1 -1
  18. package/dist/meetings/index.d.ts +1 -11
  19. package/dist/meetings/index.js +4 -3
  20. package/dist/meetings/index.js.map +1 -1
  21. package/dist/reachability/clusterReachability.d.ts +109 -0
  22. package/dist/reachability/clusterReachability.js +357 -0
  23. package/dist/reachability/clusterReachability.js.map +1 -0
  24. package/dist/reachability/index.d.ts +32 -121
  25. package/dist/reachability/index.js +173 -459
  26. package/dist/reachability/index.js.map +1 -1
  27. package/dist/reachability/util.d.ts +8 -0
  28. package/dist/reachability/util.js +29 -0
  29. package/dist/reachability/util.js.map +1 -0
  30. package/dist/statsAnalyzer/index.d.ts +22 -0
  31. package/dist/statsAnalyzer/index.js +60 -0
  32. package/dist/statsAnalyzer/index.js.map +1 -1
  33. package/dist/statsAnalyzer/mqaUtil.js +4 -0
  34. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  35. package/dist/webinar/index.js +1 -1
  36. package/package.json +25 -22
  37. package/src/config.ts +1 -0
  38. package/src/index.ts +4 -0
  39. package/src/interceptors/index.ts +3 -0
  40. package/src/interceptors/locusRetry.ts +67 -0
  41. package/src/meeting/index.ts +10 -2
  42. package/src/meetings/index.ts +4 -3
  43. package/src/reachability/clusterReachability.ts +320 -0
  44. package/src/reachability/index.ts +124 -421
  45. package/src/reachability/util.ts +24 -0
  46. package/src/statsAnalyzer/index.ts +64 -1
  47. package/src/statsAnalyzer/mqaUtil.ts +4 -0
  48. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  49. package/test/unit/spec/meeting/index.js +8 -1
  50. package/test/unit/spec/meetings/index.js +28 -25
  51. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  52. package/test/unit/spec/reachability/index.ts +159 -226
  53. package/test/unit/spec/reachability/util.ts +40 -0
  54. package/test/unit/spec/roap/request.ts +26 -3
  55. package/test/unit/spec/stats-analyzer/index.js +100 -20
@@ -65,7 +65,8 @@ describe('plugin-meetings/roap', () => {
65
65
  REACHABILITY.localStorageResult,
66
66
  JSON.stringify({
67
67
  clusterId: {
68
- udp: 'test',
68
+ udp: { result: 'reachable', latencyInMilliseconds: 10 },
69
+ tcp: { result: 'unreachable' },
69
70
  isVideoMesh: false,
70
71
  },
71
72
  })
@@ -79,7 +80,16 @@ describe('plugin-meetings/roap', () => {
79
80
  assert.deepEqual(res.localSdp, {
80
81
  reachability: {
81
82
  clusterId: {
82
- udp: 'test',
83
+ udp: {
84
+ reachable: 'true',
85
+ latencyInMilliseconds: '10',
86
+ },
87
+ tcp: {
88
+ reachable: 'false',
89
+ },
90
+ xtls: {
91
+ untested: 'true',
92
+ }
83
93
  },
84
94
  },
85
95
  });
@@ -149,7 +159,20 @@ describe('plugin-meetings/roap', () => {
149
159
  roapMessage: {
150
160
  seq: 'seq',
151
161
  },
152
- reachability: {clusterId: {udp: 'test'}},
162
+ reachability: {
163
+ clusterId: {
164
+ tcp: {
165
+ reachable: 'false',
166
+ },
167
+ udp: {
168
+ latencyInMilliseconds: '10',
169
+ reachable: 'true',
170
+ },
171
+ xtls: {
172
+ untested: 'true',
173
+ },
174
+ },
175
+ },
153
176
  });
154
177
  });
155
178
 
@@ -130,17 +130,17 @@ describe('plugin-meetings', () => {
130
130
  {
131
131
  type: 'candidate-pair',
132
132
  state: 'succeeded',
133
- localCandidateId: 'fake-candidate-id'
133
+ localCandidateId: 'fake-candidate-id',
134
134
  },
135
135
  {
136
136
  type: 'candidate-pair',
137
137
  state: 'failed',
138
- localCandidateId: 'bad-candidate-id'
138
+ localCandidateId: 'bad-candidate-id',
139
139
  },
140
140
  {
141
141
  type: 'local-candidate',
142
142
  id: 'fake-candidate-id',
143
- protocol: 'tcp'
143
+ protocol: 'tcp',
144
144
  },
145
145
  ],
146
146
  },
@@ -156,17 +156,17 @@ describe('plugin-meetings', () => {
156
156
  {
157
157
  type: 'candidate-pair',
158
158
  state: 'succeeded',
159
- localCandidateId: 'fake-candidate-id'
159
+ localCandidateId: 'fake-candidate-id',
160
160
  },
161
161
  {
162
162
  type: 'candidate-pair',
163
163
  state: 'failed',
164
- localCandidateId: 'bad-candidate-id'
164
+ localCandidateId: 'bad-candidate-id',
165
165
  },
166
166
  {
167
167
  type: 'local-candidate',
168
168
  id: 'fake-candidate-id',
169
- protocol: 'tcp'
169
+ protocol: 'tcp',
170
170
  },
171
171
  ],
172
172
  },
@@ -185,17 +185,17 @@ describe('plugin-meetings', () => {
185
185
  {
186
186
  type: 'candidate-pair',
187
187
  state: 'succeeded',
188
- localCandidateId: 'fake-candidate-id'
188
+ localCandidateId: 'fake-candidate-id',
189
189
  },
190
190
  {
191
191
  type: 'candidate-pair',
192
192
  state: 'failed',
193
- localCandidateId: 'bad-candidate-id'
193
+ localCandidateId: 'bad-candidate-id',
194
194
  },
195
195
  {
196
196
  type: 'local-candidate',
197
197
  id: 'fake-candidate-id',
198
- protocol: 'tcp'
198
+ protocol: 'tcp',
199
199
  },
200
200
  ],
201
201
  },
@@ -214,17 +214,17 @@ describe('plugin-meetings', () => {
214
214
  {
215
215
  type: 'candidate-pair',
216
216
  state: 'succeeded',
217
- localCandidateId: 'fake-candidate-id'
217
+ localCandidateId: 'fake-candidate-id',
218
218
  },
219
219
  {
220
220
  type: 'candidate-pair',
221
221
  state: 'failed',
222
- localCandidateId: 'bad-candidate-id'
222
+ localCandidateId: 'bad-candidate-id',
223
223
  },
224
224
  {
225
225
  type: 'local-candidate',
226
226
  id: 'fake-candidate-id',
227
- protocol: 'tcp'
227
+ protocol: 'tcp',
228
228
  },
229
229
  ],
230
230
  },
@@ -244,12 +244,12 @@ describe('plugin-meetings', () => {
244
244
  receivers: [fakeStats.video.receivers[0]],
245
245
  },
246
246
  screenShareAudio: {
247
- senders: [],
248
- receivers: [],
247
+ senders: [fakeStats.audio.senders[0]],
248
+ receivers: [fakeStats.audio.receivers[0]],
249
249
  },
250
250
  screenShareVideo: {
251
- senders: [],
252
- receivers: [],
251
+ senders: [fakeStats.video.senders[0]],
252
+ receivers: [fakeStats.video.receivers[0]],
253
253
  },
254
254
  }),
255
255
  };
@@ -286,6 +286,19 @@ describe('plugin-meetings', () => {
286
286
  await testUtils.flushPromises();
287
287
  };
288
288
 
289
+ const mergeProperties = (target, properties, keyValue = 'fake-candidate-id', matchKey= 'type', matchValue = 'local-candidate') => {
290
+ for (let key in target) {
291
+ if (target.hasOwnProperty(key)) {
292
+ if (typeof target[key] === 'object') {
293
+ mergeProperties(target[key], properties, keyValue, matchKey, matchValue);
294
+ }
295
+ if (key === 'id' && target[key] === keyValue && target[matchKey] === matchValue) {
296
+ Object.assign(target, properties);
297
+ }
298
+ }
299
+ }
300
+ }
301
+
289
302
  const progressTime = async () => {
290
303
  await clock.tickAsync(initialConfig.analyzerInterval);
291
304
  await testUtils.flushPromises();
@@ -300,6 +313,17 @@ describe('plugin-meetings', () => {
300
313
  };
301
314
 
302
315
  const checkMqeData = () => {
316
+ for (const data of [
317
+ mqeData.audioTransmit,
318
+ mqeData.audioReceive,
319
+ mqeData.videoTransmit,
320
+ mqeData.videoReceive,
321
+ ]) {
322
+ assert.strictEqual(data.length, 2);
323
+ assert.strictEqual(data[0].common.common.isMain, true);
324
+ assert.strictEqual(data[1].common.common.isMain, false);
325
+ }
326
+
303
327
  assert.strictEqual(mqeData.videoReceive[0].streams[0].receivedFrameSize, 3600);
304
328
  assert.strictEqual(mqeData.videoReceive[0].streams[0].receivedHeight, 720);
305
329
  assert.strictEqual(mqeData.videoReceive[0].streams[0].receivedWidth, 1280);
@@ -422,8 +446,16 @@ describe('plugin-meetings', () => {
422
446
 
423
447
  await progressTime();
424
448
 
425
- assert.strictEqual(mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.MICROPHONE).information, 'fake-microphone');
426
- assert.strictEqual(mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.CAMERA).information, 'fake-camera');
449
+ assert.strictEqual(
450
+ mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.MICROPHONE)
451
+ .information,
452
+ 'fake-microphone'
453
+ );
454
+ assert.strictEqual(
455
+ mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.CAMERA)
456
+ .information,
457
+ 'fake-camera'
458
+ );
427
459
  });
428
460
 
429
461
  it('emits the correct peripherals in MEDIA_QUALITY events when localTrackLabel is undefined', async () => {
@@ -434,8 +466,16 @@ describe('plugin-meetings', () => {
434
466
 
435
467
  await progressTime();
436
468
 
437
- assert.strictEqual(mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.MICROPHONE).information, _UNKNOWN_);
438
- assert.strictEqual(mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.CAMERA).information, _UNKNOWN_);
469
+ assert.strictEqual(
470
+ mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.MICROPHONE)
471
+ .information,
472
+ _UNKNOWN_
473
+ );
474
+ assert.strictEqual(
475
+ mqeData.intervalMetadata.peripherals.find((val) => val.name === MEDIA_DEVICES.CAMERA)
476
+ .information,
477
+ _UNKNOWN_
478
+ );
439
479
  });
440
480
 
441
481
  it('emits the correct frameRate', async () => {
@@ -447,6 +487,46 @@ describe('plugin-meetings', () => {
447
487
  await progressTime();
448
488
  assert.strictEqual(mqeData.videoReceive[0].streams[0].common.receivedFrameRate, 25);
449
489
  });
490
+
491
+ it('has the correct localIpAddress set when the candidateType is host', async () => {
492
+ await startStatsAnalyzer();
493
+
494
+ await progressTime();
495
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), '');
496
+ mergeProperties(fakeStats, {address: 'test', candidateType: 'host'});
497
+ await progressTime();
498
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), 'test');
499
+ });
500
+
501
+ it('has the correct localIpAddress set when the candidateType is prflx and relayProtocol is set', async () => {
502
+ await startStatsAnalyzer();
503
+
504
+ await progressTime();
505
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), '');
506
+ mergeProperties(fakeStats, {relayProtocol: 'test', address: 'test2', candidateType: 'prflx'});
507
+ await progressTime();
508
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), 'test2');
509
+ });
510
+
511
+ it('has the correct localIpAddress set when the candidateType is prflx and relayProtocol is not set', async () => {
512
+ await startStatsAnalyzer();
513
+
514
+ await progressTime();
515
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), '');
516
+ mergeProperties(fakeStats, {relatedAddress: 'relatedAddress', address: 'test2', candidateType: 'prflx'});
517
+ await progressTime();
518
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), 'relatedAddress');
519
+ });
520
+
521
+ it('has no localIpAddress set when the candidateType is invalid', async () => {
522
+ await startStatsAnalyzer();
523
+
524
+ await progressTime();
525
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), '');
526
+ mergeProperties(fakeStats, {candidateType: 'invalid'});
527
+ await progressTime();
528
+ assert.strictEqual(statsAnalyzer.getLocalIpAddress(), '');
529
+ });
450
530
  });
451
531
  });
452
532
  });