@webex/plugin-meetings 3.0.0-stream-classes.5 → 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} +71 -15
- package/dist/constants.js +252 -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 +38 -37
- 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 +43 -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 +318 -45
- package/dist/meeting/index.js +2620 -1405
- package/dist/meeting/index.js.map +1 -1
- 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 +2 -0
- package/dist/meeting/request.js +46 -31
- 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 +17 -0
- 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 +12 -0
- package/dist/metrics/constants.js +14 -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/multistream/remoteMediaManager.js +28 -27
- 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/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/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 +77 -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 +19 -14
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/parser.ts +40 -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 +1664 -642
- package/src/meeting/request.ts +18 -0
- 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 +12 -0
- 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/journey.js +12 -12
- package/test/integration/spec/space-meeting.js +1 -1
- 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 +88 -12
- 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 +4388 -1382
- 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 +674 -193
- 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/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/webex-test-users.js +12 -4
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -365
- package/dist/types/reachability/index.d.ts +0 -152
- 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}/locusMediaRequest.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}/remoteMediaManager.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/reachability → reachability}/request.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/roap → roap}/request.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_TIMEOUT","VIDEO_MESH_TIMEOUT","Reachability","webex","REACHABILITY","namespace","reachabilityRequest","ReachabilityRequest","clusterLatencyResults","setup","boundedStorage","del","localStorageResult","localStorageJoinCookie","getClusters","MeetingUtil","getIpVersion","clusters","joinCookie","performReachabilityCheck","results","put","LoggerProxy","logger","log","error","reachable","get","catch","reachabilityData","reachabilityResults","JSON","parse","some","result","udp","tcp","e","cluster","iceServers","map","url","username","credential","urls","iceCandidatePoolSize","iceTransportPolicy","key","config","peerConnection","window","RTCPeerConnection","peerConnectionError","startTime","begin","clusterList","buildPeerConnectionConfig","createPeerConnection","createOffer","offerToReceiveAudio","description","setLocalDescription","iceGatheringState","isVideoMesh","iceGatheringStateError","all","then","parseIceResultsToReachabilityResults","reachabilityLatencyResults","logUnreachableClusters","unreachableList","forEach","unreachable","push","onicegatheringstatechange","COMPLETE","ICE_GATHERING_STATE","iceConnectionState","elapsed","getElapsedTime","setLatencyAndClose","onicecandidate","SERVER_REFLEXIVE","candidate","String","type","toLowerCase","addPublicIP","address","timeout","ELAPSED","resolve","peerConnectionProxy","Proxy","target","property","targetMember","bind","set","value","clusterId","publicIPs","Reflect","handleIceGatheringStateChange","handleOnIceCandidate","setTimeout","CLOSED","CONNECTION_STATE","connectionState","list","getUnreachablClusters","iceResults","reachabilityMap","latencyResult","latencyInMilliseconds","toString","clientMediaIPs","untested","xtls","length","getLocalSDPForClusters","localSDPData","publicIP","modifiedPeerConnection","REACHABLE","UNREACHABLE","resultKey","intialState","close"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-disable class-methods-use-this */\n/* globals window */\nimport _ from 'lodash';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport MeetingUtil from '../meeting/util';\n\nimport {ICE_GATHERING_STATE, CONNECTION_STATE, REACHABILITY} from '../constants';\n\nimport ReachabilityRequest from './request';\n\nconst DEFAULT_TIMEOUT = 3000;\nconst VIDEO_MESH_TIMEOUT = 1000;\n\nexport type ICECandidateResult = {clusterId: string; elapsed?: string | null; publicIPs?: string[]};\n/**\n * @class Reachability\n * @export\n */\nexport default class Reachability {\n namespace = REACHABILITY.namespace;\n webex: object;\n reachabilityRequest: any;\n clusterLatencyResults: any;\n\n /**\n * Creates an instance of Reachability.\n * @param {object} webex\n * @memberof Reachability\n */\n constructor(webex: object) {\n this.webex = webex;\n\n /**\n * internal request object for the server\n * @instance\n * @type {Array}\n * @private\n * @memberof Reachability\n */\n this.reachabilityRequest = new ReachabilityRequest(this.webex);\n\n /**\n * internal object of clusters latency results\n * @instance\n * @type {object}\n * @private\n * @memberof Reachability\n */\n this.clusterLatencyResults = {};\n }\n\n /**\n * fetches reachability data\n * @returns {Object} reachability data\n * @public\n * @async\n * @memberof Reachability\n */\n public async gatherReachability() {\n this.setup();\n\n // Remove stored reachability results to ensure no stale data\n // @ts-ignore\n await this.webex.boundedStorage.del(this.namespace, REACHABILITY.localStorageResult);\n // @ts-ignore\n await this.webex.boundedStorage.del(this.namespace, REACHABILITY.localStorageJoinCookie);\n\n // Fetch clusters and measure latency\n try {\n const {clusters, joinCookie} = await this.reachabilityRequest.getClusters(\n MeetingUtil.getIpVersion(this.webex)\n );\n\n // Perform Reachability Check\n const results = await this.performReachabilityCheck(clusters);\n\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageResult,\n JSON.stringify(results)\n );\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageJoinCookie,\n JSON.stringify(joinCookie)\n );\n\n LoggerProxy.logger.log(\n 'Reachability:index#gatherReachability --> Reachability checks completed'\n );\n\n return results;\n } catch (getClusterError) {\n LoggerProxy.logger.error(\n `Reachability:index#gatherReachability --> Error in calling getClusters(): ${getClusterError}`\n );\n\n return {};\n }\n }\n\n /**\n * fetches reachability data and checks for cluster reachability\n * @returns {boolean}\n * @public\n * @memberof Reachability\n */\n async isAnyClusterReachable() {\n let reachable = false;\n // @ts-ignore\n const reachabilityData = await this.webex.boundedStorage\n .get(this.namespace, REACHABILITY.localStorageResult)\n .catch(() => {});\n\n if (reachabilityData) {\n try {\n const reachabilityResults = JSON.parse(reachabilityData);\n\n reachable = Object.values(reachabilityResults).some(\n (result: any) => result.udp?.reachable === 'true' || result.tcp?.reachable === 'true'\n );\n } catch (e) {\n LoggerProxy.logger.error(\n `Roap:request#attachReachabilityData --> Error in parsing reachability data: ${e}`\n );\n }\n }\n\n return reachable;\n }\n\n /**\n * Generate peerConnection config settings\n * @param {object} cluster\n * @returns {object} peerConnectionConfig\n * @private\n * @memberof Reachability\n */\n private buildPeerConnectionConfig(cluster: any) {\n const iceServers = _.uniq(cluster.udp).map((url) => ({\n username: '',\n credential: '',\n urls: [url],\n }));\n\n return {\n iceServers: [...iceServers],\n iceCandidatePoolSize: '0',\n iceTransportPolicy: 'all',\n };\n }\n\n /**\n * Creates an RTCPeerConnection\n * @param {object} cluster\n * @returns {RTCPeerConnection} peerConnection\n * @private\n * @memberof Reachability\n */\n private createPeerConnection(cluster: any) {\n const {key, config} = cluster;\n\n try {\n const peerConnection = new window.RTCPeerConnection(config);\n\n // @ts-ignore\n peerConnection.key = key;\n\n return peerConnection;\n } catch (peerConnectionError) {\n LoggerProxy.logger.log(\n `Reachability:index#createPeerConnection --> Error creating peerConnection: ${peerConnectionError}`\n );\n\n return null;\n }\n }\n\n /**\n * Gets total elapsed time\n * @param {RTCPeerConnection} peerConnection\n * @returns {Number} Milliseconds\n * @private\n * @memberof Reachability\n */\n private getElapsedTime(peerConnection: any) {\n const startTime = peerConnection.begin;\n\n delete peerConnection.begin;\n\n return Date.now() - startTime;\n }\n\n /**\n * creates offer and generates localSDP\n * @param {object} clusterList cluster List\n * @returns {Promise} Reachability latency results\n * @private\n * @memberof Reachability\n */\n private getLocalSDPForClusters(clusterList: object) {\n let clusters: any[] = [...Object.keys(clusterList)];\n\n clusters = clusters.map(async (key) => {\n const cluster = clusterList[key];\n const config = this.buildPeerConnectionConfig(cluster);\n const peerConnection = this.createPeerConnection({key, config});\n const description = await peerConnection.createOffer({offerToReceiveAudio: true});\n\n // @ts-ignore\n peerConnection.begin = Date.now();\n peerConnection.setLocalDescription(description);\n\n return this.iceGatheringState(\n peerConnection,\n cluster.isVideoMesh ? VIDEO_MESH_TIMEOUT : DEFAULT_TIMEOUT\n ).catch((iceGatheringStateError) => {\n LoggerProxy.logger.log(\n `Reachability:index#getLocalSDPForClusters --> Error in getLocalSDP : ${iceGatheringStateError}`\n );\n });\n });\n\n return Promise.all(clusters)\n .then(this.parseIceResultsToReachabilityResults)\n .then((reachabilityLatencyResults) => {\n this.logUnreachableClusters();\n\n // return results\n return reachabilityLatencyResults;\n });\n }\n\n /**\n * Get list of all unreachable clusters\n * @returns {array} Unreachable clusters\n * @private\n * @memberof Reachability\n */\n private getUnreachablClusters() {\n const unreachableList = [];\n const clusters = this.clusterLatencyResults;\n\n Object.keys(clusters).forEach((key) => {\n const cluster = clusters[key];\n\n if (cluster.unreachable && !cluster.reachable) {\n unreachableList.push(key);\n }\n });\n\n return unreachableList;\n }\n\n /**\n * Attach an event handler for the icegatheringstatechange\n * event and measure latency.\n * @param {RTCPeerConnection} peerConnection\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private handleIceGatheringStateChange(peerConnection: RTCPeerConnection) {\n peerConnection.onicegatheringstatechange = () => {\n const {COMPLETE} = ICE_GATHERING_STATE;\n\n if (peerConnection.iceConnectionState === COMPLETE) {\n const elapsed = this.getElapsedTime(peerConnection);\n\n // @ts-ignore\n LoggerProxy.logger.log(\n // @ts-ignore\n `Reachability:index#onIceGatheringStateChange --> Successfully pinged ${peerConnection.key}:`,\n elapsed\n );\n this.setLatencyAndClose(peerConnection, elapsed);\n }\n };\n }\n\n /**\n * Attach an event handler for the icecandidate\n * event and measure latency.\n * @param {RTCPeerConnection} peerConnection\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private handleOnIceCandidate(peerConnection: RTCPeerConnection) {\n peerConnection.onicecandidate = (e) => {\n const SERVER_REFLEXIVE = 'srflx';\n\n if (e.candidate && String(e.candidate.type).toLowerCase() === SERVER_REFLEXIVE) {\n const elapsed = this.getElapsedTime(peerConnection);\n\n LoggerProxy.logger.log(\n // @ts-ignore\n `Reachability:index#onIceCandidate --> Successfully pinged ${peerConnection.key}:`,\n elapsed\n );\n // order is important\n this.addPublicIP(peerConnection, e.candidate.address);\n this.setLatencyAndClose(peerConnection, elapsed);\n }\n };\n }\n\n /**\n * An event handler on an RTCPeerConnection when the state of the ICE\n * candidate gathering process changes. Used to measure connection\n * speed.\n * @private\n * @param {RTCPeerConnection} peerConnection\n * @param {number} timeout\n * @returns {Promise}\n */\n private iceGatheringState(peerConnection: RTCPeerConnection, timeout: number) {\n const ELAPSED = 'elapsed';\n\n return new Promise<ICECandidateResult>((resolve) => {\n const peerConnectionProxy = new window.Proxy(peerConnection, {\n // eslint-disable-next-line require-jsdoc\n get(target, property) {\n const targetMember = target[property];\n\n if (typeof targetMember === 'function') {\n return targetMember.bind(target);\n }\n\n return targetMember;\n },\n set: (target, property, value) => {\n // only intercept elapsed property\n if (property === ELAPSED) {\n // @ts-ignore\n resolve({clusterId: peerConnection.key, publicIPs: target.publicIPs, elapsed: value});\n\n return true;\n }\n\n // pass thru\n return window.Reflect.set(target, property, value);\n },\n });\n\n // Using peerConnection proxy so handle functions below\n // won't be coupled to our promise implementation\n this.handleIceGatheringStateChange(peerConnectionProxy);\n this.handleOnIceCandidate(peerConnectionProxy);\n\n // Set maximum timeout\n window.setTimeout(() => {\n const {CLOSED} = CONNECTION_STATE;\n\n // Close any open peerConnections\n if (peerConnectionProxy.connectionState !== CLOSED) {\n // order is important\n this.addPublicIP(peerConnectionProxy, null);\n this.setLatencyAndClose(peerConnectionProxy, null);\n }\n }, timeout);\n });\n }\n\n /**\n * Make a log of unreachable clusters.\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private logUnreachableClusters() {\n const list = this.getUnreachablClusters();\n\n list.forEach((cluster) => {\n LoggerProxy.logger.log(\n `Reachability:index#logUnreachableClusters --> No ice candidate for ${cluster}.`\n );\n });\n }\n\n /**\n * Calculates time to establish connection\n * @param {Array<ICECandidateResult>} iceResults iceResults\n * @returns {object} reachabilityMap\n * @protected\n * @memberof Reachability\n */\n protected parseIceResultsToReachabilityResults(iceResults: Array<ICECandidateResult>) {\n const reachabilityMap = {};\n\n iceResults.forEach(({clusterId, elapsed, publicIPs}) => {\n const latencyResult = {};\n\n if (!elapsed) {\n Object.assign(latencyResult, {reachable: 'false'});\n } else {\n Object.assign(latencyResult, {\n reachable: 'true',\n latencyInMilliseconds: elapsed.toString(),\n });\n }\n\n if (publicIPs) {\n Object.assign(latencyResult, {\n clientMediaIPs: publicIPs,\n });\n }\n\n reachabilityMap[clusterId] = {\n udp: latencyResult,\n tcp: {untested: 'true'},\n xtls: {untested: 'true'},\n };\n });\n\n return reachabilityMap;\n }\n\n /**\n * fetches reachability data\n * @param {object} clusterList\n * @returns {Promise<localSDPData>} reachability check results\n * @private\n * @memberof Reachability\n */\n private performReachabilityCheck(clusterList: object) {\n if (!clusterList || !Object.keys(clusterList).length) {\n return Promise.resolve({});\n }\n\n return new Promise((resolve) => {\n this.getLocalSDPForClusters(clusterList)\n .then((localSDPData) => {\n if (!localSDPData || !Object.keys(localSDPData).length) {\n // TODO: handle the error condition properly and try retry\n LoggerProxy.logger.log(\n 'Reachability:index#performReachabilityCheck --> Local SDP is empty or has missing elements..returning'\n );\n resolve({});\n } else {\n resolve(localSDPData);\n }\n })\n .catch((error) => {\n LoggerProxy.logger.error(\n `Reachability:index#performReachabilityCheck --> Error in getLocalSDPForClusters: ${error}`\n );\n resolve({});\n });\n });\n }\n\n /**\n * Adds public IP (client media IPs)\n * @param {RTCPeerConnection} peerConnection\n * @param {string} publicIP\n * @returns {void}\n */\n protected addPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null) {\n const modifiedPeerConnection: RTCPeerConnection & {publicIPs?: string[]} = peerConnection;\n const {CLOSED} = CONNECTION_STATE;\n\n if (modifiedPeerConnection.connectionState === CLOSED) {\n LoggerProxy.logger.log(\n `Reachability:index#addPublicIP --> Attempting to set publicIP of ${publicIP} on closed peerConnection.`\n );\n }\n\n if (publicIP) {\n if (modifiedPeerConnection.publicIPs) {\n modifiedPeerConnection.publicIPs.push(publicIP);\n } else {\n modifiedPeerConnection.publicIPs = [publicIP];\n }\n } else {\n modifiedPeerConnection.publicIPs = null;\n }\n }\n\n /**\n * Records latency and closes the peerConnection\n * @param {RTCPeerConnection} peerConnection\n * @param {number} elapsed Latency in milliseconds\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private setLatencyAndClose(peerConnection: RTCPeerConnection, elapsed: number) {\n const REACHABLE = 'reachable';\n const UNREACHABLE = 'unreachable';\n const {CLOSED} = CONNECTION_STATE;\n // @ts-ignore\n const {key} = peerConnection;\n const resultKey = elapsed === null ? UNREACHABLE : REACHABLE;\n const intialState = {[REACHABLE]: 0, [UNREACHABLE]: 0};\n\n if (peerConnection.connectionState === CLOSED) {\n LoggerProxy.logger.log(\n `Reachability:index#setLatencyAndClose --> Attempting to set latency of ${elapsed} on closed peerConnection.`\n );\n\n return;\n }\n\n this.clusterLatencyResults[key] = this.clusterLatencyResults[key] || intialState;\n this.clusterLatencyResults[key][resultKey] += 1;\n\n // Set to null in case this fired from\n // an event other than onIceCandidate\n peerConnection.onicecandidate = null;\n peerConnection.close();\n // @ts-ignore\n peerConnection.elapsed = elapsed;\n }\n\n /**\n * utility function\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private setup() {\n this.clusterLatencyResults = {};\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA;AACA;AAEA;AAEA;AAEA,IAAMA,eAAe,GAAG,IAAI;AAC5B,IAAMC,kBAAkB,GAAG,IAAI;AAG/B;AACA;AACA;AACA;AAHA,IAIqBC,YAAY;EAM/B;AACF;AACA;AACA;AACA;EACE,sBAAYC,KAAa,EAAE;IAAA;IAAA,iDAVfC,uBAAY,CAACC,SAAS;IAAA;IAAA;IAAA;IAWhC,IAAI,CAACF,KAAK,GAAGA,KAAK;;IAElB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACG,mBAAmB,GAAG,IAAIC,gBAAmB,CAAC,IAAI,CAACJ,KAAK,CAAC;;IAE9D;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACK,qBAAqB,GAAG,CAAC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WAAW,GAAG,aAAa;MACjC,IAAOnB,MAAM,GAAIC,2BAAgB,CAA1BD,MAAM;MACb;MACA,IAAO3D,GAAG,GAAIE,cAAc,CAArBF,GAAG;MACV,IAAM+E,SAAS,GAAGhD,OAAO,KAAK,IAAI,GAAG+C,WAAW,GAAGD,SAAS;MAC5D,IAAMG,WAAW,mEAAKH,SAAS,EAAG,CAAC,+CAAGC,WAAW,EAAG,CAAC,gBAAC;MAEtD,IAAI5E,cAAc,CAAC2D,eAAe,KAAKF,MAAM,EAAE;QAC7CpF,oBAAW,CAACC,MAAM,CAACC,GAAG,kFACsDsD,OAAO,gCAClF;QAED;MACF;MAEA,IAAI,CAACtE,qBAAqB,CAACuC,GAAG,CAAC,GAAG,IAAI,CAACvC,qBAAqB,CAACuC,GAAG,CAAC,IAAIgF,WAAW;MAChF,IAAI,CAACvH,qBAAqB,CAACuC,GAAG,CAAC,CAAC+E,SAAS,CAAC,IAAI,CAAC;;MAE/C;MACA;MACA7E,cAAc,CAACgC,cAAc,GAAG,IAAI;MACpChC,cAAc,CAAC+E,KAAK,EAAE;MACtB;MACA/E,cAAc,CAAC6B,OAAO,GAAGA,OAAO;IAClC;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,iBAAgB;MACd,IAAI,CAACtE,qBAAqB,GAAG,CAAC,CAAC;IACjC;EAAC;EAAA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"names":["_lodash","require","_loggerProxy","_interopRequireDefault","_util","_constants","_request","_clusterReachability","Reachability","exports","default","webex","_classCallCheck2","_defineProperty2","REACHABILITY","namespace","reachabilityRequest","ReachabilityRequest","clusterReachability","_createClass2","key","value","_gatherReachability","_asyncToGenerator2","_regenerator","mark","_callee","_yield$this$reachabil","clusters","joinCookie","results","wrap","_callee$","_context","prev","next","getClusters","MeetingUtil","getIpVersion","sent","performReachabilityChecks","boundedStorage","put","localStorageResult","_stringify","localStorageJoinCookie","LoggerProxy","logger","log","abrupt","t0","error","stop","gatherReachability","apply","arguments","_getReachabilityMetrics","_callee2","stats","updateStats","resultsJson","_callee2$","_context2","reachability_public_udp_success","reachability_public_udp_failed","reachability_public_tcp_success","reachability_public_tcp_failed","reachability_vmn_udp_success","reachability_vmn_udp_failed","reachability_vmn_tcp_success","reachability_vmn_tcp_failed","clusterType","result","udp","outcome","concat","tcp","get","JSON","parse","_values","forEach","isVideoMesh","warn","getReachabilityMetrics","mapTransportResultToBackendDataFormat","transportResult","output","_i","_Object$entries","_entries","length","_Object$entries$_i","_slicedToArray2","reachable","untested","latencyInMilliseconds","toString","_getReachabilityResults","_callee3","_this","allClusterResults","_callee3$","_context3","mapValues","clusterResult","xtls","getReachabilityResults","_isAnyPublicClusterReachable","_callee4","reachabilityData","reachabilityResults","_callee4$","_context4","catch","some","_result$udp","_result$tcp","e","isAnyPublicClusterReachable","getUnreachableClusters","unreachableList","_ref","_ref2","getResult","push","name","protocol","logUnreachableClusters","list","_ref3","_performReachabilityChecks","_callee5","clusterList","_this2","clusterReachabilityChecks","_callee5$","_context5","_keys","_promise","resolve","config","meetings","experimental","enableTcpReachability","map","cluster","includeTcpReachability","ClusterReachability","start","then","all","_x"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-disable class-methods-use-this */\nimport {mapValues} from 'lodash';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport MeetingUtil from '../meeting/util';\n\nimport {REACHABILITY} from '../constants';\n\nimport ReachabilityRequest, {ClusterList} from './request';\nimport {\n ClusterReachability,\n ClusterReachabilityResult,\n TransportResult,\n} from './clusterReachability';\n\nexport type ReachabilityMetrics = {\n reachability_public_udp_success: number;\n reachability_public_udp_failed: number;\n reachability_public_tcp_success: number;\n reachability_public_tcp_failed: number;\n reachability_vmn_udp_success: number;\n reachability_vmn_udp_failed: number;\n reachability_vmn_tcp_success: number;\n reachability_vmn_tcp_failed: number;\n};\n\n/**\n * This is the type that matches what backend expects us to send to them. It is a bit weird, because\n * it uses strings instead of booleans and numbers, but that's what they require.\n */\nexport type TransportResultForBackend = {\n reachable?: 'true' | 'false';\n latencyInMilliseconds?: string;\n clientMediaIPs?: string[];\n untested?: 'true';\n};\n\nexport type ReachabilityResultForBackend = {\n udp: TransportResultForBackend;\n tcp: TransportResultForBackend;\n xtls: TransportResultForBackend;\n};\n\n// this is the type that is required by the backend when we send them reachability results\nexport type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;\n\n// this is the type used by Reachability class internally and stored in local storage\nexport type ReachabilityResults = Record<\n string,\n ClusterReachabilityResult & {\n isVideoMesh?: boolean;\n }\n>;\n\n/**\n * @class Reachability\n * @export\n */\nexport default class Reachability {\n namespace = REACHABILITY.namespace;\n webex: object;\n reachabilityRequest: ReachabilityRequest;\n clusterReachability: {\n [key: string]: ClusterReachability;\n };\n\n /**\n * Creates an instance of Reachability.\n * @param {object} webex\n * @memberof Reachability\n */\n constructor(webex: object) {\n this.webex = webex;\n\n /**\n * internal request object for the server\n * @instance\n * @type {Array}\n * @private\n * @memberof Reachability\n */\n this.reachabilityRequest = new ReachabilityRequest(this.webex);\n\n this.clusterReachability = {};\n }\n\n /**\n * Gets a list of media clusters from the backend and performs reachability checks on all the clusters\n * @returns {Promise<ReachabilityResults>} reachability results\n * @public\n * @memberof Reachability\n */\n public async gatherReachability(): Promise<ReachabilityResults> {\n // Fetch clusters and measure latency\n try {\n const {clusters, joinCookie} = await this.reachabilityRequest.getClusters(\n MeetingUtil.getIpVersion(this.webex)\n );\n\n // Perform Reachability Check\n const results = await this.performReachabilityChecks(clusters);\n\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageResult,\n JSON.stringify(results)\n );\n // @ts-ignore\n await this.webex.boundedStorage.put(\n this.namespace,\n REACHABILITY.localStorageJoinCookie,\n JSON.stringify(joinCookie)\n );\n\n LoggerProxy.logger.log(\n 'Reachability:index#gatherReachability --> Reachability checks completed'\n );\n\n return results;\n } catch (error) {\n LoggerProxy.logger.error(`Reachability:index#gatherReachability --> Error:`, error);\n\n return {};\n }\n }\n\n /**\n * Returns statistics about last reachability results. The returned value is an object\n * with a flat list of properties so that it can be easily sent with metrics\n *\n * @returns {Promise} Promise with metrics values, it never rejects/throws.\n */\n async getReachabilityMetrics(): Promise<ReachabilityMetrics> {\n const stats: ReachabilityMetrics = {\n reachability_public_udp_success: 0,\n reachability_public_udp_failed: 0,\n reachability_public_tcp_success: 0,\n reachability_public_tcp_failed: 0,\n reachability_vmn_udp_success: 0,\n reachability_vmn_udp_failed: 0,\n reachability_vmn_tcp_success: 0,\n reachability_vmn_tcp_failed: 0,\n };\n\n const updateStats = (clusterType: 'public' | 'vmn', result: ClusterReachabilityResult) => {\n if (result.udp && result.udp.result !== 'untested') {\n const outcome = result.udp.result === 'reachable' ? 'success' : 'failed';\n stats[`reachability_${clusterType}_udp_${outcome}`] += 1;\n }\n if (result.tcp && result.tcp.result !== 'untested') {\n const outcome = result.tcp.result === 'reachable' ? 'success' : 'failed';\n stats[`reachability_${clusterType}_tcp_${outcome}`] += 1;\n }\n };\n\n try {\n // @ts-ignore\n const resultsJson = await this.webex.boundedStorage.get(\n REACHABILITY.namespace,\n REACHABILITY.localStorageResult\n );\n\n const results: ReachabilityResults = JSON.parse(resultsJson);\n\n Object.values(results).forEach((result) => {\n updateStats(result.isVideoMesh ? 'vmn' : 'public', result);\n });\n } catch (e) {\n // empty storage, that's ok\n LoggerProxy.logger.warn(\n 'Roap:request#getReachabilityMetrics --> Error parsing reachability data: ',\n e\n );\n }\n\n return stats;\n }\n\n /**\n * Maps our internal transport result to the format that backend expects\n * @param {TransportResult} transportResult\n * @returns {TransportResultForBackend}\n */\n private mapTransportResultToBackendDataFormat(\n transportResult: TransportResult\n ): TransportResultForBackend {\n const output: TransportResultForBackend = {};\n\n for (const [key, value] of Object.entries(transportResult)) {\n switch (key) {\n case 'result':\n switch (value) {\n case 'reachable':\n output.reachable = 'true';\n break;\n case 'unreachable':\n output.reachable = 'false';\n break;\n case 'untested':\n output.untested = 'true';\n break;\n }\n break;\n case 'latencyInMilliseconds':\n output.latencyInMilliseconds = value.toString();\n break;\n default:\n output[key] = value;\n }\n }\n\n return output;\n }\n\n /**\n * Reachability results as an object in the format that backend expects\n *\n * @returns {any} reachability results that need to be sent to the backend\n */\n async getReachabilityResults(): Promise<ReachabilityResultsForBackend | undefined> {\n let results: ReachabilityResultsForBackend;\n\n try {\n // @ts-ignore\n const resultsJson = await this.webex.boundedStorage.get(\n REACHABILITY.namespace,\n REACHABILITY.localStorageResult\n );\n\n const allClusterResults: ReachabilityResults = JSON.parse(resultsJson);\n\n results = mapValues(allClusterResults, (clusterResult) => ({\n udp: this.mapTransportResultToBackendDataFormat(clusterResult.udp || {result: 'untested'}),\n tcp: this.mapTransportResultToBackendDataFormat(clusterResult.tcp || {result: 'untested'}),\n xtls: this.mapTransportResultToBackendDataFormat(\n clusterResult.xtls || {result: 'untested'}\n ),\n }));\n } catch (e) {\n // empty storage, that's ok\n LoggerProxy.logger.warn(\n 'Roap:request#attachReachabilityData --> Error parsing reachability data: ',\n e\n );\n }\n\n return results;\n }\n\n /**\n * fetches reachability data and checks for cluster reachability\n * @returns {boolean}\n * @public\n * @memberof Reachability\n */\n async isAnyPublicClusterReachable() {\n let reachable = false;\n // @ts-ignore\n const reachabilityData = await this.webex.boundedStorage\n .get(this.namespace, REACHABILITY.localStorageResult)\n .catch(() => {});\n\n if (reachabilityData) {\n try {\n const reachabilityResults: ReachabilityResults = JSON.parse(reachabilityData);\n\n reachable = Object.values(reachabilityResults).some(\n (result) =>\n !result.isVideoMesh &&\n (result.udp?.result === 'reachable' || result.tcp?.result === 'reachable')\n );\n } catch (e) {\n LoggerProxy.logger.error(\n `Roap:request#attachReachabilityData --> Error in parsing reachability data: ${e}`\n );\n }\n }\n\n return reachable;\n }\n\n /**\n * Get list of all unreachable clusters\n * @returns {array} Unreachable clusters\n * @private\n * @memberof Reachability\n */\n private getUnreachableClusters(): Array<{name: string; protocol: string}> {\n const unreachableList = [];\n\n Object.entries(this.clusterReachability).forEach(([key, clusterReachability]) => {\n const result = clusterReachability.getResult();\n\n if (result.udp.result === 'unreachable') {\n unreachableList.push({name: key, protocol: 'udp'});\n }\n if (result.tcp.result === 'unreachable') {\n unreachableList.push({name: key, protocol: 'tcp'});\n }\n });\n\n return unreachableList;\n }\n\n /**\n * Make a log of unreachable clusters.\n * @returns {undefined}\n * @private\n * @memberof Reachability\n */\n private logUnreachableClusters() {\n const list = this.getUnreachableClusters();\n\n list.forEach(({name, protocol}) => {\n LoggerProxy.logger.log(\n `Reachability:index#logUnreachableClusters --> failed to reach ${name} over ${protocol}`\n );\n });\n }\n\n /**\n * Performs reachability checks for all clusters\n * @param {ClusterList} clusterList\n * @returns {Promise<ReachabilityResults>} reachability check results\n */\n private async performReachabilityChecks(clusterList: ClusterList): Promise<ReachabilityResults> {\n const results: ReachabilityResults = {};\n\n if (!clusterList || !Object.keys(clusterList).length) {\n return Promise.resolve(results);\n }\n\n LoggerProxy.logger.log(\n `Reachability:index#performReachabilityChecks --> doing UDP${\n // @ts-ignore\n this.webex.config.meetings.experimental.enableTcpReachability ? ' and TCP' : ''\n } reachability checks`\n );\n\n const clusterReachabilityChecks = Object.keys(clusterList).map((key) => {\n const cluster = clusterList[key];\n\n // Linus doesn't support TCP reachability checks on video mesh nodes\n const includeTcpReachability =\n // @ts-ignore\n this.webex.config.meetings.experimental.enableTcpReachability && !cluster.isVideoMesh;\n\n if (!includeTcpReachability) {\n cluster.tcp = [];\n }\n\n this.clusterReachability[key] = new ClusterReachability(key, cluster);\n\n return this.clusterReachability[key].start().then((result) => {\n results[key] = result;\n results[key].isVideoMesh = cluster.isVideoMesh;\n });\n });\n\n await Promise.all(clusterReachabilityChecks);\n\n this.logUnreachableClusters();\n\n return results;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GA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EvF,IAAI,CAACiE,sBAAsB,EAAE;kBAC3BD,OAAO,CAACtE,GAAG,GAAG,EAAE;gBAClB;gBAEA0D,MAAI,CAACpH,mBAAmB,CAACE,GAAG,CAAC,GAAG,IAAIgI,wCAAmB,CAAChI,GAAG,EAAE8H,OAAO,CAAC;gBAErE,OAAOZ,MAAI,CAACpH,mBAAmB,CAACE,GAAG,CAAC,CAACiI,KAAK,CAAC,CAAC,CAACC,IAAI,CAAC,UAAC9E,MAAM,EAAK;kBAC5D1C,OAAO,CAACV,GAAG,CAAC,GAAGoD,MAAM;kBACrB1C,OAAO,CAACV,GAAG,CAAC,CAAC8D,WAAW,GAAGgE,OAAO,CAAChE,WAAW;gBAChD,CAAC,CAAC;cACJ,CAAC,CAAC;cAAAuD,SAAA,CAAAtG,IAAA;cAAA,OAEIwG,QAAA,CAAAjI,OAAA,CAAQ6I,GAAG,CAAChB,yBAAyB,CAAC;YAAA;cAE5C,IAAI,CAACP,sBAAsB,CAAC,CAAC;cAAC,OAAAS,SAAA,CAAAxF,MAAA,WAEvBnB,OAAO;YAAA;YAAA;cAAA,OAAA2G,SAAA,CAAArF,IAAA;UAAA;QAAA,GAAAgF,QAAA;MAAA,CACf;MAAA,SAAA5F,0BAAAgH,EAAA;QAAA,OAAArB,0BAAA,CAAA7E,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAf,yBAAA;IAAA;EAAA;EAAA,OAAAhC,YAAA;AAAA"}
|
|
@@ -26,6 +26,12 @@ function ReachabilityRequest(webex) {
|
|
|
26
26
|
var _this = this;
|
|
27
27
|
(0, _classCallCheck2.default)(this, ReachabilityRequest);
|
|
28
28
|
(0, _defineProperty2.default)(this, "webex", void 0);
|
|
29
|
+
/**
|
|
30
|
+
* Gets the cluster information
|
|
31
|
+
*
|
|
32
|
+
* @param {IP_VERSION} ipVersion information about current ip network we're on
|
|
33
|
+
* @returns {Promise}
|
|
34
|
+
*/
|
|
29
35
|
(0, _defineProperty2.default)(this, "getClusters", function (ipVersion) {
|
|
30
36
|
return _this.webex.request({
|
|
31
37
|
method: _constants.HTTP_VERBS.GET,
|
|
@@ -42,7 +48,7 @@ function ReachabilityRequest(webex) {
|
|
|
42
48
|
joinCookie = _res$body.joinCookie;
|
|
43
49
|
(0, _keys.default)(clusters).forEach(function (key) {
|
|
44
50
|
var _res$body$clusterClas, _res$body$clusterClas2;
|
|
45
|
-
clusters[key].isVideoMesh = (_res$body$clusterClas = res.body.clusterClasses)
|
|
51
|
+
clusters[key].isVideoMesh = !!((_res$body$clusterClas = res.body.clusterClasses) !== null && _res$body$clusterClas !== void 0 && (_res$body$clusterClas2 = _res$body$clusterClas.hybridMedia) !== null && _res$body$clusterClas2 !== void 0 && _res$body$clusterClas2.includes(key));
|
|
46
52
|
});
|
|
47
53
|
_loggerProxy.default.logger.log("Reachability:request#getClusters --> get clusters (ipver=".concat(ipVersion, ") successful:").concat((0, _stringify.default)(clusters)));
|
|
48
54
|
return {
|
|
@@ -51,6 +57,11 @@ function ReachabilityRequest(webex) {
|
|
|
51
57
|
};
|
|
52
58
|
});
|
|
53
59
|
});
|
|
60
|
+
/**
|
|
61
|
+
* gets remote SDP For Clusters
|
|
62
|
+
* @param {Object} localSDPList localSDPs for the cluster
|
|
63
|
+
* @returns {Object}
|
|
64
|
+
*/
|
|
54
65
|
(0, _defineProperty2.default)(this, "remoteSDPForClusters", function (localSDPList) {
|
|
55
66
|
return _this.webex.request({
|
|
56
67
|
method: _constants.HTTP_VERBS.POST,
|
|
@@ -66,14 +77,6 @@ function ReachabilityRequest(webex) {
|
|
|
66
77
|
});
|
|
67
78
|
});
|
|
68
79
|
this.webex = webex;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Gets the cluster information
|
|
73
|
-
*
|
|
74
|
-
* @param {IP_VERSION} ipVersion information about current ip network we're on
|
|
75
|
-
* @returns {Promise}
|
|
76
|
-
*/);
|
|
77
|
-
var _default = ReachabilityRequest;
|
|
78
|
-
exports.default = _default;
|
|
80
|
+
});
|
|
81
|
+
var _default = exports.default = ReachabilityRequest;
|
|
79
82
|
//# sourceMappingURL=request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ReachabilityRequest","webex","ipVersion","request","method","HTTP_VERBS","GET","shouldRefreshAccessToken","api","API","CALLIOPEDISCOVERY","resource","RESOURCE","CLUSTERS","qs","JCSupport","ipver","then","res","body","clusters","joinCookie","forEach","key","isVideoMesh","clusterClasses","hybridMedia","includes","LoggerProxy","logger","log","localSDPList","POST","REACHABILITY","offers"],"sources":["request.ts"],"sourcesContent":["import LoggerProxy from '../common/logs/logger-proxy';\nimport {HTTP_VERBS, RESOURCE, API, IP_VERSION} from '../constants';\n\nexport interface ClusterNode {\n isVideoMesh: boolean;\n udp: Array<string>;\n tcp: Array<string>;\n xtls: Array<string>;\n}\n\nexport type ClusterList = {\n [key: string]: ClusterNode;\n};\n\n/**\n * @class ReachabilityRequest\n */\nclass ReachabilityRequest {\n webex: any;\n\n /**\n * Creates an instance of ReachabilityRequest.\n * @param {object} webex\n * @memberof ReachabilityRequest\n */\n constructor(webex: object) {\n this.webex = webex;\n }\n\n /**\n * Gets the cluster information\n *\n * @param {IP_VERSION} ipVersion information about current ip network we're on\n * @returns {Promise}\n */\n getClusters = (ipVersion?: IP_VERSION): Promise<{clusters: ClusterList; joinCookie: any}> =>\n this.webex\n .request({\n method: HTTP_VERBS.GET,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.CLUSTERS,\n qs: {\n JCSupport: 1,\n ipver: ipVersion,\n },\n })\n .then((res) => {\n const {clusters, joinCookie} = res.body;\n\n Object.keys(clusters).forEach((key) => {\n clusters[key].isVideoMesh = res.body.clusterClasses?.hybridMedia?.includes(key);\n });\n\n LoggerProxy.logger.log(\n `Reachability:request#getClusters --> get clusters (ipver=${ipVersion}) successful:${JSON.stringify(\n clusters\n )}`\n );\n\n return {\n clusters,\n joinCookie,\n };\n });\n\n /**\n * gets remote SDP For Clusters\n * @param {Object} localSDPList localSDPs for the cluster\n * @returns {Object}\n */\n remoteSDPForClusters = (localSDPList: object) =>\n this.webex\n .request({\n method: HTTP_VERBS.POST,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.REACHABILITY,\n body: {offers: localSDPList},\n })\n .then((res) => {\n LoggerProxy.logger.log(\n 'Reachability:request#remoteSDPForClusters --> Remote SDPs got succcessfully'\n );\n\n return res.body;\n });\n}\n\nexport default ReachabilityRequest;\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAaA;AACA;AACA;AAFA,
|
|
1
|
+
{"version":3,"names":["_loggerProxy","_interopRequireDefault","require","_constants","ReachabilityRequest","_createClass2","default","webex","_this","_classCallCheck2","_defineProperty2","ipVersion","request","method","HTTP_VERBS","GET","shouldRefreshAccessToken","api","API","CALLIOPEDISCOVERY","resource","RESOURCE","CLUSTERS","qs","JCSupport","ipver","then","res","_res$body","body","clusters","joinCookie","_keys","forEach","key","_res$body$clusterClas","_res$body$clusterClas2","isVideoMesh","clusterClasses","hybridMedia","includes","LoggerProxy","logger","log","concat","_stringify","localSDPList","POST","REACHABILITY","offers","_default","exports"],"sources":["request.ts"],"sourcesContent":["import LoggerProxy from '../common/logs/logger-proxy';\nimport {HTTP_VERBS, RESOURCE, API, IP_VERSION} from '../constants';\n\nexport interface ClusterNode {\n isVideoMesh: boolean;\n udp: Array<string>;\n tcp: Array<string>;\n xtls: Array<string>;\n}\n\nexport type ClusterList = {\n [key: string]: ClusterNode;\n};\n\n/**\n * @class ReachabilityRequest\n */\nclass ReachabilityRequest {\n webex: any;\n\n /**\n * Creates an instance of ReachabilityRequest.\n * @param {object} webex\n * @memberof ReachabilityRequest\n */\n constructor(webex: object) {\n this.webex = webex;\n }\n\n /**\n * Gets the cluster information\n *\n * @param {IP_VERSION} ipVersion information about current ip network we're on\n * @returns {Promise}\n */\n getClusters = (ipVersion?: IP_VERSION): Promise<{clusters: ClusterList; joinCookie: any}> =>\n this.webex\n .request({\n method: HTTP_VERBS.GET,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.CLUSTERS,\n qs: {\n JCSupport: 1,\n ipver: ipVersion,\n },\n })\n .then((res) => {\n const {clusters, joinCookie} = res.body;\n\n Object.keys(clusters).forEach((key) => {\n clusters[key].isVideoMesh = !!res.body.clusterClasses?.hybridMedia?.includes(key);\n });\n\n LoggerProxy.logger.log(\n `Reachability:request#getClusters --> get clusters (ipver=${ipVersion}) successful:${JSON.stringify(\n clusters\n )}`\n );\n\n return {\n clusters,\n joinCookie,\n };\n });\n\n /**\n * gets remote SDP For Clusters\n * @param {Object} localSDPList localSDPs for the cluster\n * @returns {Object}\n */\n remoteSDPForClusters = (localSDPList: object) =>\n this.webex\n .request({\n method: HTTP_VERBS.POST,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.REACHABILITY,\n body: {offers: localSDPList},\n })\n .then((res) => {\n LoggerProxy.logger.log(\n 'Reachability:request#remoteSDPForClusters --> Remote SDPs got succcessfully'\n );\n\n return res.body;\n });\n}\n\nexport default ReachabilityRequest;\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAaA;AACA;AACA;AAFA,IAGME,mBAAmB,oBAAAC,aAAA,CAAAC,OAAA;AAGvB;AACF;AACA;AACA;AACA;AACE,SAAAF,oBAAYG,KAAa,EAAE;EAAA,IAAAC,KAAA;EAAA,IAAAC,gBAAA,CAAAH,OAAA,QAAAF,mBAAA;EAAA,IAAAM,gBAAA,CAAAJ,OAAA;EAI3B;AACF;AACA;AACA;AACA;AACA;EALE,IAAAI,gBAAA,CAAAJ,OAAA,uBAMc,UAACK,SAAsB;IAAA,OACnCH,KAAI,CAACD,KAAK,CACPK,OAAO,CAAC;MACPC,MAAM,EAAEC,qBAAU,CAACC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1BC,QAAQ,EAAEC,mBAAQ,CAAC2B,YAAY;MAC/BnB,IAAI,EAAE;QAACoB,MAAM,EAAEH;MAAY;IAC7B,CAAC,CAAC,CACDpB,IAAI,CAAC,UAACC,GAAG,EAAK;MACbc,oBAAW,CAACC,MAAM,CAACC,GAAG,CACpB,6EACF,CAAC;MAED,OAAOhB,GAAG,CAACE,IAAI;IACjB,CAAC,CAAC;EAAA;EA5DJ,IAAI,CAACtB,KAAK,GAAGA,KAAK;AACpB,CAAC;AAAA,IAAA2C,QAAA,GAAAC,OAAA,CAAA7C,OAAA,GA8DYF,mBAAmB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a stun url to a turn url
|
|
3
|
+
*
|
|
4
|
+
* @param {string} stunUrl url of a stun server
|
|
5
|
+
* @param {'tcp'|'udp'} protocol what protocol to use for the turn server
|
|
6
|
+
* @returns {string} url of a turn server
|
|
7
|
+
*/
|
|
8
|
+
export declare function convertStunUrlToTurn(stunUrl: string, protocol: 'udp' | 'tcp'): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.convertStunUrlToTurn = convertStunUrlToTurn;
|
|
8
|
+
/* eslint-disable import/prefer-default-export */
|
|
9
|
+
/**
|
|
10
|
+
* Converts a stun url to a turn url
|
|
11
|
+
*
|
|
12
|
+
* @param {string} stunUrl url of a stun server
|
|
13
|
+
* @param {'tcp'|'udp'} protocol what protocol to use for the turn server
|
|
14
|
+
* @returns {string} url of a turn server
|
|
15
|
+
*/
|
|
16
|
+
function convertStunUrlToTurn(stunUrl, protocol) {
|
|
17
|
+
// stunUrl looks like this: "stun:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004"
|
|
18
|
+
// and we need it to be like this: "turn:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004?transport=tcp"
|
|
19
|
+
var url = new URL(stunUrl);
|
|
20
|
+
if (url.protocol !== 'stun:') {
|
|
21
|
+
throw new Error("Not a STUN URL: ".concat(stunUrl));
|
|
22
|
+
}
|
|
23
|
+
url.protocol = 'turn:';
|
|
24
|
+
if (protocol === 'tcp') {
|
|
25
|
+
url.searchParams.append('transport', 'tcp');
|
|
26
|
+
}
|
|
27
|
+
return url.toString();
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["convertStunUrlToTurn","stunUrl","protocol","url","URL","Error","concat","searchParams","append","toString"],"sources":["util.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n/**\n * Converts a stun url to a turn url\n *\n * @param {string} stunUrl url of a stun server\n * @param {'tcp'|'udp'} protocol what protocol to use for the turn server\n * @returns {string} url of a turn server\n */\nexport function convertStunUrlToTurn(stunUrl: string, protocol: 'udp' | 'tcp') {\n // stunUrl looks like this: \"stun:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004\"\n // and we need it to be like this: \"turn:external-media91.public.wjfkm-a-10.prod.infra.webex.com:5004?transport=tcp\"\n const url = new URL(stunUrl);\n\n if (url.protocol !== 'stun:') {\n throw new Error(`Not a STUN URL: ${stunUrl}`);\n }\n\n url.protocol = 'turn:';\n if (protocol === 'tcp') {\n url.searchParams.append('transport', 'tcp');\n }\n\n return url.toString();\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,oBAAoBA,CAACC,OAAe,EAAEC,QAAuB,EAAE;EAC7E;EACA;EACA,IAAMC,GAAG,GAAG,IAAIC,GAAG,CAACH,OAAO,CAAC;EAE5B,IAAIE,GAAG,CAACD,QAAQ,KAAK,OAAO,EAAE;IAC5B,MAAM,IAAIG,KAAK,oBAAAC,MAAA,CAAoBL,OAAO,CAAE,CAAC;EAC/C;EAEAE,GAAG,CAACD,QAAQ,GAAG,OAAO;EACtB,IAAIA,QAAQ,KAAK,KAAK,EAAE;IACtBC,GAAG,CAACI,YAAY,CAACC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC;EAC7C;EAEA,OAAOL,GAAG,CAACM,QAAQ,CAAC,CAAC;AACvB"}
|
|
@@ -6,8 +6,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.REACTION_RELAY_TYPES = void 0;
|
|
8
8
|
// eslint-disable-next-line import/prefer-default-export
|
|
9
|
-
var REACTION_RELAY_TYPES = {
|
|
9
|
+
var REACTION_RELAY_TYPES = exports.REACTION_RELAY_TYPES = {
|
|
10
10
|
REACTION: 'react'
|
|
11
11
|
};
|
|
12
|
-
exports.REACTION_RELAY_TYPES = REACTION_RELAY_TYPES;
|
|
13
12
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["REACTION_RELAY_TYPES","REACTION"],"sources":["constants.ts"],"sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport const REACTION_RELAY_TYPES = {\n REACTION: 'react',\n} as const;\n"],"mappings":";;;;;;;AAAA;AACO,IAAMA,oBAAoB,GAAG;
|
|
1
|
+
{"version":3,"names":["REACTION_RELAY_TYPES","exports","REACTION"],"sources":["constants.ts"],"sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport const REACTION_RELAY_TYPES = {\n REACTION: 'react',\n} as const;\n"],"mappings":";;;;;;;AAAA;AACO,IAAMA,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EAClCE,QAAQ,EAAE;AACZ,CAAU"}
|
|
@@ -5,7 +5,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.SkinTones = exports.Reactions = void 0;
|
|
8
|
-
var Reactions = {
|
|
8
|
+
var Reactions = exports.Reactions = {
|
|
9
9
|
smile: {
|
|
10
10
|
type: 'smile',
|
|
11
11
|
codepoints: '1F642',
|
|
@@ -72,8 +72,7 @@ var Reactions = {
|
|
|
72
72
|
shortcodes: ':turtle:'
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
exports.
|
|
76
|
-
var SkinTones = {
|
|
75
|
+
var SkinTones = exports.SkinTones = {
|
|
77
76
|
normal: {
|
|
78
77
|
type: 'normal_skin_tone',
|
|
79
78
|
codepoints: '',
|
|
@@ -105,5 +104,4 @@ var SkinTones = {
|
|
|
105
104
|
shortcodes: ':skin-tone-6:'
|
|
106
105
|
}
|
|
107
106
|
};
|
|
108
|
-
exports.SkinTones = SkinTones;
|
|
109
107
|
//# sourceMappingURL=reactions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Reactions","smile","type","codepoints","shortcodes","sad","wow","haha","celebrate","clap","thumb_up","thumb_down","heart","fire","prayer","speed_up","slow_down","SkinTones","normal","light","medium_light","medium","medium_dark","dark"],"sources":["reactions.ts"],"sourcesContent":["import {Reaction, ReactionServerType, SkinTone, SkinToneType} from './reactions.type';\n\nconst Reactions: Record<ReactionServerType, Reaction> = {\n smile: {\n type: 'smile',\n codepoints: '1F642',\n shortcodes: ':slightly_smiling_face:',\n },\n sad: {\n type: 'sad',\n codepoints: '1F625',\n shortcodes: ':sad_but_relieved_face:',\n },\n wow: {\n type: 'wow',\n codepoints: '1F62E',\n shortcodes: ':open_mouth:',\n },\n haha: {\n type: 'haha',\n codepoints: '1F603',\n shortcodes: ':smiley:',\n },\n celebrate: {\n type: 'celebrate',\n codepoints: '1F389',\n shortcodes: ':party_popper:',\n },\n clap: {\n type: 'clap',\n codepoints: '1F44F',\n shortcodes: ':clap:',\n },\n thumb_up: {\n type: 'thumb_up',\n codepoints: '1F44D',\n shortcodes: ':thumbsup:',\n },\n thumb_down: {\n type: 'thumb_down',\n codepoints: '1F44E',\n shortcodes: ':thumbsdown:',\n },\n heart: {\n type: 'heart',\n codepoints: '2764',\n shortcodes: ':heart:',\n },\n fire: {\n type: 'fire',\n codepoints: '1F525',\n shortcodes: ':fire:',\n },\n prayer: {\n type: 'prayer',\n codepoints: '1F64F',\n shortcodes: ':pray:',\n },\n speed_up: {\n type: 'speed_up',\n codepoints: '1F407',\n shortcodes: ':rabbit:',\n },\n slow_down: {\n type: 'slow_down',\n codepoints: '1F422',\n shortcodes: ':turtle:',\n },\n};\n\nconst SkinTones: Record<SkinToneType, SkinTone> = {\n normal: {\n type: 'normal_skin_tone',\n codepoints: '',\n shortcodes: '',\n },\n light: {\n type: 'light_skin_tone',\n codepoints: '1F3FB',\n shortcodes: ':skin-tone-2:',\n },\n medium_light: {\n type: 'medium_light_skin_tone',\n codepoints: '1F3FC',\n shortcodes: ':skin-tone-3:',\n },\n medium: {\n type: 'medium_skin_tone',\n codepoints: '1F3FD',\n shortcodes: ':skin-tone-4:',\n },\n medium_dark: {\n type: 'medium_dark_skin_tone',\n codepoints: '1F3FE',\n shortcodes: ':skin-tone-5:',\n },\n dark: {\n type: 'dark_skin_tone',\n codepoints: '1F3FF',\n shortcodes: ':skin-tone-6:',\n },\n};\n\nexport {Reactions, SkinTones};\n"],"mappings":";;;;;;;AAEA,IAAMA,SAA+C,GAAG;
|
|
1
|
+
{"version":3,"names":["Reactions","exports","smile","type","codepoints","shortcodes","sad","wow","haha","celebrate","clap","thumb_up","thumb_down","heart","fire","prayer","speed_up","slow_down","SkinTones","normal","light","medium_light","medium","medium_dark","dark"],"sources":["reactions.ts"],"sourcesContent":["import {Reaction, ReactionServerType, SkinTone, SkinToneType} from './reactions.type';\n\nconst Reactions: Record<ReactionServerType, Reaction> = {\n smile: {\n type: 'smile',\n codepoints: '1F642',\n shortcodes: ':slightly_smiling_face:',\n },\n sad: {\n type: 'sad',\n codepoints: '1F625',\n shortcodes: ':sad_but_relieved_face:',\n },\n wow: {\n type: 'wow',\n codepoints: '1F62E',\n shortcodes: ':open_mouth:',\n },\n haha: {\n type: 'haha',\n codepoints: '1F603',\n shortcodes: ':smiley:',\n },\n celebrate: {\n type: 'celebrate',\n codepoints: '1F389',\n shortcodes: ':party_popper:',\n },\n clap: {\n type: 'clap',\n codepoints: '1F44F',\n shortcodes: ':clap:',\n },\n thumb_up: {\n type: 'thumb_up',\n codepoints: '1F44D',\n shortcodes: ':thumbsup:',\n },\n thumb_down: {\n type: 'thumb_down',\n codepoints: '1F44E',\n shortcodes: ':thumbsdown:',\n },\n heart: {\n type: 'heart',\n codepoints: '2764',\n shortcodes: ':heart:',\n },\n fire: {\n type: 'fire',\n codepoints: '1F525',\n shortcodes: ':fire:',\n },\n prayer: {\n type: 'prayer',\n codepoints: '1F64F',\n shortcodes: ':pray:',\n },\n speed_up: {\n type: 'speed_up',\n codepoints: '1F407',\n shortcodes: ':rabbit:',\n },\n slow_down: {\n type: 'slow_down',\n codepoints: '1F422',\n shortcodes: ':turtle:',\n },\n};\n\nconst SkinTones: Record<SkinToneType, SkinTone> = {\n normal: {\n type: 'normal_skin_tone',\n codepoints: '',\n shortcodes: '',\n },\n light: {\n type: 'light_skin_tone',\n codepoints: '1F3FB',\n shortcodes: ':skin-tone-2:',\n },\n medium_light: {\n type: 'medium_light_skin_tone',\n codepoints: '1F3FC',\n shortcodes: ':skin-tone-3:',\n },\n medium: {\n type: 'medium_skin_tone',\n codepoints: '1F3FD',\n shortcodes: ':skin-tone-4:',\n },\n medium_dark: {\n type: 'medium_dark_skin_tone',\n codepoints: '1F3FE',\n shortcodes: ':skin-tone-5:',\n },\n dark: {\n type: 'dark_skin_tone',\n codepoints: '1F3FF',\n shortcodes: ':skin-tone-6:',\n },\n};\n\nexport {Reactions, SkinTones};\n"],"mappings":";;;;;;;AAEA,IAAMA,SAA+C,GAAAC,OAAA,CAAAD,SAAA,GAAG;EACtDE,KAAK,EAAE;IACLC,IAAI,EAAE,OAAO;IACbC,UAAU,EAAE,OAAO;IACnBC,UAAU,EAAE;EACd,CAAC;EACDC,GAAG,EAAE;IACHH,IA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,EAAE,kBAAkB;IACxBC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE;EACd,CAAC;EACDe,KAAK,EAAE;IACLjB,IAAI,EAAE,iBAAiB;IACvBC,UAAU,EAAE,OAAO;IACnBC,UAAU,EAAE;EACd,CAAC;EACDgB,YAAY,EAAE;IACZlB,IAAI,EAAE,wBAAwB;IAC9BC,UAAU,EAAE,OAAO;IACnBC,UAAU,EAAE;EACd,CAAC;EACDiB,MAAM,EAAE;IACNnB,IAAI,EAAE,kBAAkB;IACxBC,UAAU,EAAE,OAAO;IACnBC,UAAU,EAAE;EACd,CAAC;EACDkB,WAAW,EAAE;IACXpB,IAAI,EAAE,uBAAuB;IAC7BC,UAAU,EAAE,OAAO;IACnBC,UAAU,EAAE;EACd,CAAC;EACDmB,IAAI,EAAE;IACJrB,IAAI,EAAE,gBAAgB;IACtBC,UAAU,EAAE,OAAO;IACnBC,UAAU,EAAE;EACd;AACF,CAAC"}
|
|
@@ -6,9 +6,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SkinToneType = exports.ReactionServerType = void 0;
|
|
8
8
|
// eslint-disable-next-line no-shadow
|
|
9
|
-
var ReactionServerType
|
|
10
|
-
exports.ReactionServerType = ReactionServerType;
|
|
11
|
-
(function (ReactionServerType) {
|
|
9
|
+
var ReactionServerType = exports.ReactionServerType = /*#__PURE__*/function (ReactionServerType) {
|
|
12
10
|
ReactionServerType["smile"] = "smile";
|
|
13
11
|
ReactionServerType["sad"] = "sad";
|
|
14
12
|
ReactionServerType["wow"] = "wow";
|
|
@@ -22,15 +20,15 @@ exports.ReactionServerType = ReactionServerType;
|
|
|
22
20
|
ReactionServerType["prayer"] = "prayer";
|
|
23
21
|
ReactionServerType["speed_up"] = "speed_up";
|
|
24
22
|
ReactionServerType["slow_down"] = "slow_down";
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
exports.SkinToneType = SkinToneType
|
|
28
|
-
(function (SkinToneType) {
|
|
23
|
+
return ReactionServerType;
|
|
24
|
+
}({}); // eslint-disable-next-line no-shadow
|
|
25
|
+
var SkinToneType = exports.SkinToneType = /*#__PURE__*/function (SkinToneType) {
|
|
29
26
|
SkinToneType["normal"] = "normal";
|
|
30
27
|
SkinToneType["light"] = "light";
|
|
31
28
|
SkinToneType["medium_light"] = "medium_light";
|
|
32
29
|
SkinToneType["medium"] = "medium";
|
|
33
30
|
SkinToneType["medium_dark"] = "medium_dark";
|
|
34
31
|
SkinToneType["dark"] = "dark";
|
|
35
|
-
|
|
32
|
+
return SkinToneType;
|
|
33
|
+
}({});
|
|
36
34
|
//# sourceMappingURL=reactions.type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ReactionServerType","SkinToneType"],"sources":["reactions.type.ts"],"sourcesContent":["import {REACTION_RELAY_TYPES} from './constants';\n\nexport type EmoticonData = {\n type: string;\n codepoints?: string;\n shortcodes?: string;\n};\n\nexport type SkinTone = EmoticonData;\n\nexport type Reaction = EmoticonData & {\n tone?: SkinTone;\n};\n\n// eslint-disable-next-line no-shadow\nexport enum ReactionServerType {\n smile = 'smile',\n sad = 'sad',\n wow = 'wow',\n haha = 'haha',\n celebrate = 'celebrate',\n clap = 'clap',\n thumb_up = 'thumb_up',\n thumb_down = 'thumb_down',\n heart = 'heart',\n fire = 'fire',\n prayer = 'prayer',\n speed_up = 'speed_up',\n slow_down = 'slow_down',\n}\n\n// eslint-disable-next-line no-shadow\nexport enum SkinToneType {\n normal = 'normal',\n light = 'light',\n medium_light = 'medium_light',\n medium = 'medium',\n medium_dark = 'medium_dark',\n dark = 'dark',\n}\n\nexport type Sender = {\n participantId: string;\n};\n\nexport type ProcessedReaction = {\n reaction: Reaction;\n sender: {\n id: Sender['participantId'];\n name: string;\n };\n};\n\ntype RelayEventData = {\n relayType: (typeof REACTION_RELAY_TYPES)['REACTION'];\n reaction: Reaction;\n sender: Sender;\n};\n\nexport type RelayEvent = {\n data: RelayEventData;\n};\n"],"mappings":";;;;;;;AAcA;AAAA,IACYA,kBAAkB,
|
|
1
|
+
{"version":3,"names":["ReactionServerType","exports","SkinToneType"],"sources":["reactions.type.ts"],"sourcesContent":["import {REACTION_RELAY_TYPES} from './constants';\n\nexport type EmoticonData = {\n type: string;\n codepoints?: string;\n shortcodes?: string;\n};\n\nexport type SkinTone = EmoticonData;\n\nexport type Reaction = EmoticonData & {\n tone?: SkinTone;\n};\n\n// eslint-disable-next-line no-shadow\nexport enum ReactionServerType {\n smile = 'smile',\n sad = 'sad',\n wow = 'wow',\n haha = 'haha',\n celebrate = 'celebrate',\n clap = 'clap',\n thumb_up = 'thumb_up',\n thumb_down = 'thumb_down',\n heart = 'heart',\n fire = 'fire',\n prayer = 'prayer',\n speed_up = 'speed_up',\n slow_down = 'slow_down',\n}\n\n// eslint-disable-next-line no-shadow\nexport enum SkinToneType {\n normal = 'normal',\n light = 'light',\n medium_light = 'medium_light',\n medium = 'medium',\n medium_dark = 'medium_dark',\n dark = 'dark',\n}\n\nexport type Sender = {\n participantId: string;\n};\n\nexport type ProcessedReaction = {\n reaction: Reaction;\n sender: {\n id: Sender['participantId'];\n name: string;\n };\n};\n\ntype RelayEventData = {\n relayType: (typeof REACTION_RELAY_TYPES)['REACTION'];\n reaction: Reaction;\n sender: Sender;\n};\n\nexport type RelayEvent = {\n data: RelayEventData;\n};\n"],"mappings":";;;;;;;AAcA;AAAA,IACYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA,OAgB9B;AAAA,IACYE,YAAY,GAAAD,OAAA,CAAAC,YAAA,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
|
+
import { RECONNECTION_STATE } from '../constants';
|
|
4
5
|
import Meeting from '../meeting';
|
|
5
6
|
/**
|
|
6
7
|
* @export
|
|
@@ -73,6 +74,15 @@ export default class ReconnectionManager {
|
|
|
73
74
|
* @returns {Boolean} true if reconnection operation is in progress
|
|
74
75
|
*/
|
|
75
76
|
isReconnectInProgress(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Sets the reconnection status
|
|
79
|
+
*
|
|
80
|
+
* @public
|
|
81
|
+
* @param {RECONNECTION_STATE} status
|
|
82
|
+
* @memberof ReconnectionManager
|
|
83
|
+
* @returns {undefined}
|
|
84
|
+
*/
|
|
85
|
+
setStatus(status: RECONNECTION_STATE): void;
|
|
76
86
|
/**
|
|
77
87
|
* @returns {Boolean}
|
|
78
88
|
* @throws {ReconnectionError}
|