@webex/plugin-meetings 3.12.0-next.109 → 3.12.0-next.110

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.
@@ -148,8 +148,11 @@ export default class MediaProperties {
148
148
  *
149
149
  * @param {string} issueType
150
150
  * @param {string} issueSubType
151
- * @param {string} correlationId
151
+ * @param {Object} metadata
152
152
  * @returns {void}
153
153
  */
154
- sendMediaIssueMetric(issueType: string, issueSubType: string, correlationId: any): void;
154
+ sendMediaIssueMetric(issueType: string, issueSubType: string, metadata: {
155
+ correlationId: string;
156
+ isMultistream: boolean;
157
+ }): void;
155
158
  }
@@ -869,7 +869,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
869
869
  }, _callee1);
870
870
  }))();
871
871
  },
872
- version: "3.12.0-next.109"
872
+ version: "3.12.0-next.110"
873
873
  });
874
874
  var _default = exports.default = Webinar;
875
875
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -94,5 +94,5 @@
94
94
  "//": [
95
95
  "TODO: upgrade jwt-decode when moving to node 18"
96
96
  ],
97
- "version": "3.12.0-next.109"
97
+ "version": "3.12.0-next.110"
98
98
  }
@@ -455,10 +455,14 @@ export default class MediaProperties {
455
455
  *
456
456
  * @param {string} issueType
457
457
  * @param {string} issueSubType
458
- * @param {string} correlationId
458
+ * @param {Object} metadata
459
459
  * @returns {void}
460
460
  */
461
- public sendMediaIssueMetric(issueType: string, issueSubType: string, correlationId) {
461
+ public sendMediaIssueMetric(
462
+ issueType: string,
463
+ issueSubType: string,
464
+ metadata: {correlationId: string; isMultistream: boolean}
465
+ ) {
462
466
  const key = `${issueType}_${issueSubType}`;
463
467
 
464
468
  const count = (this.mediaIssueCounters[key] || 0) + 1;
@@ -466,7 +470,7 @@ export default class MediaProperties {
466
470
  this.mediaIssueCounters[key] = count;
467
471
 
468
472
  this.throttledSendMediaIssueMetric({
469
- correlationId,
473
+ ...metadata,
470
474
  ...this.mediaIssueCounters,
471
475
  });
472
476
  }
@@ -8492,11 +8492,10 @@ export default class Meeting extends StatelessWebexPlugin {
8492
8492
  });
8493
8493
 
8494
8494
  if (atLeastOneUnmutedOtherMember) {
8495
- this.mediaProperties.sendMediaIssueMetric(
8496
- 'inbound_audio',
8497
- data.issueSubType,
8498
- this.correlationId
8499
- );
8495
+ this.mediaProperties.sendMediaIssueMetric('inbound_audio', data.issueSubType, {
8496
+ correlationId: this.correlationId,
8497
+ isMultistream: this.isMultistream,
8498
+ });
8500
8499
 
8501
8500
  Trigger.trigger(
8502
8501
  this,
@@ -419,13 +419,13 @@ describe('MediaProperties', () => {
419
419
  it('should send a behavioral metric with correct parameters', () => {
420
420
  const issueType = 'audio';
421
421
  const issueSubType = 'packet-loss';
422
- const correlationId = 'test-correlation-id-123';
422
+ const metadata = {correlationId: 'test-correlation-id-123', isMultistream: false};
423
423
 
424
- mediaProperties.sendMediaIssueMetric(issueType, issueSubType, correlationId);
424
+ mediaProperties.sendMediaIssueMetric(issueType, issueSubType, metadata);
425
425
 
426
426
  assert.calledOnce(sendBehavioralMetricStub);
427
427
  assert.calledWith(sendBehavioralMetricStub, BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED, {
428
- correlationId,
428
+ ...metadata,
429
429
  'audio_packet-loss': 1,
430
430
  });
431
431
  });
@@ -433,17 +433,17 @@ describe('MediaProperties', () => {
433
433
  it('should increment count while being throttled and reset it once metric goes out', () => {
434
434
  const issueType = 'video';
435
435
  const issueSubType = 'freeze';
436
- const correlationId = 'test-correlation-id';
436
+ const metadata = {correlationId: 'test-correlation-id', isMultistream: true};
437
437
 
438
438
  // Call multiple times with same issue type/subtype
439
- mediaProperties.sendMediaIssueMetric(issueType, issueSubType, correlationId);
440
- mediaProperties.sendMediaIssueMetric(issueType, issueSubType, correlationId);
441
- mediaProperties.sendMediaIssueMetric(issueType, issueSubType, correlationId);
439
+ mediaProperties.sendMediaIssueMetric(issueType, issueSubType, metadata);
440
+ mediaProperties.sendMediaIssueMetric(issueType, issueSubType, metadata);
441
+ mediaProperties.sendMediaIssueMetric(issueType, issueSubType, metadata);
442
442
 
443
443
  // First call should go through immediately, subsequent calls are throttled
444
444
  assert.calledOnce(sendBehavioralMetricStub);
445
445
  assert.calledWith(sendBehavioralMetricStub, BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED, {
446
- correlationId,
446
+ ...metadata,
447
447
  video_freeze: 1, // Only the first call goes through due to throttling
448
448
  });
449
449
  sendBehavioralMetricStub.resetHistory();
@@ -456,29 +456,29 @@ describe('MediaProperties', () => {
456
456
  sendBehavioralMetricStub,
457
457
  BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED,
458
458
  {
459
- correlationId,
459
+ ...metadata,
460
460
  video_freeze: 2,
461
461
  }
462
462
  );
463
463
  });
464
464
 
465
465
  it('should track different issue types separately in counters', () => {
466
- const correlationId = 'test-correlation-id';
466
+ const metadata = {correlationId: 'test-correlation-id', isMultistream: false};
467
467
 
468
468
  // Send different issue types
469
- mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', correlationId);
470
- mediaProperties.sendMediaIssueMetric('video', 'freeze', correlationId);
471
- mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', correlationId);
472
- mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', correlationId);
473
- mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', correlationId);
474
- mediaProperties.sendMediaIssueMetric('video', 'freeze', correlationId);
469
+ mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', metadata);
470
+ mediaProperties.sendMediaIssueMetric('video', 'freeze', metadata);
471
+ mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', metadata);
472
+ mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', metadata);
473
+ mediaProperties.sendMediaIssueMetric('audio', 'packet-loss', metadata);
474
+ mediaProperties.sendMediaIssueMetric('video', 'freeze', metadata);
475
475
 
476
476
  // First call should go through immediately, subsequent calls are throttled
477
477
  assert.calledOnceWithExactly(
478
478
  sendBehavioralMetricStub,
479
479
  BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED,
480
480
  {
481
- correlationId,
481
+ ...metadata,
482
482
  'audio_packet-loss': 1,
483
483
  }
484
484
  );
@@ -495,7 +495,7 @@ describe('MediaProperties', () => {
495
495
  sendBehavioralMetricStub,
496
496
  BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED,
497
497
  {
498
- correlationId,
498
+ ...metadata,
499
499
  video_freeze: 2,
500
500
  'audio_packet-loss': 3,
501
501
  }
@@ -505,18 +505,18 @@ describe('MediaProperties', () => {
505
505
  it('should flush throttled metrics when unsetPeerConnection is called', () => {
506
506
  const issueType = 'share';
507
507
  const issueSubType = 'connection-lost';
508
- const correlationId = 'test-correlation-id';
508
+ const metadata = {correlationId: 'test-correlation-id', isMultistream: true};
509
509
 
510
510
  // Send metrics multiple times
511
- mediaProperties.sendMediaIssueMetric(issueType, issueSubType, correlationId);
512
- mediaProperties.sendMediaIssueMetric(issueType, issueSubType, correlationId);
511
+ mediaProperties.sendMediaIssueMetric(issueType, issueSubType, metadata);
512
+ mediaProperties.sendMediaIssueMetric(issueType, issueSubType, metadata);
513
513
 
514
514
  // First call should go through immediately
515
515
  assert.calledOnceWithExactly(
516
516
  sendBehavioralMetricStub,
517
517
  BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED,
518
518
  {
519
- correlationId,
519
+ ...metadata,
520
520
  'share_connection-lost': 1,
521
521
  }
522
522
  );
@@ -529,7 +529,7 @@ describe('MediaProperties', () => {
529
529
  sendBehavioralMetricStub,
530
530
  BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED,
531
531
  {
532
- correlationId,
532
+ ...metadata,
533
533
  'share_connection-lost': 1,
534
534
  }
535
535
  );
@@ -6211,7 +6211,10 @@ describe('plugin-meetings', () => {
6211
6211
  meeting.mediaProperties.sendMediaIssueMetric,
6212
6212
  'inbound_audio',
6213
6213
  fakeEventData.issueSubType,
6214
- meeting.correlationId
6214
+ {
6215
+ correlationId: meeting.correlationId,
6216
+ isMultistream: meeting.isMultistream,
6217
+ }
6215
6218
  );
6216
6219
  });
6217
6220
  });