@webex/plugin-meetings 2.59.5 → 2.59.6-next.2
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/common/browser-detection.js +2 -2
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +2 -2
- package/dist/common/collection.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +2 -2
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +6 -6
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +18 -18
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +2 -2
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/meeting/index.js +173 -167
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +2 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +4 -4
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +2 -2
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +7 -1
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/collection.js +2 -2
- package/dist/meetings/collection.js.map +1 -1
- package/dist/members/index.js +2 -2
- package/dist/members/index.js.map +1 -1
- package/dist/metrics/constants.js +0 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +2 -2
- package/dist/metrics/index.js.map +1 -1
- package/dist/reachability/index.js +9 -2
- package/dist/reachability/index.js.map +1 -1
- package/dist/roap/index.js +12 -13
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +44 -130
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +12 -4
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +14 -56
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +15 -15
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/package.json +22 -21
- package/src/config.ts +2 -2
- package/src/constants.ts +0 -2
- package/src/meeting/index.ts +23 -47
- package/src/meeting-info/meeting-info-v2.ts +1 -1
- package/src/metrics/constants.ts +0 -2
- package/src/roap/index.ts +10 -14
- package/src/roap/turnDiscovery.ts +20 -48
- package/src/statsAnalyzer/global.ts +10 -2
- package/src/statsAnalyzer/index.ts +17 -80
- package/test/unit/spec/meeting/index.js +53 -83
- package/test/unit/spec/meeting-info/meetinginfov2.js +1 -1
- package/test/unit/spec/roap/index.ts +80 -84
- package/test/unit/spec/roap/turnDiscovery.ts +0 -21
- package/test/unit/spec/stats-analyzer/index.js +0 -151
- package/dist/common/browser-detection.d.ts +0 -9
- package/dist/common/collection.d.ts +0 -48
- package/dist/common/config.d.ts +0 -2
- package/dist/common/errors/captcha-error.d.ts +0 -15
- package/dist/common/errors/intent-to-join.d.ts +0 -16
- package/dist/common/errors/join-meeting.d.ts +0 -17
- package/dist/common/errors/media.d.ts +0 -15
- package/dist/common/errors/parameter.d.ts +0 -15
- package/dist/common/errors/password-error.d.ts +0 -15
- package/dist/common/errors/permission.d.ts +0 -14
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection.d.ts +0 -15
- package/dist/common/errors/stats.d.ts +0 -15
- package/dist/common/errors/webex-errors.d.ts +0 -81
- package/dist/common/errors/webex-meetings-error.d.ts +0 -20
- package/dist/common/events/events-scope.d.ts +0 -17
- package/dist/common/events/events.d.ts +0 -12
- package/dist/common/events/trigger-proxy.d.ts +0 -2
- package/dist/common/events/util.d.ts +0 -2
- package/dist/common/logs/logger-config.d.ts +0 -2
- package/dist/common/logs/logger-proxy.d.ts +0 -2
- package/dist/common/logs/request.d.ts +0 -34
- package/dist/common/queue.d.ts +0 -32
- package/dist/config.d.ts +0 -73
- package/dist/constants.d.ts +0 -926
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -5
- package/dist/controls-options-manager/index.d.ts +0 -120
- package/dist/controls-options-manager/util.d.ts +0 -7
- package/dist/index.d.ts +0 -4
- package/dist/locus-info/controlsUtils.d.ts +0 -2
- package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
- package/dist/locus-info/fullState.d.ts +0 -2
- package/dist/locus-info/hostUtils.d.ts +0 -2
- package/dist/locus-info/index.d.ts +0 -269
- package/dist/locus-info/infoUtils.d.ts +0 -2
- package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
- package/dist/locus-info/parser.d.ts +0 -212
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -32
- package/dist/media/properties.d.ts +0 -108
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -233
- package/dist/meeting/effectsState.d.ts +0 -42
- package/dist/meeting/in-meeting-actions.d.ts +0 -79
- package/dist/meeting/index.d.ts +0 -1621
- package/dist/meeting/muteState.d.ts +0 -116
- package/dist/meeting/request.d.ts +0 -255
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -2
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -57
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -93
- package/dist/meeting-info/request.d.ts +0 -22
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/meetings/collection.d.ts +0 -23
- package/dist/meetings/index.d.ts +0 -296
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -147
- package/dist/member/member.types.d.ts +0 -11
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -24
- package/dist/members/index.d.ts +0 -298
- package/dist/members/request.d.ts +0 -50
- package/dist/members/util.d.ts +0 -2
- package/dist/metrics/config.d.ts +0 -169
- package/dist/metrics/constants.d.ts +0 -59
- package/dist/metrics/index.d.ts +0 -152
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/peer-connection-manager/index.d.ts +0 -6
- package/dist/peer-connection-manager/util.d.ts +0 -6
- package/dist/personal-meeting-room/index.d.ts +0 -47
- package/dist/personal-meeting-room/request.d.ts +0 -14
- package/dist/personal-meeting-room/util.d.ts +0 -2
- package/dist/reachability/index.d.ts +0 -139
- package/dist/reachability/request.d.ts +0 -35
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -32
- package/dist/reconnection-manager/index.d.ts +0 -112
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -193
- package/dist/recording-controller/util.d.ts +0 -13
- package/dist/roap/collection.d.ts +0 -10
- package/dist/roap/handler.d.ts +0 -47
- package/dist/roap/index.d.ts +0 -116
- package/dist/roap/request.d.ts +0 -35
- package/dist/roap/state.d.ts +0 -9
- package/dist/roap/turnDiscovery.d.ts +0 -81
- package/dist/roap/util.d.ts +0 -2
- package/dist/statsAnalyzer/global.d.ts +0 -118
- package/dist/statsAnalyzer/index.d.ts +0 -193
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -22
- package/dist/transcription/index.d.ts +0 -64
|
@@ -25,8 +25,6 @@ import {
|
|
|
25
25
|
|
|
26
26
|
export const EVENTS = {
|
|
27
27
|
MEDIA_QUALITY: 'MEDIA_QUALITY',
|
|
28
|
-
NO_FRAMES_SENT: 'NO_FRAMES_SENT',
|
|
29
|
-
NO_VIDEO_ENCODED: 'NO_VIDEO_ENCODED',
|
|
30
28
|
LOCAL_MEDIA_STARTED: 'LOCAL_MEDIA_STARTED',
|
|
31
29
|
LOCAL_MEDIA_STOPPED: 'LOCAL_MEDIA_STOPPED',
|
|
32
30
|
REMOTE_MEDIA_STARTED: 'REMOTE_MEDIA_STARTED',
|
|
@@ -422,6 +420,9 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
422
420
|
case 'inbound-rtp':
|
|
423
421
|
this.processInboundRTPResult(getStatsResult, type);
|
|
424
422
|
break;
|
|
423
|
+
case 'track':
|
|
424
|
+
this.processTrackResult(getStatsResult, type);
|
|
425
|
+
break;
|
|
425
426
|
case 'remote-inbound-rtp':
|
|
426
427
|
case 'remote-outbound-rtp':
|
|
427
428
|
// @ts-ignore
|
|
@@ -519,7 +520,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
519
520
|
|
|
520
521
|
if (currentValue - previousValue > 0) {
|
|
521
522
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STARTED : EVENTS.REMOTE_MEDIA_STARTED;
|
|
522
|
-
} else if (currentValue === previousValue && currentValue
|
|
523
|
+
} else if (currentValue === previousValue && currentValue > 0) {
|
|
523
524
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STOPPED : EVENTS.REMOTE_MEDIA_STOPPED;
|
|
524
525
|
}
|
|
525
526
|
|
|
@@ -634,25 +635,14 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
634
635
|
LoggerProxy.logger.info(
|
|
635
636
|
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets sent`
|
|
636
637
|
);
|
|
637
|
-
} else
|
|
638
|
+
} else {
|
|
638
639
|
if (
|
|
639
640
|
currentStats.framesEncoded === previousStats.framesEncoded ||
|
|
640
641
|
currentStats.framesEncoded === 0
|
|
641
642
|
) {
|
|
642
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_VIDEO_ENCODED;
|
|
643
643
|
LoggerProxy.logger.info(
|
|
644
644
|
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} Frames Encoded`
|
|
645
645
|
);
|
|
646
|
-
this.emit(
|
|
647
|
-
{
|
|
648
|
-
file: 'statsAnalyzer',
|
|
649
|
-
function: 'compareLastStatsResult',
|
|
650
|
-
},
|
|
651
|
-
EVENTS.NO_VIDEO_ENCODED,
|
|
652
|
-
{
|
|
653
|
-
mediaType,
|
|
654
|
-
}
|
|
655
|
-
);
|
|
656
646
|
}
|
|
657
647
|
|
|
658
648
|
if (
|
|
@@ -664,28 +654,8 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
664
654
|
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} Frames sent`
|
|
665
655
|
);
|
|
666
656
|
}
|
|
667
|
-
|
|
668
|
-
// Video is encoded but frames are not sent
|
|
669
|
-
if (
|
|
670
|
-
currentStats.framesEncoded !== previousStats.framesEncoded &&
|
|
671
|
-
(currentStats.framesSent === previousStats.framesSent || currentStats.framesSent === 0)
|
|
672
|
-
) {
|
|
673
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_FRAMES_SENT;
|
|
674
|
-
LoggerProxy.logger.info(
|
|
675
|
-
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames sent even though frames are encoded`
|
|
676
|
-
);
|
|
677
|
-
this.emit(
|
|
678
|
-
{
|
|
679
|
-
file: 'statsAnalyzer',
|
|
680
|
-
function: 'compareLastStatsResult',
|
|
681
|
-
},
|
|
682
|
-
EVENTS.NO_FRAMES_SENT,
|
|
683
|
-
{
|
|
684
|
-
mediaType,
|
|
685
|
-
}
|
|
686
|
-
);
|
|
687
|
-
}
|
|
688
657
|
}
|
|
658
|
+
|
|
689
659
|
this.emitStartStopEvents(
|
|
690
660
|
mediaType,
|
|
691
661
|
previousStats.framesSent,
|
|
@@ -761,25 +731,14 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
761
731
|
LoggerProxy.logger.info(
|
|
762
732
|
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets sent`
|
|
763
733
|
);
|
|
764
|
-
} else
|
|
734
|
+
} else {
|
|
765
735
|
if (
|
|
766
736
|
currentStats.framesEncoded === previousStats.framesEncoded ||
|
|
767
737
|
currentStats.framesEncoded === 0
|
|
768
738
|
) {
|
|
769
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_VIDEO_ENCODED;
|
|
770
739
|
LoggerProxy.logger.info(
|
|
771
740
|
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames getting encoded`
|
|
772
741
|
);
|
|
773
|
-
this.emit(
|
|
774
|
-
{
|
|
775
|
-
file: 'statsAnalyzer',
|
|
776
|
-
function: 'compareLastStatsResult',
|
|
777
|
-
},
|
|
778
|
-
EVENTS.NO_VIDEO_ENCODED,
|
|
779
|
-
{
|
|
780
|
-
mediaType,
|
|
781
|
-
}
|
|
782
|
-
);
|
|
783
742
|
}
|
|
784
743
|
|
|
785
744
|
if (
|
|
@@ -791,27 +750,6 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
791
750
|
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames sent`
|
|
792
751
|
);
|
|
793
752
|
}
|
|
794
|
-
|
|
795
|
-
// Share video is encoded but frames are not sent
|
|
796
|
-
if (
|
|
797
|
-
currentStats.framesEncoded !== previousStats.framesEncoded &&
|
|
798
|
-
(currentStats.framesSent === previousStats.framesSent || currentStats.framesSent === 0)
|
|
799
|
-
) {
|
|
800
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_FRAMES_SENT;
|
|
801
|
-
LoggerProxy.logger.info(
|
|
802
|
-
`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} Frames sent even though frames are being encoded`
|
|
803
|
-
);
|
|
804
|
-
this.emit(
|
|
805
|
-
{
|
|
806
|
-
file: 'statsAnalyzer',
|
|
807
|
-
function: 'compareLastStatsResult',
|
|
808
|
-
},
|
|
809
|
-
EVENTS.NO_FRAMES_SENT,
|
|
810
|
-
{
|
|
811
|
-
mediaType,
|
|
812
|
-
}
|
|
813
|
-
);
|
|
814
|
-
}
|
|
815
753
|
}
|
|
816
754
|
|
|
817
755
|
// TODO:need to check receive share value
|
|
@@ -943,7 +881,6 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
943
881
|
const mediaType = type || STATS.AUDIO_CORRELATE;
|
|
944
882
|
const sendrecvType = STATS.SEND_DIRECTION;
|
|
945
883
|
|
|
946
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
947
884
|
if (result.bytesSent) {
|
|
948
885
|
let kilobytes = 0;
|
|
949
886
|
|
|
@@ -967,6 +904,7 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
967
904
|
|
|
968
905
|
this.statsResults[mediaType][sendrecvType].availableBandwidth = kilobytes.toFixed(1);
|
|
969
906
|
this.statsResults[mediaType].bytesSent = kilobytes;
|
|
907
|
+
|
|
970
908
|
this.statsResults[mediaType][sendrecvType].framesEncoded =
|
|
971
909
|
result.framesEncoded - this.statsResults.internal[mediaType][sendrecvType].framesEncoded;
|
|
972
910
|
this.statsResults[mediaType][sendrecvType].keyFramesEncoded =
|
|
@@ -1017,7 +955,6 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
1017
955
|
const mediaType = type || STATS.AUDIO_CORRELATE;
|
|
1018
956
|
const sendrecvType = STATS.RECEIVE_DIRECTION;
|
|
1019
957
|
|
|
1020
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
1021
958
|
if (result.bytesReceived) {
|
|
1022
959
|
let kilobytes = 0;
|
|
1023
960
|
|
|
@@ -1221,29 +1158,29 @@ export class StatsAnalyzer extends EventsScope {
|
|
|
1221
1158
|
* @private
|
|
1222
1159
|
* @param {*} result
|
|
1223
1160
|
* @param {*} mediaType
|
|
1224
|
-
* @param {*} sendrecvType
|
|
1225
1161
|
* @returns {void}
|
|
1226
1162
|
* @memberof StatsAnalyzer
|
|
1227
1163
|
*/
|
|
1228
|
-
private processTrackResult(result: any, mediaType: any
|
|
1229
|
-
if (!result ||
|
|
1230
|
-
return;
|
|
1231
|
-
}
|
|
1232
|
-
if (result.type !== 'inbound-rtp' && result.type !== 'outbound-rtp') {
|
|
1164
|
+
private processTrackResult(result: any, mediaType: any) {
|
|
1165
|
+
if (!result || result.type !== 'track') {
|
|
1233
1166
|
return;
|
|
1234
1167
|
}
|
|
1168
|
+
if (result.type !== 'track') return;
|
|
1169
|
+
|
|
1170
|
+
const sendrecvType =
|
|
1171
|
+
result.remoteSource === true ? STATS.RECEIVE_DIRECTION : STATS.SEND_DIRECTION;
|
|
1172
|
+
|
|
1235
1173
|
if (result.frameWidth && result.frameHeight) {
|
|
1236
1174
|
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
1237
1175
|
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
1176
|
+
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
1177
|
+
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
1238
1178
|
}
|
|
1239
1179
|
|
|
1240
1180
|
if (sendrecvType === STATS.RECEIVE_DIRECTION) {
|
|
1241
1181
|
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
1242
1182
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDecoded = result.framesDecoded;
|
|
1243
1183
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDropped = result.framesDropped;
|
|
1244
|
-
} else if (sendrecvType === STATS.SEND_DIRECTION) {
|
|
1245
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
1246
|
-
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
1247
1184
|
}
|
|
1248
1185
|
|
|
1249
1186
|
if (result.trackIdentifier && mediaType !== STATS.AUDIO_CORRELATE) {
|
|
@@ -770,12 +770,12 @@ describe('plugin-meetings', () => {
|
|
|
770
770
|
assert.equal(meeting.isTranscriptionSupported(), true);
|
|
771
771
|
});
|
|
772
772
|
});
|
|
773
|
-
describe('#
|
|
773
|
+
describe('#startTranscription', () => {
|
|
774
774
|
it('should invoke subscribe method to invoke the callback', () => {
|
|
775
775
|
meeting.monitorTranscriptionSocketConnection = sinon.stub();
|
|
776
776
|
meeting.initializeTranscription = sinon.stub();
|
|
777
777
|
|
|
778
|
-
meeting.
|
|
778
|
+
meeting.startTranscription().then(() => {
|
|
779
779
|
assert.equal(true, false);
|
|
780
780
|
assert.calledOnce(meeting.initializeTranscription);
|
|
781
781
|
assert.calledOnce(meeting.monitorTranscriptionSocketConnection);
|
|
@@ -786,7 +786,7 @@ describe('plugin-meetings', () => {
|
|
|
786
786
|
meeting.request = sinon.stub().returns(Promise.reject());
|
|
787
787
|
|
|
788
788
|
try {
|
|
789
|
-
await meeting.
|
|
789
|
+
await meeting.startTranscription();
|
|
790
790
|
} catch (err) {
|
|
791
791
|
assert(err, {});
|
|
792
792
|
}
|
|
@@ -840,12 +840,12 @@ describe('plugin-meetings', () => {
|
|
|
840
840
|
assert.calledOnce(MeetingUtil.joinMeeting);
|
|
841
841
|
assert.calledOnce(meeting.setLocus);
|
|
842
842
|
});
|
|
843
|
-
it('should invoke `
|
|
843
|
+
it('should invoke `startTranscription()` if receiveTranscription is set to true', async () => {
|
|
844
844
|
meeting.isTranscriptionSupported = sinon.stub().returns(true);
|
|
845
|
-
meeting.
|
|
845
|
+
meeting.startTranscription = sinon.stub().returns(Promise.resolve());
|
|
846
846
|
|
|
847
847
|
await meeting.join({receiveTranscription: true});
|
|
848
|
-
assert.calledOnce(meeting.
|
|
848
|
+
assert.calledOnce(meeting.startTranscription);
|
|
849
849
|
});
|
|
850
850
|
|
|
851
851
|
it('should not create new correlation ID on join immediately after create', async () => {
|
|
@@ -1329,71 +1329,6 @@ describe('plugin-meetings', () => {
|
|
|
1329
1329
|
data: {intervalData: fakeData, networkType: 'wifi'},
|
|
1330
1330
|
});
|
|
1331
1331
|
});
|
|
1332
|
-
it('NO_FRAMES_SENT triggers "meeting:noFramesSent" event and sends metrics', async () => {
|
|
1333
|
-
meeting.mediaProperties.mediaDirection = {sendVideo: true};
|
|
1334
|
-
statsAnalyzerStub.emit(
|
|
1335
|
-
{file: 'test', function: 'test'},
|
|
1336
|
-
StatsAnalyzerModule.EVENTS.NO_FRAMES_SENT,
|
|
1337
|
-
{mediaType: 'video'}
|
|
1338
|
-
);
|
|
1339
|
-
|
|
1340
|
-
assert.calledWith(
|
|
1341
|
-
TriggerProxy.trigger,
|
|
1342
|
-
sinon.match.instanceOf(Meeting),
|
|
1343
|
-
{
|
|
1344
|
-
file: 'meeting/index',
|
|
1345
|
-
function: 'compareLastStatsResult',
|
|
1346
|
-
},
|
|
1347
|
-
EVENT_TRIGGERS.MEETING_NO_FRAMES_SENT,
|
|
1348
|
-
{
|
|
1349
|
-
mediaType: 'video',
|
|
1350
|
-
}
|
|
1351
|
-
);
|
|
1352
|
-
assert.calledWith(Metrics.sendBehavioralMetric, BEHAVIORAL_METRICS.NO_FRAMES_SENT);
|
|
1353
|
-
});
|
|
1354
|
-
it('NO_FRAMES_SENT triggers "meeting:noFramesSent" event and sends metrics for share', async () => {
|
|
1355
|
-
meeting.mediaProperties.mediaDirection = {sendShare: true};
|
|
1356
|
-
statsAnalyzerStub.emit(
|
|
1357
|
-
{file: 'test', function: 'test'},
|
|
1358
|
-
StatsAnalyzerModule.EVENTS.NO_FRAMES_SENT,
|
|
1359
|
-
{mediaType: 'share'}
|
|
1360
|
-
);
|
|
1361
|
-
|
|
1362
|
-
assert.calledWith(
|
|
1363
|
-
TriggerProxy.trigger,
|
|
1364
|
-
sinon.match.instanceOf(Meeting),
|
|
1365
|
-
{
|
|
1366
|
-
file: 'meeting/index',
|
|
1367
|
-
function: 'compareLastStatsResult',
|
|
1368
|
-
},
|
|
1369
|
-
EVENT_TRIGGERS.MEETING_NO_FRAMES_SENT,
|
|
1370
|
-
{
|
|
1371
|
-
mediaType: 'share',
|
|
1372
|
-
}
|
|
1373
|
-
);
|
|
1374
|
-
assert.calledWith(Metrics.sendBehavioralMetric, BEHAVIORAL_METRICS.NO_FRAMES_SENT);
|
|
1375
|
-
});
|
|
1376
|
-
it('NO_VIDEO_ENCODED triggers "meeting:noVideoEncoded" event and sends metrics', async () => {
|
|
1377
|
-
statsAnalyzerStub.emit(
|
|
1378
|
-
{file: 'test', function: 'test'},
|
|
1379
|
-
StatsAnalyzerModule.EVENTS.NO_VIDEO_ENCODED,
|
|
1380
|
-
{mediaType: 'video'}
|
|
1381
|
-
);
|
|
1382
|
-
|
|
1383
|
-
assert.calledWith(
|
|
1384
|
-
TriggerProxy.trigger,
|
|
1385
|
-
sinon.match.instanceOf(Meeting),
|
|
1386
|
-
{
|
|
1387
|
-
file: 'meeting/index',
|
|
1388
|
-
function: 'compareLastStatsResult',
|
|
1389
|
-
},
|
|
1390
|
-
EVENT_TRIGGERS.MEETING_NO_VIDEO_ENCODED,
|
|
1391
|
-
{
|
|
1392
|
-
mediaType: 'video',
|
|
1393
|
-
}
|
|
1394
|
-
);
|
|
1395
|
-
assert.calledWith(Metrics.sendBehavioralMetric, BEHAVIORAL_METRICS.NO_VIDEO_ENCODED);
|
|
1396
|
-
});
|
|
1397
1332
|
});
|
|
1398
1333
|
});
|
|
1399
1334
|
describe('#acknowledge', () => {
|
|
@@ -3643,8 +3578,49 @@ describe('plugin-meetings', () => {
|
|
|
3643
3578
|
);
|
|
3644
3579
|
done();
|
|
3645
3580
|
});
|
|
3581
|
+
it('transcription should start when configured when guest admitted', (done) => {
|
|
3582
|
+
meeting.isTranscriptionSupported = sinon.stub().returns(true);
|
|
3583
|
+
meeting.receiveTranscription = sinon.stub().returns(true);
|
|
3584
|
+
meeting.startTranscription = sinon.stub();
|
|
3585
|
+
|
|
3586
|
+
meeting.locusInfo.emit({function: 'test', file: 'test'}, 'SELF_ADMITTED_GUEST', test1);
|
|
3587
|
+
assert.calledOnce(meeting.startTranscription);
|
|
3588
|
+
done();
|
|
3589
|
+
});
|
|
3646
3590
|
});
|
|
3647
3591
|
|
|
3592
|
+
describe('#setupLocusControlsListener', () => {
|
|
3593
|
+
it('transcription should start when meeting transcribe state is updated with active transcribing', (done) => {
|
|
3594
|
+
const payload = {caption: true, transcribing: true};
|
|
3595
|
+
meeting.startTranscription = sinon.stub();
|
|
3596
|
+
meeting.config.receiveTranscription = true;
|
|
3597
|
+
meeting.transcription = null;
|
|
3598
|
+
|
|
3599
|
+
meeting.locusInfo.emit({function: 'meeting/index', file: 'setupLocusControlsListener'}, 'CONTROLS_MEETING_TRANSCRIBE_UPDATED', payload);
|
|
3600
|
+
assert.calledOnce(meeting.startTranscription);
|
|
3601
|
+
done();
|
|
3602
|
+
})
|
|
3603
|
+
|
|
3604
|
+
it('transcription should stop when meeting transcribe state is updated with inactive transcribing', (done) => {
|
|
3605
|
+
const payload = {caption: false, transcribing: false};
|
|
3606
|
+
meeting.startTranscription = sinon.stub();
|
|
3607
|
+
meeting.config.receiveTranscription = true;
|
|
3608
|
+
meeting.transcription = {};
|
|
3609
|
+
|
|
3610
|
+
meeting.locusInfo.emit({function: 'meeting/index', file: 'setupLocusControlsListener'}, 'CONTROLS_MEETING_TRANSCRIBE_UPDATED', payload);
|
|
3611
|
+
assert.notCalled(meeting.startTranscription);
|
|
3612
|
+
assert.calledTwice(TriggerProxy.trigger);
|
|
3613
|
+
assert.calledWith(
|
|
3614
|
+
TriggerProxy.trigger,
|
|
3615
|
+
sinon.match.instanceOf(Meeting),
|
|
3616
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
|
3617
|
+
'meeting:receiveTranscription:stopped',
|
|
3618
|
+
payload
|
|
3619
|
+
);
|
|
3620
|
+
done();
|
|
3621
|
+
})
|
|
3622
|
+
})
|
|
3623
|
+
|
|
3648
3624
|
describe('#setUpLocusUrlListener', () => {
|
|
3649
3625
|
it('listens to the locus url update event', (done) => {
|
|
3650
3626
|
const newLocusUrl = 'newLocusUrl/12345';
|
|
@@ -3670,17 +3646,14 @@ describe('plugin-meetings', () => {
|
|
|
3670
3646
|
describe('#setUpLocusServicesListener', () => {
|
|
3671
3647
|
it('listens to the locus services update event', (done) => {
|
|
3672
3648
|
const newLocusServices = {
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3649
|
+
services: {
|
|
3650
|
+
record: {
|
|
3651
|
+
url: 'url',
|
|
3652
|
+
}
|
|
3676
3653
|
},
|
|
3677
|
-
},
|
|
3678
3654
|
};
|
|
3679
3655
|
|
|
3680
|
-
meeting.recordingController = {
|
|
3681
|
-
setServiceUrl: sinon.stub().returns(undefined),
|
|
3682
|
-
setSessionId: sinon.stub().returns(undefined),
|
|
3683
|
-
};
|
|
3656
|
+
meeting.recordingController = {setServiceUrl: sinon.stub().returns(undefined), setSessionId: sinon.stub().returns(undefined)};
|
|
3684
3657
|
|
|
3685
3658
|
meeting.locusInfo.emit(
|
|
3686
3659
|
{function: 'test', file: 'test'},
|
|
@@ -3688,10 +3661,7 @@ describe('plugin-meetings', () => {
|
|
|
3688
3661
|
newLocusServices
|
|
3689
3662
|
);
|
|
3690
3663
|
|
|
3691
|
-
assert.calledWith(
|
|
3692
|
-
meeting.recordingController.setServiceUrl,
|
|
3693
|
-
newLocusServices.services.record.url
|
|
3694
|
-
);
|
|
3664
|
+
assert.calledWith(meeting.recordingController.setServiceUrl, newLocusServices.services.record.url);
|
|
3695
3665
|
assert.calledOnce(meeting.recordingController.setSessionId);
|
|
3696
3666
|
done();
|
|
3697
3667
|
});
|
|
@@ -41,92 +41,88 @@ describe('Roap', () => {
|
|
|
41
41
|
describe('sendRoapMediaRequest', () => {
|
|
42
42
|
let sendRoapStub;
|
|
43
43
|
let roapHandlerSubmitStub;
|
|
44
|
-
|
|
44
|
+
|
|
45
|
+
const meeting = {
|
|
46
|
+
id: 'some meeting id',
|
|
47
|
+
correlationId: 'correlation id',
|
|
48
|
+
selfUrl: 'self url',
|
|
49
|
+
mediaId: 'media id',
|
|
50
|
+
audio:{
|
|
51
|
+
isLocallyMuted: () => true,
|
|
52
|
+
},
|
|
53
|
+
video:{
|
|
54
|
+
isLocallyMuted: () => false,
|
|
55
|
+
},
|
|
56
|
+
setRoapSeq: sinon.stub(),
|
|
57
|
+
config: {experimental: {enableTurnDiscovery: false}},
|
|
58
|
+
};
|
|
45
59
|
|
|
46
60
|
beforeEach(() => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
selfUrl: 'self url',
|
|
51
|
-
mediaId: 'media id',
|
|
52
|
-
audio: {
|
|
53
|
-
isLocallyMuted: () => true,
|
|
54
|
-
},
|
|
55
|
-
video: {
|
|
56
|
-
isLocallyMuted: () => false,
|
|
57
|
-
},
|
|
58
|
-
setRoapSeq: sinon.stub(),
|
|
59
|
-
config: {experimental: {enableTurnDiscovery: false}},
|
|
60
|
-
webex: {meetings: {reachability: {isAnyClusterReachable: () => true}}},
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
beforeEach(() => {
|
|
64
|
-
sendRoapStub = sinon.stub(RoapRequest.prototype, 'sendRoap').resolves({});
|
|
65
|
-
roapHandlerSubmitStub = sinon.stub(RoapHandler.prototype, 'submit');
|
|
66
|
-
meeting.setRoapSeq.resetHistory();
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
afterEach(() => {
|
|
70
|
-
sinon.restore();
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
[
|
|
74
|
-
{reconnect: true, turnDiscoverySkipped: false, expectEmptyMediaId: false},
|
|
75
|
-
{reconnect: true, turnDiscoverySkipped: true, expectEmptyMediaId: true},
|
|
76
|
-
{reconnect: false, turnDiscoverySkipped: false, expectEmptyMediaId: false},
|
|
77
|
-
{reconnect: false, turnDiscoverySkipped: true, expectEmptyMediaId: false},
|
|
78
|
-
].forEach(({reconnect, turnDiscoverySkipped, expectEmptyMediaId}) =>
|
|
79
|
-
it(`sends roap OFFER with ${expectEmptyMediaId ? 'empty ' : ''}mediaId when ${
|
|
80
|
-
reconnect ? '' : 'not '
|
|
81
|
-
}reconnecting and TURN discovery is ${
|
|
82
|
-
turnDiscoverySkipped ? 'skipped' : 'not skipped'
|
|
83
|
-
}`, async () => {
|
|
84
|
-
const roap = new Roap({}, {parent: 'fake'});
|
|
85
|
-
|
|
86
|
-
sinon.stub(roap.turnDiscovery, 'isSkipped').resolves(turnDiscoverySkipped);
|
|
87
|
-
|
|
88
|
-
await roap.sendRoapMediaRequest({
|
|
89
|
-
meeting,
|
|
90
|
-
sdp: 'sdp',
|
|
91
|
-
reconnect,
|
|
92
|
-
roapSeq: 1,
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
const expectedRoapMessage = {
|
|
96
|
-
messageType: 'OFFER',
|
|
97
|
-
sdps: ['sdp'],
|
|
98
|
-
version: '2',
|
|
99
|
-
seq: 2,
|
|
100
|
-
tieBreaker: 4294967294,
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
assert.calledOnce(sendRoapStub);
|
|
104
|
-
assert.calledWith(sendRoapStub, {
|
|
105
|
-
roapMessage: expectedRoapMessage,
|
|
106
|
-
correlationId: meeting.correlationId,
|
|
107
|
-
locusSelfUrl: meeting.selfUrl,
|
|
108
|
-
mediaId: expectEmptyMediaId ? '' : meeting.mediaId,
|
|
109
|
-
audioMuted: meeting.audio?.isLocallyMuted(),
|
|
110
|
-
videoMuted: meeting.video?.isLocallyMuted(),
|
|
111
|
-
meetingId: meeting.id,
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
assert.calledTwice(roapHandlerSubmitStub);
|
|
115
|
-
assert.calledWith(roapHandlerSubmitStub, {
|
|
116
|
-
type: ROAP.SEND_ROAP_MSG,
|
|
117
|
-
msg: expectedRoapMessage,
|
|
118
|
-
correlationId: meeting.correlationId,
|
|
119
|
-
});
|
|
120
|
-
assert.calledWith(roapHandlerSubmitStub, {
|
|
121
|
-
type: ROAP.SEND_ROAP_MSG_SUCCESS,
|
|
122
|
-
seq: 2,
|
|
123
|
-
correlationId: meeting.correlationId,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
assert.calledOnce(meeting.setRoapSeq);
|
|
127
|
-
assert.calledWith(meeting.setRoapSeq, 2);
|
|
128
|
-
})
|
|
129
|
-
);
|
|
61
|
+
sendRoapStub = sinon.stub(RoapRequest.prototype, 'sendRoap').resolves({});
|
|
62
|
+
roapHandlerSubmitStub = sinon.stub(RoapHandler.prototype, 'submit');
|
|
63
|
+
meeting.setRoapSeq.resetHistory();
|
|
130
64
|
});
|
|
65
|
+
|
|
66
|
+
afterEach(() => {
|
|
67
|
+
sinon.restore();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
[
|
|
71
|
+
{reconnect: true, enableTurnDiscovery: true, expectEmptyMediaId: false},
|
|
72
|
+
{reconnect: true, enableTurnDiscovery: false, expectEmptyMediaId: true},
|
|
73
|
+
{reconnect: false, enableTurnDiscovery: true, expectEmptyMediaId: false},
|
|
74
|
+
{reconnect: false, enableTurnDiscovery: false, expectEmptyMediaId: false},
|
|
75
|
+
].forEach(({reconnect, enableTurnDiscovery, expectEmptyMediaId}) =>
|
|
76
|
+
it(`sends roap OFFER with ${expectEmptyMediaId ? 'empty ' : ''}mediaId when ${
|
|
77
|
+
reconnect ? '' : 'not '
|
|
78
|
+
}reconnecting and TURN discovery is ${
|
|
79
|
+
enableTurnDiscovery ? 'enabled' : 'disabled'
|
|
80
|
+
}`, async () => {
|
|
81
|
+
meeting.config.experimental.enableTurnDiscovery = enableTurnDiscovery;
|
|
82
|
+
|
|
83
|
+
const roap = new Roap({}, {parent: 'fake'});
|
|
84
|
+
|
|
85
|
+
await roap.sendRoapMediaRequest({
|
|
86
|
+
meeting,
|
|
87
|
+
sdp: 'sdp',
|
|
88
|
+
reconnect,
|
|
89
|
+
roapSeq: 1,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const expectedRoapMessage = {
|
|
93
|
+
messageType: 'OFFER',
|
|
94
|
+
sdps: ['sdp'],
|
|
95
|
+
version: '2',
|
|
96
|
+
seq: 2,
|
|
97
|
+
tieBreaker: 4294967294,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
assert.calledOnce(sendRoapStub);
|
|
101
|
+
assert.calledWith(sendRoapStub, {
|
|
102
|
+
roapMessage: expectedRoapMessage,
|
|
103
|
+
correlationId: meeting.correlationId,
|
|
104
|
+
locusSelfUrl: meeting.selfUrl,
|
|
105
|
+
mediaId: expectEmptyMediaId ? '' : meeting.mediaId,
|
|
106
|
+
audioMuted: meeting.audio?.isLocallyMuted(),
|
|
107
|
+
videoMuted: meeting.video?.isLocallyMuted(),
|
|
108
|
+
meetingId: meeting.id,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
assert.calledTwice(roapHandlerSubmitStub);
|
|
112
|
+
assert.calledWith(roapHandlerSubmitStub, {
|
|
113
|
+
type: ROAP.SEND_ROAP_MSG,
|
|
114
|
+
msg: expectedRoapMessage,
|
|
115
|
+
correlationId: meeting.correlationId,
|
|
116
|
+
});
|
|
117
|
+
assert.calledWith(roapHandlerSubmitStub, {
|
|
118
|
+
type: ROAP.SEND_ROAP_MSG_SUCCESS,
|
|
119
|
+
seq: 2,
|
|
120
|
+
correlationId: meeting.correlationId,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
assert.calledOnce(meeting.setRoapSeq);
|
|
124
|
+
assert.calledWith(meeting.setRoapSeq, 2);
|
|
125
|
+
})
|
|
126
|
+
);
|
|
131
127
|
});
|
|
132
128
|
});
|
|
@@ -352,27 +352,6 @@ describe('TurnDiscovery', () => {
|
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
354
|
|
|
355
|
-
describe('isSkipped', () => {
|
|
356
|
-
[
|
|
357
|
-
{enabledInConfig: true, isAnyClusterReachable: true, expectedIsSkipped: true},
|
|
358
|
-
{enabledInConfig: true, isAnyClusterReachable: false, expectedIsSkipped: false},
|
|
359
|
-
{enabledInConfig: false, isAnyClusterReachable: true, expectedIsSkipped: true},
|
|
360
|
-
{enabledInConfig: false, isAnyClusterReachable: false, expectedIsSkipped: true},
|
|
361
|
-
].forEach(({enabledInConfig, isAnyClusterReachable, expectedIsSkipped}) => {
|
|
362
|
-
it(`returns ${expectedIsSkipped} when TURN discovery is ${enabledInConfig ? '' : 'not '} enabled in config and isAnyClusterReachable() returns ${isAnyClusterReachable ? 'true' : 'false'}`, async () => {
|
|
363
|
-
testMeeting.config.experimental.enableTurnDiscovery = enabledInConfig;
|
|
364
|
-
|
|
365
|
-
sinon.stub(testMeeting.webex.meetings.reachability, 'isAnyClusterReachable').resolves(isAnyClusterReachable);
|
|
366
|
-
|
|
367
|
-
const td = new TurnDiscovery(mockRoapRequest);
|
|
368
|
-
|
|
369
|
-
const isSkipped = await td.isSkipped(testMeeting);
|
|
370
|
-
|
|
371
|
-
assert.equal(isSkipped, expectedIsSkipped);
|
|
372
|
-
})
|
|
373
|
-
})
|
|
374
|
-
})
|
|
375
|
-
|
|
376
355
|
describe('handleTurnDiscoveryResponse', () => {
|
|
377
356
|
it("doesn't do anything if turn discovery was not started", () => {
|
|
378
357
|
const td = new TurnDiscovery(mockRoapRequest);
|