@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.
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/media/properties.js +3 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +4 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/media/properties.d.ts +5 -2
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/media/properties.ts +7 -3
- package/src/meeting/index.ts +4 -5
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/index.js +4 -1
|
@@ -148,8 +148,11 @@ export default class MediaProperties {
|
|
|
148
148
|
*
|
|
149
149
|
* @param {string} issueType
|
|
150
150
|
* @param {string} issueSubType
|
|
151
|
-
* @param {
|
|
151
|
+
* @param {Object} metadata
|
|
152
152
|
* @returns {void}
|
|
153
153
|
*/
|
|
154
|
-
sendMediaIssueMetric(issueType: string, issueSubType: string,
|
|
154
|
+
sendMediaIssueMetric(issueType: string, issueSubType: string, metadata: {
|
|
155
|
+
correlationId: string;
|
|
156
|
+
isMultistream: boolean;
|
|
157
|
+
}): void;
|
|
155
158
|
}
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
package/src/media/properties.ts
CHANGED
|
@@ -455,10 +455,14 @@ export default class MediaProperties {
|
|
|
455
455
|
*
|
|
456
456
|
* @param {string} issueType
|
|
457
457
|
* @param {string} issueSubType
|
|
458
|
-
* @param {
|
|
458
|
+
* @param {Object} metadata
|
|
459
459
|
* @returns {void}
|
|
460
460
|
*/
|
|
461
|
-
public sendMediaIssueMetric(
|
|
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
|
-
|
|
473
|
+
...metadata,
|
|
470
474
|
...this.mediaIssueCounters,
|
|
471
475
|
});
|
|
472
476
|
}
|
package/src/meeting/index.ts
CHANGED
|
@@ -8492,11 +8492,10 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
8492
8492
|
});
|
|
8493
8493
|
|
|
8494
8494
|
if (atLeastOneUnmutedOtherMember) {
|
|
8495
|
-
this.mediaProperties.sendMediaIssueMetric(
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
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
|
|
422
|
+
const metadata = {correlationId: 'test-correlation-id-123', isMultistream: false};
|
|
423
423
|
|
|
424
|
-
mediaProperties.sendMediaIssueMetric(issueType, issueSubType,
|
|
424
|
+
mediaProperties.sendMediaIssueMetric(issueType, issueSubType, metadata);
|
|
425
425
|
|
|
426
426
|
assert.calledOnce(sendBehavioralMetricStub);
|
|
427
427
|
assert.calledWith(sendBehavioralMetricStub, BEHAVIORAL_METRICS.MEDIA_ISSUE_DETECTED, {
|
|
428
|
-
|
|
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
|
|
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,
|
|
440
|
-
mediaProperties.sendMediaIssueMetric(issueType, issueSubType,
|
|
441
|
-
mediaProperties.sendMediaIssueMetric(issueType, issueSubType,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
466
|
+
const metadata = {correlationId: 'test-correlation-id', isMultistream: false};
|
|
467
467
|
|
|
468
468
|
// Send different issue types
|
|
469
|
-
mediaProperties.sendMediaIssueMetric('audio', 'packet-loss',
|
|
470
|
-
mediaProperties.sendMediaIssueMetric('video', 'freeze',
|
|
471
|
-
mediaProperties.sendMediaIssueMetric('audio', 'packet-loss',
|
|
472
|
-
mediaProperties.sendMediaIssueMetric('audio', 'packet-loss',
|
|
473
|
-
mediaProperties.sendMediaIssueMetric('audio', 'packet-loss',
|
|
474
|
-
mediaProperties.sendMediaIssueMetric('video', 'freeze',
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
508
|
+
const metadata = {correlationId: 'test-correlation-id', isMultistream: true};
|
|
509
509
|
|
|
510
510
|
// Send metrics multiple times
|
|
511
|
-
mediaProperties.sendMediaIssueMetric(issueType, issueSubType,
|
|
512
|
-
mediaProperties.sendMediaIssueMetric(issueType, issueSubType,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
6214
|
+
{
|
|
6215
|
+
correlationId: meeting.correlationId,
|
|
6216
|
+
isMultistream: meeting.isMultistream,
|
|
6217
|
+
}
|
|
6215
6218
|
);
|
|
6216
6219
|
});
|
|
6217
6220
|
});
|