@webex/plugin-meetings 3.0.0-beta.21 → 3.0.0-beta.211
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 +45 -7
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +114 -14
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +841 -19
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/errors/webex-errors.js +3 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/queue.js +24 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +3 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +179 -30
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +106 -1
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +91 -2
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +359 -64
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +7 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +43 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +219 -63
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +89 -14
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +48 -135
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +29 -90
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -493
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +90 -2
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2770 -2547
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +229 -124
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +199 -193
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +532 -414
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +48 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +171 -51
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +20 -5
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +22 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +357 -66
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +2 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +88 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +49 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +121 -25
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +10 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +86 -5
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +106 -38
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +316 -233
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +3 -5
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +1 -468
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +238 -49
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +49 -16
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +52 -34
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +44 -18
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +60 -3
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +173 -59
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +4 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/reachability/index.js +72 -27
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -5
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +196 -155
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +21 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +9 -8
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +21 -29
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +110 -89
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +93 -36
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +117 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -93
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +326 -311
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +90 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1020 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +271 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +163 -0
- package/dist/types/meeting/index.d.ts +1482 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +72 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +257 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +79 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +62 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +367 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +159 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +46 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +200 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/package.json +23 -20
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +44 -14
- package/src/breakouts/breakout.ts +87 -9
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +710 -10
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/errors/webex-errors.ts +6 -2
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/common/queue.ts +22 -8
- package/src/config.ts +2 -7
- package/src/constants.ts +165 -21
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +39 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +108 -0
- package/src/locus-info/index.ts +383 -61
- package/src/locus-info/infoUtils.ts +10 -2
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +224 -39
- package/src/locus-info/selfUtils.ts +81 -5
- package/src/media/index.ts +87 -140
- package/src/media/properties.ts +49 -90
- package/src/mediaQualityMetrics/config.ts +379 -377
- package/src/meeting/in-meeting-actions.ts +179 -3
- package/src/meeting/index.ts +2099 -2083
- package/src/meeting/locusMediaRequest.ts +311 -0
- package/src/meeting/muteState.ts +228 -132
- package/src/meeting/request.ts +105 -115
- package/src/meeting/util.ts +511 -397
- package/src/meeting-info/index.ts +54 -8
- package/src/meeting-info/meeting-info-v2.ts +148 -14
- package/src/meeting-info/utilv2.ts +13 -3
- package/src/meetings/collection.ts +20 -0
- package/src/meetings/index.ts +392 -84
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +2 -0
- package/src/meetings/util.ts +103 -4
- package/src/member/index.ts +49 -0
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +127 -25
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +107 -6
- package/src/members/request.ts +97 -17
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +319 -240
- package/src/metrics/constants.ts +2 -4
- package/src/metrics/index.ts +1 -490
- package/src/multistream/mediaRequestManager.ts +289 -79
- package/src/multistream/receiveSlot.ts +55 -18
- package/src/multistream/receiveSlotManager.ts +46 -24
- package/src/multistream/remoteMedia.ts +27 -2
- package/src/multistream/remoteMediaGroup.ts +59 -0
- package/src/multistream/remoteMediaManager.ts +113 -32
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/reachability/index.ts +62 -15
- package/src/reachability/request.ts +10 -5
- package/src/reconnection-manager/index.ts +68 -43
- package/src/recording-controller/index.ts +20 -3
- package/src/recording-controller/util.ts +26 -9
- package/src/roap/index.ts +21 -30
- package/src/roap/request.ts +101 -95
- package/src/roap/turnDiscovery.ts +47 -25
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/global.ts +1 -94
- package/src/statsAnalyzer/index.ts +376 -386
- package/src/statsAnalyzer/mqaUtil.ts +100 -99
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +336 -259
- package/test/integration/spec/space-meeting.js +77 -4
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +142 -24
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1545 -48
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +316 -43
- package/test/unit/spec/locus-info/index.js +1169 -36
- package/test/unit/spec/locus-info/infoUtils.js +37 -15
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +62 -22
- package/test/unit/spec/locus-info/selfConstant.js +27 -4
- package/test/unit/spec/locus-info/selfUtils.js +208 -17
- package/test/unit/spec/media/index.ts +138 -28
- package/test/unit/spec/meeting/in-meeting-actions.ts +89 -3
- package/test/unit/spec/meeting/index.js +3573 -1663
- package/test/unit/spec/meeting/locusMediaRequest.ts +438 -0
- package/test/unit/spec/meeting/muteState.js +370 -208
- package/test/unit/spec/meeting/request.js +339 -44
- package/test/unit/spec/meeting/utils.js +456 -53
- package/test/unit/spec/meeting-info/index.js +181 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +383 -5
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +14 -0
- package/test/unit/spec/meetings/index.js +867 -125
- package/test/unit/spec/meetings/utils.js +206 -2
- package/test/unit/spec/member/index.js +58 -4
- package/test/unit/spec/member/util.js +479 -35
- package/test/unit/spec/members/index.js +319 -1
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +184 -0
- package/test/unit/spec/metrics/index.js +1 -50
- package/test/unit/spec/multistream/mediaRequestManager.ts +803 -162
- package/test/unit/spec/multistream/receiveSlot.ts +72 -13
- package/test/unit/spec/multistream/receiveSlotManager.ts +58 -28
- package/test/unit/spec/multistream/remoteMedia.ts +30 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +266 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +318 -0
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/reachability/index.ts +125 -8
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +59 -6
- package/test/unit/spec/recording-controller/index.js +294 -218
- package/test/unit/spec/recording-controller/util.js +223 -96
- package/test/unit/spec/roap/index.ts +26 -51
- package/test/unit/spec/roap/request.ts +196 -85
- package/test/unit/spec/roap/turnDiscovery.ts +30 -7
- package/test/unit/spec/rtcMetrics/index.ts +60 -0
- package/test/unit/spec/stats-analyzer/index.js +92 -41
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -45
- package/test/utils/webex-config.js +4 -0
- package/test/utils/webex-test-users.js +6 -3
- package/dist/meeting/effectsState.js +0 -262
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -299
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -110
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/src/index.js +0 -16
- package/src/meeting/effectsState.ts +0 -211
- package/src/metrics/config.ts +0 -495
- package/src/multistream/multistreamMedia.ts +0 -97
- package/test/unit/spec/meeting/effectsState.js +0 -285
|
@@ -15,6 +15,9 @@ import {cloneDeep} from 'lodash';
|
|
|
15
15
|
import {MediaRequest} from '@webex/plugin-meetings/src/multistream/mediaRequestManager';
|
|
16
16
|
import {CSI, ReceiveSlotId} from '@webex/plugin-meetings/src/multistream/receiveSlot';
|
|
17
17
|
import testUtils from '../../../utils/testUtils';
|
|
18
|
+
import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
|
|
19
|
+
import LoggerConfig from '@webex/plugin-meetings/src/common/logs/logger-config';
|
|
20
|
+
import { expect } from 'chai';
|
|
18
21
|
|
|
19
22
|
class FakeSlot extends EventEmitter {
|
|
20
23
|
public mediaType: MediaType;
|
|
@@ -32,6 +35,10 @@ class FakeSlot extends EventEmitter {
|
|
|
32
35
|
// Calling setMaxListeners() fixes the warning.
|
|
33
36
|
this.setMaxListeners(50);
|
|
34
37
|
}
|
|
38
|
+
|
|
39
|
+
public get logString() {
|
|
40
|
+
return this.id;
|
|
41
|
+
}
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
const DefaultTestConfiguration: Configuration = {
|
|
@@ -120,7 +127,23 @@ describe('RemoteMediaManager', () => {
|
|
|
120
127
|
let fakeScreenShareAudioSlot;
|
|
121
128
|
let fakeScreenShareVideoSlot;
|
|
122
129
|
|
|
130
|
+
const logger = {
|
|
131
|
+
log: sinon.fake(),
|
|
132
|
+
error: () => {},
|
|
133
|
+
warn: () => {},
|
|
134
|
+
trace: () => {},
|
|
135
|
+
debug: () => {},
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
afterEach(() => {
|
|
139
|
+
LoggerConfig.set({enable: false});
|
|
140
|
+
LoggerProxy.set();
|
|
141
|
+
});
|
|
142
|
+
|
|
123
143
|
beforeEach(() => {
|
|
144
|
+
LoggerConfig.set({enable: true});
|
|
145
|
+
LoggerProxy.set(logger);
|
|
146
|
+
|
|
124
147
|
fakeAudioSlot = new FakeSlot(MediaType.AudioMain, 'fake audio slot');
|
|
125
148
|
fakeVideoSlot = new FakeSlot(MediaType.VideoMain, 'fake video slot');
|
|
126
149
|
fakeScreenShareAudioSlot = new FakeSlot(
|
|
@@ -191,6 +214,7 @@ describe('RemoteMediaManager', () => {
|
|
|
191
214
|
fakeMediaRequestManagers.video.commit.resetHistory();
|
|
192
215
|
fakeMediaRequestManagers.screenShareVideo.commit.resetHistory();
|
|
193
216
|
fakeMediaRequestManagers.screenShareAudio.commit.resetHistory();
|
|
217
|
+
logger.log.resetHistory();
|
|
194
218
|
};
|
|
195
219
|
|
|
196
220
|
describe('start', () => {
|
|
@@ -639,6 +663,41 @@ describe('RemoteMediaManager', () => {
|
|
|
639
663
|
remoteMediaManager.stop();
|
|
640
664
|
});
|
|
641
665
|
});
|
|
666
|
+
|
|
667
|
+
describe('setPreferLiveVideo', () => {
|
|
668
|
+
|
|
669
|
+
it('sets preferLiveVideo', async () => {
|
|
670
|
+
const config = cloneDeep(DefaultTestConfiguration);
|
|
671
|
+
let stubs = [];
|
|
672
|
+
|
|
673
|
+
config.video.initialLayoutId = 'OnePlusFive';
|
|
674
|
+
|
|
675
|
+
remoteMediaManager = new RemoteMediaManager(
|
|
676
|
+
fakeReceiveSlotManager,
|
|
677
|
+
fakeMediaRequestManagers,
|
|
678
|
+
config
|
|
679
|
+
);
|
|
680
|
+
|
|
681
|
+
remoteMediaManager.on(Event.VideoLayoutChanged, (layoutInfo: VideoLayoutChangedEventData) => {
|
|
682
|
+
Object.values(layoutInfo.activeSpeakerVideoPanes).forEach((group) => stubs.push(sinon.stub(group, 'setPreferLiveVideo')));
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
await remoteMediaManager.start();
|
|
686
|
+
resetHistory();
|
|
687
|
+
assert(stubs.length > 0);
|
|
688
|
+
await remoteMediaManager.setPreferLiveVideo(true);
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
stubs.forEach((stub) => {
|
|
692
|
+
assert.calledWith(stub, true, false)
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
expect(config.video.preferLiveVideo).to.equal(true);
|
|
696
|
+
|
|
697
|
+
assert.calledOnce(fakeMediaRequestManagers.video.commit);
|
|
698
|
+
});
|
|
699
|
+
});
|
|
700
|
+
|
|
642
701
|
describe('setLayout', () => {
|
|
643
702
|
it('rejects if called with invalid layoutId', async () => {
|
|
644
703
|
await assert.isRejected(remoteMediaManager.setLayout('invalid value'));
|
|
@@ -671,6 +730,50 @@ describe('RemoteMediaManager', () => {
|
|
|
671
730
|
assert.alwaysCalledWith(fakeReceiveSlotManager.allocateSlot, MediaType.VideoMain);
|
|
672
731
|
});
|
|
673
732
|
|
|
733
|
+
it('logs layout changes - receiver selected', async () => {
|
|
734
|
+
const config = cloneDeep(DefaultTestConfiguration);
|
|
735
|
+
|
|
736
|
+
remoteMediaManager = new RemoteMediaManager(
|
|
737
|
+
fakeReceiveSlotManager,
|
|
738
|
+
fakeMediaRequestManagers,
|
|
739
|
+
config
|
|
740
|
+
);
|
|
741
|
+
|
|
742
|
+
await remoteMediaManager.start();
|
|
743
|
+
|
|
744
|
+
resetHistory();
|
|
745
|
+
|
|
746
|
+
await remoteMediaManager.setLayout('Stage');
|
|
747
|
+
|
|
748
|
+
assert.calledWith(
|
|
749
|
+
logger.log,
|
|
750
|
+
'RemoteMediaManager#updateVideoReceiveSlots --> receive slots updated: unused=0, activeSpeaker=6, receiverSelected=4\ngroup: thumbnails\nfake video slot fake video slot fake video slot fake video slot fake video slot fake video slot\nreceiverSelected:\n stage-1: fake video slot\n stage-2: fake video slot\n stage-3: fake video slot\n stage-4: fake video slot\n'
|
|
751
|
+
);
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
it('logs layout changes - active speaker', async () => {
|
|
755
|
+
const config = cloneDeep(DefaultTestConfiguration);
|
|
756
|
+
config.video.initialLayoutId = 'OnePlusFive'
|
|
757
|
+
|
|
758
|
+
remoteMediaManager = new RemoteMediaManager(
|
|
759
|
+
fakeReceiveSlotManager,
|
|
760
|
+
fakeMediaRequestManagers,
|
|
761
|
+
config
|
|
762
|
+
);
|
|
763
|
+
|
|
764
|
+
await remoteMediaManager.start();
|
|
765
|
+
|
|
766
|
+
resetHistory();
|
|
767
|
+
|
|
768
|
+
await remoteMediaManager.setLayout('AllEqual');
|
|
769
|
+
|
|
770
|
+
assert.calledWith(
|
|
771
|
+
logger.log,
|
|
772
|
+
'RemoteMediaManager#updateVideoReceiveSlots --> receive slots updated: unused=0, activeSpeaker=9, receiverSelected=0\ngroup: main\nfake video slot fake video slot fake video slot fake video slot fake video slot fake video slot fake video slot fake video slot fake video slot\nreceiverSelected:\n'
|
|
773
|
+
);
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
|
|
674
777
|
it('releases slots when switching to layout that requires less active speaker slots', async () => {
|
|
675
778
|
// start with "AllEqual" layout that needs just 9 video slots
|
|
676
779
|
const config = cloneDeep(DefaultTestConfiguration);
|
|
@@ -699,6 +802,133 @@ describe('RemoteMediaManager', () => {
|
|
|
699
802
|
});
|
|
700
803
|
});
|
|
701
804
|
|
|
805
|
+
it('releases slots and reallocates slots when switching to layouts in correct order', async () => {
|
|
806
|
+
|
|
807
|
+
const config = cloneDeep(DefaultTestConfiguration);
|
|
808
|
+
let count = 0;
|
|
809
|
+
|
|
810
|
+
fakeReceiveSlotManager.allocateSlot = sinon.stub().callsFake((mediaType) => {
|
|
811
|
+
switch (mediaType) {
|
|
812
|
+
case MediaType.AudioMain:
|
|
813
|
+
return Promise.resolve(fakeAudioSlot);
|
|
814
|
+
case MediaType.VideoMain:
|
|
815
|
+
return Promise.resolve(new FakeSlot(MediaType.VideoMain, `fake video ${count++}`));
|
|
816
|
+
case MediaType.AudioSlides:
|
|
817
|
+
return Promise.resolve(fakeScreenShareAudioSlot);
|
|
818
|
+
case MediaType.VideoSlides:
|
|
819
|
+
return Promise.resolve(fakeScreenShareVideoSlot);
|
|
820
|
+
}
|
|
821
|
+
throw new Error(`invalid mediaType: ${mediaType}`);
|
|
822
|
+
})
|
|
823
|
+
|
|
824
|
+
remoteMediaManager = new RemoteMediaManager(
|
|
825
|
+
fakeReceiveSlotManager,
|
|
826
|
+
fakeMediaRequestManagers,
|
|
827
|
+
config
|
|
828
|
+
);
|
|
829
|
+
|
|
830
|
+
await remoteMediaManager.start();
|
|
831
|
+
|
|
832
|
+
resetHistory();
|
|
833
|
+
|
|
834
|
+
assert.deepEqual(remoteMediaManager.slots.video.activeSpeaker.map((slot: any) => slot.id), [
|
|
835
|
+
"fake video 0",
|
|
836
|
+
"fake video 1",
|
|
837
|
+
"fake video 2",
|
|
838
|
+
"fake video 3",
|
|
839
|
+
"fake video 4",
|
|
840
|
+
"fake video 5",
|
|
841
|
+
"fake video 6",
|
|
842
|
+
"fake video 7",
|
|
843
|
+
"fake video 8",
|
|
844
|
+
]);
|
|
845
|
+
|
|
846
|
+
assert.deepEqual(remoteMediaManager.receiveSlotAllocations.activeSpeaker["main"].slots.map((slot: any) => slot.id), [
|
|
847
|
+
"fake video 0",
|
|
848
|
+
"fake video 1",
|
|
849
|
+
"fake video 2",
|
|
850
|
+
"fake video 3",
|
|
851
|
+
"fake video 4",
|
|
852
|
+
"fake video 5",
|
|
853
|
+
"fake video 6",
|
|
854
|
+
"fake video 7",
|
|
855
|
+
"fake video 8",
|
|
856
|
+
])
|
|
857
|
+
|
|
858
|
+
// switch to "OnePlusFive" layout that requires 3 less video slots (6)
|
|
859
|
+
await remoteMediaManager.setLayout('OnePlusFive');
|
|
860
|
+
|
|
861
|
+
assert.deepEqual(remoteMediaManager.slots.video.unused, []);
|
|
862
|
+
|
|
863
|
+
assert.deepEqual(remoteMediaManager.slots.video.activeSpeaker.map((slot: any) => slot.id), [
|
|
864
|
+
"fake video 0",
|
|
865
|
+
"fake video 1",
|
|
866
|
+
"fake video 2",
|
|
867
|
+
"fake video 3",
|
|
868
|
+
"fake video 4",
|
|
869
|
+
"fake video 5"
|
|
870
|
+
]);
|
|
871
|
+
|
|
872
|
+
// we're checking that the slots are in the same order as in the previous layout
|
|
873
|
+
// first one goes into main
|
|
874
|
+
assert.deepEqual(remoteMediaManager.receiveSlotAllocations.activeSpeaker["mainBigOne"].slots.map((slot: any) => slot.id), [
|
|
875
|
+
"fake video 0",
|
|
876
|
+
])
|
|
877
|
+
// and rest go in the pips
|
|
878
|
+
assert.deepEqual(remoteMediaManager.receiveSlotAllocations.activeSpeaker["secondarySetOfSmallPanes"].slots.map((slot: any) => slot.id), [
|
|
879
|
+
"fake video 1",
|
|
880
|
+
"fake video 2",
|
|
881
|
+
"fake video 3",
|
|
882
|
+
"fake video 4",
|
|
883
|
+
"fake video 5"
|
|
884
|
+
])
|
|
885
|
+
|
|
886
|
+
// verify that 3 main video slots were released
|
|
887
|
+
assert.callCount(fakeReceiveSlotManager.releaseSlot, 3);
|
|
888
|
+
fakeReceiveSlotManager.releaseSlot.getCalls().forEach((call) => {
|
|
889
|
+
const slot = call.args[0];
|
|
890
|
+
|
|
891
|
+
assert.strictEqual(slot.mediaType, MediaType.VideoMain);
|
|
892
|
+
});
|
|
893
|
+
|
|
894
|
+
await remoteMediaManager.setLayout('AllEqual');
|
|
895
|
+
|
|
896
|
+
assert.deepEqual(remoteMediaManager.slots.video.unused, []);
|
|
897
|
+
|
|
898
|
+
// checking that slots are in the same order as in previous layout + 3 new ones
|
|
899
|
+
assert.deepEqual(remoteMediaManager.slots.video.activeSpeaker.map((slot: any) => slot.id), [
|
|
900
|
+
"fake video 0",
|
|
901
|
+
"fake video 1",
|
|
902
|
+
"fake video 2",
|
|
903
|
+
"fake video 3",
|
|
904
|
+
"fake video 4",
|
|
905
|
+
"fake video 5",
|
|
906
|
+
"fake video 10",
|
|
907
|
+
"fake video 11",
|
|
908
|
+
"fake video 12",
|
|
909
|
+
]);
|
|
910
|
+
|
|
911
|
+
assert.deepEqual(remoteMediaManager.receiveSlotAllocations.activeSpeaker["main"].slots.map((slot: any) => slot.id), [
|
|
912
|
+
"fake video 0",
|
|
913
|
+
"fake video 1",
|
|
914
|
+
"fake video 2",
|
|
915
|
+
"fake video 3",
|
|
916
|
+
"fake video 4",
|
|
917
|
+
"fake video 5",
|
|
918
|
+
"fake video 10",
|
|
919
|
+
"fake video 11",
|
|
920
|
+
"fake video 12"
|
|
921
|
+
])
|
|
922
|
+
|
|
923
|
+
// verify that 3 main video slots were allocated
|
|
924
|
+
assert.callCount(fakeReceiveSlotManager.allocateSlot, 3);
|
|
925
|
+
fakeReceiveSlotManager.allocateSlot.getCalls().forEach((call) => {
|
|
926
|
+
const mediaType = call.args[0];
|
|
927
|
+
|
|
928
|
+
assert.strictEqual(mediaType, MediaType.VideoMain);
|
|
929
|
+
});
|
|
930
|
+
});
|
|
931
|
+
|
|
702
932
|
it('stops all current video remoteMedia instances when switching to new layout', async () => {
|
|
703
933
|
const audioStopStubs = [];
|
|
704
934
|
const videoStopStubs = [];
|
|
@@ -1494,6 +1724,94 @@ describe('RemoteMediaManager', () => {
|
|
|
1494
1724
|
});
|
|
1495
1725
|
});
|
|
1496
1726
|
|
|
1727
|
+
describe('setActiveSpeakerCsis', () => {
|
|
1728
|
+
it('calls setActiveSpeakerCsis on the correct remote media group', async () => {
|
|
1729
|
+
let currentLayoutInfo: VideoLayoutChangedEventData | null = null;
|
|
1730
|
+
let setCsisStub;
|
|
1731
|
+
|
|
1732
|
+
remoteMediaManager.on(Event.VideoLayoutChanged, (layoutInfo: VideoLayoutChangedEventData) => {
|
|
1733
|
+
currentLayoutInfo = layoutInfo;
|
|
1734
|
+
setCsisStub = sinon.stub(layoutInfo.activeSpeakerVideoPanes.main, 'setActiveSpeakerCsis');
|
|
1735
|
+
});
|
|
1736
|
+
|
|
1737
|
+
await remoteMediaManager.start();
|
|
1738
|
+
resetHistory();
|
|
1739
|
+
|
|
1740
|
+
assert.isNotNull(currentLayoutInfo);
|
|
1741
|
+
|
|
1742
|
+
if (currentLayoutInfo) {
|
|
1743
|
+
const remoteVideo = currentLayoutInfo.activeSpeakerVideoPanes.main.getRemoteMedia()[0];
|
|
1744
|
+
|
|
1745
|
+
remoteMediaManager.setActiveSpeakerCsis([{remoteMedia: remoteVideo}]);
|
|
1746
|
+
|
|
1747
|
+
assert.calledOnce(setCsisStub);
|
|
1748
|
+
assert.calledWith(setCsisStub, [{remoteMedia: remoteVideo}], false);
|
|
1749
|
+
assert.calledOnce(fakeMediaRequestManagers.video.commit);
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1752
|
+
|
|
1753
|
+
it('does not call setActiveSpeakerCsis on the incorrect media group', async () => {
|
|
1754
|
+
let currentLayoutInfo: VideoLayoutChangedEventData | null = null;
|
|
1755
|
+
let setCsisStub;
|
|
1756
|
+
|
|
1757
|
+
remoteMediaManager.on(Event.VideoLayoutChanged, (layoutInfo: VideoLayoutChangedEventData) => {
|
|
1758
|
+
currentLayoutInfo = layoutInfo;
|
|
1759
|
+
setCsisStub = sinon.stub(layoutInfo.activeSpeakerVideoPanes.main, 'setActiveSpeakerCsis');
|
|
1760
|
+
});
|
|
1761
|
+
|
|
1762
|
+
await remoteMediaManager.start();
|
|
1763
|
+
resetHistory();
|
|
1764
|
+
|
|
1765
|
+
assert.isNotNull(currentLayoutInfo);
|
|
1766
|
+
|
|
1767
|
+
if (currentLayoutInfo) {
|
|
1768
|
+
remoteMediaManager.setActiveSpeakerCsis([{remoteMedia: {}}]);
|
|
1769
|
+
|
|
1770
|
+
assert.notCalled(setCsisStub);
|
|
1771
|
+
assert.calledOnce(fakeMediaRequestManagers.video.commit);
|
|
1772
|
+
}
|
|
1773
|
+
});
|
|
1774
|
+
|
|
1775
|
+
it('checking when there is more than one group', async () => {
|
|
1776
|
+
let currentLayoutInfo: VideoLayoutChangedEventData | null = null;
|
|
1777
|
+
const config = cloneDeep(DefaultTestConfiguration);
|
|
1778
|
+
let stubs = [];
|
|
1779
|
+
|
|
1780
|
+
config.video.initialLayoutId = 'OnePlusFive';
|
|
1781
|
+
|
|
1782
|
+
remoteMediaManager = new RemoteMediaManager(
|
|
1783
|
+
fakeReceiveSlotManager,
|
|
1784
|
+
fakeMediaRequestManagers,
|
|
1785
|
+
config
|
|
1786
|
+
);
|
|
1787
|
+
|
|
1788
|
+
remoteMediaManager.on(Event.VideoLayoutChanged, (layoutInfo: VideoLayoutChangedEventData) => {
|
|
1789
|
+
currentLayoutInfo = layoutInfo;
|
|
1790
|
+
Object.values(layoutInfo.activeSpeakerVideoPanes).forEach((group) => stubs.push(sinon.stub(group, 'setActiveSpeakerCsis')));
|
|
1791
|
+
});
|
|
1792
|
+
|
|
1793
|
+
await remoteMediaManager.start();
|
|
1794
|
+
resetHistory();
|
|
1795
|
+
|
|
1796
|
+
assert.isNotNull(currentLayoutInfo);
|
|
1797
|
+
|
|
1798
|
+
if (currentLayoutInfo) {
|
|
1799
|
+
|
|
1800
|
+
const remoteMedia1 = currentLayoutInfo.activeSpeakerVideoPanes.mainBigOne.getRemoteMedia()[0];
|
|
1801
|
+
const remoteMedia2 = currentLayoutInfo.activeSpeakerVideoPanes.secondarySetOfSmallPanes.getRemoteMedia()[0];
|
|
1802
|
+
|
|
1803
|
+
const remoteMediaCsis = [{remoteMedia: remoteMedia1}, {remoteMedia: remoteMedia2}];
|
|
1804
|
+
|
|
1805
|
+
remoteMediaManager.setActiveSpeakerCsis([{remoteMedia: remoteMedia1}, {remoteMedia: remoteMedia2}]);
|
|
1806
|
+
|
|
1807
|
+
stubs.forEach((stub, index) => {
|
|
1808
|
+
assert.calledWith(stub, [remoteMediaCsis[index]], false)
|
|
1809
|
+
});
|
|
1810
|
+
assert.calledOnce(fakeMediaRequestManagers.video.commit);
|
|
1811
|
+
}
|
|
1812
|
+
});
|
|
1813
|
+
});
|
|
1814
|
+
|
|
1497
1815
|
describe('pinActiveSpeakerVideoPane() and isPinned()', () => {
|
|
1498
1816
|
it('throws if called on a pane not belonging to an active speaker group', async () => {
|
|
1499
1817
|
let currentLayoutInfo: VideoLayoutChangedEventData | null = null;
|
|
@@ -24,7 +24,7 @@ describe('plugin-meetings', () => {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const configObject = {
|
|
27
|
-
mediaType: 'video',
|
|
27
|
+
mediaType: 'video-send',
|
|
28
28
|
remoteRtpResults: {
|
|
29
29
|
id: 'RTCRemoteInboundRtpVideoStream_2411086660',
|
|
30
30
|
timestamp: 1624472676193.79,
|
|
@@ -42,12 +42,12 @@ describe('plugin-meetings', () => {
|
|
|
42
42
|
roundTripTimeMeasurements: 14,
|
|
43
43
|
},
|
|
44
44
|
statsAnalyzerCurrentStats: {
|
|
45
|
-
audio: {
|
|
45
|
+
'audio-send': {
|
|
46
46
|
send: {
|
|
47
47
|
currentPacketLossRatio: 8,
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
|
-
video: {
|
|
50
|
+
'video-send': {
|
|
51
51
|
send: {
|
|
52
52
|
currentPacketLossRatio: 10,
|
|
53
53
|
},
|
|
@@ -83,7 +83,7 @@ describe('plugin-meetings', () => {
|
|
|
83
83
|
}),
|
|
84
84
|
sinon.match(EVENT_TRIGGERS.NETWORK_QUALITY),
|
|
85
85
|
sinon.match({
|
|
86
|
-
mediaType: 'video',
|
|
86
|
+
mediaType: 'video-send',
|
|
87
87
|
networkQualityScore: 0,
|
|
88
88
|
})
|
|
89
89
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {assert} from '@webex/test-helper-chai';
|
|
2
2
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
3
3
|
import sinon from 'sinon';
|
|
4
|
-
import Reachability from '@webex/plugin-meetings/src/reachability/';
|
|
4
|
+
import Reachability, {ICECandidateResult} from '@webex/plugin-meetings/src/reachability/';
|
|
5
5
|
|
|
6
6
|
describe('isAnyClusterReachable', () => {
|
|
7
7
|
let webex;
|
|
@@ -66,19 +66,136 @@ describe('gatherReachability', () => {
|
|
|
66
66
|
it('stores the reachability', async () => {
|
|
67
67
|
const reachability = new Reachability(webex);
|
|
68
68
|
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
const reachabilityResults = {
|
|
70
|
+
clusters: {
|
|
71
|
+
clusterId: {
|
|
72
|
+
udp: 'testUDP',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
const getClustersResult = {
|
|
77
|
+
clusters: {clusterId: 'cluster'},
|
|
78
|
+
joinCookie: {id: 'id'},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
reachability.reachabilityRequest.getClusters = sinon.stub().returns(getClustersResult);
|
|
82
|
+
(reachability as any).performReachabilityCheck = sinon.stub().returns(reachabilityResults);
|
|
74
83
|
|
|
75
84
|
const result = await reachability.gatherReachability();
|
|
76
85
|
|
|
77
86
|
assert.equal(result, reachabilityResults);
|
|
78
87
|
|
|
79
|
-
const
|
|
88
|
+
const storedResultForReachabilityResult = await webex.boundedStorage.get(
|
|
89
|
+
'Reachability',
|
|
90
|
+
'reachability.result'
|
|
91
|
+
);
|
|
92
|
+
const storedResultForJoinCookie = await webex.boundedStorage.get(
|
|
93
|
+
'Reachability',
|
|
94
|
+
'reachability.joinCookie'
|
|
95
|
+
);
|
|
80
96
|
|
|
81
|
-
assert.equal(JSON.stringify(result),
|
|
97
|
+
assert.equal(JSON.stringify(result), storedResultForReachabilityResult);
|
|
98
|
+
assert.equal(JSON.stringify(getClustersResult.joinCookie), storedResultForJoinCookie);
|
|
82
99
|
});
|
|
83
100
|
|
|
101
|
+
describe('clientMediaIPs', () => {
|
|
102
|
+
let testingClass: TestReachability;
|
|
103
|
+
|
|
104
|
+
class TestReachability extends Reachability {
|
|
105
|
+
public testParseIceResultsToReachabilityResults(iceResults: Array<ICECandidateResult>) {
|
|
106
|
+
return this.parseIceResultsToReachabilityResults(iceResults);
|
|
107
|
+
}
|
|
108
|
+
public testAddPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null) {
|
|
109
|
+
return this.addPublicIP(peerConnection, publicIP);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
beforeEach(() => {
|
|
113
|
+
testingClass = new TestReachability({webex});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it('calls parseIceResultsToReachabilityResults correctly', () => {
|
|
117
|
+
const res = testingClass.testParseIceResultsToReachabilityResults([
|
|
118
|
+
{
|
|
119
|
+
clusterId: 'id1',
|
|
120
|
+
elapsed: '12312',
|
|
121
|
+
publicIPs: ['1.1.1.1'],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
clusterId: 'id2',
|
|
125
|
+
elapsed: null,
|
|
126
|
+
publicIPs: ['1.1.1.1'],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
clusterId: 'id2',
|
|
130
|
+
elapsed: '14123',
|
|
131
|
+
publicIPs: undefined,
|
|
132
|
+
},
|
|
133
|
+
]);
|
|
134
|
+
|
|
135
|
+
assert.deepEqual(res, {
|
|
136
|
+
id1: {
|
|
137
|
+
tcp: {
|
|
138
|
+
clientMediaIPs: ['1.1.1.1'],
|
|
139
|
+
latencyInMilliseconds: '12312',
|
|
140
|
+
reachable: 'true',
|
|
141
|
+
},
|
|
142
|
+
udp: {
|
|
143
|
+
clientMediaIPs: ['1.1.1.1'],
|
|
144
|
+
latencyInMilliseconds: '12312',
|
|
145
|
+
reachable: 'true',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
id2: {
|
|
149
|
+
tcp: {
|
|
150
|
+
latencyInMilliseconds: '14123',
|
|
151
|
+
reachable: 'true',
|
|
152
|
+
},
|
|
153
|
+
udp: {
|
|
154
|
+
latencyInMilliseconds: '14123',
|
|
155
|
+
reachable: 'true',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('calls addPublicIP correctly with no existing public APIs', () => {
|
|
162
|
+
const peerConnection = {
|
|
163
|
+
connectionState: 'not_closed',
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
testingClass.testAddPublicIP(peerConnection as RTCPeerConnection, '1.1.1.1');
|
|
167
|
+
|
|
168
|
+
assert.deepEqual(peerConnection, {
|
|
169
|
+
connectionState: 'not_closed',
|
|
170
|
+
publicIPs: ['1.1.1.1'],
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it('calls addPublicIP correctly with existing public APIs', () => {
|
|
175
|
+
const peerConnection = {
|
|
176
|
+
connectionState: 'not_closed',
|
|
177
|
+
publicIPs: ['2.2.2.2'],
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
testingClass.testAddPublicIP(peerConnection as any, '1.1.1.1');
|
|
181
|
+
|
|
182
|
+
assert.deepEqual(peerConnection, {
|
|
183
|
+
connectionState: 'not_closed',
|
|
184
|
+
publicIPs: ['2.2.2.2', '1.1.1.1'],
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it('calls addPublicIP correctly null publicAPI', () => {
|
|
189
|
+
const peerConnection = {
|
|
190
|
+
connectionState: 'not_closed',
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
testingClass.testAddPublicIP(peerConnection as RTCPeerConnection, null);
|
|
194
|
+
|
|
195
|
+
assert.deepEqual(peerConnection, {
|
|
196
|
+
connectionState: 'not_closed',
|
|
197
|
+
publicIPs: null,
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
});
|
|
84
201
|
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import {assert} from '@webex/test-helper-chai';
|
|
3
|
+
import MockWebex from '@webex/test-helper-mock-webex';
|
|
4
|
+
import Meetings from '@webex/plugin-meetings';
|
|
5
|
+
import ReachabilityRequest from '@webex/plugin-meetings/src/reachability/request';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
describe('plugin-meetings/reachability', () => {
|
|
9
|
+
let reachabilityRequest;
|
|
10
|
+
let webex;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
webex = new MockWebex({
|
|
14
|
+
children: {
|
|
15
|
+
meetings: Meetings,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
webex.meetings.clientRegion = {
|
|
20
|
+
countryCode: 'US',
|
|
21
|
+
regionCode: 'WEST-COAST',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
webex.internal = {
|
|
25
|
+
services: {
|
|
26
|
+
get: sinon.mock().returns('locusUrl'),
|
|
27
|
+
waitForCatalog: sinon.mock().returns(Promise.resolve({})),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
reachabilityRequest = new ReachabilityRequest(webex);
|
|
33
|
+
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('#getClusters', () => {
|
|
37
|
+
it('sends a GET request with the correct params', async () => {
|
|
38
|
+
webex.request = sinon.mock().returns(Promise.resolve({
|
|
39
|
+
body: {
|
|
40
|
+
clusterClasses: {
|
|
41
|
+
hybridMedia: ["clusterId"]
|
|
42
|
+
},
|
|
43
|
+
clusters: {"clusterId": {
|
|
44
|
+
udp: "testUDP"
|
|
45
|
+
}},
|
|
46
|
+
joinCookie: {anycastEntryPoint: "aws-eu-west-1"}
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
|
|
50
|
+
const res = await reachabilityRequest.getClusters();
|
|
51
|
+
|
|
52
|
+
const requestParams = webex.request.getCall(0).args[0];
|
|
53
|
+
|
|
54
|
+
assert.equal(requestParams.method, 'GET');
|
|
55
|
+
assert.equal(requestParams.resource, `clusters`);
|
|
56
|
+
assert.equal(requestParams.api, 'calliopeDiscovery');
|
|
57
|
+
assert.equal(requestParams.shouldRefreshAccessToken, false);
|
|
58
|
+
|
|
59
|
+
assert.deepEqual(requestParams.qs, {
|
|
60
|
+
JCSupport: 1,
|
|
61
|
+
});
|
|
62
|
+
assert.deepEqual(res.clusters.clusterId, {udp: "testUDP", isVideoMesh: true})
|
|
63
|
+
assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"})
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|