@webex/plugin-meetings 3.0.0-beta.3 → 3.0.0-beta.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -8
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +41 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +9 -15
- package/dist/config.js.map +1 -1
- package/dist/constants.js +315 -68
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +114 -17
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +101 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +561 -246
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +10 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +68 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +314 -163
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +103 -231
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +137 -222
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +93 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +4624 -3740
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +249 -184
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +400 -346
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +598 -586
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +87 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +349 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +143 -234
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +26 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +813 -596
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +183 -156
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +135 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +158 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +194 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +324 -259
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +14 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +263 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +66 -43
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +536 -439
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +233 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +322 -200
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +20 -26
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +388 -476
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +362 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +99 -94
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +131 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +151 -101
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +117 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +416 -497
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +145 -88
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +71 -0
- package/dist/types/constants.d.ts +1066 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +273 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +163 -0
- package/dist/types/meeting/index.d.ts +1676 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +290 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +102 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +367 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +65 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +285 -0
- package/dist/types/multistream/sendSlotManager.d.ts +61 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +194 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +78 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +92 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +47 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +201 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/internal-README.md +7 -6
- package/package.json +29 -21
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +26 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +18 -19
- package/src/constants.ts +260 -22
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +40 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +557 -119
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +81 -17
- package/src/locus-info/{parser.js → parser.ts} +303 -104
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +458 -0
- package/src/media/properties.ts +283 -0
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +384 -0
- package/src/meeting/in-meeting-actions.ts +191 -3
- package/src/meeting/index.ts +7882 -0
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +451 -0
- package/src/meeting/{request.js → request.ts} +421 -220
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +697 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +210 -0
- package/src/meeting-info/meeting-info-v2.ts +429 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +60 -51
- package/src/meeting-info/{utilv2.js → utilv2.ts} +78 -71
- package/src/meetings/{collection.js → collection.ts} +26 -3
- package/src/meetings/index.ts +1470 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +132 -37
- package/src/member/{index.js → index.ts} +160 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +397 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +351 -146
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +353 -0
- package/src/metrics/{constants.js → constants.ts} +12 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +337 -63
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +63 -3
- package/src/multistream/remoteMediaManager.ts +300 -66
- package/src/multistream/sendSlotManager.ts +170 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/index.ts +671 -0
- package/src/reachability/request.ts +50 -35
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/{index.js → index.ts} +258 -138
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +332 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/{index.js → index.ts} +127 -79
- package/src/roap/request.ts +153 -0
- package/src/roap/turnDiscovery.ts +109 -47
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1250 -0
- package/src/statsAnalyzer/mqaUtil.ts +292 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +790 -530
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +237 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1390 -17
- package/test/unit/spec/locus-info/infoUtils.js +71 -40
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +32 -0
- package/test/unit/spec/locus-info/parser.js +119 -44
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +296 -12
- package/test/unit/spec/media/index.ts +128 -77
- package/test/unit/spec/media/properties.ts +11 -11
- package/test/unit/spec/meeting/in-meeting-actions.ts +92 -3
- package/test/unit/spec/meeting/index.js +7433 -2752
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +420 -211
- package/test/unit/spec/meeting/request.js +545 -79
- package/test/unit/spec/meeting/utils.js +722 -174
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +624 -76
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +15 -1
- package/test/unit/spec/meetings/index.js +1365 -377
- package/test/unit/spec/meetings/utils.js +216 -14
- package/test/unit/spec/member/index.js +61 -7
- package/test/unit/spec/member/util.js +526 -26
- package/test/unit/spec/members/index.js +536 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +217 -4
- package/test/unit/spec/metrics/index.js +12 -66
- package/test/unit/spec/multistream/mediaRequestManager.ts +1012 -109
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +738 -65
- package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +598 -26
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reconnection-manager/index.js +181 -12
- package/test/unit/spec/recording-controller/index.js +307 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +179 -64
- package/test/unit/spec/roap/request.ts +232 -0
- package/test/unit/spec/roap/turnDiscovery.ts +123 -58
- package/test/unit/spec/rtcMetrics/index.ts +73 -0
- package/test/unit/spec/stats-analyzer/index.js +199 -60
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +57 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/media/properties.js +0 -289
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/reachability/index.js +0 -464
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
|
@@ -1,52 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = void 0;
|
|
12
|
-
|
|
13
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
14
|
-
|
|
15
10
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
16
|
-
|
|
17
11
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
18
|
-
|
|
19
12
|
var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
|
|
20
|
-
|
|
21
13
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
22
|
-
|
|
23
14
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
24
|
-
|
|
25
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
26
|
-
|
|
15
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
|
|
27
16
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
28
|
-
|
|
29
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
30
|
-
|
|
31
18
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
32
|
-
|
|
33
19
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
34
|
-
|
|
20
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
21
|
+
var _pick2 = _interopRequireDefault(require("lodash/pick"));
|
|
22
|
+
var _mapValues2 = _interopRequireDefault(require("lodash/mapValues"));
|
|
35
23
|
var _uniq2 = _interopRequireDefault(require("lodash/uniq"));
|
|
36
|
-
|
|
37
24
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
38
|
-
|
|
25
|
+
var _util = _interopRequireDefault(require("../meeting/util"));
|
|
39
26
|
var _constants = require("../constants");
|
|
40
|
-
|
|
41
27
|
var _request = _interopRequireDefault(require("./request"));
|
|
42
|
-
|
|
43
28
|
var DEFAULT_TIMEOUT = 3000;
|
|
44
29
|
var VIDEO_MESH_TIMEOUT = 1000;
|
|
45
30
|
/**
|
|
46
31
|
* @class Reachability
|
|
47
32
|
* @export
|
|
48
33
|
*/
|
|
49
|
-
|
|
50
34
|
var Reachability = /*#__PURE__*/function () {
|
|
51
35
|
/**
|
|
52
36
|
* Creates an instance of Reachability.
|
|
@@ -55,7 +39,12 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
55
39
|
*/
|
|
56
40
|
function Reachability(webex) {
|
|
57
41
|
(0, _classCallCheck2.default)(this, Reachability);
|
|
42
|
+
(0, _defineProperty2.default)(this, "namespace", _constants.REACHABILITY.namespace);
|
|
43
|
+
(0, _defineProperty2.default)(this, "webex", void 0);
|
|
44
|
+
(0, _defineProperty2.default)(this, "reachabilityRequest", void 0);
|
|
45
|
+
(0, _defineProperty2.default)(this, "clusterLatencyResults", void 0);
|
|
58
46
|
this.webex = webex;
|
|
47
|
+
|
|
59
48
|
/**
|
|
60
49
|
* internal request object for the server
|
|
61
50
|
* @instance
|
|
@@ -63,8 +52,8 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
63
52
|
* @private
|
|
64
53
|
* @memberof Reachability
|
|
65
54
|
*/
|
|
66
|
-
|
|
67
55
|
this.reachabilityRequest = new _request.default(this.webex);
|
|
56
|
+
|
|
68
57
|
/**
|
|
69
58
|
* internal object of clusters latency results
|
|
70
59
|
* @instance
|
|
@@ -72,9 +61,9 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
72
61
|
* @private
|
|
73
62
|
* @memberof Reachability
|
|
74
63
|
*/
|
|
75
|
-
|
|
76
64
|
this.clusterLatencyResults = {};
|
|
77
65
|
}
|
|
66
|
+
|
|
78
67
|
/**
|
|
79
68
|
* fetches reachability data
|
|
80
69
|
* @returns {Object} reachability data
|
|
@@ -82,103 +71,209 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
82
71
|
* @async
|
|
83
72
|
* @memberof Reachability
|
|
84
73
|
*/
|
|
85
|
-
|
|
86
|
-
|
|
87
74
|
(0, _createClass2.default)(Reachability, [{
|
|
88
75
|
key: "gatherReachability",
|
|
89
76
|
value: function () {
|
|
90
77
|
var _gatherReachability = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
var clusters, results;
|
|
78
|
+
var _yield$this$reachabil, clusters, joinCookie, results;
|
|
94
79
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
95
|
-
while (1) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
_context.t0 = _context["catch"](7);
|
|
135
|
-
|
|
136
|
-
_loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error in calling getClusters(): ".concat(_context.t0));
|
|
137
|
-
|
|
138
|
-
return _context.abrupt("return", {});
|
|
139
|
-
|
|
140
|
-
case 23:
|
|
141
|
-
case "end":
|
|
142
|
-
return _context.stop();
|
|
143
|
-
}
|
|
80
|
+
while (1) switch (_context.prev = _context.next) {
|
|
81
|
+
case 0:
|
|
82
|
+
this.setup();
|
|
83
|
+
|
|
84
|
+
// Remove stored reachability results to ensure no stale data
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
_context.next = 3;
|
|
87
|
+
return this.webex.boundedStorage.del(this.namespace, _constants.REACHABILITY.localStorageResult);
|
|
88
|
+
case 3:
|
|
89
|
+
_context.next = 5;
|
|
90
|
+
return this.webex.boundedStorage.del(this.namespace, _constants.REACHABILITY.localStorageJoinCookie);
|
|
91
|
+
case 5:
|
|
92
|
+
_context.prev = 5;
|
|
93
|
+
_context.next = 8;
|
|
94
|
+
return this.reachabilityRequest.getClusters(_util.default.getIpVersion(this.webex));
|
|
95
|
+
case 8:
|
|
96
|
+
_yield$this$reachabil = _context.sent;
|
|
97
|
+
clusters = _yield$this$reachabil.clusters;
|
|
98
|
+
joinCookie = _yield$this$reachabil.joinCookie;
|
|
99
|
+
_context.next = 13;
|
|
100
|
+
return this.performReachabilityCheck(clusters);
|
|
101
|
+
case 13:
|
|
102
|
+
results = _context.sent;
|
|
103
|
+
_context.next = 16;
|
|
104
|
+
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageResult, (0, _stringify.default)(results));
|
|
105
|
+
case 16:
|
|
106
|
+
_context.next = 18;
|
|
107
|
+
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageJoinCookie, (0, _stringify.default)(joinCookie));
|
|
108
|
+
case 18:
|
|
109
|
+
_loggerProxy.default.logger.log('Reachability:index#gatherReachability --> Reachability checks completed');
|
|
110
|
+
return _context.abrupt("return", results);
|
|
111
|
+
case 22:
|
|
112
|
+
_context.prev = 22;
|
|
113
|
+
_context.t0 = _context["catch"](5);
|
|
114
|
+
_loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error in calling getClusters(): ".concat(_context.t0));
|
|
115
|
+
return _context.abrupt("return", {});
|
|
116
|
+
case 26:
|
|
117
|
+
case "end":
|
|
118
|
+
return _context.stop();
|
|
144
119
|
}
|
|
145
|
-
}, _callee, this, [[
|
|
120
|
+
}, _callee, this, [[5, 22]]);
|
|
146
121
|
}));
|
|
147
|
-
|
|
148
122
|
function gatherReachability() {
|
|
149
123
|
return _gatherReachability.apply(this, arguments);
|
|
150
124
|
}
|
|
151
|
-
|
|
152
125
|
return gatherReachability;
|
|
153
126
|
}()
|
|
127
|
+
/**
|
|
128
|
+
* Returns statistics about last reachability results. The returned value is an object
|
|
129
|
+
* with a flat list of properties so that it can be easily sent with metrics
|
|
130
|
+
*
|
|
131
|
+
* @returns {Promise} Promise with metrics values, it never rejects/throws.
|
|
132
|
+
*/
|
|
133
|
+
}, {
|
|
134
|
+
key: "getReachabilityMetrics",
|
|
135
|
+
value: function () {
|
|
136
|
+
var _getReachabilityMetrics = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
137
|
+
var stats, updateStats, resultsJson, internalResults;
|
|
138
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
139
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
140
|
+
case 0:
|
|
141
|
+
stats = {
|
|
142
|
+
reachability_public_udp_success: 0,
|
|
143
|
+
reachability_public_udp_failed: 0,
|
|
144
|
+
reachability_public_tcp_success: 0,
|
|
145
|
+
reachability_public_tcp_failed: 0,
|
|
146
|
+
reachability_vmn_udp_success: 0,
|
|
147
|
+
reachability_vmn_udp_failed: 0,
|
|
148
|
+
reachability_vmn_tcp_success: 0,
|
|
149
|
+
reachability_vmn_tcp_failed: 0
|
|
150
|
+
};
|
|
151
|
+
updateStats = function updateStats(clusterType, result) {
|
|
152
|
+
var _result$udp, _result$tcp;
|
|
153
|
+
if ((_result$udp = result.udp) !== null && _result$udp !== void 0 && _result$udp.reachable) {
|
|
154
|
+
var outcome = result.udp.reachable === 'true' ? 'success' : 'failed';
|
|
155
|
+
stats["reachability_".concat(clusterType, "_udp_").concat(outcome)] += 1;
|
|
156
|
+
}
|
|
157
|
+
if ((_result$tcp = result.tcp) !== null && _result$tcp !== void 0 && _result$tcp.reachable) {
|
|
158
|
+
var _outcome = result.tcp.reachable === 'true' ? 'success' : 'failed';
|
|
159
|
+
stats["reachability_".concat(clusterType, "_tcp_").concat(_outcome)] += 1;
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
_context2.prev = 2;
|
|
163
|
+
_context2.next = 5;
|
|
164
|
+
return this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageResult);
|
|
165
|
+
case 5:
|
|
166
|
+
resultsJson = _context2.sent;
|
|
167
|
+
internalResults = JSON.parse(resultsJson);
|
|
168
|
+
(0, _values.default)(internalResults).forEach(function (result) {
|
|
169
|
+
updateStats(result.isVideoMesh ? 'vmn' : 'public', result);
|
|
170
|
+
});
|
|
171
|
+
_context2.next = 13;
|
|
172
|
+
break;
|
|
173
|
+
case 10:
|
|
174
|
+
_context2.prev = 10;
|
|
175
|
+
_context2.t0 = _context2["catch"](2);
|
|
176
|
+
// empty storage, that's ok
|
|
177
|
+
_loggerProxy.default.logger.warn('Roap:request#getReachabilityMetrics --> Error parsing reachability data: ', _context2.t0);
|
|
178
|
+
case 13:
|
|
179
|
+
return _context2.abrupt("return", stats);
|
|
180
|
+
case 14:
|
|
181
|
+
case "end":
|
|
182
|
+
return _context2.stop();
|
|
183
|
+
}
|
|
184
|
+
}, _callee2, this, [[2, 10]]);
|
|
185
|
+
}));
|
|
186
|
+
function getReachabilityMetrics() {
|
|
187
|
+
return _getReachabilityMetrics.apply(this, arguments);
|
|
188
|
+
}
|
|
189
|
+
return getReachabilityMetrics;
|
|
190
|
+
}()
|
|
191
|
+
/**
|
|
192
|
+
* Reachability results as an object in the format that backend expects
|
|
193
|
+
*
|
|
194
|
+
* @returns {any} reachability results that need to be sent to the backend
|
|
195
|
+
*/
|
|
196
|
+
}, {
|
|
197
|
+
key: "getReachabilityResults",
|
|
198
|
+
value: function () {
|
|
199
|
+
var _getReachabilityResults = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
200
|
+
var results, reachabilityResultsProps, resultsJson, internalResults;
|
|
201
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
202
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
203
|
+
case 0:
|
|
204
|
+
// these are the only props that backend needs in the reachability results:
|
|
205
|
+
reachabilityResultsProps = ['udp', 'tcp', 'xtls'];
|
|
206
|
+
_context3.prev = 1;
|
|
207
|
+
_context3.next = 4;
|
|
208
|
+
return this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageResult);
|
|
209
|
+
case 4:
|
|
210
|
+
resultsJson = _context3.sent;
|
|
211
|
+
internalResults = JSON.parse(resultsJson);
|
|
212
|
+
results = (0, _mapValues2.default)(internalResults, function (result) {
|
|
213
|
+
return (0, _pick2.default)(result, reachabilityResultsProps);
|
|
214
|
+
});
|
|
215
|
+
_context3.next = 12;
|
|
216
|
+
break;
|
|
217
|
+
case 9:
|
|
218
|
+
_context3.prev = 9;
|
|
219
|
+
_context3.t0 = _context3["catch"](1);
|
|
220
|
+
// empty storage, that's ok
|
|
221
|
+
_loggerProxy.default.logger.warn('Roap:request#attachReachabilityData --> Error parsing reachability data: ', _context3.t0);
|
|
222
|
+
case 12:
|
|
223
|
+
return _context3.abrupt("return", results);
|
|
224
|
+
case 13:
|
|
225
|
+
case "end":
|
|
226
|
+
return _context3.stop();
|
|
227
|
+
}
|
|
228
|
+
}, _callee3, this, [[1, 9]]);
|
|
229
|
+
}));
|
|
230
|
+
function getReachabilityResults() {
|
|
231
|
+
return _getReachabilityResults.apply(this, arguments);
|
|
232
|
+
}
|
|
233
|
+
return getReachabilityResults;
|
|
234
|
+
}()
|
|
154
235
|
/**
|
|
155
236
|
* fetches reachability data and checks for cluster reachability
|
|
156
237
|
* @returns {boolean}
|
|
157
238
|
* @public
|
|
158
239
|
* @memberof Reachability
|
|
159
240
|
*/
|
|
160
|
-
|
|
161
241
|
}, {
|
|
162
|
-
key: "
|
|
163
|
-
value: function
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
242
|
+
key: "isAnyPublicClusterReachable",
|
|
243
|
+
value: function () {
|
|
244
|
+
var _isAnyPublicClusterReachable = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
245
|
+
var reachable, reachabilityData, reachabilityResults;
|
|
246
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
247
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
248
|
+
case 0:
|
|
249
|
+
reachable = false; // @ts-ignore
|
|
250
|
+
_context4.next = 3;
|
|
251
|
+
return this.webex.boundedStorage.get(this.namespace, _constants.REACHABILITY.localStorageResult).catch(function () {});
|
|
252
|
+
case 3:
|
|
253
|
+
reachabilityData = _context4.sent;
|
|
254
|
+
if (reachabilityData) {
|
|
255
|
+
try {
|
|
256
|
+
reachabilityResults = JSON.parse(reachabilityData);
|
|
257
|
+
reachable = (0, _values.default)(reachabilityResults).some(function (result) {
|
|
258
|
+
var _result$udp2, _result$tcp2;
|
|
259
|
+
return !result.isVideoMesh && (((_result$udp2 = result.udp) === null || _result$udp2 === void 0 ? void 0 : _result$udp2.reachable) === 'true' || ((_result$tcp2 = result.tcp) === null || _result$tcp2 === void 0 ? void 0 : _result$tcp2.reachable) === 'true');
|
|
260
|
+
});
|
|
261
|
+
} catch (e) {
|
|
262
|
+
_loggerProxy.default.logger.error("Roap:request#attachReachabilityData --> Error in parsing reachability data: ".concat(e));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return _context4.abrupt("return", reachable);
|
|
266
|
+
case 6:
|
|
267
|
+
case "end":
|
|
268
|
+
return _context4.stop();
|
|
269
|
+
}
|
|
270
|
+
}, _callee4, this);
|
|
271
|
+
}));
|
|
272
|
+
function isAnyPublicClusterReachable() {
|
|
273
|
+
return _isAnyPublicClusterReachable.apply(this, arguments);
|
|
178
274
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
275
|
+
return isAnyPublicClusterReachable;
|
|
276
|
+
}()
|
|
182
277
|
/**
|
|
183
278
|
* Generate peerConnection config settings
|
|
184
279
|
* @param {object} cluster
|
|
@@ -186,11 +281,10 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
186
281
|
* @private
|
|
187
282
|
* @memberof Reachability
|
|
188
283
|
*/
|
|
189
|
-
|
|
190
284
|
}, {
|
|
191
285
|
key: "buildPeerConnectionConfig",
|
|
192
286
|
value: function buildPeerConnectionConfig(cluster) {
|
|
193
|
-
var iceServers = (0, _uniq2.default)(
|
|
287
|
+
var iceServers = (0, _uniq2.default)(cluster.udp).map(function (url) {
|
|
194
288
|
return {
|
|
195
289
|
username: '',
|
|
196
290
|
credential: '',
|
|
@@ -203,6 +297,7 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
203
297
|
iceTransportPolicy: 'all'
|
|
204
298
|
};
|
|
205
299
|
}
|
|
300
|
+
|
|
206
301
|
/**
|
|
207
302
|
* Creates an RTCPeerConnection
|
|
208
303
|
* @param {object} cluster
|
|
@@ -210,23 +305,23 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
210
305
|
* @private
|
|
211
306
|
* @memberof Reachability
|
|
212
307
|
*/
|
|
213
|
-
|
|
214
308
|
}, {
|
|
215
309
|
key: "createPeerConnection",
|
|
216
310
|
value: function createPeerConnection(cluster) {
|
|
217
311
|
var key = cluster.key,
|
|
218
|
-
|
|
219
|
-
|
|
312
|
+
config = cluster.config;
|
|
220
313
|
try {
|
|
221
314
|
var peerConnection = new window.RTCPeerConnection(config);
|
|
315
|
+
|
|
316
|
+
// @ts-ignore
|
|
222
317
|
peerConnection.key = key;
|
|
223
318
|
return peerConnection;
|
|
224
319
|
} catch (peerConnectionError) {
|
|
225
320
|
_loggerProxy.default.logger.log("Reachability:index#createPeerConnection --> Error creating peerConnection: ".concat(peerConnectionError));
|
|
226
|
-
|
|
227
321
|
return null;
|
|
228
322
|
}
|
|
229
323
|
}
|
|
324
|
+
|
|
230
325
|
/**
|
|
231
326
|
* Gets total elapsed time
|
|
232
327
|
* @param {RTCPeerConnection} peerConnection
|
|
@@ -234,7 +329,6 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
234
329
|
* @private
|
|
235
330
|
* @memberof Reachability
|
|
236
331
|
*/
|
|
237
|
-
|
|
238
332
|
}, {
|
|
239
333
|
key: "getElapsedTime",
|
|
240
334
|
value: function getElapsedTime(peerConnection) {
|
|
@@ -242,6 +336,7 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
242
336
|
delete peerConnection.begin;
|
|
243
337
|
return (0, _now.default)() - startTime;
|
|
244
338
|
}
|
|
339
|
+
|
|
245
340
|
/**
|
|
246
341
|
* creates offer and generates localSDP
|
|
247
342
|
* @param {object} clusterList cluster List
|
|
@@ -249,65 +344,59 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
249
344
|
* @private
|
|
250
345
|
* @memberof Reachability
|
|
251
346
|
*/
|
|
252
|
-
|
|
253
347
|
}, {
|
|
254
348
|
key: "getLocalSDPForClusters",
|
|
255
349
|
value: function getLocalSDPForClusters(clusterList) {
|
|
256
350
|
var _this = this;
|
|
257
|
-
|
|
258
351
|
var clusters = (0, _toConsumableArray2.default)((0, _keys.default)(clusterList));
|
|
259
352
|
clusters = clusters.map( /*#__PURE__*/function () {
|
|
260
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
353
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(key) {
|
|
261
354
|
var cluster, config, peerConnection, description;
|
|
262
|
-
return _regenerator.default.wrap(function
|
|
263
|
-
while (1) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
case "end":
|
|
287
|
-
return _context2.stop();
|
|
288
|
-
}
|
|
355
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
356
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
357
|
+
case 0:
|
|
358
|
+
cluster = clusterList[key];
|
|
359
|
+
config = _this.buildPeerConnectionConfig(cluster);
|
|
360
|
+
peerConnection = _this.createPeerConnection({
|
|
361
|
+
key: key,
|
|
362
|
+
config: config
|
|
363
|
+
});
|
|
364
|
+
_context5.next = 5;
|
|
365
|
+
return peerConnection.createOffer({
|
|
366
|
+
offerToReceiveAudio: true
|
|
367
|
+
});
|
|
368
|
+
case 5:
|
|
369
|
+
description = _context5.sent;
|
|
370
|
+
// @ts-ignore
|
|
371
|
+
peerConnection.begin = (0, _now.default)();
|
|
372
|
+
peerConnection.setLocalDescription(description);
|
|
373
|
+
return _context5.abrupt("return", _this.iceGatheringState(peerConnection, cluster.isVideoMesh).catch(function (iceGatheringStateError) {
|
|
374
|
+
_loggerProxy.default.logger.log("Reachability:index#getLocalSDPForClusters --> Error in getLocalSDP : ".concat(iceGatheringStateError));
|
|
375
|
+
}));
|
|
376
|
+
case 9:
|
|
377
|
+
case "end":
|
|
378
|
+
return _context5.stop();
|
|
289
379
|
}
|
|
290
|
-
},
|
|
380
|
+
}, _callee5);
|
|
291
381
|
}));
|
|
292
|
-
|
|
293
382
|
return function (_x) {
|
|
294
383
|
return _ref.apply(this, arguments);
|
|
295
384
|
};
|
|
296
385
|
}());
|
|
297
|
-
return _promise.default.all(clusters).then(this.
|
|
298
|
-
_this.logUnreachableClusters();
|
|
299
|
-
|
|
386
|
+
return _promise.default.all(clusters).then(this.parseIceResultsToInternalReachabilityResults).then(function (reachabilityLatencyResults) {
|
|
387
|
+
_this.logUnreachableClusters();
|
|
300
388
|
|
|
389
|
+
// return results
|
|
301
390
|
return reachabilityLatencyResults;
|
|
302
391
|
});
|
|
303
392
|
}
|
|
393
|
+
|
|
304
394
|
/**
|
|
305
395
|
* Get list of all unreachable clusters
|
|
306
396
|
* @returns {array} Unreachable clusters
|
|
307
397
|
* @private
|
|
308
398
|
* @memberof Reachability
|
|
309
399
|
*/
|
|
310
|
-
|
|
311
400
|
}, {
|
|
312
401
|
key: "getUnreachablClusters",
|
|
313
402
|
value: function getUnreachablClusters() {
|
|
@@ -315,13 +404,13 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
315
404
|
var clusters = this.clusterLatencyResults;
|
|
316
405
|
(0, _keys.default)(clusters).forEach(function (key) {
|
|
317
406
|
var cluster = clusters[key];
|
|
318
|
-
|
|
319
407
|
if (cluster.unreachable && !cluster.reachable) {
|
|
320
408
|
unreachableList.push(key);
|
|
321
409
|
}
|
|
322
410
|
});
|
|
323
411
|
return unreachableList;
|
|
324
412
|
}
|
|
413
|
+
|
|
325
414
|
/**
|
|
326
415
|
* Attach an event handler for the icegatheringstatechange
|
|
327
416
|
* event and measure latency.
|
|
@@ -330,24 +419,23 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
330
419
|
* @private
|
|
331
420
|
* @memberof Reachability
|
|
332
421
|
*/
|
|
333
|
-
|
|
334
422
|
}, {
|
|
335
423
|
key: "handleIceGatheringStateChange",
|
|
336
424
|
value: function handleIceGatheringStateChange(peerConnection) {
|
|
337
425
|
var _this2 = this;
|
|
338
|
-
|
|
339
426
|
peerConnection.onicegatheringstatechange = function () {
|
|
340
427
|
var COMPLETE = _constants.ICE_GATHERING_STATE.COMPLETE;
|
|
341
|
-
|
|
342
428
|
if (peerConnection.iceConnectionState === COMPLETE) {
|
|
343
429
|
var elapsed = _this2.getElapsedTime(peerConnection);
|
|
344
430
|
|
|
345
|
-
|
|
346
|
-
|
|
431
|
+
// @ts-ignore
|
|
432
|
+
_loggerProxy.default.logger.log( // @ts-ignore
|
|
433
|
+
"Reachability:index#onIceGatheringStateChange --> Successfully pinged ".concat(peerConnection.key, ":"), elapsed);
|
|
347
434
|
_this2.setLatencyAndClose(peerConnection, elapsed);
|
|
348
435
|
}
|
|
349
436
|
};
|
|
350
437
|
}
|
|
438
|
+
|
|
351
439
|
/**
|
|
352
440
|
* Attach an event handler for the icecandidate
|
|
353
441
|
* event and measure latency.
|
|
@@ -356,88 +444,92 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
356
444
|
* @private
|
|
357
445
|
* @memberof Reachability
|
|
358
446
|
*/
|
|
359
|
-
|
|
360
447
|
}, {
|
|
361
448
|
key: "handleOnIceCandidate",
|
|
362
449
|
value: function handleOnIceCandidate(peerConnection) {
|
|
363
450
|
var _this3 = this;
|
|
364
|
-
|
|
365
451
|
peerConnection.onicecandidate = function (e) {
|
|
366
452
|
var SERVER_REFLEXIVE = 'srflx';
|
|
367
|
-
|
|
368
453
|
if (e.candidate && String(e.candidate.type).toLowerCase() === SERVER_REFLEXIVE) {
|
|
369
454
|
var elapsed = _this3.getElapsedTime(peerConnection);
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
455
|
+
_loggerProxy.default.logger.log( // @ts-ignore
|
|
456
|
+
"Reachability:index#onIceCandidate --> Successfully pinged ".concat(peerConnection.key, ":"), elapsed);
|
|
457
|
+
// order is important
|
|
458
|
+
_this3.addPublicIP(peerConnection, e.candidate.address);
|
|
373
459
|
_this3.setLatencyAndClose(peerConnection, elapsed);
|
|
374
460
|
}
|
|
375
461
|
};
|
|
376
462
|
}
|
|
463
|
+
|
|
377
464
|
/**
|
|
378
465
|
* An event handler on an RTCPeerConnection when the state of the ICE
|
|
379
466
|
* candidate gathering process changes. Used to measure connection
|
|
380
467
|
* speed.
|
|
381
468
|
* @private
|
|
382
469
|
* @param {RTCPeerConnection} peerConnection
|
|
383
|
-
* @param {
|
|
470
|
+
* @param {boolean} isVideoMesh
|
|
384
471
|
* @returns {Promise}
|
|
385
472
|
*/
|
|
386
|
-
|
|
387
473
|
}, {
|
|
388
474
|
key: "iceGatheringState",
|
|
389
|
-
value: function iceGatheringState(peerConnection,
|
|
475
|
+
value: function iceGatheringState(peerConnection, isVideoMesh) {
|
|
390
476
|
var _this4 = this;
|
|
391
|
-
|
|
392
477
|
var ELAPSED = 'elapsed';
|
|
478
|
+
var timeout = isVideoMesh ? VIDEO_MESH_TIMEOUT : DEFAULT_TIMEOUT;
|
|
393
479
|
return new _promise.default(function (resolve) {
|
|
394
480
|
var peerConnectionProxy = new window.Proxy(peerConnection, {
|
|
481
|
+
// eslint-disable-next-line require-jsdoc
|
|
395
482
|
get: function get(target, property) {
|
|
396
483
|
var targetMember = target[property];
|
|
397
|
-
|
|
398
484
|
if (typeof targetMember === 'function') {
|
|
399
485
|
return targetMember.bind(target);
|
|
400
486
|
}
|
|
401
|
-
|
|
402
487
|
return targetMember;
|
|
403
488
|
},
|
|
404
489
|
set: function set(target, property, value) {
|
|
405
490
|
// only intercept elapsed property
|
|
406
491
|
if (property === ELAPSED) {
|
|
407
492
|
resolve({
|
|
493
|
+
// @ts-ignore
|
|
408
494
|
clusterId: peerConnection.key,
|
|
495
|
+
isVideoMesh: isVideoMesh,
|
|
496
|
+
// @ts-ignore
|
|
497
|
+
publicIPs: target.publicIPs,
|
|
409
498
|
elapsed: value
|
|
410
499
|
});
|
|
411
500
|
return true;
|
|
412
|
-
}
|
|
413
|
-
|
|
501
|
+
}
|
|
414
502
|
|
|
503
|
+
// pass thru
|
|
415
504
|
return window.Reflect.set(target, property, value);
|
|
416
505
|
}
|
|
417
|
-
});
|
|
418
|
-
// won't be coupled to our promise implementation
|
|
506
|
+
});
|
|
419
507
|
|
|
508
|
+
// Using peerConnection proxy so handle functions below
|
|
509
|
+
// won't be coupled to our promise implementation
|
|
420
510
|
_this4.handleIceGatheringStateChange(peerConnectionProxy);
|
|
511
|
+
_this4.handleOnIceCandidate(peerConnectionProxy);
|
|
421
512
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
513
|
+
// Set maximum timeout
|
|
425
514
|
window.setTimeout(function () {
|
|
426
|
-
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
515
|
+
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
427
516
|
|
|
517
|
+
// Close any open peerConnections
|
|
428
518
|
if (peerConnectionProxy.connectionState !== CLOSED) {
|
|
519
|
+
// order is important
|
|
520
|
+
_this4.addPublicIP(peerConnectionProxy, null);
|
|
429
521
|
_this4.setLatencyAndClose(peerConnectionProxy, null);
|
|
430
522
|
}
|
|
431
523
|
}, timeout);
|
|
432
524
|
});
|
|
433
525
|
}
|
|
526
|
+
|
|
434
527
|
/**
|
|
435
528
|
* Make a log of unreachable clusters.
|
|
436
529
|
* @returns {undefined}
|
|
437
530
|
* @private
|
|
438
531
|
* @memberof Reachability
|
|
439
532
|
*/
|
|
440
|
-
|
|
441
533
|
}, {
|
|
442
534
|
key: "logUnreachableClusters",
|
|
443
535
|
value: function logUnreachableClusters() {
|
|
@@ -446,75 +538,108 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
446
538
|
_loggerProxy.default.logger.log("Reachability:index#logUnreachableClusters --> No ice candidate for ".concat(cluster, "."));
|
|
447
539
|
});
|
|
448
540
|
}
|
|
541
|
+
|
|
449
542
|
/**
|
|
450
543
|
* Calculates time to establish connection
|
|
451
|
-
* @param {
|
|
544
|
+
* @param {Array<ICECandidateResult>} iceResults iceResults
|
|
452
545
|
* @returns {object} reachabilityMap
|
|
453
|
-
* @
|
|
546
|
+
* @protected
|
|
454
547
|
* @memberof Reachability
|
|
455
548
|
*/
|
|
456
|
-
|
|
457
549
|
}, {
|
|
458
|
-
key: "
|
|
459
|
-
value: function
|
|
550
|
+
key: "parseIceResultsToInternalReachabilityResults",
|
|
551
|
+
value: function parseIceResultsToInternalReachabilityResults(iceResults) {
|
|
460
552
|
var reachabilityMap = {};
|
|
461
553
|
iceResults.forEach(function (_ref2) {
|
|
462
554
|
var clusterId = _ref2.clusterId,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
555
|
+
isVideoMesh = _ref2.isVideoMesh,
|
|
556
|
+
elapsed = _ref2.elapsed,
|
|
557
|
+
publicIPs = _ref2.publicIPs;
|
|
558
|
+
var latencyResult = {};
|
|
559
|
+
if (!elapsed) {
|
|
560
|
+
(0, _assign.default)(latencyResult, {
|
|
468
561
|
reachable: 'false'
|
|
469
|
-
};
|
|
562
|
+
});
|
|
470
563
|
} else {
|
|
471
|
-
latencyResult
|
|
564
|
+
(0, _assign.default)(latencyResult, {
|
|
472
565
|
reachable: 'true',
|
|
473
566
|
latencyInMilliseconds: elapsed.toString()
|
|
474
|
-
};
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
if (publicIPs) {
|
|
570
|
+
(0, _assign.default)(latencyResult, {
|
|
571
|
+
clientMediaIPs: publicIPs
|
|
572
|
+
});
|
|
475
573
|
}
|
|
476
|
-
|
|
477
574
|
reachabilityMap[clusterId] = {
|
|
478
575
|
udp: latencyResult,
|
|
479
|
-
tcp:
|
|
576
|
+
tcp: {
|
|
577
|
+
untested: 'true'
|
|
578
|
+
},
|
|
579
|
+
xtls: {
|
|
580
|
+
untested: 'true'
|
|
581
|
+
},
|
|
582
|
+
isVideoMesh: isVideoMesh
|
|
480
583
|
};
|
|
481
584
|
});
|
|
482
585
|
return reachabilityMap;
|
|
483
586
|
}
|
|
587
|
+
|
|
484
588
|
/**
|
|
485
589
|
* fetches reachability data
|
|
486
590
|
* @param {object} clusterList
|
|
487
|
-
* @returns {Promise<
|
|
591
|
+
* @returns {Promise<InternalReachabilityResults>} reachability check results
|
|
488
592
|
* @private
|
|
489
593
|
* @memberof Reachability
|
|
490
594
|
*/
|
|
491
|
-
|
|
492
595
|
}, {
|
|
493
596
|
key: "performReachabilityCheck",
|
|
494
597
|
value: function performReachabilityCheck(clusterList) {
|
|
495
598
|
var _this5 = this;
|
|
496
|
-
|
|
497
599
|
if (!clusterList || !(0, _keys.default)(clusterList).length) {
|
|
498
600
|
return _promise.default.resolve({});
|
|
499
601
|
}
|
|
500
|
-
|
|
501
602
|
return new _promise.default(function (resolve) {
|
|
502
603
|
_this5.getLocalSDPForClusters(clusterList).then(function (localSDPData) {
|
|
503
604
|
if (!localSDPData || !(0, _keys.default)(localSDPData).length) {
|
|
504
605
|
// TODO: handle the error condition properly and try retry
|
|
505
606
|
_loggerProxy.default.logger.log('Reachability:index#performReachabilityCheck --> Local SDP is empty or has missing elements..returning');
|
|
506
|
-
|
|
507
607
|
resolve({});
|
|
508
608
|
} else {
|
|
509
609
|
resolve(localSDPData);
|
|
510
610
|
}
|
|
511
611
|
}).catch(function (error) {
|
|
512
612
|
_loggerProxy.default.logger.error("Reachability:index#performReachabilityCheck --> Error in getLocalSDPForClusters: ".concat(error));
|
|
513
|
-
|
|
514
613
|
resolve({});
|
|
515
614
|
});
|
|
516
615
|
});
|
|
517
616
|
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Adds public IP (client media IPs)
|
|
620
|
+
* @param {RTCPeerConnection} peerConnection
|
|
621
|
+
* @param {string} publicIP
|
|
622
|
+
* @returns {void}
|
|
623
|
+
*/
|
|
624
|
+
}, {
|
|
625
|
+
key: "addPublicIP",
|
|
626
|
+
value: function addPublicIP(peerConnection, publicIP) {
|
|
627
|
+
var modifiedPeerConnection = peerConnection;
|
|
628
|
+
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
629
|
+
if (modifiedPeerConnection.connectionState === CLOSED) {
|
|
630
|
+
_loggerProxy.default.logger.log("Reachability:index#addPublicIP --> Attempting to set publicIP of ".concat(publicIP, " on closed peerConnection."));
|
|
631
|
+
}
|
|
632
|
+
if (publicIP) {
|
|
633
|
+
if (modifiedPeerConnection.publicIPs) {
|
|
634
|
+
modifiedPeerConnection.publicIPs.push(publicIP);
|
|
635
|
+
} else {
|
|
636
|
+
modifiedPeerConnection.publicIPs = [publicIP];
|
|
637
|
+
}
|
|
638
|
+
} else {
|
|
639
|
+
modifiedPeerConnection.publicIPs = null;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
518
643
|
/**
|
|
519
644
|
* Records latency and closes the peerConnection
|
|
520
645
|
* @param {RTCPeerConnection} peerConnection
|
|
@@ -523,40 +648,38 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
523
648
|
* @private
|
|
524
649
|
* @memberof Reachability
|
|
525
650
|
*/
|
|
526
|
-
|
|
527
651
|
}, {
|
|
528
652
|
key: "setLatencyAndClose",
|
|
529
653
|
value: function setLatencyAndClose(peerConnection, elapsed) {
|
|
530
654
|
var _intialState;
|
|
531
|
-
|
|
532
655
|
var REACHABLE = 'reachable';
|
|
533
656
|
var UNREACHABLE = 'unreachable';
|
|
534
657
|
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
658
|
+
// @ts-ignore
|
|
535
659
|
var key = peerConnection.key;
|
|
536
660
|
var resultKey = elapsed === null ? UNREACHABLE : REACHABLE;
|
|
537
661
|
var intialState = (_intialState = {}, (0, _defineProperty2.default)(_intialState, REACHABLE, 0), (0, _defineProperty2.default)(_intialState, UNREACHABLE, 0), _intialState);
|
|
538
|
-
|
|
539
662
|
if (peerConnection.connectionState === CLOSED) {
|
|
540
663
|
_loggerProxy.default.logger.log("Reachability:index#setLatencyAndClose --> Attempting to set latency of ".concat(elapsed, " on closed peerConnection."));
|
|
541
|
-
|
|
542
664
|
return;
|
|
543
665
|
}
|
|
544
|
-
|
|
545
666
|
this.clusterLatencyResults[key] = this.clusterLatencyResults[key] || intialState;
|
|
546
|
-
this.clusterLatencyResults[key][resultKey] += 1;
|
|
547
|
-
// an event other than onIceCandidate
|
|
667
|
+
this.clusterLatencyResults[key][resultKey] += 1;
|
|
548
668
|
|
|
669
|
+
// Set to null in case this fired from
|
|
670
|
+
// an event other than onIceCandidate
|
|
549
671
|
peerConnection.onicecandidate = null;
|
|
550
672
|
peerConnection.close();
|
|
673
|
+
// @ts-ignore
|
|
551
674
|
peerConnection.elapsed = elapsed;
|
|
552
675
|
}
|
|
676
|
+
|
|
553
677
|
/**
|
|
554
678
|
* utility function
|
|
555
679
|
* @returns {undefined}
|
|
556
680
|
* @private
|
|
557
681
|
* @memberof Reachability
|
|
558
682
|
*/
|
|
559
|
-
|
|
560
683
|
}, {
|
|
561
684
|
key: "setup",
|
|
562
685
|
value: function setup() {
|
|
@@ -565,6 +688,5 @@ var Reachability = /*#__PURE__*/function () {
|
|
|
565
688
|
}]);
|
|
566
689
|
return Reachability;
|
|
567
690
|
}();
|
|
568
|
-
|
|
569
691
|
exports.default = Reachability;
|
|
570
692
|
//# sourceMappingURL=index.js.map
|