@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,131 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* eslint-disable camelcase */
|
|
6
|
+
import {assert} from '@webex/test-helper-chai';
|
|
7
|
+
import { expect } from "@webex/test-helper-chai";
|
|
8
|
+
import MockWebex from '@webex/test-helper-mock-webex';
|
|
9
|
+
import {LocusRetryStatusInterceptor} from "@webex/plugin-meetings/src/interceptors";
|
|
10
|
+
import {WebexHttpError} from '@webex/webex-core';
|
|
11
|
+
import Meetings from '@webex/plugin-meetings';
|
|
12
|
+
import sinon from 'sinon';
|
|
13
|
+
|
|
14
|
+
describe('plugin-meetings', () => {
|
|
15
|
+
describe('Interceptors', () => {
|
|
16
|
+
describe('LocusRetryStatusInterceptor', () => {
|
|
17
|
+
let interceptor, webex;
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
webex = new MockWebex({
|
|
20
|
+
children: {
|
|
21
|
+
meeting: Meetings,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
interceptor = Reflect.apply(LocusRetryStatusInterceptor.create, {
|
|
25
|
+
sessionId: 'mock-webex_uuid',
|
|
26
|
+
}, []);
|
|
27
|
+
});
|
|
28
|
+
describe('#onResponseError', () => {
|
|
29
|
+
const options = {
|
|
30
|
+
method: 'POST',
|
|
31
|
+
headers: {
|
|
32
|
+
trackingid: 'test',
|
|
33
|
+
'retry-after': 1000,
|
|
34
|
+
},
|
|
35
|
+
uri: `https://locus-test.webex.com/locus/api/v1/loci/call`,
|
|
36
|
+
body: 'foo'
|
|
37
|
+
};
|
|
38
|
+
const reason1 = new WebexHttpError.MethodNotAllowed({
|
|
39
|
+
statusCode: 403,
|
|
40
|
+
options: {
|
|
41
|
+
headers: {
|
|
42
|
+
trackingid: 'test',
|
|
43
|
+
'retry-after': 1000,
|
|
44
|
+
},
|
|
45
|
+
uri: `https://locus-test.webex.com/locus/api/v1/loci/call`,
|
|
46
|
+
},
|
|
47
|
+
body: {
|
|
48
|
+
error: 'POST not allwed',
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
const reason2 = new WebexHttpError.MethodNotAllowed({
|
|
52
|
+
statusCode: 503,
|
|
53
|
+
options: {
|
|
54
|
+
headers: {
|
|
55
|
+
trackingid: 'test',
|
|
56
|
+
'retry-after': 1000,
|
|
57
|
+
},
|
|
58
|
+
uri: `https://locus-test.webex.com/locus/api/v1/loci/call`,
|
|
59
|
+
},
|
|
60
|
+
body: {
|
|
61
|
+
error: 'Service Unavailable',
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('rejects when not locus service unavailable error', () => {
|
|
66
|
+
return assert.isRejected(interceptor.onResponseError(options, reason1));
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('calls handleRetryRequestLocusServiceError with correct retry time when locus service unavailable error', () => {
|
|
70
|
+
interceptor.webex.request = sinon.stub().returns(Promise.resolve());
|
|
71
|
+
const handleRetryStub = sinon.stub(interceptor, 'handleRetryRequestLocusServiceError');
|
|
72
|
+
handleRetryStub.returns(Promise.resolve());
|
|
73
|
+
|
|
74
|
+
return interceptor.onResponseError(options, reason2).then(() => {
|
|
75
|
+
expect(handleRetryStub.calledWith(options, 1000)).to.be.true;
|
|
76
|
+
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
describe('#handleRetryRequestLocusServiceError', () => {
|
|
82
|
+
const options = {
|
|
83
|
+
method: 'POST',
|
|
84
|
+
headers: {
|
|
85
|
+
trackingid: 'test',
|
|
86
|
+
},
|
|
87
|
+
uri: `https://locus-test.webex.com/locus/api/v1/loci/call`,
|
|
88
|
+
body: 'foo'
|
|
89
|
+
};
|
|
90
|
+
const retryAfterTime = 2000;
|
|
91
|
+
|
|
92
|
+
it('returns the correct resolved value when the request is successful', () => {
|
|
93
|
+
const mockResponse = 'mock response'
|
|
94
|
+
interceptor.webex.request = sinon.stub().returns(Promise.resolve(mockResponse));
|
|
95
|
+
|
|
96
|
+
return interceptor.handleRetryRequestLocusServiceError(options, retryAfterTime)
|
|
97
|
+
.then((response) => {
|
|
98
|
+
expect(response).to.equal(mockResponse);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it('rejects the promise when the request is unsuccessful', () => {
|
|
103
|
+
const rejectionReason = 'Service Unavaialble after retry';
|
|
104
|
+
|
|
105
|
+
interceptor.webex.request = sinon.stub().returns(Promise.reject(rejectionReason));
|
|
106
|
+
|
|
107
|
+
return interceptor.handleRetryRequestLocusServiceError(options, retryAfterTime)
|
|
108
|
+
.catch((error) => {
|
|
109
|
+
expect(error).to.equal(rejectionReason);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it('retries the request after the specified time', () => {
|
|
114
|
+
let clock;
|
|
115
|
+
clock = sinon.useFakeTimers();
|
|
116
|
+
const mockResponse = 'mock response'
|
|
117
|
+
|
|
118
|
+
interceptor.webex.request = sinon.stub().returns(Promise.resolve(mockResponse));
|
|
119
|
+
const promise = interceptor.handleRetryRequestLocusServiceError(options, retryAfterTime);
|
|
120
|
+
|
|
121
|
+
clock.tick(retryAfterTime);
|
|
122
|
+
|
|
123
|
+
return promise.then(() => {
|
|
124
|
+
expect(interceptor.webex.request.calledOnce).to.be.true;
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
@@ -10,6 +10,7 @@ import SelfUtils from '@webex/plugin-meetings/src/locus-info/selfUtils';
|
|
|
10
10
|
import InfoUtils from '@webex/plugin-meetings/src/locus-info/infoUtils';
|
|
11
11
|
import EmbeddedAppsUtils from '@webex/plugin-meetings/src/locus-info/embeddedAppsUtils';
|
|
12
12
|
import LocusDeltaParser from '@webex/plugin-meetings/src/locus-info/parser';
|
|
13
|
+
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
13
14
|
|
|
14
15
|
import {
|
|
15
16
|
LOCUSINFO,
|
|
@@ -23,8 +24,7 @@ import {
|
|
|
23
24
|
_MEETING_,
|
|
24
25
|
} from '../../../../src/constants';
|
|
25
26
|
|
|
26
|
-
import {self, selfWithInactivity} from './selfConstant';
|
|
27
|
-
import uuid from 'uuid';
|
|
27
|
+
import {self, selfWithInactivity} from './lib/selfConstant';
|
|
28
28
|
|
|
29
29
|
describe('plugin-meetings', () => {
|
|
30
30
|
describe('LocusInfo index', () => {
|
|
@@ -39,6 +39,7 @@ describe('plugin-meetings', () => {
|
|
|
39
39
|
const locus = {};
|
|
40
40
|
const meetingId = 'meetingId';
|
|
41
41
|
let locusInfo;
|
|
42
|
+
let sendBehavioralMetricStub;
|
|
42
43
|
|
|
43
44
|
const webex = new MockWebex({
|
|
44
45
|
children: {
|
|
@@ -65,6 +66,12 @@ describe('plugin-meetings', () => {
|
|
|
65
66
|
},
|
|
66
67
|
},
|
|
67
68
|
};
|
|
69
|
+
|
|
70
|
+
sendBehavioralMetricStub = sinon.stub(Metrics, 'sendBehavioralMetric');
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
afterEach(() => {
|
|
74
|
+
sinon.restore();
|
|
68
75
|
});
|
|
69
76
|
|
|
70
77
|
describe('#updateControls', () => {
|
|
@@ -1370,7 +1377,7 @@ describe('plugin-meetings', () => {
|
|
|
1370
1377
|
);
|
|
1371
1378
|
});
|
|
1372
1379
|
|
|
1373
|
-
const checkMeetingInfoUpdatedCalled = (expected) => {
|
|
1380
|
+
const checkMeetingInfoUpdatedCalled = (expected, payload) => {
|
|
1374
1381
|
const expectedArgs = [
|
|
1375
1382
|
locusInfo.emitScoped,
|
|
1376
1383
|
{
|
|
@@ -1378,6 +1385,7 @@ describe('plugin-meetings', () => {
|
|
|
1378
1385
|
function: 'updateMeetingInfo',
|
|
1379
1386
|
},
|
|
1380
1387
|
LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
|
|
1388
|
+
payload
|
|
1381
1389
|
];
|
|
1382
1390
|
|
|
1383
1391
|
if (expected) {
|
|
@@ -1388,7 +1396,7 @@ describe('plugin-meetings', () => {
|
|
|
1388
1396
|
locusInfo.emitScoped.resetHistory();
|
|
1389
1397
|
};
|
|
1390
1398
|
|
|
1391
|
-
const checkMeetingInfoUpdatedCalledForRoles = (expected) => {
|
|
1399
|
+
const checkMeetingInfoUpdatedCalledForRoles = (expected, payload) => {
|
|
1392
1400
|
const expectedArgs = [
|
|
1393
1401
|
locusInfo.emitScoped,
|
|
1394
1402
|
{
|
|
@@ -1396,6 +1404,7 @@ describe('plugin-meetings', () => {
|
|
|
1396
1404
|
function: 'updateMeetingInfo',
|
|
1397
1405
|
},
|
|
1398
1406
|
LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
|
|
1407
|
+
payload
|
|
1399
1408
|
];
|
|
1400
1409
|
|
|
1401
1410
|
if (expected) {
|
|
@@ -1440,7 +1449,7 @@ describe('plugin-meetings', () => {
|
|
|
1440
1449
|
|
|
1441
1450
|
// since it was initially undefined, this should trigger the event
|
|
1442
1451
|
|
|
1443
|
-
checkMeetingInfoUpdatedCalled(true);
|
|
1452
|
+
checkMeetingInfoUpdatedCalled(true, {isInitializing: false});
|
|
1444
1453
|
|
|
1445
1454
|
const newInfo = cloneDeep(meetingInfo);
|
|
1446
1455
|
|
|
@@ -1465,7 +1474,7 @@ describe('plugin-meetings', () => {
|
|
|
1465
1474
|
};
|
|
1466
1475
|
locusInfo.updateMeetingInfo(newInfo, self);
|
|
1467
1476
|
|
|
1468
|
-
checkMeetingInfoUpdatedCalled(true);
|
|
1477
|
+
checkMeetingInfoUpdatedCalled(true, {isInitializing: false});
|
|
1469
1478
|
|
|
1470
1479
|
// update it with the same info
|
|
1471
1480
|
expectedMeeting = {
|
|
@@ -1487,7 +1496,7 @@ describe('plugin-meetings', () => {
|
|
|
1487
1496
|
locusInfo.updateMeetingInfo(newInfo, self);
|
|
1488
1497
|
|
|
1489
1498
|
// since the info is the same it should not call trigger the event
|
|
1490
|
-
checkMeetingInfoUpdatedCalled(false);
|
|
1499
|
+
checkMeetingInfoUpdatedCalled(false, {isInitializing: false});
|
|
1491
1500
|
|
|
1492
1501
|
// update it with the same info, but roles changed
|
|
1493
1502
|
const updateSelf = cloneDeep(self);
|
|
@@ -1518,7 +1527,7 @@ describe('plugin-meetings', () => {
|
|
|
1518
1527
|
};
|
|
1519
1528
|
locusInfo.updateMeetingInfo(newInfo, updateSelf);
|
|
1520
1529
|
// since the info is the same but roles changed, it should call trigger the event
|
|
1521
|
-
checkMeetingInfoUpdatedCalledForRoles(true);
|
|
1530
|
+
checkMeetingInfoUpdatedCalledForRoles(true, {isInitializing: false});
|
|
1522
1531
|
});
|
|
1523
1532
|
|
|
1524
1533
|
it('gets roles from self if available', () => {
|
|
@@ -1539,12 +1548,17 @@ describe('plugin-meetings', () => {
|
|
|
1539
1548
|
roles: ['MODERATOR', 'COHOST'],
|
|
1540
1549
|
};
|
|
1541
1550
|
|
|
1551
|
+
sinon.stub(locusInfo, 'emitScoped');
|
|
1552
|
+
|
|
1542
1553
|
const parsedLocusInfo = cloneDeep(locusInfo.parsedLocus.info);
|
|
1543
1554
|
|
|
1544
1555
|
locusInfo.updateMeetingInfo(initialInfo);
|
|
1545
1556
|
assert.calledWith(isJoinedSpy, locusInfo.parsedLocus.self);
|
|
1546
1557
|
assert.neverCalledWith(getRolesSpy, self);
|
|
1547
1558
|
assert.calledWith(getInfosSpy, parsedLocusInfo, initialInfo, ['MODERATOR', 'COHOST']);
|
|
1559
|
+
|
|
1560
|
+
// since self is not passed to updateMeetingInfo, MEETING_INFO_UPDATED should be triggered with isIntializing: true
|
|
1561
|
+
checkMeetingInfoUpdatedCalledForRoles(true, {isInitializing: true});
|
|
1548
1562
|
});
|
|
1549
1563
|
});
|
|
1550
1564
|
|
|
@@ -1877,6 +1891,135 @@ describe('plugin-meetings', () => {
|
|
|
1877
1891
|
});
|
|
1878
1892
|
});
|
|
1879
1893
|
|
|
1894
|
+
it('applyLocusDeltaData handles LOCUS_URL_CHANGED action correctly', () => {
|
|
1895
|
+
const {LOCUS_URL_CHANGED} = LocusDeltaParser.loci;
|
|
1896
|
+
const fakeDeltaLocus = {id: 'fake delta locus'};
|
|
1897
|
+
const meeting = {
|
|
1898
|
+
meetingRequest: {
|
|
1899
|
+
getLocusDTO: sandbox.stub().resolves({body: fakeDeltaLocus}),
|
|
1900
|
+
},
|
|
1901
|
+
locusInfo: {
|
|
1902
|
+
handleLocusDelta: sandbox.stub(),
|
|
1903
|
+
},
|
|
1904
|
+
locusUrl: 'current locus url',
|
|
1905
|
+
};
|
|
1906
|
+
|
|
1907
|
+
locusInfo.locusParser.workingCopy = {
|
|
1908
|
+
syncUrl: 'current sync url',
|
|
1909
|
+
};
|
|
1910
|
+
|
|
1911
|
+
locusInfo.applyLocusDeltaData(LOCUS_URL_CHANGED, fakeLocus, meeting);
|
|
1912
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'current sync url'});
|
|
1913
|
+
});
|
|
1914
|
+
|
|
1915
|
+
describe('edge cases for sync failing', () => {
|
|
1916
|
+
const {DESYNC} = LocusDeltaParser.loci;
|
|
1917
|
+
const fakeFullLocusDto = {id: 'fake full locus dto'};
|
|
1918
|
+
let meeting;
|
|
1919
|
+
|
|
1920
|
+
beforeEach(() => {
|
|
1921
|
+
sinon.stub(locusInfo.locusParser, 'resume');
|
|
1922
|
+
sinon.stub(webex.meetings, 'destroy');
|
|
1923
|
+
|
|
1924
|
+
meeting = {
|
|
1925
|
+
meetingRequest: {
|
|
1926
|
+
getLocusDTO: sandbox.stub(),
|
|
1927
|
+
},
|
|
1928
|
+
locusInfo: {
|
|
1929
|
+
handleLocusDelta: sandbox.stub(),
|
|
1930
|
+
onFullLocus: sandbox.stub(),
|
|
1931
|
+
},
|
|
1932
|
+
locusUrl: 'fullSyncUrl',
|
|
1933
|
+
};
|
|
1934
|
+
|
|
1935
|
+
locusInfo.locusParser.workingCopy = {
|
|
1936
|
+
syncUrl: 'deltaSyncUrl',
|
|
1937
|
+
};
|
|
1938
|
+
});
|
|
1939
|
+
|
|
1940
|
+
it('applyLocusDeltaData gets full locus on DESYNC action if we do not have a syncUrl and destroys the meeting if that fails', () => {
|
|
1941
|
+
meeting.meetingRequest.getLocusDTO.rejects(new Error('fake error'));
|
|
1942
|
+
|
|
1943
|
+
locusInfo.locusParser.workingCopy = {}; // no syncUrl
|
|
1944
|
+
|
|
1945
|
+
// Since we have a promise inside a function we want to test that's not returned,
|
|
1946
|
+
// we will wait and stub it's last function to resolve this waiting promise.
|
|
1947
|
+
return new Promise((resolve) => {
|
|
1948
|
+
webex.meetings.destroy.callsFake(() => resolve());
|
|
1949
|
+
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
|
1950
|
+
}).then(() => {
|
|
1951
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'fullSyncUrl'});
|
|
1952
|
+
|
|
1953
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
|
1954
|
+
assert.notCalled(meeting.locusInfo.onFullLocus);
|
|
1955
|
+
assert.notCalled(locusInfo.locusParser.resume);
|
|
1956
|
+
|
|
1957
|
+
assert.calledOnceWithExactly(webex.meetings.destroy, meeting, 'LOCUS_DTO_SYNC_FAILED');
|
|
1958
|
+
});
|
|
1959
|
+
});
|
|
1960
|
+
|
|
1961
|
+
it('applyLocusDeltaData first tries a delta sync on DESYNC action and if that fails, does a full locus sync', () => {
|
|
1962
|
+
meeting.meetingRequest.getLocusDTO.onCall(0).rejects(new Error('fake error'));
|
|
1963
|
+
meeting.meetingRequest.getLocusDTO.onCall(1).resolves({body: fakeFullLocusDto});
|
|
1964
|
+
|
|
1965
|
+
// Since we have a promise inside a function we want to test that's not returned,
|
|
1966
|
+
// we will wait and stub it's last function to resolve this waiting promise.
|
|
1967
|
+
return new Promise((resolve) => {
|
|
1968
|
+
locusInfo.locusParser.resume.callsFake(() => resolve());
|
|
1969
|
+
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
|
1970
|
+
}).then(() => {
|
|
1971
|
+
assert.calledTwice(meeting.meetingRequest.getLocusDTO);
|
|
1972
|
+
|
|
1973
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [{url: 'deltaSyncUrl'}]);
|
|
1974
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [{url: 'fullSyncUrl'}]);
|
|
1975
|
+
|
|
1976
|
+
assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
|
|
1977
|
+
correlationId: meeting.correlationId,
|
|
1978
|
+
url: 'deltaSyncUrl',
|
|
1979
|
+
reason: 'fake error',
|
|
1980
|
+
errorName: 'Error',
|
|
1981
|
+
stack: sinon.match.any,
|
|
1982
|
+
code: sinon.match.any,
|
|
1983
|
+
});
|
|
1984
|
+
|
|
1985
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
|
1986
|
+
assert.calledOnceWithExactly(meeting.locusInfo.onFullLocus, fakeFullLocusDto);
|
|
1987
|
+
assert.calledOnce(locusInfo.locusParser.resume);
|
|
1988
|
+
});
|
|
1989
|
+
});
|
|
1990
|
+
|
|
1991
|
+
it('applyLocusDeltaData destroys the meeting if both delta sync and full sync fail', () => {
|
|
1992
|
+
meeting.meetingRequest.getLocusDTO.rejects(new Error('fake error'));
|
|
1993
|
+
|
|
1994
|
+
// Since we have a promise inside a function we want to test that's not returned,
|
|
1995
|
+
// we will wait and stub it's last function to resolve this waiting promise.
|
|
1996
|
+
return new Promise((resolve) => {
|
|
1997
|
+
webex.meetings.destroy.callsFake(() => resolve());
|
|
1998
|
+
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
|
1999
|
+
}).then(() => {
|
|
2000
|
+
assert.calledTwice(meeting.meetingRequest.getLocusDTO);
|
|
2001
|
+
|
|
2002
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [{url: 'deltaSyncUrl'}]);
|
|
2003
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [{url: 'fullSyncUrl'}]);
|
|
2004
|
+
|
|
2005
|
+
assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
|
|
2006
|
+
correlationId: meeting.correlationId,
|
|
2007
|
+
url: 'deltaSyncUrl',
|
|
2008
|
+
reason: 'fake error',
|
|
2009
|
+
errorName: 'Error',
|
|
2010
|
+
stack: sinon.match.any,
|
|
2011
|
+
code: sinon.match.any,
|
|
2012
|
+
});
|
|
2013
|
+
|
|
2014
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
|
2015
|
+
assert.notCalled(meeting.locusInfo.onFullLocus);
|
|
2016
|
+
assert.notCalled(locusInfo.locusParser.resume);
|
|
2017
|
+
|
|
2018
|
+
assert.calledOnceWithExactly(webex.meetings.destroy, meeting, 'LOCUS_DTO_SYNC_FAILED');
|
|
2019
|
+
});
|
|
2020
|
+
});
|
|
2021
|
+
});
|
|
2022
|
+
|
|
1880
2023
|
it('onDeltaLocus handle delta data', () => {
|
|
1881
2024
|
fakeLocus.participants = {};
|
|
1882
2025
|
const fakeBreakout = {
|
|
@@ -1922,7 +2065,7 @@ describe('plugin-meetings', () => {
|
|
|
1922
2065
|
});
|
|
1923
2066
|
|
|
1924
2067
|
describe('#getTheLocusToUpdate', () => {
|
|
1925
|
-
it('return the cache locus if return to main session', () => {
|
|
2068
|
+
it('return the cache locus if return to main session and do not clear main session cache', () => {
|
|
1926
2069
|
locusInfo.mainSessionLocusCache = {url: 'url'};
|
|
1927
2070
|
locusInfo.controls = {
|
|
1928
2071
|
breakout: {
|
|
@@ -1938,9 +2081,13 @@ describe('plugin-meetings', () => {
|
|
|
1938
2081
|
};
|
|
1939
2082
|
|
|
1940
2083
|
assert.deepEqual(locusInfo.getTheLocusToUpdate(newLocus), {url: 'url'});
|
|
2084
|
+
|
|
2085
|
+
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2086
|
+
locusInfo.getTheLocusToUpdate(newLocus);
|
|
2087
|
+
assert.notCalled(locusInfo.clearMainSessionLocusCache)
|
|
1941
2088
|
});
|
|
1942
2089
|
|
|
1943
|
-
it('return the new locus if return to main session but no cache', () => {
|
|
2090
|
+
it('return the new locus if return to main session but no cache and do not clear main session cache', () => {
|
|
1944
2091
|
locusInfo.mainSessionLocusCache = null;
|
|
1945
2092
|
locusInfo.controls = {
|
|
1946
2093
|
breakout: {
|
|
@@ -1956,10 +2103,22 @@ describe('plugin-meetings', () => {
|
|
|
1956
2103
|
};
|
|
1957
2104
|
|
|
1958
2105
|
assert.deepEqual(locusInfo.getTheLocusToUpdate(newLocus), newLocus);
|
|
2106
|
+
|
|
2107
|
+
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2108
|
+
locusInfo.getTheLocusToUpdate(newLocus);
|
|
2109
|
+
assert.notCalled(locusInfo.clearMainSessionLocusCache)
|
|
1959
2110
|
});
|
|
1960
2111
|
|
|
1961
|
-
it('return the new locus if not return to main session', () => {
|
|
1962
|
-
locusInfo.mainSessionLocusCache = {
|
|
2112
|
+
it('return the new locus if not return to main session and clear main session cache', () => {
|
|
2113
|
+
locusInfo.mainSessionLocusCache = {
|
|
2114
|
+
controls: {
|
|
2115
|
+
breakout: {
|
|
2116
|
+
sessionType: 'MAIN',
|
|
2117
|
+
},
|
|
2118
|
+
},
|
|
2119
|
+
self: {removed: true}
|
|
2120
|
+
};
|
|
2121
|
+
locusInfo.fullState = {state: 'ACTIVE'}
|
|
1963
2122
|
locusInfo.controls = {
|
|
1964
2123
|
breakout: {
|
|
1965
2124
|
sessionType: 'MAIN',
|
|
@@ -1973,7 +2132,39 @@ describe('plugin-meetings', () => {
|
|
|
1973
2132
|
},
|
|
1974
2133
|
};
|
|
1975
2134
|
|
|
1976
|
-
|
|
2135
|
+
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2136
|
+
const result = locusInfo.getTheLocusToUpdate(newLocus);
|
|
2137
|
+
assert.calledOnce(locusInfo.clearMainSessionLocusCache)
|
|
2138
|
+
|
|
2139
|
+
assert.deepEqual(result, newLocus);
|
|
2140
|
+
});
|
|
2141
|
+
|
|
2142
|
+
it('do not clear main session cache when "mainSessionLocusCache?.self?.removed" is not true', () => {
|
|
2143
|
+
locusInfo.mainSessionLocusCache = {
|
|
2144
|
+
controls: {
|
|
2145
|
+
breakout: {
|
|
2146
|
+
sessionType: 'MAIN',
|
|
2147
|
+
},
|
|
2148
|
+
},
|
|
2149
|
+
self: {removed: undefined}
|
|
2150
|
+
};
|
|
2151
|
+
locusInfo.fullState = {state: 'ACTIVE'}
|
|
2152
|
+
locusInfo.controls = {
|
|
2153
|
+
breakout: {
|
|
2154
|
+
sessionType: 'MAIN',
|
|
2155
|
+
},
|
|
2156
|
+
};
|
|
2157
|
+
const newLocus = {
|
|
2158
|
+
controls: {
|
|
2159
|
+
breakout: {
|
|
2160
|
+
sessionType: 'BREAKOUT',
|
|
2161
|
+
},
|
|
2162
|
+
},
|
|
2163
|
+
};
|
|
2164
|
+
|
|
2165
|
+
locusInfo.clearMainSessionLocusCache = sinon.stub();
|
|
2166
|
+
locusInfo.getTheLocusToUpdate(newLocus);
|
|
2167
|
+
assert.notCalled(locusInfo.clearMainSessionLocusCache)
|
|
1977
2168
|
});
|
|
1978
2169
|
});
|
|
1979
2170
|
|
|
@@ -2420,6 +2611,8 @@ describe('plugin-meetings', () => {
|
|
|
2420
2611
|
// send an out-of-order delta
|
|
2421
2612
|
locusInfo.handleLocusDelta(oooDelta, mockMeeting);
|
|
2422
2613
|
|
|
2614
|
+
assert.calledOnceWithExactly(sendBehavioralMetricStub, 'js_sdk_locus_delta_ooo', { stack: sinon.match.any})
|
|
2615
|
+
|
|
2423
2616
|
await clock.tickAsync(12499);
|
|
2424
2617
|
await testUtils.flushPromises();
|
|
2425
2618
|
assert.notCalled(syncRequestStub);
|
|
@@ -517,6 +517,22 @@
|
|
|
517
517
|
"new": "seq4g",
|
|
518
518
|
"result": "DESYNC",
|
|
519
519
|
"description": "New seq is greater than current, but both current and new base have some unique entries."
|
|
520
|
+
},
|
|
521
|
+
"updt25": {
|
|
522
|
+
"current": "seq4",
|
|
523
|
+
"newbase": "seq5c",
|
|
524
|
+
"new": "seq5b",
|
|
525
|
+
"result": "WAIT",
|
|
526
|
+
"description": "Both new seq and new base are newer than current but are not equal"
|
|
527
|
+
},
|
|
528
|
+
"updt26": {
|
|
529
|
+
"current": "seq4",
|
|
530
|
+
"currentUrl": "locus url 1",
|
|
531
|
+
"newbase": "seq5c",
|
|
532
|
+
"new": "seq5b",
|
|
533
|
+
"newUrl": "locus url 2",
|
|
534
|
+
"result": "LOCUS_URL_CHANGED",
|
|
535
|
+
"description": "Locus url changes in incoming"
|
|
520
536
|
}
|
|
521
537
|
}
|
|
522
538
|
}
|
|
@@ -20,3 +20,13 @@ describe('getContentUrl', () => {
|
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
describe('getContentBeneficiaryDeviceUrl', () => {
|
|
24
|
+
it('getContentBeneficiaryDeviceUrl return correct deviceUrl value', () => {
|
|
25
|
+
const mockContentBeneficiaryDeviceUrl = "https://wdm-a.wbx2.com/wdm/api/v1/devices/e9ffd8a1-1fae-42d1-afbe-013e951f93ab"
|
|
26
|
+
const stub = Sinon.stub(MediaSharesUtils, 'extractContentFloor').returns({ beneficiary: {deviceUrl : mockContentBeneficiaryDeviceUrl}});
|
|
27
|
+
const contentBeneficiaryDeviceUrl = MediaSharesUtils.getContentBeneficiaryDeviceUrl();
|
|
28
|
+
assert.equal(contentBeneficiaryDeviceUrl, mockContentBeneficiaryDeviceUrl);
|
|
29
|
+
stub.restore();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|