@webex/plugin-meetings 3.6.0 → 3.7.0-ipv6-multi-turn-urls.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/README.md +2 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/join-webinar-error.js +50 -0
- package/dist/common/errors/join-webinar-error.js.map +1 -0
- package/dist/config.js +4 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +54 -4
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +1 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +10 -3
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +12 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +28 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +2 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/index.js +61 -3
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +5 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/media/index.js +29 -1
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +29 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +807 -540
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +2 -6
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +5 -2
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +21 -29
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +98 -61
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +80 -17
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +29 -2
- package/dist/meetings/index.js.map +1 -1
- package/dist/members/index.js +3 -2
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +13 -7
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMedia.js +34 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/reachability/clusterReachability.js +12 -15
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +433 -136
- package/dist/reachability/index.js.map +1 -1
- package/dist/{rtcMetrics/constants.js → reachability/reachability.types.js} +1 -5
- package/dist/reachability/reachability.types.js.map +1 -0
- package/dist/reachability/request.js +23 -9
- package/dist/reachability/request.js.map +1 -1
- package/dist/recording-controller/enums.js +8 -4
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +18 -9
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +13 -9
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +5 -7
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +45 -79
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +3 -6
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/{common/errors/parameter.d.ts → types/common/errors/join-webinar-error.d.ts} +4 -5
- package/dist/types/config.d.ts +3 -0
- package/dist/types/constants.d.ts +43 -0
- package/dist/types/controls-options-manager/enums.d.ts +2 -1
- package/dist/types/controls-options-manager/index.d.ts +2 -1
- package/dist/types/controls-options-manager/types.d.ts +2 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/locus-info/index.d.ts +9 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +28 -0
- package/dist/types/meeting/index.d.ts +34 -3
- package/dist/types/meeting/locusMediaRequest.d.ts +2 -3
- package/dist/types/meeting/muteState.d.ts +2 -1
- package/dist/types/meeting/request.d.ts +2 -2
- package/dist/types/meeting/util.d.ts +2 -2
- package/dist/types/meeting-info/meeting-info-v2.d.ts +23 -0
- package/dist/types/meetings/index.d.ts +13 -1
- package/dist/types/members/index.d.ts +2 -1
- package/dist/types/members/util.d.ts +5 -1
- package/dist/types/metrics/constants.d.ts +3 -0
- package/dist/types/multistream/remoteMedia.d.ts +1 -0
- package/dist/types/reachability/clusterReachability.d.ts +1 -10
- package/dist/types/reachability/index.d.ts +74 -35
- package/dist/types/reachability/reachability.types.d.ts +64 -0
- package/dist/types/reachability/request.d.ts +5 -1
- package/dist/types/recording-controller/enums.d.ts +5 -2
- package/dist/types/recording-controller/index.d.ts +1 -0
- package/dist/types/recording-controller/util.d.ts +2 -1
- package/dist/types/roap/request.d.ts +1 -13
- package/dist/webinar/index.js +382 -19
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/common/errors/join-webinar-error.ts +24 -0
- package/src/config.ts +3 -0
- package/src/constants.ts +52 -0
- package/src/controls-options-manager/enums.ts +1 -0
- package/src/controls-options-manager/index.ts +19 -2
- package/src/controls-options-manager/types.ts +2 -0
- package/src/controls-options-manager/util.ts +12 -0
- package/src/index.ts +2 -0
- package/src/locus-info/controlsUtils.ts +46 -2
- package/src/locus-info/fullState.ts +1 -0
- package/src/locus-info/index.ts +60 -0
- package/src/locus-info/parser.ts +8 -1
- package/src/media/index.ts +15 -0
- package/src/meeting/in-meeting-actions.ts +58 -0
- package/src/meeting/index.ts +268 -32
- package/src/meeting/locusMediaRequest.ts +4 -8
- package/src/meeting/muteState.ts +6 -2
- package/src/meeting/request.ts +4 -11
- package/src/meeting/util.ts +31 -6
- package/src/meeting-info/meeting-info-v2.ts +63 -0
- package/src/meetings/index.ts +74 -40
- package/src/members/index.ts +4 -2
- package/src/members/util.ts +4 -1
- package/src/metrics/constants.ts +3 -0
- package/src/multistream/remoteMedia.ts +33 -15
- package/src/reachability/clusterReachability.ts +5 -15
- package/src/reachability/index.ts +285 -77
- package/src/reachability/reachability.types.ts +85 -0
- package/src/reachability/request.ts +55 -30
- package/src/recording-controller/enums.ts +5 -2
- package/src/recording-controller/index.ts +17 -4
- package/src/recording-controller/util.ts +20 -5
- package/src/roap/index.ts +4 -5
- package/src/roap/request.ts +32 -44
- package/src/roap/turnDiscovery.ts +2 -4
- package/src/webinar/index.ts +223 -17
- package/test/unit/spec/controls-options-manager/index.js +56 -32
- package/test/unit/spec/controls-options-manager/util.js +44 -0
- package/test/unit/spec/locus-info/controlsUtils.js +80 -4
- package/test/unit/spec/locus-info/index.js +88 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +31 -1
- package/test/unit/spec/meeting/index.js +407 -82
- package/test/unit/spec/meeting/locusMediaRequest.ts +18 -11
- package/test/unit/spec/meeting/muteState.js +8 -4
- package/test/unit/spec/meeting/request.js +3 -26
- package/test/unit/spec/meeting/utils.js +71 -14
- package/test/unit/spec/meeting-info/meetinginfov2.js +42 -0
- package/test/unit/spec/meetings/index.js +41 -6
- package/test/unit/spec/members/index.js +25 -2
- package/test/unit/spec/members/request.js +37 -3
- package/test/unit/spec/members/utils.js +110 -1
- package/test/unit/spec/multistream/remoteMedia.ts +27 -9
- package/test/unit/spec/reachability/clusterReachability.ts +7 -0
- package/test/unit/spec/reachability/index.ts +265 -1
- package/test/unit/spec/reachability/request.js +56 -15
- package/test/unit/spec/recording-controller/index.js +61 -5
- package/test/unit/spec/recording-controller/util.js +39 -3
- package/test/unit/spec/roap/index.ts +1 -1
- package/test/unit/spec/roap/request.ts +51 -109
- package/test/unit/spec/roap/turnDiscovery.ts +202 -147
- package/test/unit/spec/webinar/index.ts +443 -14
- package/dist/annotation/annotation.types.d.ts +0 -42
- package/dist/annotation/constants.d.ts +0 -31
- package/dist/annotation/index.d.ts +0 -117
- package/dist/breakouts/breakout.d.ts +0 -8
- package/dist/breakouts/collection.d.ts +0 -5
- package/dist/breakouts/edit-lock-error.d.ts +0 -15
- package/dist/breakouts/events.d.ts +0 -8
- package/dist/breakouts/index.d.ts +0 -5
- package/dist/breakouts/request.d.ts +0 -22
- package/dist/breakouts/utils.d.ts +0 -15
- 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/no-meeting-info.d.ts +0 -14
- package/dist/common/errors/password-error.d.ts +0 -15
- package/dist/common/errors/permission.d.ts +0 -14
- package/dist/common/errors/reclaim-host-role-error.js +0 -149
- package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js +0 -33
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- 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 -93
- 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 -36
- package/dist/common/queue.d.ts +0 -34
- package/dist/config.d.ts +0 -72
- package/dist/constants.d.ts +0 -1088
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -15
- package/dist/controls-options-manager/index.d.ts +0 -136
- package/dist/controls-options-manager/types.d.ts +0 -43
- package/dist/controls-options-manager/util.d.ts +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/locusRetry.d.ts +0 -27
- package/dist/interpretation/collection.d.ts +0 -5
- package/dist/interpretation/index.d.ts +0 -5
- package/dist/interpretation/siLanguage.d.ts +0 -5
- 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 -322
- 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 -272
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -34
- package/dist/media/properties.d.ts +0 -93
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/mediaQualityMetrics/config.js +0 -502
- package/dist/mediaQualityMetrics/config.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/meeting/in-meeting-actions.d.ts +0 -167
- package/dist/meeting/index.d.ts +0 -1825
- package/dist/meeting/locusMediaRequest.d.ts +0 -74
- package/dist/meeting/muteState.d.ts +0 -178
- package/dist/meeting/request.d.ts +0 -295
- package/dist/meeting/request.type.d.ts +0 -11
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -119
- package/dist/meeting/voicea-meeting.d.ts +0 -16
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -69
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
- 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 -40
- package/dist/meetings/index.d.ts +0 -390
- package/dist/meetings/meetings.types.d.ts +0 -4
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -160
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/dist/member/types.d.ts +0 -32
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -29
- package/dist/members/index.d.ts +0 -353
- package/dist/members/request.d.ts +0 -114
- package/dist/members/types.d.ts +0 -25
- package/dist/members/util.d.ts +0 -215
- package/dist/metrics/config.js +0 -276
- package/dist/metrics/config.js.map +0 -1
- package/dist/metrics/constants.d.ts +0 -70
- package/dist/metrics/index.d.ts +0 -45
- package/dist/multistream/mediaRequestManager.d.ts +0 -119
- package/dist/multistream/receiveSlot.d.ts +0 -68
- package/dist/multistream/receiveSlotManager.d.ts +0 -56
- package/dist/multistream/remoteMedia.d.ts +0 -72
- package/dist/multistream/remoteMediaGroup.d.ts +0 -49
- package/dist/multistream/remoteMediaManager.d.ts +0 -300
- package/dist/multistream/sendSlotManager.d.ts +0 -69
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/networkQualityMonitor/index.js +0 -221
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -109
- package/dist/peer-connection-manager/util.js.map +0 -1
- 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/clusterReachability.d.ts +0 -109
- package/dist/reachability/index.d.ts +0 -105
- package/dist/reachability/request.d.ts +0 -39
- package/dist/reachability/util.d.ts +0 -8
- package/dist/reactions/constants.d.ts +0 -3
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -52
- package/dist/reconnection-manager/index.d.ts +0 -136
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -207
- package/dist/recording-controller/util.d.ts +0 -14
- package/dist/roap/collection.js +0 -62
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -275
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/index.d.ts +0 -86
- package/dist/roap/request.d.ts +0 -39
- package/dist/roap/state.js +0 -126
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/turnDiscovery.d.ts +0 -155
- package/dist/roap/util.js +0 -75
- package/dist/roap/util.js.map +0 -1
- package/dist/rtcMetrics/constants.d.ts +0 -4
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.d.ts +0 -61
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/statsAnalyzer/global.d.ts +0 -36
- package/dist/statsAnalyzer/global.js +0 -126
- package/dist/statsAnalyzer/global.js.map +0 -1
- package/dist/statsAnalyzer/index.d.ts +0 -217
- package/dist/statsAnalyzer/index.js +0 -1013
- package/dist/statsAnalyzer/index.js.map +0 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/statsAnalyzer/mqaUtil.js +0 -179
- package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
- package/dist/transcription/index.d.ts +0 -64
- package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/dist/types/statsAnalyzer/global.d.ts +0 -36
- package/dist/types/statsAnalyzer/index.d.ts +0 -217
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/webinar/collection.d.ts +0 -16
- package/dist/webinar/index.d.ts +0 -5
|
@@ -91,12 +91,14 @@ import ParameterError from '../../../../src/common/errors/parameter';
|
|
|
91
91
|
import PasswordError from '../../../../src/common/errors/password-error';
|
|
92
92
|
import CaptchaError from '../../../../src/common/errors/captcha-error';
|
|
93
93
|
import PermissionError from '../../../../src/common/errors/permission';
|
|
94
|
+
import JoinWebinarError from '../../../../src/common/errors/join-webinar-error';
|
|
94
95
|
import IntentToJoinError from '../../../../src/common/errors/intent-to-join';
|
|
95
96
|
import testUtils from '../../../utils/testUtils';
|
|
96
97
|
import {
|
|
97
98
|
MeetingInfoV2CaptchaError,
|
|
98
99
|
MeetingInfoV2PasswordError,
|
|
99
100
|
MeetingInfoV2PolicyError,
|
|
101
|
+
MeetingInfoV2JoinWebinarError,
|
|
100
102
|
} from '../../../../src/meeting-info/meeting-info-v2';
|
|
101
103
|
import {
|
|
102
104
|
DTLS_HANDSHAKE_FAILED_CLIENT_CODE,
|
|
@@ -375,7 +377,10 @@ describe('plugin-meetings', () => {
|
|
|
375
377
|
}
|
|
376
378
|
);
|
|
377
379
|
assert.equal(newMeeting.correlationId, newMeeting.id);
|
|
378
|
-
assert.deepEqual(newMeeting.callStateForMetrics, {
|
|
380
|
+
assert.deepEqual(newMeeting.callStateForMetrics, {
|
|
381
|
+
correlationId: newMeeting.id,
|
|
382
|
+
sessionCorrelationId: '',
|
|
383
|
+
});
|
|
379
384
|
});
|
|
380
385
|
|
|
381
386
|
it('correlationId can be provided in callStateForMetrics', () => {
|
|
@@ -644,7 +649,6 @@ describe('plugin-meetings', () => {
|
|
|
644
649
|
});
|
|
645
650
|
|
|
646
651
|
const fakeRoapMessage = {id: 'fake TURN discovery message'};
|
|
647
|
-
const fakeReachabilityResults = {id: 'fake reachability'};
|
|
648
652
|
const fakeTurnServerInfo = {id: 'fake turn info'};
|
|
649
653
|
const fakeJoinResult = {id: 'join result'};
|
|
650
654
|
|
|
@@ -662,8 +666,6 @@ describe('plugin-meetings', () => {
|
|
|
662
666
|
.stub(meeting, 'addMediaInternal')
|
|
663
667
|
.returns(Promise.resolve(test4));
|
|
664
668
|
|
|
665
|
-
webex.meetings.reachability.getReachabilityResults.resolves(fakeReachabilityResults);
|
|
666
|
-
|
|
667
669
|
generateTurnDiscoveryRequestMessageStub = sinon
|
|
668
670
|
.stub(meeting.roap, 'generateTurnDiscoveryRequestMessage')
|
|
669
671
|
.resolves({roapMessage: fakeRoapMessage});
|
|
@@ -683,7 +685,6 @@ describe('plugin-meetings', () => {
|
|
|
683
685
|
assert.calledOnceWithExactly(meeting.join, {
|
|
684
686
|
...joinOptions,
|
|
685
687
|
roapMessage: fakeRoapMessage,
|
|
686
|
-
reachability: fakeReachabilityResults,
|
|
687
688
|
});
|
|
688
689
|
assert.calledOnceWithExactly(generateTurnDiscoveryRequestMessageStub, meeting, true);
|
|
689
690
|
assert.calledOnceWithExactly(
|
|
@@ -720,7 +721,6 @@ describe('plugin-meetings', () => {
|
|
|
720
721
|
assert.calledOnceWithExactly(meeting.join, {
|
|
721
722
|
...joinOptions,
|
|
722
723
|
roapMessage: undefined,
|
|
723
|
-
reachability: fakeReachabilityResults,
|
|
724
724
|
});
|
|
725
725
|
assert.calledOnceWithExactly(generateTurnDiscoveryRequestMessageStub, meeting, true);
|
|
726
726
|
assert.notCalled(handleTurnDiscoveryHttpResponseStub);
|
|
@@ -752,7 +752,6 @@ describe('plugin-meetings', () => {
|
|
|
752
752
|
assert.calledOnceWithExactly(meeting.join, {
|
|
753
753
|
...joinOptions,
|
|
754
754
|
roapMessage: fakeRoapMessage,
|
|
755
|
-
reachability: fakeReachabilityResults,
|
|
756
755
|
});
|
|
757
756
|
assert.calledOnceWithExactly(generateTurnDiscoveryRequestMessageStub, meeting, true);
|
|
758
757
|
assert.calledOnceWithExactly(
|
|
@@ -1706,6 +1705,12 @@ describe('plugin-meetings', () => {
|
|
|
1706
1705
|
sinon.assert.called(setCorrelationIdSpy);
|
|
1707
1706
|
assert.equal(meeting.correlationId, '123');
|
|
1708
1707
|
});
|
|
1708
|
+
|
|
1709
|
+
it('should not send client.call.initiated if told not to', async () => {
|
|
1710
|
+
await meeting.join({sendCallInitiated: false});
|
|
1711
|
+
|
|
1712
|
+
sinon.assert.notCalled(webex.internal.newMetrics.submitClientEvent);
|
|
1713
|
+
});
|
|
1709
1714
|
});
|
|
1710
1715
|
|
|
1711
1716
|
describe('failure', () => {
|
|
@@ -2466,6 +2471,61 @@ describe('plugin-meetings', () => {
|
|
|
2466
2471
|
checkWorking();
|
|
2467
2472
|
});
|
|
2468
2473
|
|
|
2474
|
+
it('should upload logs periodically', async () => {
|
|
2475
|
+
const clock = sinon.useFakeTimers();
|
|
2476
|
+
|
|
2477
|
+
meeting.roap.doTurnDiscovery = sinon
|
|
2478
|
+
.stub()
|
|
2479
|
+
.resolves({turnServerInfo: undefined, turnDiscoverySkippedReason: undefined});
|
|
2480
|
+
|
|
2481
|
+
let logUploadCounter = 0;
|
|
2482
|
+
|
|
2483
|
+
TriggerProxy.trigger.callsFake((meetingObject, options, event) => {
|
|
2484
|
+
if (
|
|
2485
|
+
meetingObject === meeting &&
|
|
2486
|
+
options.file === 'meeting/index' &&
|
|
2487
|
+
options.function === 'uploadLogs' &&
|
|
2488
|
+
event === 'REQUEST_UPLOAD_LOGS'
|
|
2489
|
+
) {
|
|
2490
|
+
logUploadCounter += 1;
|
|
2491
|
+
}
|
|
2492
|
+
});
|
|
2493
|
+
|
|
2494
|
+
meeting.config.logUploadIntervalMultiplicationFactor = 1;
|
|
2495
|
+
meeting.meetingState = 'ACTIVE';
|
|
2496
|
+
|
|
2497
|
+
await meeting.addMedia({
|
|
2498
|
+
mediaSettings: {},
|
|
2499
|
+
});
|
|
2500
|
+
|
|
2501
|
+
const checkLogCounter = (delayInMinutes, expectedCounter) => {
|
|
2502
|
+
const delayInMilliseconds = delayInMinutes * 60 * 1000;
|
|
2503
|
+
|
|
2504
|
+
// first check that the counter is not increased just before the delay
|
|
2505
|
+
clock.tick(delayInMilliseconds - 50);
|
|
2506
|
+
assert.equal(logUploadCounter, expectedCounter - 1);
|
|
2507
|
+
|
|
2508
|
+
// and now check that it has reached expected value after the delay
|
|
2509
|
+
clock.tick(50);
|
|
2510
|
+
assert.equal(logUploadCounter, expectedCounter);
|
|
2511
|
+
};
|
|
2512
|
+
|
|
2513
|
+
checkLogCounter(0.1, 1);
|
|
2514
|
+
checkLogCounter(15, 2);
|
|
2515
|
+
checkLogCounter(30, 3);
|
|
2516
|
+
checkLogCounter(60, 4);
|
|
2517
|
+
checkLogCounter(60, 5);
|
|
2518
|
+
|
|
2519
|
+
// simulate media connection being removed -> 1 more upload should happen, but nothing more afterwards
|
|
2520
|
+
meeting.mediaProperties.webrtcMediaConnection = undefined;
|
|
2521
|
+
checkLogCounter(60, 6);
|
|
2522
|
+
|
|
2523
|
+
clock.tick(120 * 1000 * 60);
|
|
2524
|
+
assert.equal(logUploadCounter, 6);
|
|
2525
|
+
|
|
2526
|
+
clock.restore();
|
|
2527
|
+
});
|
|
2528
|
+
|
|
2469
2529
|
it('should attach the media and return promise when in the lobby if allowMediaInLobby is set', async () => {
|
|
2470
2530
|
meeting.roap.doTurnDiscovery = sinon
|
|
2471
2531
|
.stub()
|
|
@@ -3440,47 +3500,60 @@ describe('plugin-meetings', () => {
|
|
|
3440
3500
|
});
|
|
3441
3501
|
});
|
|
3442
3502
|
|
|
3443
|
-
|
|
3503
|
+
describe('bundlePolicy', () => {
|
|
3444
3504
|
const FAKE_TURN_URL = 'turns:webex.com:3478';
|
|
3445
3505
|
const FAKE_TURN_USER = 'some-turn-username';
|
|
3446
3506
|
const FAKE_TURN_PASSWORD = 'some-password';
|
|
3447
3507
|
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
meeting.roap.doTurnDiscovery = sinon.stub().resolves({
|
|
3452
|
-
turnServerInfo: {
|
|
3453
|
-
url: FAKE_TURN_URL,
|
|
3454
|
-
username: FAKE_TURN_USER,
|
|
3455
|
-
password: FAKE_TURN_PASSWORD,
|
|
3456
|
-
},
|
|
3457
|
-
turnDiscoverySkippedReason: undefined,
|
|
3458
|
-
});
|
|
3459
|
-
const media = meeting.addMedia({
|
|
3460
|
-
mediaSettings: {},
|
|
3461
|
-
bundlePolicy: 'bundlePolicy-value',
|
|
3462
|
-
});
|
|
3508
|
+
beforeEach(() => {
|
|
3509
|
+
meeting.meetingState = 'ACTIVE';
|
|
3510
|
+
Media.createMediaConnection.resetHistory();
|
|
3463
3511
|
|
|
3464
|
-
|
|
3465
|
-
await media;
|
|
3466
|
-
assert.calledOnce(meeting.roap.doTurnDiscovery);
|
|
3467
|
-
assert.calledWith(meeting.roap.doTurnDiscovery, meeting, false);
|
|
3468
|
-
assert.calledOnce(Media.createMediaConnection);
|
|
3469
|
-
assert.calledWith(
|
|
3470
|
-
Media.createMediaConnection,
|
|
3471
|
-
false,
|
|
3472
|
-
meeting.getMediaConnectionDebugId(),
|
|
3473
|
-
meeting.id,
|
|
3474
|
-
sinon.match({
|
|
3512
|
+
meeting.roap.doTurnDiscovery = sinon.stub().resolves({
|
|
3475
3513
|
turnServerInfo: {
|
|
3476
3514
|
url: FAKE_TURN_URL,
|
|
3477
3515
|
username: FAKE_TURN_USER,
|
|
3478
3516
|
password: FAKE_TURN_PASSWORD,
|
|
3479
3517
|
},
|
|
3480
|
-
|
|
3481
|
-
})
|
|
3482
|
-
);
|
|
3483
|
-
|
|
3518
|
+
turnDiscoverySkippedReason: undefined,
|
|
3519
|
+
});
|
|
3520
|
+
});
|
|
3521
|
+
|
|
3522
|
+
const runCheck = async (bundlePolicy, expectedValue) => {
|
|
3523
|
+
const media = meeting.addMedia({
|
|
3524
|
+
mediaSettings: {},
|
|
3525
|
+
bundlePolicy,
|
|
3526
|
+
});
|
|
3527
|
+
|
|
3528
|
+
assert.exists(media);
|
|
3529
|
+
await media;
|
|
3530
|
+
assert.calledOnce(meeting.roap.doTurnDiscovery);
|
|
3531
|
+
assert.calledWith(meeting.roap.doTurnDiscovery, meeting, false);
|
|
3532
|
+
assert.calledOnce(Media.createMediaConnection);
|
|
3533
|
+
assert.calledWith(
|
|
3534
|
+
Media.createMediaConnection,
|
|
3535
|
+
false,
|
|
3536
|
+
meeting.getMediaConnectionDebugId(),
|
|
3537
|
+
meeting.id,
|
|
3538
|
+
sinon.match({
|
|
3539
|
+
turnServerInfo: {
|
|
3540
|
+
url: FAKE_TURN_URL,
|
|
3541
|
+
username: FAKE_TURN_USER,
|
|
3542
|
+
password: FAKE_TURN_PASSWORD,
|
|
3543
|
+
},
|
|
3544
|
+
bundlePolicy: expectedValue,
|
|
3545
|
+
})
|
|
3546
|
+
);
|
|
3547
|
+
assert.calledOnce(fakeMediaConnection.initiateOffer);
|
|
3548
|
+
};
|
|
3549
|
+
|
|
3550
|
+
it('should pass bundlePolicy to createMediaConnection', async () => {
|
|
3551
|
+
await runCheck('max-compat', 'max-compat');
|
|
3552
|
+
});
|
|
3553
|
+
|
|
3554
|
+
it('should pass max-bundle to createMediaConnection if bundlePolicy is not provided', async () => {
|
|
3555
|
+
await runCheck(undefined, 'max-bundle');
|
|
3556
|
+
});
|
|
3484
3557
|
});
|
|
3485
3558
|
|
|
3486
3559
|
it('succeeds even if getDevices() throws', async () => {
|
|
@@ -3674,6 +3747,12 @@ describe('plugin-meetings', () => {
|
|
|
3674
3747
|
meeting.setMercuryListener = sinon.stub();
|
|
3675
3748
|
meeting.locusInfo.onFullLocus = sinon.stub();
|
|
3676
3749
|
meeting.webex.meetings.geoHintInfo = {regionCode: 'EU', countryCode: 'UK'};
|
|
3750
|
+
meeting.webex.meetings.reachability.getReachabilityReportToAttachToRoap = sinon
|
|
3751
|
+
.stub()
|
|
3752
|
+
.resolves({id: 'fake reachability'});
|
|
3753
|
+
meeting.webex.meetings.reachability.getClientMediaPreferences = sinon
|
|
3754
|
+
.stub()
|
|
3755
|
+
.resolves({id: 'fake clientMediaPreferences'});
|
|
3677
3756
|
meeting.roap.doTurnDiscovery = sinon.stub().resolves({
|
|
3678
3757
|
turnServerInfo: {
|
|
3679
3758
|
url: 'turns:turn-server-url:443?transport=tcp',
|
|
@@ -3793,12 +3872,12 @@ describe('plugin-meetings', () => {
|
|
|
3793
3872
|
id: 'fake locus from mocked join request',
|
|
3794
3873
|
locusUrl: 'fake locus url',
|
|
3795
3874
|
mediaId: 'fake media id',
|
|
3796
|
-
})
|
|
3875
|
+
});
|
|
3797
3876
|
sinon.stub(meeting.meetingRequest, 'joinMeeting').resolves({
|
|
3798
3877
|
headers: {
|
|
3799
3878
|
trackingid: 'fake tracking id',
|
|
3800
|
-
}
|
|
3801
|
-
})
|
|
3879
|
+
},
|
|
3880
|
+
});
|
|
3802
3881
|
await meeting.join({enableMultistream: isMultistream});
|
|
3803
3882
|
});
|
|
3804
3883
|
|
|
@@ -3859,6 +3938,15 @@ describe('plugin-meetings', () => {
|
|
|
3859
3938
|
const checkSdpOfferSent = ({audioMuted, videoMuted}) => {
|
|
3860
3939
|
const {sdp, seq, tieBreaker} = roapOfferMessage;
|
|
3861
3940
|
|
|
3941
|
+
assert.calledWith(
|
|
3942
|
+
meeting.webex.meetings.reachability.getClientMediaPreferences,
|
|
3943
|
+
meeting.isMultistream,
|
|
3944
|
+
0
|
|
3945
|
+
);
|
|
3946
|
+
assert.calledWith(
|
|
3947
|
+
meeting.webex.meetings.reachability.getReachabilityReportToAttachToRoap
|
|
3948
|
+
);
|
|
3949
|
+
|
|
3862
3950
|
assert.calledWith(locusMediaRequestStub, {
|
|
3863
3951
|
method: 'PUT',
|
|
3864
3952
|
uri: `${meeting.selfUrl}/media`,
|
|
@@ -3872,14 +3960,12 @@ describe('plugin-meetings', () => {
|
|
|
3872
3960
|
correlationId: meeting.correlationId,
|
|
3873
3961
|
localMedias: [
|
|
3874
3962
|
{
|
|
3875
|
-
localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OFFER","sdps":["${sdp}"],"version":"2","seq":"${seq}","tieBreaker":"${tieBreaker}","headers":["includeAnswerInHttpResponse","noOkInTransaction"]}}`,
|
|
3963
|
+
localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OFFER","sdps":["${sdp}"],"version":"2","seq":"${seq}","tieBreaker":"${tieBreaker}","headers":["includeAnswerInHttpResponse","noOkInTransaction"]},"reachability":{"id":"fake reachability"}}`,
|
|
3876
3964
|
mediaId: 'fake media id',
|
|
3877
3965
|
},
|
|
3878
3966
|
],
|
|
3879
3967
|
clientMediaPreferences: {
|
|
3880
|
-
|
|
3881
|
-
joinCookie: undefined,
|
|
3882
|
-
ipver: 0,
|
|
3968
|
+
id: 'fake clientMediaPreferences',
|
|
3883
3969
|
},
|
|
3884
3970
|
},
|
|
3885
3971
|
});
|
|
@@ -3900,13 +3986,11 @@ describe('plugin-meetings', () => {
|
|
|
3900
3986
|
},
|
|
3901
3987
|
correlationId: meeting.correlationId,
|
|
3902
3988
|
clientMediaPreferences: {
|
|
3903
|
-
|
|
3904
|
-
ipver: undefined,
|
|
3905
|
-
joinCookie: undefined,
|
|
3989
|
+
id: 'fake clientMediaPreferences',
|
|
3906
3990
|
},
|
|
3907
3991
|
localMedias: [
|
|
3908
3992
|
{
|
|
3909
|
-
localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OK","version":"2","seq":"${seq}"}}`,
|
|
3993
|
+
localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OK","version":"2","seq":"${seq}"},"reachability":{"id":"fake reachability"}}`,
|
|
3910
3994
|
mediaId: 'fake media id',
|
|
3911
3995
|
},
|
|
3912
3996
|
],
|
|
@@ -3932,10 +4016,6 @@ describe('plugin-meetings', () => {
|
|
|
3932
4016
|
mediaId: 'fake media id',
|
|
3933
4017
|
},
|
|
3934
4018
|
],
|
|
3935
|
-
clientMediaPreferences: {
|
|
3936
|
-
preferTranscoding: !meeting.isMultistream,
|
|
3937
|
-
ipver: undefined,
|
|
3938
|
-
},
|
|
3939
4019
|
respOnlySdp: true,
|
|
3940
4020
|
usingResource: null,
|
|
3941
4021
|
},
|
|
@@ -3991,6 +4071,10 @@ describe('plugin-meetings', () => {
|
|
|
3991
4071
|
assert.notCalled(
|
|
3992
4072
|
meeting.sendSlotManager.getSlot(MediaType.AudioMain).publishStream
|
|
3993
4073
|
);
|
|
4074
|
+
assert.throws(
|
|
4075
|
+
meeting.publishStreams(localStreams),
|
|
4076
|
+
`Attempted to publish microphone stream with ended readyState, correlationId=${meeting.correlationId}`
|
|
4077
|
+
);
|
|
3994
4078
|
} else {
|
|
3995
4079
|
assert.calledOnceWithExactly(
|
|
3996
4080
|
meeting.sendSlotManager.getSlot(MediaType.AudioMain).publishStream,
|
|
@@ -4003,6 +4087,10 @@ describe('plugin-meetings', () => {
|
|
|
4003
4087
|
assert.notCalled(
|
|
4004
4088
|
meeting.sendSlotManager.getSlot(MediaType.VideoMain).publishStream
|
|
4005
4089
|
);
|
|
4090
|
+
assert.throws(
|
|
4091
|
+
meeting.publishStreams(localStreams),
|
|
4092
|
+
`Attempted to publish camera stream with ended readyState, correlationId=${meeting.correlationId}`
|
|
4093
|
+
);
|
|
4006
4094
|
} else {
|
|
4007
4095
|
assert.calledOnceWithExactly(
|
|
4008
4096
|
meeting.sendSlotManager.getSlot(MediaType.VideoMain).publishStream,
|
|
@@ -4015,6 +4103,10 @@ describe('plugin-meetings', () => {
|
|
|
4015
4103
|
assert.notCalled(
|
|
4016
4104
|
meeting.sendSlotManager.getSlot(MediaType.AudioSlides).publishStream
|
|
4017
4105
|
);
|
|
4106
|
+
assert.throws(
|
|
4107
|
+
meeting.publishStreams(localStreams),
|
|
4108
|
+
`Attempted to publish screenShare audio stream with ended readyState, correlationId=${meeting.correlationId}`
|
|
4109
|
+
);
|
|
4018
4110
|
} else {
|
|
4019
4111
|
assert.calledOnceWithExactly(
|
|
4020
4112
|
meeting.sendSlotManager.getSlot(MediaType.AudioSlides).publishStream,
|
|
@@ -4027,6 +4119,10 @@ describe('plugin-meetings', () => {
|
|
|
4027
4119
|
assert.notCalled(
|
|
4028
4120
|
meeting.sendSlotManager.getSlot(MediaType.VideoSlides).publishStream
|
|
4029
4121
|
);
|
|
4122
|
+
assert.throws(
|
|
4123
|
+
meeting.publishStreams(localStreams),
|
|
4124
|
+
`Attempted to publish screenShare video stream with ended readyState, correlationId=${meeting.correlationId}`
|
|
4125
|
+
);
|
|
4030
4126
|
} else {
|
|
4031
4127
|
assert.calledOnceWithExactly(
|
|
4032
4128
|
meeting.sendSlotManager.getSlot(MediaType.VideoSlides).publishStream,
|
|
@@ -4321,14 +4417,14 @@ describe('plugin-meetings', () => {
|
|
|
4321
4417
|
const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
|
|
4322
4418
|
await meeting.addMedia({audioEnabled: false});
|
|
4323
4419
|
//calling handleDeviceLogging with audioEnaled as true adn videoEnabled as false
|
|
4324
|
-
assert.calledWith(handleDeviceLoggingSpy,false,true);
|
|
4420
|
+
assert.calledWith(handleDeviceLoggingSpy, false, true);
|
|
4325
4421
|
});
|
|
4326
4422
|
|
|
4327
4423
|
it('addMedia() works correctly when video is disabled with no streams to publish', async () => {
|
|
4328
4424
|
const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
|
|
4329
4425
|
await meeting.addMedia({videoEnabled: false});
|
|
4330
4426
|
//calling handleDeviceLogging audioEnabled as true videoEnabled as false
|
|
4331
|
-
assert.calledWith(handleDeviceLoggingSpy,true,false);
|
|
4427
|
+
assert.calledWith(handleDeviceLoggingSpy, true, false);
|
|
4332
4428
|
});
|
|
4333
4429
|
|
|
4334
4430
|
it('addMedia() works correctly when video is disabled with no streams to publish', async () => {
|
|
@@ -4397,12 +4493,11 @@ describe('plugin-meetings', () => {
|
|
|
4397
4493
|
assert.calledTwice(locusMediaRequestStub);
|
|
4398
4494
|
});
|
|
4399
4495
|
|
|
4400
|
-
|
|
4401
4496
|
it('addMedia() works correctly when both shareAudio and shareVideo is disabled with no streams publish', async () => {
|
|
4402
4497
|
const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
|
|
4403
4498
|
await meeting.addMedia({shareAudioEnabled: false, shareVideoEnabled: false});
|
|
4404
4499
|
//calling handleDeviceLogging with audioEnabled true and videoEnabled as true
|
|
4405
|
-
assert.calledWith(handleDeviceLoggingSpy,true,true);
|
|
4500
|
+
assert.calledWith(handleDeviceLoggingSpy, true, true);
|
|
4406
4501
|
});
|
|
4407
4502
|
|
|
4408
4503
|
describe('publishStreams()/unpublishStreams() calls', () => {
|
|
@@ -6250,6 +6345,75 @@ describe('plugin-meetings', () => {
|
|
|
6250
6345
|
|
|
6251
6346
|
assert.equal(meeting.fetchMeetingInfoTimeoutId, undefined);
|
|
6252
6347
|
});
|
|
6348
|
+
|
|
6349
|
+
it('handles MeetingInfoV2JoinWebinarError webinar need registration', async () => {
|
|
6350
|
+
meeting.destination = FAKE_DESTINATION;
|
|
6351
|
+
meeting.destinationType = FAKE_TYPE;
|
|
6352
|
+
meeting.attrs.meetingInfoProvider = {
|
|
6353
|
+
fetchMeetingInfo: sinon
|
|
6354
|
+
.stub()
|
|
6355
|
+
.throws(
|
|
6356
|
+
new MeetingInfoV2JoinWebinarError(403021, FAKE_MEETING_INFO, 'a message')
|
|
6357
|
+
),
|
|
6358
|
+
};
|
|
6359
|
+
|
|
6360
|
+
await assert.isRejected(
|
|
6361
|
+
meeting.fetchMeetingInfo({sendCAevents: true}),
|
|
6362
|
+
JoinWebinarError
|
|
6363
|
+
);
|
|
6364
|
+
|
|
6365
|
+
assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
|
|
6366
|
+
assert.equal(
|
|
6367
|
+
meeting.meetingInfoFailureReason,
|
|
6368
|
+
MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION
|
|
6369
|
+
);
|
|
6370
|
+
});
|
|
6371
|
+
|
|
6372
|
+
it('handles MeetingInfoV2JoinWebinarError webinar need join with webcast', async () => {
|
|
6373
|
+
meeting.destination = FAKE_DESTINATION;
|
|
6374
|
+
meeting.destinationType = FAKE_TYPE;
|
|
6375
|
+
meeting.attrs.meetingInfoProvider = {
|
|
6376
|
+
fetchMeetingInfo: sinon
|
|
6377
|
+
.stub()
|
|
6378
|
+
.throws(
|
|
6379
|
+
new MeetingInfoV2JoinWebinarError(403026, FAKE_MEETING_INFO, 'a message')
|
|
6380
|
+
),
|
|
6381
|
+
};
|
|
6382
|
+
|
|
6383
|
+
await assert.isRejected(
|
|
6384
|
+
meeting.fetchMeetingInfo({sendCAevents: true}),
|
|
6385
|
+
JoinWebinarError
|
|
6386
|
+
);
|
|
6387
|
+
|
|
6388
|
+
assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
|
|
6389
|
+
assert.equal(
|
|
6390
|
+
meeting.meetingInfoFailureReason,
|
|
6391
|
+
MEETING_INFO_FAILURE_REASON.NEED_JOIN_WITH_WEBCAST
|
|
6392
|
+
);
|
|
6393
|
+
});
|
|
6394
|
+
|
|
6395
|
+
it('handles MeetingInfoV2JoinWebinarError webinar need registrationId', async () => {
|
|
6396
|
+
meeting.destination = FAKE_DESTINATION;
|
|
6397
|
+
meeting.destinationType = FAKE_TYPE;
|
|
6398
|
+
meeting.attrs.meetingInfoProvider = {
|
|
6399
|
+
fetchMeetingInfo: sinon
|
|
6400
|
+
.stub()
|
|
6401
|
+
.throws(
|
|
6402
|
+
new MeetingInfoV2JoinWebinarError(403037, FAKE_MEETING_INFO, 'a message')
|
|
6403
|
+
),
|
|
6404
|
+
};
|
|
6405
|
+
|
|
6406
|
+
await assert.isRejected(
|
|
6407
|
+
meeting.fetchMeetingInfo({sendCAevents: true}),
|
|
6408
|
+
JoinWebinarError
|
|
6409
|
+
);
|
|
6410
|
+
|
|
6411
|
+
assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
|
|
6412
|
+
assert.equal(
|
|
6413
|
+
meeting.meetingInfoFailureReason,
|
|
6414
|
+
MEETING_INFO_FAILURE_REASON.WEBINAR_NEED_REGISTRATIONID
|
|
6415
|
+
);
|
|
6416
|
+
});
|
|
6253
6417
|
});
|
|
6254
6418
|
|
|
6255
6419
|
describe('#refreshPermissionToken', () => {
|
|
@@ -6963,7 +7127,10 @@ describe('plugin-meetings', () => {
|
|
|
6963
7127
|
assert.deepEqual(meeting.callStateForMetrics, {correlationId, sessionCorrelationId: ''});
|
|
6964
7128
|
meeting.setCorrelationId(uuid1);
|
|
6965
7129
|
assert.equal(meeting.correlationId, uuid1);
|
|
6966
|
-
assert.deepEqual(meeting.callStateForMetrics, {
|
|
7130
|
+
assert.deepEqual(meeting.callStateForMetrics, {
|
|
7131
|
+
correlationId: uuid1,
|
|
7132
|
+
sessionCorrelationId: '',
|
|
7133
|
+
});
|
|
6967
7134
|
});
|
|
6968
7135
|
});
|
|
6969
7136
|
|
|
@@ -7635,11 +7802,11 @@ describe('plugin-meetings', () => {
|
|
|
7635
7802
|
id: 'stream',
|
|
7636
7803
|
getTracks: () => [{id: 'track', addEventListener: sinon.stub()}],
|
|
7637
7804
|
};
|
|
7638
|
-
const simulateConnectionStateChange = (newState) => {
|
|
7805
|
+
const simulateConnectionStateChange = async (newState) => {
|
|
7639
7806
|
meeting.mediaProperties.webrtcMediaConnection.getConnectionState = sinon
|
|
7640
7807
|
.stub()
|
|
7641
7808
|
.returns(newState);
|
|
7642
|
-
eventListeners[MediaConnectionEventNames.PEER_CONNECTION_STATE_CHANGED]();
|
|
7809
|
+
await eventListeners[MediaConnectionEventNames.PEER_CONNECTION_STATE_CHANGED]();
|
|
7643
7810
|
};
|
|
7644
7811
|
|
|
7645
7812
|
beforeEach(() => {
|
|
@@ -7709,11 +7876,19 @@ describe('plugin-meetings', () => {
|
|
|
7709
7876
|
});
|
|
7710
7877
|
|
|
7711
7878
|
it('should collect ice candidates', () => {
|
|
7712
|
-
eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({
|
|
7879
|
+
eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({
|
|
7880
|
+
candidate: {candidate: 'candidate'},
|
|
7881
|
+
});
|
|
7713
7882
|
|
|
7714
7883
|
assert.equal(meeting.iceCandidatesCount, 1);
|
|
7715
7884
|
});
|
|
7716
7885
|
|
|
7886
|
+
it('should not collect empty ice candidates', () => {
|
|
7887
|
+
eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({candidate: {candidate: ''}});
|
|
7888
|
+
|
|
7889
|
+
assert.equal(meeting.iceCandidatesCount, 0);
|
|
7890
|
+
});
|
|
7891
|
+
|
|
7717
7892
|
it('should not collect null ice candidates', () => {
|
|
7718
7893
|
eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({candidate: null});
|
|
7719
7894
|
|
|
@@ -7895,7 +8070,7 @@ describe('plugin-meetings', () => {
|
|
|
7895
8070
|
meeting.reconnectionManager = new ReconnectionManager(meeting);
|
|
7896
8071
|
meeting.reconnectionManager.iceReconnected = sinon.stub().returns(undefined);
|
|
7897
8072
|
meeting.setNetworkStatus = sinon.stub().returns(undefined);
|
|
7898
|
-
meeting.statsAnalyzer = {startAnalyzer: sinon.stub()};
|
|
8073
|
+
meeting.statsAnalyzer = {startAnalyzer: sinon.stub(), stopAnalyzer: sinon.stub()};
|
|
7899
8074
|
meeting.mediaProperties.webrtcMediaConnection = {
|
|
7900
8075
|
// mock the on() method and store all the listeners
|
|
7901
8076
|
on: sinon.stub().callsFake((event, listener) => {
|
|
@@ -7970,10 +8145,10 @@ describe('plugin-meetings', () => {
|
|
|
7970
8145
|
});
|
|
7971
8146
|
|
|
7972
8147
|
describe('CONNECTION_STATE_CHANGED event when state = "Failed"', () => {
|
|
7973
|
-
const mockFailedEvent = () => {
|
|
8148
|
+
const mockFailedEvent = async () => {
|
|
7974
8149
|
meeting.setupMediaConnectionListeners();
|
|
7975
8150
|
|
|
7976
|
-
simulateConnectionStateChange(ConnectionState.Failed);
|
|
8151
|
+
await simulateConnectionStateChange(ConnectionState.Failed);
|
|
7977
8152
|
};
|
|
7978
8153
|
|
|
7979
8154
|
const checkBehavioralMetricSent = (hasMediaConnectionConnectedAtLeastOnce = false) => {
|
|
@@ -8003,6 +8178,22 @@ describe('plugin-meetings', () => {
|
|
|
8003
8178
|
assert.notCalled(webex.internal.newMetrics.submitClientEvent);
|
|
8004
8179
|
checkBehavioralMetricSent(true);
|
|
8005
8180
|
});
|
|
8181
|
+
|
|
8182
|
+
it('stop stats analyzer during reconnection ', async () => {
|
|
8183
|
+
meeting.hasMediaConnectionConnectedAtLeastOnce = true;
|
|
8184
|
+
meeting.statsAnalyzer.stopAnalyzer = sinon.stub().resolves();
|
|
8185
|
+
meeting.reconnectionManager = {
|
|
8186
|
+
reconnect: sinon.stub().resolves(),
|
|
8187
|
+
resetReconnectionTimer: () => {},
|
|
8188
|
+
};
|
|
8189
|
+
meeting.currentMediaStatus = {
|
|
8190
|
+
video: true,
|
|
8191
|
+
};
|
|
8192
|
+
|
|
8193
|
+
await mockFailedEvent();
|
|
8194
|
+
|
|
8195
|
+
assert.calledOnce(meeting.statsAnalyzer.stopAnalyzer);
|
|
8196
|
+
});
|
|
8006
8197
|
});
|
|
8007
8198
|
|
|
8008
8199
|
describe('should send correct metrics for ROAP_FAILURE event', () => {
|
|
@@ -8547,6 +8738,13 @@ describe('plugin-meetings', () => {
|
|
|
8547
8738
|
{payload: test1}
|
|
8548
8739
|
);
|
|
8549
8740
|
assert.calledOnce(meeting.updateLLMConnection);
|
|
8741
|
+
assert.calledOnceWithExactly(
|
|
8742
|
+
Metrics.sendBehavioralMetric,
|
|
8743
|
+
BEHAVIORAL_METRICS.GUEST_ENTERED_LOBBY,
|
|
8744
|
+
{
|
|
8745
|
+
correlation_id: meeting.correlationId,
|
|
8746
|
+
}
|
|
8747
|
+
);
|
|
8550
8748
|
done();
|
|
8551
8749
|
});
|
|
8552
8750
|
it('listens to the self admitted guest event', (done) => {
|
|
@@ -8568,6 +8766,13 @@ describe('plugin-meetings', () => {
|
|
|
8568
8766
|
assert.calledOnce(meeting.updateLLMConnection);
|
|
8569
8767
|
assert.calledOnceWithExactly(meeting.rtcMetrics.sendNextMetrics);
|
|
8570
8768
|
|
|
8769
|
+
assert.calledOnceWithExactly(
|
|
8770
|
+
Metrics.sendBehavioralMetric,
|
|
8771
|
+
BEHAVIORAL_METRICS.GUEST_EXITED_LOBBY,
|
|
8772
|
+
{
|
|
8773
|
+
correlation_id: meeting.correlationId,
|
|
8774
|
+
}
|
|
8775
|
+
);
|
|
8571
8776
|
done();
|
|
8572
8777
|
});
|
|
8573
8778
|
|
|
@@ -8863,6 +9068,81 @@ describe('plugin-meetings', () => {
|
|
|
8863
9068
|
);
|
|
8864
9069
|
});
|
|
8865
9070
|
|
|
9071
|
+
it('listens to MEETING_CONTROLS_WEBCAST_UPDATED', async () => {
|
|
9072
|
+
const state = {example: 'value'};
|
|
9073
|
+
|
|
9074
|
+
await meeting.locusInfo.emitScoped(
|
|
9075
|
+
{function: 'test', file: 'test'},
|
|
9076
|
+
LOCUSINFO.EVENTS.CONTROLS_WEBCAST_CHANGED,
|
|
9077
|
+
{state}
|
|
9078
|
+
);
|
|
9079
|
+
|
|
9080
|
+
assert.calledWith(
|
|
9081
|
+
TriggerProxy.trigger,
|
|
9082
|
+
meeting,
|
|
9083
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
|
9084
|
+
EVENT_TRIGGERS.MEETING_CONTROLS_WEBCAST_UPDATED,
|
|
9085
|
+
{state}
|
|
9086
|
+
);
|
|
9087
|
+
});
|
|
9088
|
+
|
|
9089
|
+
it('listens to MEETING_CONTROLS_MEETING_FULL_UPDATED', async () => {
|
|
9090
|
+
const state = {example: 'value'};
|
|
9091
|
+
|
|
9092
|
+
await meeting.locusInfo.emitScoped(
|
|
9093
|
+
{function: 'test', file: 'test'},
|
|
9094
|
+
LOCUSINFO.EVENTS.CONTROLS_MEETING_FULL_CHANGED,
|
|
9095
|
+
{state}
|
|
9096
|
+
);
|
|
9097
|
+
|
|
9098
|
+
assert.calledWith(
|
|
9099
|
+
TriggerProxy.trigger,
|
|
9100
|
+
meeting,
|
|
9101
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
|
9102
|
+
EVENT_TRIGGERS.MEETING_CONTROLS_MEETING_FULL_UPDATED,
|
|
9103
|
+
{state}
|
|
9104
|
+
);
|
|
9105
|
+
});
|
|
9106
|
+
|
|
9107
|
+
it('listens to MEETING_CONTROLS_PRACTICE_SESSION_STATUS_UPDATED', async () => {
|
|
9108
|
+
meeting.webinar.updatePracticeSessionStatus = sinon.stub();
|
|
9109
|
+
|
|
9110
|
+
const state = {example: 'value'};
|
|
9111
|
+
|
|
9112
|
+
await meeting.locusInfo.emitScoped(
|
|
9113
|
+
{function: 'test', file: 'test'},
|
|
9114
|
+
LOCUSINFO.EVENTS.CONTROLS_PRACTICE_SESSION_STATUS_UPDATED,
|
|
9115
|
+
{state}
|
|
9116
|
+
);
|
|
9117
|
+
|
|
9118
|
+
assert.calledOnceWithExactly(meeting.webinar.updatePracticeSessionStatus, state);
|
|
9119
|
+
assert.calledWith(
|
|
9120
|
+
TriggerProxy.trigger,
|
|
9121
|
+
meeting,
|
|
9122
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
|
9123
|
+
EVENT_TRIGGERS.MEETING_CONTROLS_PRACTICE_SESSION_STATUS_UPDATED,
|
|
9124
|
+
{state}
|
|
9125
|
+
);
|
|
9126
|
+
});
|
|
9127
|
+
|
|
9128
|
+
it('listens to MEETING_CONTROLS_STAGE_VIEW_UPDATED', async () => {
|
|
9129
|
+
const state = {example: 'value'};
|
|
9130
|
+
|
|
9131
|
+
await meeting.locusInfo.emitScoped(
|
|
9132
|
+
{function: 'test', file: 'test'},
|
|
9133
|
+
LOCUSINFO.EVENTS.CONTROLS_STAGE_VIEW_UPDATED,
|
|
9134
|
+
{state}
|
|
9135
|
+
);
|
|
9136
|
+
|
|
9137
|
+
assert.calledWith(
|
|
9138
|
+
TriggerProxy.trigger,
|
|
9139
|
+
meeting,
|
|
9140
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
|
9141
|
+
EVENT_TRIGGERS.MEETING_CONTROLS_STAGE_VIEW_UPDATED,
|
|
9142
|
+
{state}
|
|
9143
|
+
);
|
|
9144
|
+
});
|
|
9145
|
+
|
|
8866
9146
|
it('listens to MEETING_CONTROLS_VIDEO_UPDATED', async () => {
|
|
8867
9147
|
const state = {example: 'value'};
|
|
8868
9148
|
|
|
@@ -8976,12 +9256,6 @@ describe('plugin-meetings', () => {
|
|
|
8976
9256
|
approval: {
|
|
8977
9257
|
url: 'url',
|
|
8978
9258
|
},
|
|
8979
|
-
webcast: {
|
|
8980
|
-
url: 'url',
|
|
8981
|
-
},
|
|
8982
|
-
webinarAttendeesSearching: {
|
|
8983
|
-
url: 'url',
|
|
8984
|
-
},
|
|
8985
9259
|
},
|
|
8986
9260
|
};
|
|
8987
9261
|
|
|
@@ -8995,10 +9269,6 @@ describe('plugin-meetings', () => {
|
|
|
8995
9269
|
meeting.simultaneousInterpretation = {
|
|
8996
9270
|
approvalUrlUpdate: sinon.stub().returns(undefined),
|
|
8997
9271
|
};
|
|
8998
|
-
meeting.webinar = {
|
|
8999
|
-
webcastUrlUpdate: sinon.stub().returns(undefined),
|
|
9000
|
-
webinarAttendeesSearchingUrlUpdate: sinon.stub().returns(undefined),
|
|
9001
|
-
};
|
|
9002
9272
|
|
|
9003
9273
|
meeting.locusInfo.emit(
|
|
9004
9274
|
{function: 'test', file: 'test'},
|
|
@@ -9018,19 +9288,37 @@ describe('plugin-meetings', () => {
|
|
|
9018
9288
|
meeting.simultaneousInterpretation.approvalUrlUpdate,
|
|
9019
9289
|
newLocusServices.services.approval.url
|
|
9020
9290
|
);
|
|
9021
|
-
assert.calledWith(
|
|
9022
|
-
meeting.webinar.webcastUrlUpdate,
|
|
9023
|
-
newLocusServices.services.webcast.url
|
|
9024
|
-
);
|
|
9025
|
-
assert.calledWith(
|
|
9026
|
-
meeting.webinar.webinarAttendeesSearchingUrlUpdate,
|
|
9027
|
-
newLocusServices.services.webinarAttendeesSearching.url
|
|
9028
|
-
);
|
|
9029
9291
|
assert.calledOnce(meeting.recordingController.setSessionId);
|
|
9030
9292
|
done();
|
|
9031
9293
|
});
|
|
9032
9294
|
});
|
|
9033
9295
|
|
|
9296
|
+
describe('#setUpLocusResourcesListener', () => {
|
|
9297
|
+
it('listens to the locus resources update event', (done) => {
|
|
9298
|
+
const newLocusResources = {
|
|
9299
|
+
resources: {
|
|
9300
|
+
webcastInstance: {
|
|
9301
|
+
url: 'url',
|
|
9302
|
+
},
|
|
9303
|
+
},
|
|
9304
|
+
};
|
|
9305
|
+
|
|
9306
|
+
meeting.webinar = {
|
|
9307
|
+
updateWebcastUrl: sinon.stub().returns(undefined),
|
|
9308
|
+
};
|
|
9309
|
+
|
|
9310
|
+
meeting.locusInfo.emit(
|
|
9311
|
+
{function: 'test', file: 'test'},
|
|
9312
|
+
'LINKS_RESOURCES',
|
|
9313
|
+
newLocusResources
|
|
9314
|
+
);
|
|
9315
|
+
|
|
9316
|
+
assert.calledWith(meeting.webinar.updateWebcastUrl, newLocusResources);
|
|
9317
|
+
|
|
9318
|
+
done();
|
|
9319
|
+
});
|
|
9320
|
+
});
|
|
9321
|
+
|
|
9034
9322
|
describe('#setUpLocusInfoMediaInactiveListener', () => {
|
|
9035
9323
|
it('listens to disconnect due to un activity ', (done) => {
|
|
9036
9324
|
TriggerProxy.trigger.reset();
|
|
@@ -12178,6 +12466,43 @@ describe('plugin-meetings', () => {
|
|
|
12178
12466
|
await testEmit(false);
|
|
12179
12467
|
});
|
|
12180
12468
|
});
|
|
12469
|
+
|
|
12470
|
+
describe('LOCAL_UNMUTE_REQUIRED locus event', () => {
|
|
12471
|
+
const testEmit = async (unmuteAllowed) => {
|
|
12472
|
+
meeting.audio = {
|
|
12473
|
+
handleServerLocalUnmuteRequired: sinon.stub(),
|
|
12474
|
+
};
|
|
12475
|
+
await meeting.locusInfo.emitScoped({}, LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, {
|
|
12476
|
+
unmuteAllowed,
|
|
12477
|
+
});
|
|
12478
|
+
|
|
12479
|
+
assert.calledWith(
|
|
12480
|
+
TriggerProxy.trigger,
|
|
12481
|
+
sinon.match.instanceOf(Meeting),
|
|
12482
|
+
{
|
|
12483
|
+
file: 'meeting/index',
|
|
12484
|
+
function: 'setUpLocusInfoSelfListener',
|
|
12485
|
+
},
|
|
12486
|
+
EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS,
|
|
12487
|
+
{
|
|
12488
|
+
payload: {
|
|
12489
|
+
unmuteAllowed,
|
|
12490
|
+
},
|
|
12491
|
+
}
|
|
12492
|
+
);
|
|
12493
|
+
assert.calledOnceWithExactly(
|
|
12494
|
+
meeting.audio.handleServerLocalUnmuteRequired,
|
|
12495
|
+
meeting,
|
|
12496
|
+
unmuteAllowed
|
|
12497
|
+
);
|
|
12498
|
+
};
|
|
12499
|
+
|
|
12500
|
+
[true, false].forEach((unmuteAllowed) => {
|
|
12501
|
+
it(`emits the expected event and calls handleServerLocalUnmuteRequired() when unmuteAllowed=${unmuteAllowed}`, async () => {
|
|
12502
|
+
await testEmit(unmuteAllowed);
|
|
12503
|
+
});
|
|
12504
|
+
});
|
|
12505
|
+
});
|
|
12181
12506
|
});
|
|
12182
12507
|
});
|
|
12183
12508
|
|