@webex/plugin-meetings 3.0.0 → 3.1.0
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/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +5 -4
- package/dist/constants.js +8 -4
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +16 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/mediaSharesUtils.js +15 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +5 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/media/MediaConnectionAwaiter.js +163 -0
- package/dist/media/MediaConnectionAwaiter.js.map +1 -0
- package/dist/media/index.js +4 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -24
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.d.ts +26 -7
- package/dist/meeting/index.js +893 -677
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.d.ts +2 -8
- package/dist/meeting/muteState.js +37 -25
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.d.ts +3 -0
- package/dist/meeting/request.js +32 -23
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +4 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.d.ts +8 -0
- package/dist/meetings/index.js +20 -0
- package/dist/meetings/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.d.ts +2 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.d.ts +2 -0
- package/dist/multistream/remoteMediaGroup.js +16 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.d.ts +15 -0
- package/dist/multistream/remoteMediaManager.js +179 -65
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.d.ts +9 -1
- package/dist/multistream/sendSlotManager.js +22 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.d.ts +1 -0
- package/dist/reachability/clusterReachability.js +29 -15
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.d.ts +4 -0
- package/dist/reachability/index.js +18 -2
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -10
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.d.ts +7 -0
- package/dist/reachability/util.js +19 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.d.ts +10 -2
- package/dist/roap/index.js +15 -0
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +3 -3
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.d.ts +64 -17
- package/dist/roap/turnDiscovery.js +307 -126
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/index.js +53 -30
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/config.ts +1 -0
- package/src/constants.ts +7 -3
- package/src/index.ts +1 -0
- package/src/interpretation/index.ts +18 -1
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/selfUtils.ts +5 -0
- package/src/media/MediaConnectionAwaiter.ts +174 -0
- package/src/media/index.ts +3 -1
- package/src/media/properties.ts +6 -31
- package/src/meeting/index.ts +321 -106
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +18 -2
- package/src/meeting/util.ts +1 -0
- package/src/meeting-info/utilv2.ts +2 -1
- package/src/meetings/index.ts +18 -0
- package/src/multistream/mediaRequestManager.ts +4 -1
- package/src/multistream/remoteMediaGroup.ts +19 -0
- package/src/multistream/remoteMediaManager.ts +101 -16
- package/src/multistream/sendSlotManager.ts +28 -0
- package/src/reachability/clusterReachability.ts +20 -5
- package/src/reachability/index.ts +24 -1
- package/src/reachability/request.ts +15 -11
- package/src/reachability/util.ts +21 -0
- package/src/reconnection-manager/index.ts +1 -1
- package/src/roap/index.ts +25 -3
- package/src/roap/request.ts +3 -3
- package/src/roap/turnDiscovery.ts +244 -78
- package/src/statsAnalyzer/index.ts +63 -27
- package/test/integration/spec/journey.js +14 -14
- package/test/integration/spec/space-meeting.js +1 -1
- package/test/unit/spec/interpretation/index.ts +39 -3
- package/test/unit/spec/locus-info/index.js +28 -19
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
- package/test/unit/spec/locus-info/selfUtils.js +42 -12
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
- package/test/unit/spec/media/index.ts +89 -78
- package/test/unit/spec/media/properties.ts +16 -70
- package/test/unit/spec/meeting/index.js +638 -139
- package/test/unit/spec/meeting/muteState.js +219 -67
- package/test/unit/spec/meeting/request.js +21 -0
- package/test/unit/spec/meeting/utils.js +6 -1
- package/test/unit/spec/meeting-info/utilv2.js +6 -0
- package/test/unit/spec/meetings/index.js +40 -20
- package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +79 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +199 -1
- package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
- package/test/unit/spec/reachability/clusterReachability.ts +86 -22
- package/test/unit/spec/reachability/index.ts +197 -60
- package/test/unit/spec/reachability/request.js +15 -7
- package/test/unit/spec/reachability/util.ts +32 -2
- package/test/unit/spec/reconnection-manager/index.js +28 -0
- package/test/unit/spec/roap/index.ts +61 -6
- package/test/unit/spec/roap/turnDiscovery.ts +298 -16
- package/test/unit/spec/stats-analyzer/index.js +179 -0
- package/dist/member/member.types.d.ts +0 -11
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/src/member/member.types.ts +0 -13
- /package/test/unit/spec/locus-info/{lib/selfConstant.js → selfConstant.js} +0 -0
|
@@ -264,7 +264,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
264
264
|
|
|
265
265
|
// Add stats for individual streams
|
|
266
266
|
Object.keys(this.statsResults).forEach((mediaType) => {
|
|
267
|
-
if (mediaType.
|
|
267
|
+
if (mediaType.startsWith('audio-send')) {
|
|
268
268
|
const audioSenderStream = cloneDeep(emptyAudioTransmitStream);
|
|
269
269
|
|
|
270
270
|
getAudioSenderStreamMqa({
|
|
@@ -276,7 +276,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
276
276
|
newMqa.audioTransmit[0].streams.push(audioSenderStream);
|
|
277
277
|
|
|
278
278
|
this.lastMqaDataSent[mediaType].send = cloneDeep(this.statsResults[mediaType].send);
|
|
279
|
-
} else if (mediaType.
|
|
279
|
+
} else if (mediaType.startsWith('audio-share-send')) {
|
|
280
280
|
const audioSenderStream = cloneDeep(emptyAudioTransmitStream);
|
|
281
281
|
|
|
282
282
|
getAudioSenderStreamMqa({
|
|
@@ -288,7 +288,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
288
288
|
newMqa.audioTransmit[1].streams.push(audioSenderStream);
|
|
289
289
|
|
|
290
290
|
this.lastMqaDataSent[mediaType].send = cloneDeep(this.statsResults[mediaType].send);
|
|
291
|
-
} else if (mediaType.
|
|
291
|
+
} else if (mediaType.startsWith('audio-recv')) {
|
|
292
292
|
const audioReceiverStream = cloneDeep(emptyAudioReceiveStream);
|
|
293
293
|
|
|
294
294
|
getAudioReceiverStreamMqa({
|
|
@@ -300,7 +300,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
300
300
|
newMqa.audioReceive[0].streams.push(audioReceiverStream);
|
|
301
301
|
|
|
302
302
|
this.lastMqaDataSent[mediaType].recv = cloneDeep(this.statsResults[mediaType].recv);
|
|
303
|
-
} else if (mediaType.
|
|
303
|
+
} else if (mediaType.startsWith('audio-share-recv')) {
|
|
304
304
|
const audioReceiverStream = cloneDeep(emptyAudioReceiveStream);
|
|
305
305
|
|
|
306
306
|
getAudioReceiverStreamMqa({
|
|
@@ -312,7 +312,8 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
312
312
|
newMqa.audioReceive[1].streams.push(audioReceiverStream);
|
|
313
313
|
|
|
314
314
|
this.lastMqaDataSent[mediaType].recv = cloneDeep(this.statsResults[mediaType].recv);
|
|
315
|
-
} else if (mediaType.
|
|
315
|
+
} else if (mediaType.startsWith('video-send-layer')) {
|
|
316
|
+
// We only want the stream-specific stats we get with video-send-layer-0, video-send-layer-1, etc.
|
|
316
317
|
const videoSenderStream = cloneDeep(emptyVideoTransmitStream);
|
|
317
318
|
|
|
318
319
|
getVideoSenderStreamMqa({
|
|
@@ -324,7 +325,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
324
325
|
newMqa.videoTransmit[0].streams.push(videoSenderStream);
|
|
325
326
|
|
|
326
327
|
this.lastMqaDataSent[mediaType].send = cloneDeep(this.statsResults[mediaType].send);
|
|
327
|
-
} else if (mediaType.
|
|
328
|
+
} else if (mediaType.startsWith('video-share-send')) {
|
|
328
329
|
const videoSenderStream = cloneDeep(emptyVideoTransmitStream);
|
|
329
330
|
|
|
330
331
|
getVideoSenderStreamMqa({
|
|
@@ -336,7 +337,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
336
337
|
newMqa.videoTransmit[1].streams.push(videoSenderStream);
|
|
337
338
|
|
|
338
339
|
this.lastMqaDataSent[mediaType].send = cloneDeep(this.statsResults[mediaType].send);
|
|
339
|
-
} else if (mediaType.
|
|
340
|
+
} else if (mediaType.startsWith('video-recv')) {
|
|
340
341
|
const videoReceiverStream = cloneDeep(emptyVideoReceiveStream);
|
|
341
342
|
|
|
342
343
|
getVideoReceiverStreamMqa({
|
|
@@ -348,7 +349,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
348
349
|
newMqa.videoReceive[0].streams.push(videoReceiverStream);
|
|
349
350
|
|
|
350
351
|
this.lastMqaDataSent[mediaType].recv = cloneDeep(this.statsResults[mediaType].recv);
|
|
351
|
-
} else if (mediaType.
|
|
352
|
+
} else if (mediaType.startsWith('video-share-recv')) {
|
|
352
353
|
const videoReceiverStream = cloneDeep(emptyVideoReceiveStream);
|
|
353
354
|
|
|
354
355
|
getVideoReceiverStreamMqa({
|
|
@@ -373,9 +374,14 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
373
374
|
name: MEDIA_DEVICES.MICROPHONE,
|
|
374
375
|
});
|
|
375
376
|
}
|
|
376
|
-
|
|
377
|
+
|
|
378
|
+
const existingVideoSender = Object.keys(this.statsResults).find((item) =>
|
|
379
|
+
item.includes('video-send')
|
|
380
|
+
);
|
|
381
|
+
|
|
382
|
+
if (existingVideoSender) {
|
|
377
383
|
newMqa.intervalMetadata.peripherals.push({
|
|
378
|
-
information: this.statsResults[
|
|
384
|
+
information: this.statsResults[existingVideoSender].trackLabel || _UNKNOWN_,
|
|
379
385
|
name: MEDIA_DEVICES.CAMERA,
|
|
380
386
|
});
|
|
381
387
|
}
|
|
@@ -552,9 +558,21 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
552
558
|
}
|
|
553
559
|
});
|
|
554
560
|
|
|
561
|
+
let videoSenderIndex = 0;
|
|
555
562
|
statsItem.report.forEach((result) => {
|
|
556
563
|
if (types.includes(result.type)) {
|
|
557
|
-
|
|
564
|
+
// if the video sender has multiple streams in the report, it is a new stream object.
|
|
565
|
+
if (type === 'video-send' && result.type === 'outbound-rtp') {
|
|
566
|
+
const newType = `video-send-layer-${videoSenderIndex}`;
|
|
567
|
+
this.parseGetStatsResult(result, newType, isSender);
|
|
568
|
+
videoSenderIndex += 1;
|
|
569
|
+
|
|
570
|
+
this.statsResults[newType].direction = statsItem.currentDirection;
|
|
571
|
+
this.statsResults[newType].trackLabel = statsItem.localTrackLabel;
|
|
572
|
+
this.statsResults[newType].csi = statsItem.csi;
|
|
573
|
+
} else {
|
|
574
|
+
this.parseGetStatsResult(result, type, isSender);
|
|
575
|
+
}
|
|
558
576
|
}
|
|
559
577
|
});
|
|
560
578
|
|
|
@@ -664,12 +682,23 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
664
682
|
const getCurrentStatsTotals = (keyPrefix: string, value: string): number =>
|
|
665
683
|
Object.keys(this.statsResults)
|
|
666
684
|
.filter((key) => key.startsWith(keyPrefix))
|
|
667
|
-
.reduce(
|
|
685
|
+
.reduce(
|
|
686
|
+
(prev, cur) =>
|
|
687
|
+
prev +
|
|
688
|
+
(this.statsResults[cur]?.[keyPrefix.includes('send') ? 'send' : 'recv'][value] || 0),
|
|
689
|
+
0
|
|
690
|
+
);
|
|
668
691
|
|
|
669
692
|
const getPreviousStatsTotals = (keyPrefix: string, value: string): number =>
|
|
670
693
|
Object.keys(this.statsResults)
|
|
671
694
|
.filter((key) => key.startsWith(keyPrefix))
|
|
672
|
-
.reduce(
|
|
695
|
+
.reduce(
|
|
696
|
+
(prev, cur) =>
|
|
697
|
+
prev +
|
|
698
|
+
(this.lastStatsResults[cur]?.[keyPrefix.includes('send') ? 'send' : 'recv'][value] ||
|
|
699
|
+
0),
|
|
700
|
+
0
|
|
701
|
+
);
|
|
673
702
|
|
|
674
703
|
// Audio Transmit
|
|
675
704
|
if (this.lastStatsResults['audio-send']) {
|
|
@@ -731,47 +760,54 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
731
760
|
false
|
|
732
761
|
);
|
|
733
762
|
|
|
763
|
+
const currentTotalPacketsSent = getCurrentStatsTotals('video-send', 'totalPacketsSent');
|
|
764
|
+
const previousTotalPacketsSent = getPreviousStatsTotals('video-send', 'totalPacketsSent');
|
|
765
|
+
|
|
766
|
+
const currentFramesEncoded = getCurrentStatsTotals('video-send', 'framesEncoded');
|
|
767
|
+
const previousFramesEncoded = getPreviousStatsTotals('video-send', 'framesEncoded');
|
|
768
|
+
|
|
769
|
+
const currentFramesSent = getCurrentStatsTotals('video-send', 'framesSent');
|
|
770
|
+
const previousFramesSent = getPreviousStatsTotals('video-send', 'framesSent');
|
|
771
|
+
|
|
772
|
+
const doesVideoSendExist = Object.keys(this.lastStatsResults).some((item) =>
|
|
773
|
+
item.includes('video-send')
|
|
774
|
+
);
|
|
775
|
+
|
|
734
776
|
// Video Transmit
|
|
735
|
-
if (
|
|
777
|
+
if (doesVideoSendExist) {
|
|
736
778
|
// compare video stats sent
|
|
737
|
-
const currentStats = this.statsResults['video-send'].send;
|
|
738
|
-
const previousStats = this.lastStatsResults['video-send'].send;
|
|
739
779
|
|
|
740
780
|
if (
|
|
741
781
|
this.meetingMediaStatus.expected.sendVideo &&
|
|
742
|
-
(
|
|
743
|
-
currentStats.totalPacketsSent === 0)
|
|
782
|
+
(currentTotalPacketsSent === previousTotalPacketsSent || currentTotalPacketsSent === 0)
|
|
744
783
|
) {
|
|
745
784
|
LoggerProxy.logger.info(
|
|
746
785
|
`StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets sent`,
|
|
747
|
-
|
|
786
|
+
currentTotalPacketsSent
|
|
748
787
|
);
|
|
749
788
|
} else {
|
|
750
789
|
if (
|
|
751
790
|
this.meetingMediaStatus.expected.sendVideo &&
|
|
752
|
-
(
|
|
753
|
-
currentStats.framesEncoded === 0)
|
|
791
|
+
(currentFramesEncoded === previousFramesEncoded || currentFramesEncoded === 0)
|
|
754
792
|
) {
|
|
755
793
|
LoggerProxy.logger.info(
|
|
756
794
|
`StatsAnalyzer:index#compareLastStatsResult --> No video Frames Encoded`,
|
|
757
|
-
|
|
795
|
+
currentFramesEncoded
|
|
758
796
|
);
|
|
759
797
|
}
|
|
760
798
|
|
|
761
799
|
if (
|
|
762
800
|
this.meetingMediaStatus.expected.sendVideo &&
|
|
763
|
-
(
|
|
764
|
-
this.lastStatsResults['video-send'].send.framesSent ||
|
|
765
|
-
this.statsResults['video-send'].send.framesSent === 0)
|
|
801
|
+
(currentFramesSent === previousFramesSent || currentFramesSent === 0)
|
|
766
802
|
) {
|
|
767
803
|
LoggerProxy.logger.info(
|
|
768
804
|
`StatsAnalyzer:index#compareLastStatsResult --> No video Frames sent`,
|
|
769
|
-
|
|
805
|
+
currentFramesSent
|
|
770
806
|
);
|
|
771
807
|
}
|
|
772
808
|
}
|
|
773
809
|
|
|
774
|
-
this.emitStartStopEvents('video',
|
|
810
|
+
this.emitStartStopEvents('video', previousFramesSent, currentFramesSent, true);
|
|
775
811
|
}
|
|
776
812
|
|
|
777
813
|
// Video Receive
|
|
@@ -432,11 +432,11 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
432
432
|
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
433
433
|
]);
|
|
434
434
|
|
|
435
|
-
localStreams.alice.microphone.
|
|
435
|
+
localStreams.alice.microphone.setUserMuted(true);
|
|
436
436
|
|
|
437
437
|
await membersUpdate;
|
|
438
438
|
|
|
439
|
-
assert.equal(localStreams.alice.microphone.
|
|
439
|
+
assert.equal(localStreams.alice.microphone.userMuted, true);
|
|
440
440
|
});
|
|
441
441
|
|
|
442
442
|
it('alice Audio unMute ', async () => {
|
|
@@ -451,11 +451,11 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
451
451
|
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
452
452
|
]);
|
|
453
453
|
|
|
454
|
-
localStreams.alice.microphone.
|
|
454
|
+
localStreams.alice.microphone.setUserMuted(false);
|
|
455
455
|
|
|
456
456
|
await membersUpdate;
|
|
457
457
|
|
|
458
|
-
assert.equal(localStreams.alice.microphone.
|
|
458
|
+
assert.equal(localStreams.alice.microphone.userMuted, false);
|
|
459
459
|
});
|
|
460
460
|
|
|
461
461
|
it('alice video mute', async () => {
|
|
@@ -470,11 +470,11 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
470
470
|
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
471
471
|
]);
|
|
472
472
|
|
|
473
|
-
localStreams.alice.camera.
|
|
473
|
+
localStreams.alice.camera.setUserMuted(true);
|
|
474
474
|
|
|
475
475
|
await membersUpdate;
|
|
476
476
|
|
|
477
|
-
assert.equal(localStreams.alice.camera.
|
|
477
|
+
assert.equal(localStreams.alice.camera.userMuted, true);
|
|
478
478
|
});
|
|
479
479
|
|
|
480
480
|
it('alice video unmute', async () => {
|
|
@@ -489,11 +489,11 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
489
489
|
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
490
490
|
]);
|
|
491
491
|
|
|
492
|
-
localStreams.alice.camera.
|
|
492
|
+
localStreams.alice.camera.setUserMuted(false);
|
|
493
493
|
|
|
494
494
|
await membersUpdate;
|
|
495
495
|
|
|
496
|
-
assert.equal(localStreams.alice.camera.
|
|
496
|
+
assert.equal(localStreams.alice.camera.userMuted, false);
|
|
497
497
|
});
|
|
498
498
|
|
|
499
499
|
it('alice update Audio', async () => {
|
|
@@ -574,11 +574,11 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
574
574
|
]);
|
|
575
575
|
|
|
576
576
|
// first bob mutes himself
|
|
577
|
-
localStreams.bob.microphone.
|
|
577
|
+
localStreams.bob.microphone.setUserMuted(true);
|
|
578
578
|
|
|
579
579
|
await membersUpdate;
|
|
580
580
|
|
|
581
|
-
assert.equal(localStreams.bob.microphone.
|
|
581
|
+
assert.equal(localStreams.bob.microphone.userMuted, true);
|
|
582
582
|
|
|
583
583
|
// now alice tries to unmmute bob
|
|
584
584
|
await testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, false))
|
|
@@ -593,7 +593,7 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
593
593
|
assert.fail('bob received unexpected meeting:self:unmutedByOthers event');
|
|
594
594
|
})
|
|
595
595
|
.catch(() => {
|
|
596
|
-
assert.equal(localStreams.bob.microphone.
|
|
596
|
+
assert.equal(localStreams.bob.microphone.userMuted, true);
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
599
|
|
|
@@ -607,11 +607,11 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
607
607
|
{scope: alice.meeting.members, event: 'members:update', match: checkEvent},
|
|
608
608
|
]);
|
|
609
609
|
|
|
610
|
-
localStreams.bob.microphone.
|
|
610
|
+
localStreams.bob.microphone.setUserMuted(false);
|
|
611
611
|
|
|
612
612
|
await membersUpdate;
|
|
613
613
|
|
|
614
|
-
assert.equal(localStreams.bob.microphone.
|
|
614
|
+
assert.equal(localStreams.bob.microphone.userMuted, false);
|
|
615
615
|
});
|
|
616
616
|
|
|
617
617
|
it('alice shares the screen with highFrameRate', async () => {
|
|
@@ -871,7 +871,7 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
871
871
|
assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
|
|
872
872
|
}));
|
|
873
873
|
|
|
874
|
-
it('alice adds chris as guest to 1:1 meeting',
|
|
874
|
+
it('alice adds chris as guest to 1:1 meeting', () =>
|
|
875
875
|
Promise.all([
|
|
876
876
|
testUtils.delayedPromise(alice.meeting.invite({emailAddress: chris.emailAddress})),
|
|
877
877
|
testUtils.waitForEvents([
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {assert, expect} from '@webex/test-helper-chai';
|
|
2
2
|
import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
|
|
3
3
|
import SimultaneousInterpretation from '@webex/plugin-meetings/src/interpretation';
|
|
4
|
+
import SILanguage from '@webex/plugin-meetings/src/interpretation/siLanguage';
|
|
4
5
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
5
6
|
import sinon from 'sinon';
|
|
6
7
|
|
|
@@ -123,22 +124,57 @@ describe('plugin-meetings', () => {
|
|
|
123
124
|
receiveLanguage: 'en',
|
|
124
125
|
order: 0,
|
|
125
126
|
}, selfParticipantId: '123'};
|
|
126
|
-
interpretation.updateSelfInterpretation(sampleData);
|
|
127
|
+
assert.equal(interpretation.updateSelfInterpretation(sampleData), true);
|
|
127
128
|
assert.equal(interpretation.originalLanguage, 'en');
|
|
128
129
|
assert.equal(interpretation.sourceLanguage, 'en');
|
|
129
130
|
assert.equal(interpretation.targetLanguage, 'zh');
|
|
130
131
|
assert.equal(interpretation.receiveLanguage, 'en');
|
|
131
132
|
assert.equal(interpretation.isActive, true);
|
|
132
133
|
assert.equal(interpretation.order, 0);
|
|
134
|
+
assert.equal(interpretation.selfIsInterpreter, true);
|
|
133
135
|
|
|
134
136
|
sampleData.interpretation = {
|
|
135
137
|
originalLanguage: 'en',
|
|
138
|
+
targetLanguage: 'zh',
|
|
136
139
|
order: 0,
|
|
137
140
|
};
|
|
138
|
-
interpretation.updateSelfInterpretation(sampleData);
|
|
141
|
+
assert.equal(interpretation.updateSelfInterpretation(sampleData), false);
|
|
139
142
|
assert.equal(interpretation.sourceLanguage, undefined);
|
|
140
|
-
assert.equal(interpretation.targetLanguage,
|
|
143
|
+
assert.equal(interpretation.targetLanguage, 'zh');
|
|
141
144
|
assert.equal(interpretation.receiveLanguage, undefined);
|
|
145
|
+
assert.equal(interpretation.selfIsInterpreter, true);
|
|
146
|
+
|
|
147
|
+
sampleData.interpretation = {
|
|
148
|
+
order: 0,
|
|
149
|
+
};
|
|
150
|
+
assert.equal(interpretation.updateSelfInterpretation(sampleData), true);
|
|
151
|
+
assert.equal(interpretation.originalLanguage, undefined);
|
|
152
|
+
assert.equal(interpretation.targetLanguage, undefined);
|
|
153
|
+
assert.equal(interpretation.selfIsInterpreter, false);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
describe('#getTargetLanguageCode', () => {
|
|
158
|
+
it('get target language id if self is interpreter', () => {
|
|
159
|
+
interpretation.siLanguages.set([{
|
|
160
|
+
languageCode: 24,
|
|
161
|
+
languageName: "fr"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
languageCode: 20,
|
|
165
|
+
languageName: "en"
|
|
166
|
+
}]);
|
|
167
|
+
interpretation.selfIsInterpreter = true;
|
|
168
|
+
interpretation.targetLanguage = 'fr';
|
|
169
|
+
|
|
170
|
+
assert.equal(interpretation.getTargetLanguageCode(), 24);
|
|
171
|
+
|
|
172
|
+
interpretation.targetLanguage = 'en';
|
|
173
|
+
assert.equal(interpretation.getTargetLanguageCode(), 20);
|
|
174
|
+
|
|
175
|
+
interpretation.selfIsInterpreter = false;
|
|
176
|
+
assert.equal(interpretation.getTargetLanguageCode(), 0);
|
|
177
|
+
|
|
142
178
|
});
|
|
143
179
|
});
|
|
144
180
|
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
_MEETING_,
|
|
25
25
|
} from '../../../../src/constants';
|
|
26
26
|
|
|
27
|
-
import {self, selfWithInactivity} from './
|
|
27
|
+
import {self, selfWithInactivity} from './selfConstant';
|
|
28
28
|
|
|
29
29
|
describe('plugin-meetings', () => {
|
|
30
30
|
describe('LocusInfo index', () => {
|
|
@@ -1385,7 +1385,7 @@ describe('plugin-meetings', () => {
|
|
|
1385
1385
|
function: 'updateMeetingInfo',
|
|
1386
1386
|
},
|
|
1387
1387
|
LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
|
|
1388
|
-
payload
|
|
1388
|
+
payload,
|
|
1389
1389
|
];
|
|
1390
1390
|
|
|
1391
1391
|
if (expected) {
|
|
@@ -1404,7 +1404,7 @@ describe('plugin-meetings', () => {
|
|
|
1404
1404
|
function: 'updateMeetingInfo',
|
|
1405
1405
|
},
|
|
1406
1406
|
LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
|
|
1407
|
-
payload
|
|
1407
|
+
payload,
|
|
1408
1408
|
];
|
|
1409
1409
|
|
|
1410
1410
|
if (expected) {
|
|
@@ -1426,8 +1426,7 @@ describe('plugin-meetings', () => {
|
|
|
1426
1426
|
*/
|
|
1427
1427
|
sinon.stub(locusInfo, 'emitScoped').callsFake(() => {
|
|
1428
1428
|
assert.deepEqual(mockMeeting, expectedMeeting);
|
|
1429
|
-
})
|
|
1430
|
-
|
|
1429
|
+
});
|
|
1431
1430
|
|
|
1432
1431
|
// set the info initially as locusInfo.info starts as undefined
|
|
1433
1432
|
expectedMeeting = {
|
|
@@ -1907,7 +1906,7 @@ describe('plugin-meetings', () => {
|
|
|
1907
1906
|
locusInfo.locusParser.workingCopy = {
|
|
1908
1907
|
syncUrl: 'current sync url',
|
|
1909
1908
|
};
|
|
1910
|
-
|
|
1909
|
+
|
|
1911
1910
|
locusInfo.applyLocusDeltaData(LOCUS_URL_CHANGED, fakeLocus, meeting);
|
|
1912
1911
|
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'current sync url'});
|
|
1913
1912
|
});
|
|
@@ -1970,8 +1969,12 @@ describe('plugin-meetings', () => {
|
|
|
1970
1969
|
}).then(() => {
|
|
1971
1970
|
assert.calledTwice(meeting.meetingRequest.getLocusDTO);
|
|
1972
1971
|
|
|
1973
|
-
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [
|
|
1974
|
-
|
|
1972
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [
|
|
1973
|
+
{url: 'deltaSyncUrl'},
|
|
1974
|
+
]);
|
|
1975
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [
|
|
1976
|
+
{url: 'fullSyncUrl'},
|
|
1977
|
+
]);
|
|
1975
1978
|
|
|
1976
1979
|
assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
|
|
1977
1980
|
correlationId: meeting.correlationId,
|
|
@@ -1999,8 +2002,12 @@ describe('plugin-meetings', () => {
|
|
|
1999
2002
|
}).then(() => {
|
|
2000
2003
|
assert.calledTwice(meeting.meetingRequest.getLocusDTO);
|
|
2001
2004
|
|
|
2002
|
-
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [
|
|
2003
|
-
|
|
2005
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [
|
|
2006
|
+
{url: 'deltaSyncUrl'},
|
|
2007
|
+
]);
|
|
2008
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [
|
|
2009
|
+
{url: 'fullSyncUrl'},
|
|
2010
|
+
]);
|
|
2004
2011
|
|
|
2005
2012
|
assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
|
|
2006
2013
|
correlationId: meeting.correlationId,
|
|
@@ -2084,7 +2091,7 @@ describe('plugin-meetings', () => {
|
|
|
2084
2091
|
|
|
2085
2092
|
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2086
2093
|
locusInfo.getTheLocusToUpdate(newLocus);
|
|
2087
|
-
assert.notCalled(locusInfo.clearMainSessionLocusCache)
|
|
2094
|
+
assert.notCalled(locusInfo.clearMainSessionLocusCache);
|
|
2088
2095
|
});
|
|
2089
2096
|
|
|
2090
2097
|
it('return the new locus if return to main session but no cache and do not clear main session cache', () => {
|
|
@@ -2106,7 +2113,7 @@ describe('plugin-meetings', () => {
|
|
|
2106
2113
|
|
|
2107
2114
|
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2108
2115
|
locusInfo.getTheLocusToUpdate(newLocus);
|
|
2109
|
-
assert.notCalled(locusInfo.clearMainSessionLocusCache)
|
|
2116
|
+
assert.notCalled(locusInfo.clearMainSessionLocusCache);
|
|
2110
2117
|
});
|
|
2111
2118
|
|
|
2112
2119
|
it('return the new locus if not return to main session and clear main session cache', () => {
|
|
@@ -2116,9 +2123,9 @@ describe('plugin-meetings', () => {
|
|
|
2116
2123
|
sessionType: 'MAIN',
|
|
2117
2124
|
},
|
|
2118
2125
|
},
|
|
2119
|
-
self: {removed: true}
|
|
2126
|
+
self: {removed: true},
|
|
2120
2127
|
};
|
|
2121
|
-
locusInfo.fullState = {state: 'ACTIVE'}
|
|
2128
|
+
locusInfo.fullState = {state: 'ACTIVE'};
|
|
2122
2129
|
locusInfo.controls = {
|
|
2123
2130
|
breakout: {
|
|
2124
2131
|
sessionType: 'MAIN',
|
|
@@ -2134,7 +2141,7 @@ describe('plugin-meetings', () => {
|
|
|
2134
2141
|
|
|
2135
2142
|
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2136
2143
|
const result = locusInfo.getTheLocusToUpdate(newLocus);
|
|
2137
|
-
assert.calledOnce(locusInfo.clearMainSessionLocusCache)
|
|
2144
|
+
assert.calledOnce(locusInfo.clearMainSessionLocusCache);
|
|
2138
2145
|
|
|
2139
2146
|
assert.deepEqual(result, newLocus);
|
|
2140
2147
|
});
|
|
@@ -2146,9 +2153,9 @@ describe('plugin-meetings', () => {
|
|
|
2146
2153
|
sessionType: 'MAIN',
|
|
2147
2154
|
},
|
|
2148
2155
|
},
|
|
2149
|
-
self: {removed: undefined}
|
|
2156
|
+
self: {removed: undefined},
|
|
2150
2157
|
};
|
|
2151
|
-
locusInfo.fullState = {state: 'ACTIVE'}
|
|
2158
|
+
locusInfo.fullState = {state: 'ACTIVE'};
|
|
2152
2159
|
locusInfo.controls = {
|
|
2153
2160
|
breakout: {
|
|
2154
2161
|
sessionType: 'MAIN',
|
|
@@ -2164,7 +2171,7 @@ describe('plugin-meetings', () => {
|
|
|
2164
2171
|
|
|
2165
2172
|
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2166
2173
|
locusInfo.getTheLocusToUpdate(newLocus);
|
|
2167
|
-
assert.notCalled(locusInfo.clearMainSessionLocusCache)
|
|
2174
|
+
assert.notCalled(locusInfo.clearMainSessionLocusCache);
|
|
2168
2175
|
});
|
|
2169
2176
|
});
|
|
2170
2177
|
|
|
@@ -2611,7 +2618,9 @@ describe('plugin-meetings', () => {
|
|
|
2611
2618
|
// send an out-of-order delta
|
|
2612
2619
|
locusInfo.handleLocusDelta(oooDelta, mockMeeting);
|
|
2613
2620
|
|
|
2614
|
-
assert.calledOnceWithExactly(sendBehavioralMetricStub, 'js_sdk_locus_delta_ooo', {
|
|
2621
|
+
assert.calledOnceWithExactly(sendBehavioralMetricStub, 'js_sdk_locus_delta_ooo', {
|
|
2622
|
+
stack: sinon.match.any,
|
|
2623
|
+
});
|
|
2615
2624
|
|
|
2616
2625
|
await clock.tickAsync(12499);
|
|
2617
2626
|
await testUtils.flushPromises();
|
|
@@ -20,6 +20,15 @@ describe('getContentUrl', () => {
|
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
describe('getContentResourceType', () => {
|
|
24
|
+
it('getContentResourceType return correct resourceType value', () => {
|
|
25
|
+
const stub = Sinon.stub(MediaSharesUtils, 'extractContent').returns({resourceType:'resourceType'});
|
|
26
|
+
const resourceType = MediaSharesUtils.getContentResourceType();
|
|
27
|
+
assert.equal(resourceType,'resourceType');
|
|
28
|
+
stub.restore();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
23
32
|
describe('getContentBeneficiaryDeviceUrl', () => {
|
|
24
33
|
it('getContentBeneficiaryDeviceUrl return correct deviceUrl value', () => {
|
|
25
34
|
const mockContentBeneficiaryDeviceUrl = "https://wdm-a.wbx2.com/wdm/api/v1/devices/e9ffd8a1-1fae-42d1-afbe-013e951f93ab"
|
|
@@ -3,7 +3,7 @@ import Sinon from 'sinon';
|
|
|
3
3
|
import {cloneDeep} from 'lodash';
|
|
4
4
|
import SelfUtils from '@webex/plugin-meetings/src/locus-info/selfUtils';
|
|
5
5
|
|
|
6
|
-
import {self} from './
|
|
6
|
+
import {self} from './selfConstant';
|
|
7
7
|
|
|
8
8
|
describe('plugin-meetings', () => {
|
|
9
9
|
describe('selfUtils', () => {
|
|
@@ -150,8 +150,7 @@ describe('plugin-meetings', () => {
|
|
|
150
150
|
|
|
151
151
|
it('should return false if no breakouts in current', () => {
|
|
152
152
|
const current = {
|
|
153
|
-
breakoutSessions: {
|
|
154
|
-
},
|
|
153
|
+
breakoutSessions: {},
|
|
155
154
|
};
|
|
156
155
|
const previous = {
|
|
157
156
|
breakoutSessions: {
|
|
@@ -293,7 +292,7 @@ describe('plugin-meetings', () => {
|
|
|
293
292
|
const clonedSelf = cloneDeep(self);
|
|
294
293
|
|
|
295
294
|
clonedSelf.controls.audio.requestedToUnmute = true;
|
|
296
|
-
clonedSelf.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z'
|
|
295
|
+
clonedSelf.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z';
|
|
297
296
|
|
|
298
297
|
const {updates} = SelfUtils.getSelves(self, clonedSelf);
|
|
299
298
|
|
|
@@ -345,6 +344,41 @@ describe('plugin-meetings', () => {
|
|
|
345
344
|
});
|
|
346
345
|
});
|
|
347
346
|
|
|
347
|
+
describe('mutedByOthersChanged', () => {
|
|
348
|
+
it('throws an error if changedSelf is not provided', function() {
|
|
349
|
+
assert.throws(() => SelfUtils.mutedByOthersChanged({}, null), 'New self must be defined to determine if self was muted by others.');
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
it('return false when oldSelf is not defined', function() {
|
|
353
|
+
assert.equal(SelfUtils.mutedByOthersChanged(null, { remoteMuted: false }), false);
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
it('should return true when remoteMuted is true on entry', function() {
|
|
357
|
+
assert.equal(SelfUtils.mutedByOthersChanged(null, { remoteMuted: true }), true);
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
it('should return false when selfIdentity and modifiedBy are the same', function() {
|
|
361
|
+
assert.equal(SelfUtils.mutedByOthersChanged(
|
|
362
|
+
{ remoteMuted: false },
|
|
363
|
+
{ remoteMuted: true, selfIdentity: 'user1', modifiedBy: 'user1' }
|
|
364
|
+
), false);
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
it('should return true when remoteMuted values are different', function() {
|
|
368
|
+
assert.equal(SelfUtils.mutedByOthersChanged(
|
|
369
|
+
{ remoteMuted: false },
|
|
370
|
+
{ remoteMuted: true, selfIdentity: 'user1', modifiedBy: 'user2' }
|
|
371
|
+
), true);
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
it('should return true when remoteMuted is true and unmuteAllowed has changed', function() {
|
|
375
|
+
assert.equal(SelfUtils.mutedByOthersChanged(
|
|
376
|
+
{ remoteMuted: true, unmuteAllowed: false },
|
|
377
|
+
{ remoteMuted: true, unmuteAllowed: true, selfIdentity: 'user1', modifiedBy: 'user2' }
|
|
378
|
+
), true);
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
|
|
348
382
|
describe('videoMutedByOthersChanged', () => {
|
|
349
383
|
it('returns true if changed', () => {
|
|
350
384
|
assert.equal(
|
|
@@ -371,23 +405,18 @@ describe('plugin-meetings', () => {
|
|
|
371
405
|
const clonedSelf = cloneDeep(self);
|
|
372
406
|
|
|
373
407
|
it('get breakoutMoveId works', () => {
|
|
374
|
-
|
|
375
408
|
assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(self, deviceId), breakoutMoveId);
|
|
376
|
-
|
|
377
409
|
});
|
|
378
410
|
|
|
379
411
|
it('replaces is empty', () => {
|
|
380
|
-
|
|
381
412
|
clonedSelf.devices[0].replaces = undefined;
|
|
382
413
|
assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(clonedSelf, deviceId), null);
|
|
383
|
-
|
|
384
414
|
});
|
|
385
415
|
|
|
386
416
|
it('no self or self.devices is not array', () => {
|
|
387
|
-
|
|
388
417
|
assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(undefined, deviceId), null);
|
|
389
418
|
|
|
390
|
-
clonedSelf.devices =
|
|
419
|
+
clonedSelf.devices = {
|
|
391
420
|
url: 'https://wdm-a.wbx2.com/wdm/api/v1/devices/20eabde3-4254-48da-9a24',
|
|
392
421
|
deviceType: 'WEB',
|
|
393
422
|
mediaSessionsExternal: false,
|
|
@@ -395,10 +424,11 @@ describe('plugin-meetings', () => {
|
|
|
395
424
|
{
|
|
396
425
|
breakoutMoveId: 'e5caeb2c-ffcc-4e06-a08a-1122e7710398',
|
|
397
426
|
lastActive: '2023-05-04T07:14:32.068Z',
|
|
398
|
-
locusUrl:
|
|
427
|
+
locusUrl:
|
|
428
|
+
'https://locus-alpha-apdx.prod.meetapi.webex.com/locus/api/v1/loci/495061ca-7b3c-3b77-85ff-4e1bd58600d1',
|
|
399
429
|
replacedAt: '2023-05-04T07:16:04.905Z',
|
|
400
430
|
sessionId: 'be3147d4-c318-86d8-7611-8d24beaaca8d',
|
|
401
|
-
}
|
|
431
|
+
},
|
|
402
432
|
],
|
|
403
433
|
state: 'JOINED',
|
|
404
434
|
};
|