@webex/plugin-meetings 3.0.0-stream-classes.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -0
- package/README.md +12 -0
- package/babel.config.js +3 -0
- package/dist/annotation/constants.js +12 -20
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +25 -10
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +2 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js +1 -2
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +1 -2
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js +1 -2
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +13 -14
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +1 -2
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js +3 -6
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js +2 -3
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +3 -4
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +1 -2
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +1 -2
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +1 -2
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +1 -2
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +1 -2
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/common/errors/no-meeting-info.js +50 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +3 -4
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +1 -2
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +1 -2
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/common/errors/reclaim-host-role-errors.js +154 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +1 -2
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +1 -2
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +1 -2
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/{types/common → common}/errors/webex-errors.d.ts +13 -1
- package/dist/common/errors/webex-errors.js +35 -16
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +1 -2
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +1 -2
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +1 -2
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +1 -2
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +1 -2
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -2
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/{types/common → common}/logs/request.d.ts +3 -1
- package/dist/common/logs/request.js +8 -5
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +2 -4
- package/dist/common/queue.js.map +1 -1
- package/dist/{types/config.d.ts → config.d.ts} +1 -1
- package/dist/config.js +3 -3
- package/dist/config.js.map +1 -1
- package/dist/{types/constants.d.ts → constants.d.ts} +72 -15
- package/dist/constants.js +254 -371
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +3 -6
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +7 -10
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +27 -32
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.d.ts +2 -0
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.d.ts +27 -0
- package/dist/interceptors/locusRetry.js +94 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.js +1 -2
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +2 -3
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +2 -3
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +12 -13
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -4
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +1 -2
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +1 -2
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/{types/locus-info → locus-info}/index.d.ts +1 -1
- package/dist/locus-info/index.js +63 -38
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -4
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +16 -3
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/{types/locus-info → locus-info}/parser.d.ts +3 -2
- package/dist/locus-info/parser.js +48 -31
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +7 -6
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +15 -10
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +16 -7
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +1 -2
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.d.ts +241 -0
- package/dist/mediaQualityMetrics/config.js +135 -339
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/{types/meeting → meeting}/in-meeting-actions.d.ts +4 -0
- package/dist/meeting/in-meeting-actions.js +18 -2
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/{types/meeting → meeting}/index.d.ts +331 -44
- package/dist/meeting/index.js +2639 -1367
- package/dist/meeting/index.js.map +1 -1
- package/dist/{types/meeting → meeting}/locusMediaRequest.d.ts +1 -2
- package/dist/meeting/locusMediaRequest.js +4 -5
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +2 -4
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/{types/meeting → meeting}/request.d.ts +4 -1
- package/dist/meeting/request.js +47 -32
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js +1 -2
- package/dist/meeting/state.js.map +1 -1
- package/dist/{types/meeting → meeting}/util.d.ts +26 -1
- package/dist/meeting/util.js +83 -10
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.d.ts +16 -0
- package/dist/meeting/voicea-meeting.js +169 -0
- package/dist/meeting/voicea-meeting.js.map +1 -0
- package/dist/meeting-info/collection.js +3 -4
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/{types/meeting-info → meeting-info}/index.d.ts +7 -0
- package/dist/meeting-info/index.js +53 -27
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/{types/meeting-info → meeting-info}/meeting-info-v2.d.ts +1 -0
- package/dist/meeting-info/meeting-info-v2.js +52 -33
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +8 -8
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +12 -9
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/{types/meetings → meetings}/collection.d.ts +9 -0
- package/dist/meetings/collection.js +21 -5
- package/dist/meetings/collection.js.map +1 -1
- package/dist/{types/meetings → meetings}/index.d.ts +45 -16
- package/dist/meetings/index.js +166 -74
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +2 -3
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +3 -10
- package/dist/meetings/util.js.map +1 -1
- package/dist/{types/member → member}/index.d.ts +1 -0
- package/dist/member/index.js +10 -3
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.d.ts +11 -0
- package/dist/member/member.types.js +17 -0
- package/dist/member/member.types.js.map +1 -0
- package/dist/member/types.js +6 -8
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +12 -2
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +25 -8
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +2 -3
- package/dist/members/request.js.map +1 -1
- package/dist/{types/members → members}/types.d.ts +1 -0
- package/dist/members/types.js +3 -4
- package/dist/members/types.js.map +1 -1
- package/dist/{types/members → members}/util.d.ts +6 -1
- package/dist/members/util.js +18 -8
- package/dist/members/util.js.map +1 -1
- package/dist/{types/metrics → metrics}/constants.d.ts +15 -0
- package/dist/metrics/constants.js +16 -3
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -2
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +9 -11
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +3 -5
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +7 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +3 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +7 -6
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/{types/multistream → multistream}/remoteMediaManager.d.ts +9 -1
- package/dist/multistream/remoteMediaManager.js +74 -36
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +9 -6
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +1 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +2 -3
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -3
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +1 -2
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.d.ts +109 -0
- package/dist/reachability/clusterReachability.js +357 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.d.ts +105 -0
- package/dist/reachability/index.js +279 -436
- package/dist/reachability/index.js.map +1 -1
- package/dist/{types/reachability → reachability}/request.d.ts +1 -1
- package/dist/reachability/request.js +14 -11
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.d.ts +8 -0
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reactions/constants.js +1 -2
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js +2 -4
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +6 -8
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/{types/reconnection-manager → reconnection-manager}/index.d.ts +10 -0
- package/dist/reconnection-manager/index.js +129 -106
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +4 -5
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +43 -51
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +1 -2
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/{types/roap → roap}/index.d.ts +2 -1
- package/dist/roap/index.js +59 -28
- package/dist/roap/index.js.map +1 -1
- package/dist/{types/roap → roap}/request.d.ts +2 -1
- package/dist/roap/request.js +14 -22
- package/dist/roap/request.js.map +1 -1
- package/dist/{types/roap → roap}/turnDiscovery.d.ts +21 -4
- package/dist/roap/turnDiscovery.js +182 -89
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +1 -2
- package/dist/rtcMetrics/constants.js.map +1 -1
- package/dist/{types/rtcMetrics → rtcMetrics}/index.d.ts +15 -1
- package/dist/rtcMetrics/index.js +72 -12
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/{types/statsAnalyzer → statsAnalyzer}/index.d.ts +28 -11
- package/dist/statsAnalyzer/index.js +371 -318
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/statsAnalyzer/mqaUtil.js +295 -162
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +1 -2
- package/dist/transcription/index.js.map +1 -1
- package/dist/webinar/collection.d.ts +16 -0
- package/dist/webinar/collection.js +43 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +68 -0
- package/dist/webinar/index.js.map +1 -0
- package/jest.config.js +3 -0
- package/package.json +44 -24
- package/process +1 -0
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/webex-errors.ts +19 -2
- package/src/common/logs/request.ts +5 -1
- package/src/config.ts +3 -5
- package/src/constants.ts +78 -8
- package/src/index.ts +4 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/locus-info/index.ts +52 -16
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/parser.ts +47 -21
- package/src/media/index.ts +8 -6
- package/src/media/properties.ts +17 -2
- package/src/mediaQualityMetrics/config.ts +103 -238
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +1692 -627
- package/src/meeting/request.ts +19 -1
- package/src/meeting/util.ts +102 -1
- package/src/meeting/voicea-meeting.ts +122 -0
- package/src/meeting-info/index.ts +47 -20
- package/src/meeting-info/meeting-info-v2.ts +32 -16
- package/src/meeting-info/util.ts +12 -9
- package/src/meeting-info/utilv2.ts +25 -15
- package/src/meetings/collection.ts +13 -0
- package/src/meetings/index.ts +112 -31
- package/src/meetings/util.ts +2 -8
- package/src/member/index.ts +9 -1
- package/src/member/member.types.ts +13 -0
- package/src/member/util.ts +14 -0
- package/src/members/index.ts +29 -2
- package/src/members/types.ts +1 -0
- package/src/members/util.ts +15 -1
- package/src/metrics/constants.ts +14 -0
- package/src/multistream/remoteMediaManager.ts +41 -4
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +221 -382
- package/src/reachability/request.ts +1 -1
- package/src/reachability/util.ts +24 -0
- package/src/reconnection-manager/index.ts +87 -83
- package/src/roap/index.ts +60 -24
- package/src/roap/request.ts +4 -17
- package/src/roap/turnDiscovery.ts +112 -39
- package/src/rtcMetrics/index.ts +71 -5
- package/src/statsAnalyzer/index.ts +430 -427
- package/src/statsAnalyzer/mqaUtil.ts +317 -168
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +7 -7
- package/test/integration/spec/journey.js +88 -106
- package/test/integration/spec/space-meeting.js +10 -10
- package/test/unit/spec/breakouts/breakout.ts +2 -1
- package/test/unit/spec/breakouts/index.ts +7 -4
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/locus-info/index.js +206 -13
- package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
- package/test/unit/spec/locus-info/parser.js +54 -13
- package/test/unit/spec/locus-info/selfUtils.js +1 -1
- package/test/unit/spec/media/index.ts +25 -4
- package/test/unit/spec/media/properties.ts +2 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +4354 -1285
- package/test/unit/spec/meeting/request.js +63 -12
- package/test/unit/spec/meeting/utils.js +145 -10
- package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
- package/test/unit/spec/meeting-info/index.js +180 -61
- package/test/unit/spec/meeting-info/meetinginfov2.js +216 -68
- package/test/unit/spec/meetings/collection.js +12 -0
- package/test/unit/spec/meetings/index.js +676 -195
- package/test/unit/spec/meetings/utils.js +35 -12
- package/test/unit/spec/member/index.js +8 -7
- package/test/unit/spec/member/util.js +32 -0
- package/test/unit/spec/members/index.js +130 -17
- package/test/unit/spec/members/utils.js +26 -0
- package/test/unit/spec/metrics/index.js +1 -2
- package/test/unit/spec/multistream/mediaRequestManager.ts +1 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +10 -2
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +505 -135
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +74 -17
- package/test/unit/spec/recording-controller/index.js +0 -1
- package/test/unit/spec/roap/index.ts +181 -61
- package/test/unit/spec/roap/request.ts +27 -3
- package/test/unit/spec/roap/turnDiscovery.ts +363 -102
- package/test/unit/spec/rtcMetrics/index.ts +57 -3
- package/test/unit/spec/stats-analyzer/index.js +1225 -12
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/integrationTestUtils.js +4 -4
- package/test/utils/webex-test-users.js +12 -4
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -365
- package/dist/types/reachability/index.d.ts +0 -158
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -24
- /package/dist/{types/annotation → annotation}/annotation.types.d.ts +0 -0
- /package/dist/{types/annotation → annotation}/constants.d.ts +0 -0
- /package/dist/{types/annotation → annotation}/index.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/breakout.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/collection.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/edit-lock-error.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/events.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/index.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/request.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/utils.d.ts +0 -0
- /package/dist/{types/common → common}/browser-detection.d.ts +0 -0
- /package/dist/{types/common → common}/collection.d.ts +0 -0
- /package/dist/{types/common → common}/config.d.ts +0 -0
- /package/dist/{types/common → common}/errors/captcha-error.d.ts +0 -0
- /package/dist/{types/common → common}/errors/intent-to-join.d.ts +0 -0
- /package/dist/{types/common → common}/errors/join-meeting.d.ts +0 -0
- /package/dist/{types/common → common}/errors/media.d.ts +0 -0
- /package/dist/{types/common → common}/errors/parameter.d.ts +0 -0
- /package/dist/{types/common → common}/errors/password-error.d.ts +0 -0
- /package/dist/{types/common → common}/errors/permission.d.ts +0 -0
- /package/dist/{types/common → common}/errors/reconnection-in-progress.d.ts +0 -0
- /package/dist/{types/common → common}/errors/reconnection.d.ts +0 -0
- /package/dist/{types/common → common}/errors/stats.d.ts +0 -0
- /package/dist/{types/common → common}/errors/webex-meetings-error.d.ts +0 -0
- /package/dist/{types/common → common}/events/events-scope.d.ts +0 -0
- /package/dist/{types/common → common}/events/events.d.ts +0 -0
- /package/dist/{types/common → common}/events/trigger-proxy.d.ts +0 -0
- /package/dist/{types/common → common}/events/util.d.ts +0 -0
- /package/dist/{types/common → common}/logs/logger-config.d.ts +0 -0
- /package/dist/{types/common → common}/logs/logger-proxy.d.ts +0 -0
- /package/dist/{types/common → common}/queue.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/constants.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/enums.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/index.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/types.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/util.d.ts +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/interpretation → interpretation}/collection.d.ts +0 -0
- /package/dist/{types/interpretation → interpretation}/index.d.ts +0 -0
- /package/dist/{types/interpretation → interpretation}/siLanguage.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/controlsUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/embeddedAppsUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/fullState.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/hostUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/infoUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/mediaSharesUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/selfUtils.d.ts +0 -0
- /package/dist/{types/media → media}/index.d.ts +0 -0
- /package/dist/{types/media → media}/properties.d.ts +0 -0
- /package/dist/{types/media → media}/util.d.ts +0 -0
- /package/dist/{types/meeting → meeting}/muteState.d.ts +0 -0
- /package/dist/{types/meeting → meeting}/request.type.d.ts +0 -0
- /package/dist/{types/meeting → meeting}/state.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/collection.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/request.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/util.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/utilv2.d.ts +0 -0
- /package/dist/{types/meetings → meetings}/meetings.types.d.ts +0 -0
- /package/dist/{types/meetings → meetings}/request.d.ts +0 -0
- /package/dist/{types/meetings → meetings}/util.d.ts +0 -0
- /package/dist/{types/member → member}/types.d.ts +0 -0
- /package/dist/{types/member → member}/util.d.ts +0 -0
- /package/dist/{types/members → members}/collection.d.ts +0 -0
- /package/dist/{types/members → members}/index.d.ts +0 -0
- /package/dist/{types/members → members}/request.d.ts +0 -0
- /package/dist/{types/metrics → metrics}/index.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/mediaRequestManager.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/receiveSlot.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/receiveSlotManager.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/remoteMedia.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/remoteMediaGroup.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/sendSlotManager.d.ts +0 -0
- /package/dist/{types/networkQualityMonitor → networkQualityMonitor}/index.d.ts +0 -0
- /package/dist/{types/personal-meeting-room → personal-meeting-room}/index.d.ts +0 -0
- /package/dist/{types/personal-meeting-room → personal-meeting-room}/request.d.ts +0 -0
- /package/dist/{types/personal-meeting-room → personal-meeting-room}/util.d.ts +0 -0
- /package/dist/{types/reactions → reactions}/constants.d.ts +0 -0
- /package/dist/{types/reactions → reactions}/reactions.d.ts +0 -0
- /package/dist/{types/reactions → reactions}/reactions.type.d.ts +0 -0
- /package/dist/{types/recording-controller → recording-controller}/enums.d.ts +0 -0
- /package/dist/{types/recording-controller → recording-controller}/index.d.ts +0 -0
- /package/dist/{types/recording-controller → recording-controller}/util.d.ts +0 -0
- /package/dist/{types/rtcMetrics → rtcMetrics}/constants.d.ts +0 -0
- /package/dist/{types/statsAnalyzer → statsAnalyzer}/global.d.ts +0 -0
- /package/dist/{types/transcription → transcription}/index.d.ts +0 -0
- /package/test/unit/spec/locus-info/{selfConstant.js → lib/selfConstant.js} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {assert} from '@webex/test-helper-chai';
|
|
2
|
+
|
|
3
|
+
import {convertStunUrlToTurn} from '@webex/plugin-meetings/src/reachability/util';
|
|
4
|
+
|
|
5
|
+
describe('plugin-meetings/src/reachability/util', () => {
|
|
6
|
+
describe('#convertStunUrlToTurn()', () => {
|
|
7
|
+
[
|
|
8
|
+
{
|
|
9
|
+
title: 'a stun url with port',
|
|
10
|
+
stunUrl: 'stun:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004',
|
|
11
|
+
expectedUrlPart: 'external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: 'a stun url without port',
|
|
15
|
+
stunUrl: 'stun:something.somewhere.com',
|
|
16
|
+
expectedUrlPart: 'something.somewhere.com',
|
|
17
|
+
},
|
|
18
|
+
].forEach(({title, stunUrl, expectedUrlPart}) => {
|
|
19
|
+
it(`should convert ${title} to a TCP turn url`, () => {
|
|
20
|
+
const turnUrl = convertStunUrlToTurn(stunUrl, 'tcp');
|
|
21
|
+
|
|
22
|
+
assert.equal(turnUrl, `turn:${expectedUrlPart}?transport=tcp`);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it(`should convert ${title} to a UDP turn url`, () => {
|
|
26
|
+
const turnUrl = convertStunUrlToTurn(stunUrl, 'udp');
|
|
27
|
+
|
|
28
|
+
assert.equal(turnUrl, `turn:${expectedUrlPart}`);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('show fail if stunUrl is not a valid url', () => {
|
|
33
|
+
assert.throws(() => convertStunUrlToTurn('not a url', 'tcp'), 'Invalid URL: not a url');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('show fail if stunUrl is not a STUN url', () => {
|
|
37
|
+
assert.throws(() => convertStunUrlToTurn('http://webex.com', 'tcp'), 'Not a STUN URL: http://webex.com');
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -3,6 +3,9 @@ import chai from 'chai';
|
|
|
3
3
|
import chaiAsPromised from 'chai-as-promised';
|
|
4
4
|
import sinon from 'sinon';
|
|
5
5
|
import ReconnectionManager from '@webex/plugin-meetings/src/reconnection-manager';
|
|
6
|
+
import { RECONNECTION } from '../../../../src/constants';
|
|
7
|
+
import LoggerProxy from '../../../../src/common/logs/logger-proxy';
|
|
8
|
+
import LoggerConfig from '../../../../src/common/logs/logger-config';
|
|
6
9
|
|
|
7
10
|
const {assert} = chai;
|
|
8
11
|
|
|
@@ -11,8 +14,16 @@ sinon.assert.expose(chai.assert, {prefix: ''});
|
|
|
11
14
|
|
|
12
15
|
describe('plugin-meetings', () => {
|
|
13
16
|
describe('ReconnectionManager.reconnect', () => {
|
|
17
|
+
const sandbox = sinon.createSandbox();
|
|
14
18
|
let fakeMediaConnection;
|
|
15
19
|
let fakeMeeting;
|
|
20
|
+
let loggerSpy;
|
|
21
|
+
|
|
22
|
+
before(() => {
|
|
23
|
+
LoggerConfig.set({ enable: false });
|
|
24
|
+
LoggerProxy.set();
|
|
25
|
+
loggerSpy = sandbox.spy(LoggerProxy.logger, 'info');
|
|
26
|
+
});
|
|
16
27
|
|
|
17
28
|
beforeEach(() => {
|
|
18
29
|
fakeMediaConnection = {
|
|
@@ -64,6 +75,7 @@ describe('plugin-meetings', () => {
|
|
|
64
75
|
meetings: {
|
|
65
76
|
getMeetingByType: sinon.stub().returns(true),
|
|
66
77
|
syncMeetings: sinon.stub().resolves({}),
|
|
78
|
+
startReachability: sinon.stub().resolves({}),
|
|
67
79
|
},
|
|
68
80
|
internal: {
|
|
69
81
|
newMetrics: {
|
|
@@ -74,22 +86,38 @@ describe('plugin-meetings', () => {
|
|
|
74
86
|
};
|
|
75
87
|
});
|
|
76
88
|
|
|
77
|
-
|
|
89
|
+
afterEach(() => {
|
|
90
|
+
sandbox.reset();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('calls syncMeetings', async () => {
|
|
78
94
|
const rm = new ReconnectionManager(fakeMeeting);
|
|
79
95
|
|
|
80
96
|
await rm.reconnect();
|
|
81
97
|
|
|
82
98
|
assert.calledOnce(rm.webex.meetings.syncMeetings);
|
|
99
|
+
assert.calledWith(rm.webex.meetings.syncMeetings, {keepOnlyLocusMeetings: false});
|
|
83
100
|
});
|
|
84
101
|
|
|
85
|
-
it('
|
|
102
|
+
it('calls startReachability on reconnect', async () => {
|
|
86
103
|
const rm = new ReconnectionManager(fakeMeeting);
|
|
87
104
|
|
|
88
|
-
rm.
|
|
105
|
+
await rm.reconnect();
|
|
106
|
+
|
|
107
|
+
assert.calledOnce(rm.webex.meetings.startReachability);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('continues with reconnection attempt if startReachability throws an error', async () => {
|
|
111
|
+
const reachabilityError = new Error();
|
|
112
|
+
fakeMeeting.webex.meetings.startReachability = sinon.stub().throws(reachabilityError);
|
|
113
|
+
|
|
114
|
+
const rm = new ReconnectionManager(fakeMeeting);
|
|
89
115
|
|
|
90
116
|
await rm.reconnect();
|
|
91
117
|
|
|
92
|
-
assert.
|
|
118
|
+
assert.calledOnce(rm.webex.meetings.startReachability);
|
|
119
|
+
assert.calledWith(loggerSpy, 'ReconnectionManager:index#reconnect --> Reachability failed, continuing with reconnection attempt, err: ', reachabilityError);
|
|
120
|
+
assert.calledWith(loggerSpy, 'ReconnectionManager:index#executeReconnection --> Attempting to reconnect to meeting.');
|
|
93
121
|
});
|
|
94
122
|
|
|
95
123
|
it('uses correct TURN TLS information on the reconnection', async () => {
|
|
@@ -98,6 +126,7 @@ describe('plugin-meetings', () => {
|
|
|
98
126
|
await rm.reconnect();
|
|
99
127
|
|
|
100
128
|
assert.calledOnce(fakeMeeting.roap.doTurnDiscovery);
|
|
129
|
+
assert.calledWith(fakeMeeting.roap.doTurnDiscovery, fakeMeeting, true, true);
|
|
101
130
|
assert.calledOnce(fakeMediaConnection.reconnect);
|
|
102
131
|
assert.calledWith(fakeMediaConnection.reconnect, [
|
|
103
132
|
{
|
|
@@ -113,16 +142,6 @@ describe('plugin-meetings', () => {
|
|
|
113
142
|
meetingId: rm.meeting.id,
|
|
114
143
|
},
|
|
115
144
|
});
|
|
116
|
-
|
|
117
|
-
assert.calledWith(fakeMeeting.webex.internal.newMetrics.submitClientEvent, {
|
|
118
|
-
name: 'client.media.recovered',
|
|
119
|
-
payload: {
|
|
120
|
-
recoveredBy: 'new',
|
|
121
|
-
},
|
|
122
|
-
options: {
|
|
123
|
-
meetingId: rm.meeting.id,
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
145
|
});
|
|
127
146
|
|
|
128
147
|
it('does not clear previous requests and re-request media for non-multistream meetings', async () => {
|
|
@@ -149,7 +168,6 @@ describe('plugin-meetings', () => {
|
|
|
149
168
|
assert.calledOnce(fakeMeeting.mediaRequestManagers.video.commit);
|
|
150
169
|
});
|
|
151
170
|
|
|
152
|
-
|
|
153
171
|
it('sends the correct client event when reconnection fails', async () => {
|
|
154
172
|
sinon.stub(ReconnectionManager.prototype, 'executeReconnection').rejects();
|
|
155
173
|
fakeMeeting.isMultistream = true;
|
|
@@ -186,9 +204,10 @@ describe('plugin-meetings', () => {
|
|
|
186
204
|
*/
|
|
187
205
|
describe('ReconnectionManager', () => {
|
|
188
206
|
let reconnectionManager;
|
|
207
|
+
let fakeMeeting;
|
|
189
208
|
|
|
190
209
|
beforeEach(() => {
|
|
191
|
-
|
|
210
|
+
fakeMeeting = {
|
|
192
211
|
config: {
|
|
193
212
|
reconnection: {
|
|
194
213
|
enabled: true,
|
|
@@ -203,7 +222,9 @@ describe('plugin-meetings', () => {
|
|
|
203
222
|
},
|
|
204
223
|
},
|
|
205
224
|
},
|
|
206
|
-
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
reconnectionManager = new ReconnectionManager(fakeMeeting);
|
|
207
228
|
});
|
|
208
229
|
|
|
209
230
|
describe('iceReconnected()', () => {
|
|
@@ -309,5 +330,41 @@ describe('plugin-meetings', () => {
|
|
|
309
330
|
});
|
|
310
331
|
});
|
|
311
332
|
});
|
|
333
|
+
|
|
334
|
+
describe('setStatus()', () => {
|
|
335
|
+
beforeEach(() => {
|
|
336
|
+
reconnectionManager.status = RECONNECTION.STATE.DEFAULT_STATUS;
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
it('should correctly change status to in progress', () => {
|
|
340
|
+
reconnectionManager.setStatus(RECONNECTION.STATE.IN_PROGRESS);
|
|
341
|
+
|
|
342
|
+
assert.equal(reconnectionManager.status, RECONNECTION.STATE.IN_PROGRESS);
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
it('should correctly change status to complete', () => {
|
|
346
|
+
reconnectionManager.setStatus(RECONNECTION.STATE.COMPLETE);
|
|
347
|
+
|
|
348
|
+
assert.equal(reconnectionManager.status, RECONNECTION.STATE.COMPLETE);
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
it('should correctly change status to failure', () => {
|
|
352
|
+
reconnectionManager.setStatus(RECONNECTION.STATE.FAILURE);
|
|
353
|
+
|
|
354
|
+
assert.equal(reconnectionManager.status, RECONNECTION.STATE.FAILURE);
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
describe('cleanUp()', () => {
|
|
359
|
+
it('should call reset and keep reference to meeting object', () => {
|
|
360
|
+
const resetSpy = sinon.spy(reconnectionManager, 'reset');
|
|
361
|
+
assert.equal(reconnectionManager.meeting, fakeMeeting);
|
|
362
|
+
|
|
363
|
+
reconnectionManager.cleanUp();
|
|
364
|
+
|
|
365
|
+
assert.equal(reconnectionManager.meeting, fakeMeeting);
|
|
366
|
+
assert.calledOnce(reconnectionManager.reset);
|
|
367
|
+
});
|
|
368
|
+
});
|
|
312
369
|
});
|
|
313
370
|
});
|
|
@@ -3,7 +3,6 @@ import sinon from 'sinon';
|
|
|
3
3
|
import {assert} from '@webex/test-helper-chai';
|
|
4
4
|
import {HTTP_VERBS, SELF_POLICY} from '@webex/plugin-meetings/src/constants';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
describe('plugin-meetings', () => {
|
|
8
7
|
describe('recording-controller tests', () => {
|
|
9
8
|
describe('index', () => {
|
|
@@ -7,38 +7,35 @@ import RoapRequest from '@webex/plugin-meetings/src/roap/request';
|
|
|
7
7
|
import Roap from '@webex/plugin-meetings/src/roap/';
|
|
8
8
|
import Meeting from '@webex/plugin-meetings/src/meeting';
|
|
9
9
|
import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
|
|
10
|
+
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
11
|
+
import BEHAVIORAL_METRICS from '@webex/plugin-meetings/src/metrics/constants';
|
|
10
12
|
|
|
11
13
|
import { IP_VERSION } from '../../../../src/constants';
|
|
12
14
|
|
|
13
15
|
describe('Roap', () => {
|
|
14
16
|
describe('doTurnDiscovery', () => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
[false, true].forEach(function (isReconnecting) {
|
|
18
|
+
[false, true, undefined].forEach(function (isForced) {
|
|
19
|
+
it(`calls this.turnDiscovery.doTurnDiscovery() and forwards all the arguments when isReconnecting = ${isReconnecting} and isForced = ${isForced}`, async () => {
|
|
20
|
+
const webex = new MockWebex({});
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
const RESULT = {something: 'some value'};
|
|
23
|
+
const meeting = {id: 'some meeting id'} as Meeting;
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
const doTurnDiscoveryStub = sinon
|
|
26
|
+
.stub(TurnDiscovery.prototype, 'doTurnDiscovery')
|
|
27
|
+
.resolves(RESULT);
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
const roap = new Roap({}, {parent: webex});
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
const result = await roap.doTurnDiscovery(meeting, true);
|
|
31
|
+
const result = await roap.doTurnDiscovery(meeting, isReconnecting, isForced);
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
assert.calledOnceWithExactly(doTurnDiscoveryStub, meeting, isReconnecting, isForced);
|
|
34
|
+
assert.deepEqual(result, RESULT);
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const result2 = await roap.doTurnDiscovery(meeting, false);
|
|
37
|
-
|
|
38
|
-
assert.calledOnceWithExactly(doTurnDiscoveryStub, meeting, false);
|
|
39
|
-
assert.deepEqual(result2, RESULT);
|
|
40
|
-
|
|
41
|
-
sinon.restore();
|
|
36
|
+
sinon.restore();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
42
39
|
});
|
|
43
40
|
});
|
|
44
41
|
|
|
@@ -47,6 +44,9 @@ describe('Roap', () => {
|
|
|
47
44
|
let meeting;
|
|
48
45
|
|
|
49
46
|
let webex;
|
|
47
|
+
let roap;
|
|
48
|
+
|
|
49
|
+
const fakeLocus = {id: 'fake locus'};
|
|
50
50
|
|
|
51
51
|
beforeEach(() => {
|
|
52
52
|
webex = new MockWebex({});
|
|
@@ -55,68 +55,188 @@ describe('Roap', () => {
|
|
|
55
55
|
correlationId: 'correlation id',
|
|
56
56
|
selfUrl: 'self url',
|
|
57
57
|
mediaId: 'media id',
|
|
58
|
-
audio:{
|
|
58
|
+
audio: {
|
|
59
59
|
isLocallyMuted: () => true,
|
|
60
60
|
},
|
|
61
|
-
video:{
|
|
61
|
+
video: {
|
|
62
62
|
isLocallyMuted: () => false,
|
|
63
63
|
},
|
|
64
|
+
isMultistream: true,
|
|
64
65
|
setRoapSeq: sinon.stub(),
|
|
65
|
-
config: {experimental: {enableTurnDiscovery: false}},
|
|
66
66
|
locusMediaRequest: {fake: true},
|
|
67
|
-
webex: {
|
|
67
|
+
webex: {meetings: {reachability: {isAnyPublicClusterReachable: () => true}}},
|
|
68
|
+
updateMediaConnections: sinon.stub(),
|
|
68
69
|
};
|
|
69
70
|
|
|
70
71
|
sinon.stub(MeetingUtil, 'getIpVersion').returns(IP_VERSION.unknown);
|
|
72
|
+
sinon.stub(Metrics, 'sendBehavioralMetric');
|
|
71
73
|
|
|
72
74
|
sendRoapStub = sinon.stub(RoapRequest.prototype, 'sendRoap').resolves({});
|
|
73
75
|
meeting.setRoapSeq.resetHistory();
|
|
76
|
+
|
|
77
|
+
roap = new Roap({}, {parent: webex});
|
|
78
|
+
sinon.stub(roap.turnDiscovery, 'isSkipped').resolves(false);
|
|
74
79
|
});
|
|
75
80
|
|
|
76
81
|
afterEach(() => {
|
|
77
82
|
sinon.restore();
|
|
78
83
|
});
|
|
79
84
|
|
|
80
|
-
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
meeting,
|
|
97
|
-
sdp: 'sdp',
|
|
98
|
-
reconnect,
|
|
99
|
-
seq: 2,
|
|
100
|
-
tieBreaker: 4294967294,
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
const expectedRoapMessage = {
|
|
104
|
-
messageType: 'OFFER',
|
|
105
|
-
sdps: ['sdp'],
|
|
106
|
-
version: '2',
|
|
107
|
-
seq: 2,
|
|
108
|
-
tieBreaker: 4294967294,
|
|
109
|
-
};
|
|
85
|
+
it(`sends roap OFFER`, async () => {
|
|
86
|
+
await roap.sendRoapMediaRequest({
|
|
87
|
+
meeting,
|
|
88
|
+
sdp: 'sdp',
|
|
89
|
+
seq: 2,
|
|
90
|
+
tieBreaker: 4294967294,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
const expectedRoapMessage = {
|
|
94
|
+
messageType: 'OFFER',
|
|
95
|
+
sdps: ['sdp'],
|
|
96
|
+
version: '2',
|
|
97
|
+
seq: 2,
|
|
98
|
+
tieBreaker: 4294967294,
|
|
99
|
+
headers: ['includeAnswerInHttpResponse', 'noOkInTransaction'],
|
|
100
|
+
};
|
|
110
101
|
|
|
111
|
-
|
|
112
|
-
|
|
102
|
+
assert.calledOnce(sendRoapStub);
|
|
103
|
+
assert.calledWith(
|
|
104
|
+
sendRoapStub,
|
|
105
|
+
sinon.match({
|
|
113
106
|
roapMessage: expectedRoapMessage,
|
|
114
107
|
locusSelfUrl: meeting.selfUrl,
|
|
115
|
-
mediaId:
|
|
108
|
+
mediaId: meeting.mediaId,
|
|
116
109
|
meetingId: meeting.id,
|
|
117
110
|
locusMediaRequest: meeting.locusMediaRequest,
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
);
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('reads SDP answer from the http response', async () => {
|
|
116
|
+
const roapAnswer = {
|
|
117
|
+
seq: 5,
|
|
118
|
+
messageType: 'ANSWER',
|
|
119
|
+
sdps: ['sdp answer'],
|
|
120
|
+
errorType: 'error type', // normally ANSWER would not have errorType or errorCause (only error messages have these)
|
|
121
|
+
errorCause: 'error cause', // but we're just testing here that all the fields are forwarded to the caller of sendRoapMediaRequest()
|
|
122
|
+
headers: ['header1', 'header2'],
|
|
123
|
+
};
|
|
124
|
+
const fakeMediaConnections = [
|
|
125
|
+
{
|
|
126
|
+
remoteSdp: JSON.stringify({
|
|
127
|
+
roapMessage: roapAnswer,
|
|
128
|
+
}),
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
sendRoapStub.resolves({
|
|
133
|
+
mediaConnections: fakeMediaConnections,
|
|
134
|
+
locus: fakeLocus,
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const result = await roap.sendRoapMediaRequest({
|
|
138
|
+
meeting,
|
|
139
|
+
sdp: 'sdp',
|
|
140
|
+
reconnect: false,
|
|
141
|
+
seq: 1,
|
|
142
|
+
tieBreaker: 4294967294,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
assert.calledOnce(sendRoapStub);
|
|
146
|
+
assert.calledOnceWithExactly(meeting.updateMediaConnections, fakeMediaConnections);
|
|
147
|
+
assert.deepEqual(result, {
|
|
148
|
+
locus: fakeLocus,
|
|
149
|
+
roapAnswer: {
|
|
150
|
+
seq: 5,
|
|
151
|
+
messageType: 'ANSWER',
|
|
152
|
+
sdp: 'sdp answer',
|
|
153
|
+
errorType: 'error type',
|
|
154
|
+
errorCause: 'error cause',
|
|
155
|
+
headers: ['header1', 'header2'],
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('handles the case when there is no answer in the http response', async () => {
|
|
161
|
+
const fakeMediaConnections = [
|
|
162
|
+
{
|
|
163
|
+
// this is the actual value Locus returns to us when they don't send Roap ANSWER in the http response
|
|
164
|
+
remoteSdp:
|
|
165
|
+
'{"audioMuted":false,"videoMuted":false,"csis":[],"dtmfReceiveSupported":true,"type":"SDP"}',
|
|
166
|
+
},
|
|
167
|
+
];
|
|
168
|
+
|
|
169
|
+
sendRoapStub.resolves({
|
|
170
|
+
mediaConnections: fakeMediaConnections,
|
|
171
|
+
locus: fakeLocus,
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
const result = await roap.sendRoapMediaRequest({
|
|
175
|
+
meeting,
|
|
176
|
+
sdp: 'sdp',
|
|
177
|
+
reconnect: false,
|
|
178
|
+
seq: 1,
|
|
179
|
+
tieBreaker: 4294967294,
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
assert.calledOnce(sendRoapStub);
|
|
183
|
+
assert.calledOnceWithExactly(meeting.updateMediaConnections, fakeMediaConnections);
|
|
184
|
+
assert.deepEqual(result, {
|
|
185
|
+
locus: fakeLocus,
|
|
186
|
+
roapAnswer: undefined,
|
|
187
|
+
});
|
|
188
|
+
assert.calledOnceWithExactly(
|
|
189
|
+
Metrics.sendBehavioralMetric,
|
|
190
|
+
BEHAVIORAL_METRICS.ROAP_HTTP_RESPONSE_MISSING,
|
|
191
|
+
{
|
|
192
|
+
correlationId: meeting.correlationId,
|
|
193
|
+
messageType: 'ANSWER',
|
|
194
|
+
isMultistream: meeting.isMultistream,
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
describe('does not crash when http response is missing things', () => {
|
|
200
|
+
[
|
|
201
|
+
{mediaConnections: undefined, title: 'mediaConnections are undefined'},
|
|
202
|
+
{mediaConnections: [], title: 'mediaConnections are empty array'},
|
|
203
|
+
{mediaConnections: [{}], title: 'mediaConnections[0] has no remoteSdp'},
|
|
204
|
+
{
|
|
205
|
+
mediaConnections: [{remoteSdp: '{}'}],
|
|
206
|
+
title: 'mediaConnections[0].remoteSdp is an empty json',
|
|
207
|
+
},
|
|
208
|
+
].forEach(({mediaConnections, title}) =>
|
|
209
|
+
it(title, async () => {
|
|
210
|
+
sendRoapStub.resolves({
|
|
211
|
+
mediaConnections,
|
|
212
|
+
locus: fakeLocus,
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const result = await roap.sendRoapMediaRequest({
|
|
216
|
+
meeting,
|
|
217
|
+
sdp: 'sdp',
|
|
218
|
+
reconnect: false,
|
|
219
|
+
seq: 1,
|
|
220
|
+
tieBreaker: 4294967294,
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
assert.calledOnce(sendRoapStub);
|
|
224
|
+
assert.deepEqual(result, {
|
|
225
|
+
locus: fakeLocus,
|
|
226
|
+
roapAnswer: undefined,
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
assert.calledOnceWithExactly(
|
|
230
|
+
Metrics.sendBehavioralMetric,
|
|
231
|
+
BEHAVIORAL_METRICS.ROAP_HTTP_RESPONSE_MISSING,
|
|
232
|
+
{
|
|
233
|
+
correlationId: meeting.correlationId,
|
|
234
|
+
messageType: 'ANSWER',
|
|
235
|
+
isMultistream: meeting.isMultistream,
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
})
|
|
239
|
+
);
|
|
240
|
+
});
|
|
121
241
|
});
|
|
122
242
|
});
|
|
@@ -65,7 +65,9 @@ describe('plugin-meetings/roap', () => {
|
|
|
65
65
|
REACHABILITY.localStorageResult,
|
|
66
66
|
JSON.stringify({
|
|
67
67
|
clusterId: {
|
|
68
|
-
udp: '
|
|
68
|
+
udp: { result: 'reachable', latencyInMilliseconds: 10 },
|
|
69
|
+
tcp: { result: 'unreachable' },
|
|
70
|
+
isVideoMesh: false,
|
|
69
71
|
},
|
|
70
72
|
})
|
|
71
73
|
);
|
|
@@ -78,7 +80,16 @@ describe('plugin-meetings/roap', () => {
|
|
|
78
80
|
assert.deepEqual(res.localSdp, {
|
|
79
81
|
reachability: {
|
|
80
82
|
clusterId: {
|
|
81
|
-
udp:
|
|
83
|
+
udp: {
|
|
84
|
+
reachable: 'true',
|
|
85
|
+
latencyInMilliseconds: '10',
|
|
86
|
+
},
|
|
87
|
+
tcp: {
|
|
88
|
+
reachable: 'false',
|
|
89
|
+
},
|
|
90
|
+
xtls: {
|
|
91
|
+
untested: 'true',
|
|
92
|
+
}
|
|
82
93
|
},
|
|
83
94
|
},
|
|
84
95
|
});
|
|
@@ -148,7 +159,20 @@ describe('plugin-meetings/roap', () => {
|
|
|
148
159
|
roapMessage: {
|
|
149
160
|
seq: 'seq',
|
|
150
161
|
},
|
|
151
|
-
reachability: {
|
|
162
|
+
reachability: {
|
|
163
|
+
clusterId: {
|
|
164
|
+
tcp: {
|
|
165
|
+
reachable: 'false',
|
|
166
|
+
},
|
|
167
|
+
udp: {
|
|
168
|
+
latencyInMilliseconds: '10',
|
|
169
|
+
reachable: 'true',
|
|
170
|
+
},
|
|
171
|
+
xtls: {
|
|
172
|
+
untested: 'true',
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
152
176
|
});
|
|
153
177
|
});
|
|
154
178
|
|