@webex/plugin-meetings 3.0.0-beta.2 → 3.0.0-beta.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -7
- package/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/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/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 +9 -43
- 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 +37 -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 +8 -13
- package/dist/config.js.map +1 -1
- package/dist/constants.js +250 -66
- 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 +108 -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 +532 -240
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -37
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +54 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +284 -154
- 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 +95 -226
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +99 -194
- 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 +83 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +3478 -3563
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +247 -183
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +344 -344
- 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 +529 -588
- 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 +62 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +328 -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 +156 -232
- 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 +795 -574
- 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 +186 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +126 -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 +147 -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 +178 -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 +314 -260
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -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 +264 -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 +502 -442
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- 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 +192 -191
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +15 -23
- 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 +384 -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 +363 -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 +58 -91
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +137 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +148 -100
- 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 +115 -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 +385 -460
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +143 -87
- 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/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1016 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +271 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +153 -0
- package/dist/types/meeting/index.d.ts +1471 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +257 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +78 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +62 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +367 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +159 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +208 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +46 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +200 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/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/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/{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} +14 -9
- 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} +22 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +17 -17
- package/src/constants.ts +197 -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 +39 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +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} +518 -111
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +19 -8
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +65 -17
- package/src/locus-info/{parser.js → parser.ts} +271 -98
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +456 -0
- package/src/media/{properties.js → properties.ts} +80 -102
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +384 -0
- package/src/meeting/in-meeting-actions.ts +171 -3
- package/src/meeting/index.ts +7070 -0
- package/src/meeting/locusMediaRequest.ts +309 -0
- package/src/meeting/muteState.ts +450 -0
- package/src/meeting/{request.js → request.ts} +354 -214
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +615 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +183 -0
- package/src/meeting-info/meeting-info-v2.ts +407 -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} +77 -60
- package/src/meetings/{collection.js → collection.ts} +26 -3
- package/src/meetings/index.ts +1467 -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} +137 -36
- package/src/member/{index.js → index.ts} +151 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +383 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +323 -145
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +339 -0
- package/src/metrics/{constants.js → constants.ts} +2 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +337 -61
- 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 +263 -66
- 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.js → index.ts} +157 -94
- package/src/reachability/request.ts +46 -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} +254 -136
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +333 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/{index.js → index.ts} +86 -78
- package/src/roap/request.ts +163 -0
- package/src/roap/turnDiscovery.ts +111 -49
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +96 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1272 -0
- package/src/statsAnalyzer/mqaUtil.ts +291 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +804 -526
- 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 +1176 -18
- package/test/unit/spec/locus-info/infoUtils.js +41 -32
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +65 -31
- 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 +162 -68
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +82 -3
- package/test/unit/spec/meeting/index.js +4569 -1773
- package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
- package/test/unit/spec/meeting/muteState.js +382 -211
- package/test/unit/spec/meeting/request.js +444 -78
- package/test/unit/spec/meeting/utils.js +517 -192
- package/test/unit/spec/meeting-info/index.js +181 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +481 -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 +1254 -330
- package/test/unit/spec/meetings/utils.js +220 -14
- package/test/unit/spec/member/index.js +58 -5
- package/test/unit/spec/member/util.js +494 -26
- package/test/unit/spec/members/index.js +423 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +191 -4
- package/test/unit/spec/metrics/index.js +12 -66
- package/test/unit/spec/multistream/mediaRequestManager.ts +1013 -106
- 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 +730 -65
- 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 +176 -27
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +155 -9
- 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 +28 -52
- package/test/unit/spec/roap/request.ts +225 -0
- package/test/unit/spec/roap/turnDiscovery.ts +92 -50
- package/test/unit/spec/rtcMetrics/index.ts +60 -0
- package/test/unit/spec/stats-analyzer/index.js +116 -60
- 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/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/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
package/dist/meetings/index.js
CHANGED
|
@@ -1,168 +1,126 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs2/helpers/typeof");
|
|
3
4
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
-
|
|
5
|
+
var _Object$keys2 = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
6
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
8
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
9
|
+
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
5
10
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
6
|
-
|
|
11
|
+
var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");
|
|
7
12
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
8
|
-
|
|
9
13
|
_Object$defineProperty(exports, "__esModule", {
|
|
10
14
|
value: true
|
|
11
15
|
});
|
|
12
|
-
|
|
13
16
|
exports.default = void 0;
|
|
14
|
-
|
|
15
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
|
-
|
|
17
17
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
18
|
-
|
|
19
18
|
var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
|
|
20
|
-
|
|
21
19
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
22
|
-
|
|
23
20
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
24
|
-
|
|
21
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
22
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
25
23
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
26
|
-
|
|
27
24
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
28
|
-
|
|
29
25
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
30
|
-
|
|
31
26
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
32
|
-
|
|
33
27
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
34
|
-
|
|
35
28
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
36
|
-
|
|
37
29
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
38
|
-
|
|
39
30
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
40
|
-
|
|
41
31
|
require("@webex/internal-plugin-mercury");
|
|
42
|
-
|
|
43
32
|
require("@webex/internal-plugin-conversation");
|
|
44
|
-
|
|
33
|
+
require("@webex/internal-plugin-metrics");
|
|
45
34
|
var _webexCore = require("@webex/webex-core");
|
|
46
|
-
|
|
47
35
|
var _internalMediaCore = require("@webex/internal-media-core");
|
|
48
|
-
|
|
36
|
+
var mediaHelpersModule = _interopRequireWildcard(require("@webex/media-helpers"));
|
|
49
37
|
require("webrtc-adapter");
|
|
50
|
-
|
|
51
38
|
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
52
|
-
|
|
53
|
-
var _config = require("../metrics/config");
|
|
54
|
-
|
|
55
39
|
var _loggerConfig = _interopRequireDefault(require("../common/logs/logger-config"));
|
|
56
|
-
|
|
57
|
-
var _config2 = _interopRequireDefault(require("../common/config"));
|
|
58
|
-
|
|
40
|
+
var _config = _interopRequireDefault(require("../common/config"));
|
|
59
41
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
60
|
-
|
|
61
42
|
var _request = _interopRequireDefault(require("../common/logs/request"));
|
|
62
|
-
|
|
63
43
|
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
64
|
-
|
|
65
44
|
var _media = _interopRequireDefault(require("../media"));
|
|
66
|
-
|
|
67
45
|
var _util = _interopRequireDefault(require("../meeting/util"));
|
|
68
|
-
|
|
69
46
|
var _constants = require("../constants");
|
|
70
|
-
|
|
71
47
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
72
|
-
|
|
73
48
|
var _meetingInfo = _interopRequireDefault(require("../meeting-info"));
|
|
74
|
-
|
|
75
49
|
var _meetingInfoV = _interopRequireDefault(require("../meeting-info/meeting-info-v2"));
|
|
76
|
-
|
|
77
50
|
var _meeting = _interopRequireDefault(require("../meeting"));
|
|
78
|
-
|
|
79
51
|
var _personalMeetingRoom = _interopRequireDefault(require("../personal-meeting-room"));
|
|
80
|
-
|
|
81
52
|
var _reachability = _interopRequireDefault(require("../reachability"));
|
|
82
|
-
|
|
83
|
-
var _request2 = _interopRequireDefault(require("../meetings/request"));
|
|
84
|
-
|
|
53
|
+
var _request2 = _interopRequireDefault(require("./request"));
|
|
85
54
|
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
86
|
-
|
|
87
55
|
var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
|
|
88
|
-
|
|
89
56
|
var _collection = _interopRequireDefault(require("./collection"));
|
|
90
|
-
|
|
91
57
|
var _util2 = _interopRequireDefault(require("./util"));
|
|
92
|
-
|
|
58
|
+
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
59
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
60
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
61
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
62
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
93
63
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
94
|
-
|
|
95
64
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
96
|
-
|
|
97
65
|
var mediaLogger;
|
|
98
|
-
|
|
99
66
|
var MediaLogger = /*#__PURE__*/function () {
|
|
100
67
|
function MediaLogger() {
|
|
101
68
|
(0, _classCallCheck2.default)(this, MediaLogger);
|
|
102
69
|
}
|
|
103
|
-
|
|
104
70
|
(0, _createClass2.default)(MediaLogger, [{
|
|
105
71
|
key: "info",
|
|
106
72
|
value: function info() {
|
|
107
73
|
var _LoggerProxy$logger;
|
|
108
|
-
|
|
109
74
|
(_LoggerProxy$logger = _loggerProxy.default.logger).info.apply(_LoggerProxy$logger, arguments);
|
|
110
75
|
}
|
|
111
76
|
}, {
|
|
112
77
|
key: "log",
|
|
113
78
|
value: function log() {
|
|
114
79
|
var _LoggerProxy$logger2;
|
|
115
|
-
|
|
116
80
|
(_LoggerProxy$logger2 = _loggerProxy.default.logger).log.apply(_LoggerProxy$logger2, arguments);
|
|
117
81
|
}
|
|
118
82
|
}, {
|
|
119
83
|
key: "error",
|
|
120
84
|
value: function error() {
|
|
121
85
|
var _LoggerProxy$logger3;
|
|
122
|
-
|
|
123
86
|
(_LoggerProxy$logger3 = _loggerProxy.default.logger).error.apply(_LoggerProxy$logger3, arguments);
|
|
124
87
|
}
|
|
125
88
|
}, {
|
|
126
89
|
key: "warn",
|
|
127
90
|
value: function warn() {
|
|
128
91
|
var _LoggerProxy$logger4;
|
|
129
|
-
|
|
130
92
|
(_LoggerProxy$logger4 = _loggerProxy.default.logger).warn.apply(_LoggerProxy$logger4, arguments);
|
|
131
93
|
}
|
|
132
94
|
}, {
|
|
133
95
|
key: "trace",
|
|
134
96
|
value: function trace() {
|
|
135
97
|
var _LoggerProxy$logger5;
|
|
136
|
-
|
|
137
98
|
(_LoggerProxy$logger5 = _loggerProxy.default.logger).trace.apply(_LoggerProxy$logger5, arguments);
|
|
138
99
|
}
|
|
139
100
|
}, {
|
|
140
101
|
key: "debug",
|
|
141
102
|
value: function debug() {
|
|
142
103
|
var _LoggerProxy$logger6;
|
|
143
|
-
|
|
144
104
|
(_LoggerProxy$logger6 = _loggerProxy.default.logger).debug.apply(_LoggerProxy$logger6, arguments);
|
|
145
105
|
}
|
|
146
106
|
}]);
|
|
147
107
|
return MediaLogger;
|
|
148
108
|
}();
|
|
149
109
|
/**
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
110
|
+
* Meetings Ready Event
|
|
111
|
+
* Emitted when the meetings instance on webex is ready
|
|
112
|
+
* @event meetings:ready
|
|
113
|
+
* @instance
|
|
114
|
+
* @memberof Meetings
|
|
115
|
+
*/
|
|
157
116
|
/**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
117
|
+
* Meetings Network Disconnected Event
|
|
118
|
+
* Emitted when the meetings instance is disconnected from
|
|
119
|
+
* the internal mercury server
|
|
120
|
+
* @event network:disconnected
|
|
121
|
+
* @instance
|
|
122
|
+
* @memberof Meetings
|
|
123
|
+
*/
|
|
166
124
|
/**
|
|
167
125
|
* Meetings Registered Event
|
|
168
126
|
* Emitted when the meetings instance has been registered and listening
|
|
@@ -170,137 +128,295 @@ var MediaLogger = /*#__PURE__*/function () {
|
|
|
170
128
|
* @instance
|
|
171
129
|
* @memberof Meetings
|
|
172
130
|
*/
|
|
173
|
-
|
|
174
131
|
/**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
132
|
+
* Meeting Removed Event
|
|
133
|
+
* Emitted when a meeting was removed from the cache of meetings
|
|
134
|
+
* @event meeting:removed
|
|
135
|
+
* @instance
|
|
136
|
+
* @type {Object}
|
|
137
|
+
* @property {String} meetingId the removed meeting
|
|
138
|
+
* @property {Object} response the server response
|
|
139
|
+
* @property {String} type what type of meeting it was
|
|
140
|
+
* @memberof Meetings
|
|
141
|
+
*/
|
|
186
142
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
143
|
+
* Meeting Added Event
|
|
144
|
+
* Emitted when a meeting was added to the cache of meetings
|
|
145
|
+
* @event meeting:added
|
|
146
|
+
* @instance
|
|
147
|
+
* @type {Object}
|
|
148
|
+
* @property {String} meetingId the added meeting
|
|
149
|
+
* @property {String} type what type of meeting it was
|
|
150
|
+
* @memberof Meetings
|
|
151
|
+
*/
|
|
197
152
|
/**
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
153
|
+
* Maintain a cache of meetings and sync with services.
|
|
154
|
+
* @class
|
|
155
|
+
*/
|
|
203
156
|
var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
204
157
|
(0, _inherits2.default)(Meetings, _WebexPlugin);
|
|
205
|
-
|
|
206
158
|
var _super = _createSuper(Meetings);
|
|
207
|
-
|
|
208
159
|
/**
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
160
|
+
* Initializes the Meetings Plugin
|
|
161
|
+
* @constructor
|
|
162
|
+
* @public
|
|
163
|
+
* @memberof Meetings
|
|
164
|
+
*/
|
|
214
165
|
function Meetings() {
|
|
215
166
|
var _this;
|
|
216
|
-
|
|
217
167
|
(0, _classCallCheck2.default)(this, Meetings);
|
|
218
|
-
|
|
219
168
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
220
169
|
args[_key] = arguments[_key];
|
|
221
170
|
}
|
|
222
|
-
|
|
223
171
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
224
|
-
/**
|
|
225
|
-
* The Meetings request to interact with server
|
|
226
|
-
* @instance
|
|
227
|
-
* @type {Object}
|
|
228
|
-
* @private
|
|
229
|
-
* @memberof Meetings
|
|
230
|
-
*/
|
|
231
172
|
|
|
173
|
+
/**
|
|
174
|
+
* The webrtc-core media helpers. This is a temporary solution required for the SDK sample app
|
|
175
|
+
* to be able to call media helper functions.
|
|
176
|
+
*
|
|
177
|
+
* @instance
|
|
178
|
+
* @type {Object}
|
|
179
|
+
* @private
|
|
180
|
+
* @memberof Meetings
|
|
181
|
+
*/
|
|
182
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "loggerRequest", void 0);
|
|
183
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "media", void 0);
|
|
184
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingCollection", void 0);
|
|
185
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "personalMeetingRoom", void 0);
|
|
186
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "preferredWebexSite", void 0);
|
|
187
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "reachability", void 0);
|
|
188
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registered", void 0);
|
|
189
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "request", void 0);
|
|
190
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "geoHintInfo", void 0);
|
|
191
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingInfo", void 0);
|
|
192
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaHelpers", void 0);
|
|
193
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "breakoutLocusForHandleLater", void 0);
|
|
232
194
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
|
|
195
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createNoiseReductionEffect", /*#__PURE__*/function () {
|
|
196
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options) {
|
|
197
|
+
var authToken;
|
|
198
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
199
|
+
while (1) switch (_context.prev = _context.next) {
|
|
200
|
+
case 0:
|
|
201
|
+
// @ts-ignore
|
|
202
|
+
authToken = _this.webex.credentials.supertoken.access_token;
|
|
203
|
+
return _context.abrupt("return", new mediaHelpersModule.NoiseReductionEffect(_objectSpread({
|
|
204
|
+
authToken: authToken
|
|
205
|
+
}, options)));
|
|
206
|
+
case 2:
|
|
207
|
+
case "end":
|
|
208
|
+
return _context.stop();
|
|
209
|
+
}
|
|
210
|
+
}, _callee);
|
|
211
|
+
}));
|
|
212
|
+
return function (_x) {
|
|
213
|
+
return _ref.apply(this, arguments);
|
|
214
|
+
};
|
|
215
|
+
}());
|
|
216
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createVirtualBackgroundEffect", /*#__PURE__*/function () {
|
|
217
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
|
|
218
|
+
var authToken;
|
|
219
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
220
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
221
|
+
case 0:
|
|
222
|
+
// @ts-ignore
|
|
223
|
+
authToken = _this.webex.credentials.supertoken.access_token;
|
|
224
|
+
return _context2.abrupt("return", new mediaHelpersModule.VirtualBackgroundEffect(_objectSpread({
|
|
225
|
+
authToken: authToken
|
|
226
|
+
}, options)));
|
|
227
|
+
case 2:
|
|
228
|
+
case "end":
|
|
229
|
+
return _context2.stop();
|
|
230
|
+
}
|
|
231
|
+
}, _callee2);
|
|
232
|
+
}));
|
|
233
|
+
return function (_x2) {
|
|
234
|
+
return _ref2.apply(this, arguments);
|
|
235
|
+
};
|
|
236
|
+
}());
|
|
237
|
+
_this.mediaHelpers = mediaHelpersModule;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The Meetings request to interact with server
|
|
241
|
+
* @instance
|
|
242
|
+
* @type {Object}
|
|
243
|
+
* @private
|
|
244
|
+
* @memberof Meetings
|
|
245
|
+
*/
|
|
246
|
+
// @ts-ignore
|
|
233
247
|
_this.request = new _request2.default({}, {
|
|
234
248
|
parent: _this.webex
|
|
235
249
|
});
|
|
236
250
|
/**
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
251
|
+
* Log upload request helper
|
|
252
|
+
* @instance
|
|
253
|
+
* @type {Object}
|
|
254
|
+
* @private
|
|
255
|
+
* @memberof Meetings
|
|
256
|
+
*/
|
|
257
|
+
// @ts-ignore
|
|
244
258
|
_this.loggerRequest = new _request.default({
|
|
245
259
|
webex: _this.webex
|
|
246
260
|
});
|
|
247
261
|
_this.meetingCollection = new _collection.default();
|
|
248
262
|
/**
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
263
|
+
* The PersonalMeetingRoom object to interact with server
|
|
264
|
+
* @instance
|
|
265
|
+
* @type {Object}
|
|
266
|
+
* @public
|
|
267
|
+
* @memberof Meetings
|
|
268
|
+
*/
|
|
256
269
|
_this.personalMeetingRoom = null;
|
|
257
270
|
/**
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
271
|
+
* The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called
|
|
272
|
+
* starts as null
|
|
273
|
+
* @instance
|
|
274
|
+
* @type {Object}
|
|
275
|
+
* @private
|
|
276
|
+
* @memberof Meetings
|
|
277
|
+
*/
|
|
266
278
|
_this.reachability = null;
|
|
267
|
-
/**
|
|
268
|
-
* If the meetings plugin has been registered and listening via {@link Meetings#register}
|
|
269
|
-
* @instance
|
|
270
|
-
* @type {Boolean}
|
|
271
|
-
* @public
|
|
272
|
-
* @memberof Meetings
|
|
273
|
-
*/
|
|
274
279
|
|
|
275
|
-
_this.registered = false;
|
|
276
280
|
/**
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
* If the meetings plugin has been registered and listening via {@link Meetings#register}
|
|
282
|
+
* @instance
|
|
283
|
+
* @type {Boolean}
|
|
284
|
+
* @public
|
|
285
|
+
* @memberof Meetings
|
|
286
|
+
*/
|
|
287
|
+
_this.registered = false;
|
|
283
288
|
|
|
284
|
-
_this.preferredWebexSite = '';
|
|
285
289
|
/**
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
* This values indicates the preferred webex site the user will start there meeting, getsits value from {@link Meetings#register}
|
|
291
|
+
* @instance
|
|
292
|
+
* @type {String}
|
|
293
|
+
* @private
|
|
294
|
+
* @memberof Meetings
|
|
295
|
+
*/
|
|
296
|
+
_this.preferredWebexSite = '';
|
|
293
297
|
|
|
298
|
+
/**
|
|
299
|
+
* The public interface for the internal Media util files. These are helpful to expose outside the context
|
|
300
|
+
* of a meeting so that a user can access media without creating a meeting instance.
|
|
301
|
+
* @instance
|
|
302
|
+
* @type {Object}
|
|
303
|
+
* @private
|
|
304
|
+
* @memberof Meetings
|
|
305
|
+
*/
|
|
294
306
|
_this.media = {
|
|
295
|
-
getUserMedia: _media.default.getUserMedia
|
|
296
|
-
getSupportedDevice: _media.default.getSupportedDevice
|
|
307
|
+
getUserMedia: _media.default.getUserMedia
|
|
297
308
|
};
|
|
298
|
-
|
|
299
309
|
_this.onReady();
|
|
300
|
-
|
|
301
310
|
return _this;
|
|
302
311
|
}
|
|
312
|
+
|
|
303
313
|
/**
|
|
314
|
+
* check whether you need to handle this main session's locus data or not
|
|
315
|
+
* @param {Object} meeting current meeting data
|
|
316
|
+
* @param {Object} newLocus new locus data
|
|
317
|
+
* @returns {boolean}
|
|
318
|
+
* @private
|
|
319
|
+
* @memberof Meetings
|
|
320
|
+
*/
|
|
321
|
+
(0, _createClass2.default)(Meetings, [{
|
|
322
|
+
key: "isNeedHandleMainLocus",
|
|
323
|
+
value: function isNeedHandleMainLocus(meeting, newLocus) {
|
|
324
|
+
var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _newLocus$self2, _newLocus$self3, _breakoutLocus$joined, _newLocus$self4;
|
|
325
|
+
var breakoutUrl = (_newLocus$controls = newLocus.controls) === null || _newLocus$controls === void 0 ? void 0 : (_newLocus$controls$br = _newLocus$controls.breakout) === null || _newLocus$controls$br === void 0 ? void 0 : _newLocus$controls$br.url;
|
|
326
|
+
var breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
|
|
327
|
+
var isSelfJoined = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self = newLocus.self) === null || _newLocus$self === void 0 ? void 0 : _newLocus$self.state) === _constants._JOINED_;
|
|
328
|
+
var isSelfMoved = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self2 = newLocus.self) === null || _newLocus$self2 === void 0 ? void 0 : _newLocus$self2.state) === _constants._LEFT_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self3 = newLocus.self) === null || _newLocus$self3 === void 0 ? void 0 : _newLocus$self3.reason) === _constants._MOVED_;
|
|
329
|
+
// @ts-ignore
|
|
330
|
+
var deviceFromNewLocus = _util2.default.getThisDevice(newLocus, this.webex.internal.device.url);
|
|
331
|
+
var isResourceMovedOnThisDevice = (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.state) === _constants._LEFT_ && (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.reason) === _constants._MOVED_;
|
|
332
|
+
var isNewLocusJoinThisDevice = _util2.default.joinedOnThisDevice(meeting, newLocus,
|
|
333
|
+
// @ts-ignore
|
|
334
|
+
this.webex.internal.device.url);
|
|
335
|
+
var isBreakoutLocusJoinThisDevice = (breakoutLocus === null || breakoutLocus === void 0 ? void 0 : (_breakoutLocus$joined = breakoutLocus.joinedWith) === null || _breakoutLocus$joined === void 0 ? void 0 : _breakoutLocus$joined.correlationId) && breakoutLocus.joinedWith.correlationId === (meeting === null || meeting === void 0 ? void 0 : meeting.correlationId);
|
|
336
|
+
if (isSelfJoined && isNewLocusJoinThisDevice) {
|
|
337
|
+
_loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self this device shown as JOINED in the main session');
|
|
338
|
+
if (breakoutLocus !== null && breakoutLocus !== void 0 && breakoutLocus.joinedWith && deviceFromNewLocus) {
|
|
339
|
+
var _breakoutLocus$joined2, _deviceFromNewLocus$r;
|
|
340
|
+
var breakoutReplaceAt = ((_breakoutLocus$joined2 = breakoutLocus.joinedWith.replaces) === null || _breakoutLocus$joined2 === void 0 ? void 0 : _breakoutLocus$joined2.length) > 0 ? breakoutLocus.joinedWith.replaces[0].replaceAt : '';
|
|
341
|
+
var newLocusReplaceAt = ((_deviceFromNewLocus$r = deviceFromNewLocus.replaces) === null || _deviceFromNewLocus$r === void 0 ? void 0 : _deviceFromNewLocus$r.length) > 0 ? deviceFromNewLocus.replaces[0].replaceAt : '';
|
|
342
|
+
if (breakoutReplaceAt && newLocusReplaceAt && breakoutReplaceAt > newLocusReplaceAt) {
|
|
343
|
+
_loggerProxy.default.logger.log("Meetings:index#isNeedHandleMainLocus --> this is expired main joined status locus_dto replacedAt ".concat(newLocusReplaceAt, " bo replacedAt ").concat(breakoutReplaceAt));
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
if (isBreakoutLocusJoinThisDevice) {
|
|
350
|
+
_loggerProxy.default.logger.log("Meetings:index#isNeedHandleMainLocus --> there is active breakout session and joined on this device, and don't need to handle main session: ".concat(breakoutUrl));
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self4 = newLocus.self) !== null && _newLocus$self4 !== void 0 && _newLocus$self4.removed || isResourceMovedOnThisDevice)) {
|
|
354
|
+
_loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self moved main locus with self removed status or with device resource moved, not need to handle');
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
if (isSelfJoined && isResourceMovedOnThisDevice) {
|
|
358
|
+
_loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self device left&moved in main locus with self joined status, not need to handle');
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
_loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> this is a normal main session locusDTO update case');
|
|
362
|
+
return true;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* check whether you need to handle this locus data or not
|
|
367
|
+
* @param {Object} meeting old locus data
|
|
368
|
+
* @param {Object} newLocus new locus data
|
|
369
|
+
* @returns {boolean}
|
|
370
|
+
* @private
|
|
371
|
+
* @memberof Meetings
|
|
372
|
+
*/
|
|
373
|
+
}, {
|
|
374
|
+
key: "isNeedHandleLocusDTO",
|
|
375
|
+
value: function isNeedHandleLocusDTO(meeting, newLocus) {
|
|
376
|
+
if (newLocus) {
|
|
377
|
+
var _newLocus$self5, _newLocus$self6;
|
|
378
|
+
var isNewLocusAsBreakout = _util2.default.isBreakoutLocusDTO(newLocus);
|
|
379
|
+
var isSelfMoved = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) === _constants._LEFT_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self6 = newLocus.self) === null || _newLocus$self6 === void 0 ? void 0 : _newLocus$self6.reason) === _constants._MOVED_;
|
|
380
|
+
if (!meeting) {
|
|
381
|
+
if (isNewLocusAsBreakout) {
|
|
382
|
+
var _newLocus$fullState, _newLocus$self7;
|
|
383
|
+
_loggerProxy.default.logger.log("Meetings:index#isNeedHandleLocusDTO --> the first breakout session locusDTO active status: ".concat((_newLocus$fullState = newLocus.fullState) === null || _newLocus$fullState === void 0 ? void 0 : _newLocus$fullState.active));
|
|
384
|
+
return ((_newLocus$self7 = newLocus.self) === null || _newLocus$self7 === void 0 ? void 0 : _newLocus$self7.state) === _constants._JOINED_;
|
|
385
|
+
}
|
|
386
|
+
return this.isNeedHandleMainLocus(meeting, newLocus);
|
|
387
|
+
}
|
|
388
|
+
if (!isNewLocusAsBreakout) {
|
|
389
|
+
return this.isNeedHandleMainLocus(meeting, newLocus);
|
|
390
|
+
}
|
|
391
|
+
return !isSelfMoved;
|
|
392
|
+
}
|
|
393
|
+
return true;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* get corresponding meeting object by locus data
|
|
398
|
+
* @param {Object} data a locus event
|
|
399
|
+
* @param {String} data.locusUrl
|
|
400
|
+
* @param {Object} data.locus
|
|
401
|
+
* @returns {Object}
|
|
402
|
+
* @private
|
|
403
|
+
* @memberof Meetings
|
|
404
|
+
*/
|
|
405
|
+
}, {
|
|
406
|
+
key: "getCorrespondingMeetingByLocus",
|
|
407
|
+
value: function getCorrespondingMeetingByLocus(data) {
|
|
408
|
+
var _data$locus$info, _data$locus, _data$locus$info2;
|
|
409
|
+
// getting meeting by correlationId. This will happen for the new event
|
|
410
|
+
// Either the locus
|
|
411
|
+
// TODO : Add check for the callBack Address
|
|
412
|
+
return this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locusUrl) ||
|
|
413
|
+
// @ts-ignore
|
|
414
|
+
this.meetingCollection.getByKey(_constants.CORRELATION_ID,
|
|
415
|
+
// @ts-ignore
|
|
416
|
+
_util2.default.checkForCorrelationId(this.webex.internal.device.url, data.locus)) || this.meetingCollection.getByKey(_constants.SIP_URI, data.locus.self && data.locus.self.callbackInfo && data.locus.self.callbackInfo.callbackAddress) || ((_data$locus$info = data.locus.info) !== null && _data$locus$info !== void 0 && _data$locus$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_constants.CONVERSATION_URL, data.locus.conversationUrl)) || this.meetingCollection.getByKey(_constants.MEETINGNUMBER, (_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : (_data$locus$info2 = _data$locus.info) === null || _data$locus$info2 === void 0 ? void 0 : _data$locus$info2.webExMeetingId);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
304
420
|
* handle locus events and takes meeting actions with them as they come in
|
|
305
421
|
* @param {Object} data a locus event
|
|
306
422
|
* @param {String} data.locusUrl
|
|
@@ -311,79 +427,86 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
311
427
|
* @private
|
|
312
428
|
* @memberof Meetings
|
|
313
429
|
*/
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
(0, _createClass2.default)(Meetings, [{
|
|
430
|
+
}, {
|
|
317
431
|
key: "handleLocusEvent",
|
|
318
432
|
value: function handleLocusEvent(data) {
|
|
319
|
-
var _data$
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
_this2 = this;
|
|
323
|
-
|
|
433
|
+
var _data$locus2,
|
|
434
|
+
_data$locus2$replaces,
|
|
435
|
+
_this2 = this;
|
|
324
436
|
var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
325
|
-
var meeting =
|
|
326
|
-
// Either the locus
|
|
327
|
-
// TODO : Add check for the callBack Address
|
|
437
|
+
var meeting = this.getCorrespondingMeetingByLocus(data);
|
|
328
438
|
|
|
329
|
-
|
|
439
|
+
// Special case when locus has got replaced, This only happend once if a replace locus exists
|
|
330
440
|
// https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
|
|
331
441
|
|
|
332
|
-
if (!meeting && ((_data$
|
|
442
|
+
if (!meeting && ((_data$locus2 = data.locus) === null || _data$locus2 === void 0 ? void 0 : (_data$locus2$replaces = _data$locus2.replaces) === null || _data$locus2$replaces === void 0 ? void 0 : _data$locus2$replaces.length) > 0) {
|
|
333
443
|
// Always the last element in the replace is the active one
|
|
334
444
|
meeting = this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);
|
|
335
445
|
}
|
|
336
|
-
|
|
446
|
+
if (meeting && !_util2.default.isBreakoutLocusDTO(data.locus)) {
|
|
447
|
+
meeting.locusInfo.updateMainSessionLocusCache(data.locus);
|
|
448
|
+
}
|
|
449
|
+
if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
|
|
450
|
+
_loggerProxy.default.logger.log("Meetings:index#handleLocusEvent --> doesn't need to process locus event");
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
337
453
|
if (!meeting) {
|
|
338
454
|
// TODO: create meeting when we get a meeting object
|
|
339
455
|
// const checkForEnded = (locus) => {
|
|
340
456
|
// TODO: you already ended the meeting but you got an event later
|
|
341
457
|
// Mainly for 1:1 Callsor meeting
|
|
342
458
|
// Happens mainly after refresh
|
|
459
|
+
|
|
343
460
|
// 1:1 Meeting
|
|
344
461
|
// 1) You ended a call before but you got a mercury event
|
|
345
462
|
// Make sure end the call and cleanup the meeting only if the mercury
|
|
346
463
|
// event says so
|
|
347
464
|
// 2) Maintain lastSync time in the meetings object which helps to compare
|
|
348
465
|
// If the meeting came befor or after the sync . ANy meeting start time before the sync time is invalid
|
|
466
|
+
|
|
349
467
|
// For space Meeting
|
|
350
468
|
// Check the locus object and see who has joined
|
|
469
|
+
|
|
351
470
|
// };
|
|
352
471
|
// rather then locus object change to locus url
|
|
472
|
+
|
|
353
473
|
if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
|
|
354
474
|
// just ignore the event as its already ended and not active
|
|
355
475
|
_loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
356
|
-
|
|
357
476
|
return;
|
|
358
|
-
}
|
|
359
|
-
// Any future events will be neglected
|
|
477
|
+
}
|
|
360
478
|
|
|
479
|
+
// When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
|
|
480
|
+
// Any future events will be neglected
|
|
361
481
|
|
|
362
482
|
if (data.locus && data.locus.self && data.locus.self.state === _constants._LEFT_ && data.locus.self.removed === true) {
|
|
363
483
|
// just ignore the event as its already ended and not active
|
|
364
484
|
_loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
365
|
-
|
|
366
485
|
return;
|
|
367
486
|
}
|
|
368
|
-
|
|
369
487
|
this.create(data.locus, _constants._LOCUS_ID_, useRandomDelayForInfo).then(function (newMeeting) {
|
|
370
|
-
meeting = newMeeting;
|
|
488
|
+
meeting = newMeeting;
|
|
371
489
|
|
|
490
|
+
// It's a new meeting so initialize the locus data
|
|
372
491
|
meeting.locusInfo.initialSetup(data.locus);
|
|
492
|
+
_this2.checkHandleBreakoutLocus(data.locus);
|
|
373
493
|
}).catch(function (e) {
|
|
374
|
-
|
|
494
|
+
_loggerProxy.default.logger.error(e);
|
|
375
495
|
}).finally(function () {
|
|
376
496
|
// There will be cases where locus event comes in gets created and deleted because its a 1:1 and meeting gets deleted
|
|
377
497
|
// because the other user left so before sending 'added' event make sure it exists in the collection
|
|
498
|
+
|
|
378
499
|
if (_this2.getMeetingByType(_constants._ID_, meeting.id)) {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
trigger:
|
|
500
|
+
// @ts-ignore
|
|
501
|
+
_this2.webex.internal.newMetrics.submitClientEvent({
|
|
502
|
+
name: 'client.call.remote-started',
|
|
503
|
+
payload: {
|
|
504
|
+
trigger: 'mercury-event'
|
|
505
|
+
},
|
|
506
|
+
options: {
|
|
507
|
+
meetingId: meeting.id
|
|
384
508
|
}
|
|
385
509
|
});
|
|
386
|
-
|
|
387
510
|
_triggerProxy.default.trigger(_this2, {
|
|
388
511
|
file: 'meetings',
|
|
389
512
|
function: 'handleLocusEvent'
|
|
@@ -400,33 +523,33 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
400
523
|
meeting.locusInfo.parse(meeting, data);
|
|
401
524
|
}
|
|
402
525
|
}
|
|
403
|
-
/**
|
|
404
|
-
* handles locus events through mercury that are not roap
|
|
405
|
-
* @param {Object} envelope
|
|
406
|
-
* @param {Object} envelope.data
|
|
407
|
-
* @param {String} envelope.data.eventType
|
|
408
|
-
* @returns {undefined}
|
|
409
|
-
* @private
|
|
410
|
-
* @memberof Meetings
|
|
411
|
-
*/
|
|
412
526
|
|
|
527
|
+
/**
|
|
528
|
+
* handles locus events through mercury that are not roap
|
|
529
|
+
* @param {Object} envelope
|
|
530
|
+
* @param {Object} envelope.data
|
|
531
|
+
* @param {String} envelope.data.eventType
|
|
532
|
+
* @returns {undefined}
|
|
533
|
+
* @private
|
|
534
|
+
* @memberof Meetings
|
|
535
|
+
*/
|
|
413
536
|
}, {
|
|
414
537
|
key: "handleLocusMercury",
|
|
415
538
|
value: function handleLocusMercury(envelope) {
|
|
416
539
|
var data = envelope.data;
|
|
540
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
417
541
|
var eventType = data.eventType;
|
|
418
|
-
|
|
419
542
|
if (eventType && eventType !== _constants.LOCUSEVENT.MESSAGE_ROAP) {
|
|
420
543
|
this.handleLocusEvent(data, true);
|
|
421
544
|
}
|
|
422
545
|
}
|
|
423
|
-
/**
|
|
424
|
-
* handles mecury offline event
|
|
425
|
-
* @returns {undefined}
|
|
426
|
-
* @private
|
|
427
|
-
* @memberof Meetings
|
|
428
|
-
*/
|
|
429
546
|
|
|
547
|
+
/**
|
|
548
|
+
* handles mecury offline event
|
|
549
|
+
* @returns {undefined}
|
|
550
|
+
* @private
|
|
551
|
+
* @memberof Meetings
|
|
552
|
+
*/
|
|
430
553
|
}, {
|
|
431
554
|
key: "handleMercuryOffline",
|
|
432
555
|
value: function handleMercuryOffline() {
|
|
@@ -435,66 +558,74 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
435
558
|
function: 'handleMercuryOffline'
|
|
436
559
|
}, _constants.EVENT_TRIGGERS.MEETINGS_NETWORK_DISCONNECTED);
|
|
437
560
|
}
|
|
438
|
-
/**
|
|
439
|
-
* registers for locus and roap mercury events
|
|
440
|
-
* @returns {undefined}
|
|
441
|
-
* @private
|
|
442
|
-
* @memberof Meetings
|
|
443
|
-
*/
|
|
444
561
|
|
|
562
|
+
/**
|
|
563
|
+
* registers for locus and roap mercury events
|
|
564
|
+
* @returns {undefined}
|
|
565
|
+
* @private
|
|
566
|
+
* @memberof Meetings
|
|
567
|
+
*/
|
|
445
568
|
}, {
|
|
446
569
|
key: "listenForEvents",
|
|
447
570
|
value: function listenForEvents() {
|
|
448
571
|
var _this3 = this;
|
|
449
|
-
|
|
572
|
+
// @ts-ignore
|
|
450
573
|
this.webex.internal.mercury.on(_constants.LOCUSEVENT.LOCUS_MERCURY, function (envelope) {
|
|
451
574
|
_this3.handleLocusMercury(envelope);
|
|
452
575
|
});
|
|
576
|
+
// @ts-ignore
|
|
453
577
|
this.webex.internal.mercury.on(_constants.ROAP.ROAP_MERCURY, function (envelope) {
|
|
454
578
|
_util2.default.handleRoapMercury(envelope, _this3.meetingCollection);
|
|
455
579
|
});
|
|
580
|
+
|
|
581
|
+
// @ts-ignore
|
|
456
582
|
this.webex.internal.mercury.on(_constants.ONLINE, function () {
|
|
457
583
|
_this3.syncMeetings();
|
|
458
584
|
});
|
|
585
|
+
|
|
586
|
+
// @ts-ignore
|
|
459
587
|
this.webex.internal.mercury.on(_constants.OFFLINE, function () {
|
|
460
588
|
_this3.handleMercuryOffline();
|
|
461
589
|
});
|
|
462
590
|
}
|
|
463
|
-
/**
|
|
464
|
-
* stops listening for locus and roap mercury events
|
|
465
|
-
* @returns {undefined}
|
|
466
|
-
* @private
|
|
467
|
-
* @memberof Meetings
|
|
468
|
-
*/
|
|
469
591
|
|
|
592
|
+
/**
|
|
593
|
+
* stops listening for locus and roap mercury events
|
|
594
|
+
* @returns {undefined}
|
|
595
|
+
* @private
|
|
596
|
+
* @memberof Meetings
|
|
597
|
+
*/
|
|
470
598
|
}, {
|
|
471
599
|
key: "stopListeningForEvents",
|
|
472
600
|
value: function stopListeningForEvents() {
|
|
601
|
+
// @ts-ignore
|
|
473
602
|
this.webex.internal.mercury.off(_constants.LOCUSEVENT.LOCUS_MERCURY);
|
|
603
|
+
// @ts-ignore
|
|
474
604
|
this.webex.internal.mercury.off(_constants.ROAP.ROAP_MERCURY);
|
|
605
|
+
// @ts-ignore
|
|
475
606
|
this.webex.internal.mercury.off(_constants.ONLINE);
|
|
476
607
|
}
|
|
477
|
-
/**
|
|
478
|
-
* @returns {undefined}
|
|
479
|
-
* @private
|
|
480
|
-
* @memberof Meetings
|
|
481
|
-
*/
|
|
482
608
|
|
|
609
|
+
/**
|
|
610
|
+
* @returns {undefined}
|
|
611
|
+
* @private
|
|
612
|
+
* @memberof Meetings
|
|
613
|
+
*/
|
|
483
614
|
}, {
|
|
484
615
|
key: "onReady",
|
|
485
616
|
value: function onReady() {
|
|
486
617
|
var _this4 = this;
|
|
487
|
-
|
|
618
|
+
// @ts-ignore
|
|
488
619
|
this.webex.once(_constants.READY, function () {
|
|
489
|
-
|
|
490
|
-
|
|
620
|
+
// @ts-ignore
|
|
621
|
+
_config.default.set(_this4.config);
|
|
622
|
+
// @ts-ignore
|
|
491
623
|
_loggerConfig.default.set(_this4.config.logging);
|
|
492
|
-
|
|
624
|
+
// @ts-ignore
|
|
493
625
|
_loggerProxy.default.set(_this4.webex.logger);
|
|
494
|
-
|
|
495
626
|
mediaLogger = new MediaLogger();
|
|
627
|
+
(0, _internalMediaCore.setLogger)(mediaLogger);
|
|
496
628
|
|
|
497
|
-
_internalMediaCore.MediaConnection.setLogger(mediaLogger);
|
|
498
629
|
/**
|
|
499
630
|
* The MeetingInfo object to interact with server
|
|
500
631
|
* @instance
|
|
@@ -502,198 +633,207 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
502
633
|
* @private
|
|
503
634
|
* @memberof Meetings
|
|
504
635
|
*/
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
636
|
+
// @ts-ignore
|
|
637
|
+
_this4.meetingInfo = _this4.config.experimental.enableUnifiedMeetings ?
|
|
638
|
+
// @ts-ignore
|
|
639
|
+
new _meetingInfoV.default(_this4.webex) :
|
|
640
|
+
// @ts-ignore
|
|
641
|
+
new _meetingInfo.default(_this4.webex);
|
|
642
|
+
// @ts-ignore
|
|
508
643
|
_this4.personalMeetingRoom = new _personalMeetingRoom.default({
|
|
509
644
|
meetingInfo: _this4.meetingInfo
|
|
510
|
-
},
|
|
645
|
+
},
|
|
646
|
+
// @ts-ignore
|
|
647
|
+
{
|
|
511
648
|
parent: _this4.webex
|
|
512
649
|
});
|
|
513
|
-
|
|
514
650
|
_triggerProxy.default.trigger(_this4, {
|
|
515
651
|
file: 'meetings',
|
|
516
652
|
function: 'onReady'
|
|
517
653
|
}, _constants.EVENT_TRIGGERS.MEETINGS_READY);
|
|
518
|
-
|
|
519
654
|
_util2.default.checkH264Support({
|
|
520
655
|
disableNotifications: true
|
|
521
656
|
});
|
|
522
|
-
|
|
523
|
-
_metrics.default.initialSetup(_this4.
|
|
657
|
+
// @ts-ignore
|
|
658
|
+
_metrics.default.initialSetup(_this4.webex);
|
|
524
659
|
});
|
|
525
660
|
}
|
|
526
|
-
/**
|
|
527
|
-
* API to toggle unified meetings
|
|
528
|
-
* @param {Boolean} changeState
|
|
529
|
-
* @private
|
|
530
|
-
* @memberof Meetings
|
|
531
|
-
* @returns {undefined}
|
|
532
|
-
*/
|
|
533
661
|
|
|
662
|
+
/**
|
|
663
|
+
* API to toggle unified meetings
|
|
664
|
+
* @param {Boolean} changeState
|
|
665
|
+
* @private
|
|
666
|
+
* @memberof Meetings
|
|
667
|
+
* @returns {undefined}
|
|
668
|
+
*/
|
|
534
669
|
}, {
|
|
535
670
|
key: "_toggleUnifiedMeetings",
|
|
536
671
|
value: function _toggleUnifiedMeetings(changeState) {
|
|
537
672
|
var _this$config, _this$config$experime;
|
|
538
|
-
|
|
539
673
|
if (typeof changeState !== 'boolean') {
|
|
540
674
|
return;
|
|
541
675
|
}
|
|
542
|
-
|
|
676
|
+
// @ts-ignore
|
|
543
677
|
if (((_this$config = this.config) === null || _this$config === void 0 ? void 0 : (_this$config$experime = _this$config.experimental) === null || _this$config$experime === void 0 ? void 0 : _this$config$experime.enableUnifiedMeetings) !== changeState) {
|
|
678
|
+
// @ts-ignore
|
|
544
679
|
this.config.experimental.enableUnifiedMeetings = changeState;
|
|
680
|
+
// @ts-ignore
|
|
545
681
|
this.meetingInfo = changeState ? new _meetingInfoV.default(this.webex) : new _meetingInfo.default(this.webex);
|
|
546
682
|
}
|
|
547
683
|
}
|
|
548
|
-
/**
|
|
549
|
-
* API to enable or disable TURN discovery
|
|
550
|
-
* @param {Boolean} enable
|
|
551
|
-
* @private
|
|
552
|
-
* @memberof Meetings
|
|
553
|
-
* @returns {undefined}
|
|
554
|
-
*/
|
|
555
684
|
|
|
685
|
+
/**
|
|
686
|
+
* API to enable or disable TURN discovery
|
|
687
|
+
* @param {Boolean} enable
|
|
688
|
+
* @private
|
|
689
|
+
* @memberof Meetings
|
|
690
|
+
* @returns {undefined}
|
|
691
|
+
*/
|
|
556
692
|
}, {
|
|
557
693
|
key: "_toggleTurnDiscovery",
|
|
558
694
|
value: function _toggleTurnDiscovery(enable) {
|
|
559
695
|
if (typeof enable !== 'boolean') {
|
|
560
696
|
return;
|
|
561
697
|
}
|
|
562
|
-
|
|
698
|
+
// @ts-ignore
|
|
563
699
|
this.config.experimental.enableTurnDiscovery = enable;
|
|
564
700
|
}
|
|
565
|
-
/**
|
|
566
|
-
* API to toggle starting adhoc meeting
|
|
567
|
-
* @param {Boolean} changeState
|
|
568
|
-
* @private
|
|
569
|
-
* @memberof Meetings
|
|
570
|
-
* @returns {undefined}
|
|
571
|
-
*/
|
|
572
701
|
|
|
702
|
+
/**
|
|
703
|
+
* API to toggle starting adhoc meeting
|
|
704
|
+
* @param {Boolean} changeState
|
|
705
|
+
* @private
|
|
706
|
+
* @memberof Meetings
|
|
707
|
+
* @returns {undefined}
|
|
708
|
+
*/
|
|
573
709
|
}, {
|
|
574
710
|
key: "_toggleAdhocMeetings",
|
|
575
711
|
value: function _toggleAdhocMeetings(changeState) {
|
|
576
712
|
var _this$config2, _this$config2$experim;
|
|
577
|
-
|
|
578
713
|
if (typeof changeState !== 'boolean') {
|
|
579
714
|
return;
|
|
580
715
|
}
|
|
581
|
-
|
|
716
|
+
// @ts-ignore
|
|
582
717
|
if (((_this$config2 = this.config) === null || _this$config2 === void 0 ? void 0 : (_this$config2$experim = _this$config2.experimental) === null || _this$config2$experim === void 0 ? void 0 : _this$config2$experim.enableAdhocMeetings) !== changeState) {
|
|
718
|
+
// @ts-ignore
|
|
583
719
|
this.config.experimental.enableAdhocMeetings = changeState;
|
|
584
720
|
}
|
|
585
721
|
}
|
|
586
|
-
/**
|
|
587
|
-
* Explicitly sets up the meetings plugin by registering
|
|
588
|
-
* the device, connecting to mercury, and listening for locus events.
|
|
589
|
-
*
|
|
590
|
-
* @returns {Promise}
|
|
591
|
-
* @public
|
|
592
|
-
* @memberof Meetings
|
|
593
|
-
*/
|
|
594
722
|
|
|
723
|
+
/**
|
|
724
|
+
* Explicitly sets up the meetings plugin by registering
|
|
725
|
+
* the device, connecting to mercury, and listening for locus events.
|
|
726
|
+
*
|
|
727
|
+
* @returns {Promise}
|
|
728
|
+
* @public
|
|
729
|
+
* @memberof Meetings
|
|
730
|
+
*/
|
|
595
731
|
}, {
|
|
596
732
|
key: "register",
|
|
597
733
|
value: function register() {
|
|
598
734
|
var _this5 = this;
|
|
599
|
-
|
|
735
|
+
// @ts-ignore
|
|
600
736
|
if (!this.webex.canAuthorize) {
|
|
601
737
|
_loggerProxy.default.logger.error('Meetings:index#register --> ERROR, Unable to register, SDK cannot authorize');
|
|
602
|
-
|
|
603
738
|
return _promise.default.reject(new Error('SDK cannot authorize'));
|
|
604
739
|
}
|
|
605
|
-
|
|
606
740
|
if (this.registered) {
|
|
607
741
|
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');
|
|
608
|
-
|
|
609
742
|
return _promise.default.resolve();
|
|
610
743
|
}
|
|
611
|
-
|
|
612
744
|
return _promise.default.all([this.fetchUserPreferredWebexSite(), this.getGeoHint(), this.startReachability().catch(function (error) {
|
|
613
745
|
_loggerProxy.default.logger.error("Meetings:index#register --> GDM error, ".concat(error.message));
|
|
614
|
-
}),
|
|
615
|
-
|
|
616
|
-
|
|
746
|
+
}),
|
|
747
|
+
// @ts-ignore
|
|
748
|
+
this.webex.internal.device.register()
|
|
749
|
+
// @ts-ignore
|
|
750
|
+
.then(function () {
|
|
751
|
+
return _loggerProxy.default.logger.info( // @ts-ignore
|
|
752
|
+
"Meetings:index#register --> INFO, Device registered ".concat(_this5.webex.internal.device.url));
|
|
753
|
+
})
|
|
754
|
+
// @ts-ignore
|
|
755
|
+
.then(function () {
|
|
617
756
|
return _this5.webex.internal.mercury.connect();
|
|
618
757
|
}), _util2.default.checkH264Support.call(this)]).then(function () {
|
|
619
758
|
_this5.listenForEvents();
|
|
620
|
-
|
|
621
759
|
_triggerProxy.default.trigger(_this5, {
|
|
622
760
|
file: 'meetings',
|
|
623
761
|
function: 'register'
|
|
624
762
|
}, _constants.EVENT_TRIGGERS.MEETINGS_REGISTERED);
|
|
625
|
-
|
|
626
763
|
_this5.registered = true;
|
|
627
|
-
|
|
628
764
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETINGS_REGISTRATION_SUCCESS);
|
|
629
765
|
}).catch(function (error) {
|
|
630
766
|
_loggerProxy.default.logger.error("Meetings:index#register --> ERROR, Unable to register, ".concat(error.message));
|
|
631
|
-
|
|
632
767
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETINGS_REGISTRATION_FAILED, {
|
|
633
768
|
reason: error.message,
|
|
634
769
|
stack: error.stack
|
|
635
770
|
});
|
|
636
|
-
|
|
637
771
|
return _promise.default.reject(error);
|
|
638
772
|
});
|
|
639
773
|
}
|
|
640
|
-
/**
|
|
641
|
-
* Explicitly tears down the meetings plugin by deregistering
|
|
642
|
-
* the device, disconnecting from mercury, and stops listening to locus events
|
|
643
|
-
*
|
|
644
|
-
* @returns {Promise}
|
|
645
|
-
* @public
|
|
646
|
-
* @memberof Meetings
|
|
647
|
-
*/
|
|
648
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Explicitly tears down the meetings plugin by deregistering
|
|
777
|
+
* the device, disconnecting from mercury, and stops listening to locus events
|
|
778
|
+
*
|
|
779
|
+
* @returns {Promise}
|
|
780
|
+
* @public
|
|
781
|
+
* @memberof Meetings
|
|
782
|
+
*/
|
|
649
783
|
}, {
|
|
650
784
|
key: "unregister",
|
|
651
785
|
value: function unregister() {
|
|
652
786
|
var _this6 = this;
|
|
653
|
-
|
|
654
787
|
if (!this.registered) {
|
|
655
788
|
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');
|
|
656
|
-
|
|
657
789
|
return _promise.default.resolve();
|
|
658
790
|
}
|
|
659
|
-
|
|
660
791
|
this.stopListeningForEvents();
|
|
661
|
-
return
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
792
|
+
return (
|
|
793
|
+
// @ts-ignore
|
|
794
|
+
this.webex.internal.mercury.disconnect()
|
|
795
|
+
// @ts-ignore
|
|
796
|
+
.then(function () {
|
|
797
|
+
return _this6.webex.internal.device.unregister();
|
|
798
|
+
}).then(function () {
|
|
799
|
+
_triggerProxy.default.trigger(_this6, {
|
|
800
|
+
file: 'meetings',
|
|
801
|
+
function: 'unregister'
|
|
802
|
+
}, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
|
|
803
|
+
_this6.registered = false;
|
|
804
|
+
})
|
|
805
|
+
);
|
|
671
806
|
}
|
|
672
|
-
/**
|
|
673
|
-
* Uploads logs to the webex services for tracking
|
|
674
|
-
* @param {Object} [options={}]
|
|
675
|
-
* @param {String} [options.callStart] Call Start Time
|
|
676
|
-
* @param {String} [options.feedbackId] ID used for tracking
|
|
677
|
-
* @param {String} [options.locusId]
|
|
678
|
-
* @param {String} [options.correlationId]
|
|
679
|
-
* @param {String} [options.meetingId] webex meeting ID
|
|
680
|
-
* @param {String} [options.userId] userId
|
|
681
|
-
* @param {String} [options.orgId] org id
|
|
682
|
-
* @returns {String} feedback ID logs were submitted under
|
|
683
|
-
*/
|
|
684
807
|
|
|
808
|
+
/**
|
|
809
|
+
* Creates a noise reduction effect
|
|
810
|
+
*
|
|
811
|
+
* @param {INoiseReductionEffect} options optional custom effect options
|
|
812
|
+
* @returns {Promise<effect>} noise reduction effect.
|
|
813
|
+
* @public
|
|
814
|
+
* @memberof Meetings
|
|
815
|
+
*/
|
|
685
816
|
}, {
|
|
686
817
|
key: "uploadLogs",
|
|
687
|
-
value:
|
|
818
|
+
value:
|
|
819
|
+
/**
|
|
820
|
+
* Uploads logs to the webex services for tracking
|
|
821
|
+
* @param {Object} [options={}]
|
|
822
|
+
* @param {String} [options.callStart] Call Start Time
|
|
823
|
+
* @param {String} [options.feedbackId] ID used for tracking
|
|
824
|
+
* @param {String} [options.locusId]
|
|
825
|
+
* @param {String} [options.correlationId]
|
|
826
|
+
* @param {String} [options.meetingId] webex meeting ID
|
|
827
|
+
* @param {String} [options.userId] userId
|
|
828
|
+
* @param {String} [options.orgId] org id
|
|
829
|
+
* @returns {String} feedback ID logs were submitted under
|
|
830
|
+
*/
|
|
831
|
+
function uploadLogs() {
|
|
688
832
|
var _this7 = this;
|
|
689
|
-
|
|
690
833
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
691
|
-
|
|
692
834
|
_loggerProxy.default.logger.info('Meetings:index#uploadLogs --> uploading logs');
|
|
693
|
-
|
|
694
835
|
return this.loggerRequest.uploadLogs(options).then(function (uploadResult) {
|
|
695
836
|
_loggerProxy.default.logger.info('Meetings:index#uploadLogs --> Upload logs for meeting completed.', uploadResult);
|
|
696
|
-
|
|
697
837
|
_triggerProxy.default.trigger(_this7, {
|
|
698
838
|
file: 'meetings',
|
|
699
839
|
function: 'uploadLogs'
|
|
@@ -701,9 +841,9 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
701
841
|
meetingId: options.meetingId,
|
|
702
842
|
details: uploadResult
|
|
703
843
|
});
|
|
844
|
+
return uploadResult;
|
|
704
845
|
}).catch(function (uploadError) {
|
|
705
846
|
_loggerProxy.default.logger.error('Meetings:index#uploadLogs --> Unable to upload logs for meeting', uploadError);
|
|
706
|
-
|
|
707
847
|
_triggerProxy.default.trigger(_this7, {
|
|
708
848
|
file: 'meetings',
|
|
709
849
|
function: 'uploadLogs'
|
|
@@ -711,8 +851,8 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
711
851
|
meetingId: options.meetingId,
|
|
712
852
|
reason: uploadError
|
|
713
853
|
});
|
|
714
|
-
|
|
715
854
|
_metrics.default.sendBehavioralMetric(_constants2.default.UPLOAD_LOGS_FAILURE, {
|
|
855
|
+
// @ts-ignore - seems like typo
|
|
716
856
|
meetingId: options.meetingsId,
|
|
717
857
|
reason: uploadError.message,
|
|
718
858
|
stack: uploadError.stack,
|
|
@@ -720,109 +860,122 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
720
860
|
});
|
|
721
861
|
});
|
|
722
862
|
}
|
|
723
|
-
/**
|
|
724
|
-
* initializes the reachability instance for Meetings
|
|
725
|
-
* @returns {undefined}
|
|
726
|
-
* @public
|
|
727
|
-
* @memberof Meetings
|
|
728
|
-
*/
|
|
729
863
|
|
|
864
|
+
/**
|
|
865
|
+
* initializes the reachability instance for Meetings
|
|
866
|
+
* @returns {undefined}
|
|
867
|
+
* @public
|
|
868
|
+
* @memberof Meetings
|
|
869
|
+
*/
|
|
730
870
|
}, {
|
|
731
871
|
key: "setReachability",
|
|
732
872
|
value: function setReachability() {
|
|
873
|
+
// @ts-ignore
|
|
733
874
|
this.reachability = new _reachability.default(this.webex);
|
|
734
875
|
}
|
|
735
|
-
/**
|
|
736
|
-
* gets the reachability instance for Meetings
|
|
737
|
-
* @returns {Reachability}
|
|
738
|
-
* @public
|
|
739
|
-
* @memberof Meetings
|
|
740
|
-
*/
|
|
741
876
|
|
|
877
|
+
/**
|
|
878
|
+
* gets the reachability instance for Meetings
|
|
879
|
+
* @returns {Reachability}
|
|
880
|
+
* @public
|
|
881
|
+
* @memberof Meetings
|
|
882
|
+
*/
|
|
742
883
|
}, {
|
|
743
884
|
key: "getReachability",
|
|
744
885
|
value: function getReachability() {
|
|
745
886
|
return this.reachability;
|
|
746
887
|
}
|
|
747
|
-
/**
|
|
748
|
-
* initializes and starts gathering reachability for Meetings
|
|
749
|
-
* @returns {Promise}
|
|
750
|
-
* @public
|
|
751
|
-
* @memberof Meetings
|
|
752
|
-
*/
|
|
753
888
|
|
|
889
|
+
/**
|
|
890
|
+
* initializes and starts gathering reachability for Meetings
|
|
891
|
+
* @returns {Promise}
|
|
892
|
+
* @public
|
|
893
|
+
* @memberof Meetings
|
|
894
|
+
*/
|
|
754
895
|
}, {
|
|
755
896
|
key: "startReachability",
|
|
756
897
|
value: function startReachability() {
|
|
757
898
|
if (!this.reachability) {
|
|
758
899
|
this.setReachability();
|
|
759
900
|
}
|
|
760
|
-
|
|
761
901
|
return this.getReachability().gatherReachability();
|
|
762
902
|
}
|
|
763
|
-
/**
|
|
764
|
-
* Get geoHint for info for meetings
|
|
765
|
-
* @returns {Promise}
|
|
766
|
-
* @private
|
|
767
|
-
* @memberof Meetings
|
|
768
|
-
*/
|
|
769
903
|
|
|
904
|
+
/**
|
|
905
|
+
* Get geoHint for info for meetings
|
|
906
|
+
* @returns {Promise}
|
|
907
|
+
* @private
|
|
908
|
+
* @memberof Meetings
|
|
909
|
+
*/
|
|
770
910
|
}, {
|
|
771
911
|
key: "getGeoHint",
|
|
772
912
|
value: function getGeoHint() {
|
|
773
913
|
var _this8 = this;
|
|
774
|
-
|
|
775
914
|
return this.request.fetchGeoHint().then(function (res) {
|
|
776
915
|
_this8.geoHintInfo = res;
|
|
777
916
|
});
|
|
778
917
|
}
|
|
779
|
-
/**
|
|
780
|
-
* Fetch user preferred webex site information
|
|
781
|
-
* This also has other infomation about the user
|
|
782
|
-
* @returns {Promise}
|
|
783
|
-
* @private
|
|
784
|
-
* @memberof Meetings
|
|
785
|
-
*/
|
|
786
918
|
|
|
919
|
+
/**
|
|
920
|
+
* Fetch user preferred webex site information
|
|
921
|
+
* This also has other infomation about the user
|
|
922
|
+
* @returns {Promise}
|
|
923
|
+
* @private
|
|
924
|
+
* @memberof Meetings
|
|
925
|
+
*/
|
|
787
926
|
}, {
|
|
788
927
|
key: "fetchUserPreferredWebexSite",
|
|
789
928
|
value: function fetchUserPreferredWebexSite() {
|
|
790
929
|
var _this9 = this;
|
|
791
|
-
|
|
792
930
|
return this.request.getMeetingPreferences().then(function (res) {
|
|
793
931
|
if (res) {
|
|
794
932
|
_this9.preferredWebexSite = _util2.default.parseDefaultSiteFromMeetingPreferences(res);
|
|
795
933
|
}
|
|
934
|
+
|
|
935
|
+
// fall back to getting the preferred site from the user information
|
|
936
|
+
if (!_this9.preferredWebexSite) {
|
|
937
|
+
// @ts-ignore
|
|
938
|
+
return _this9.webex.internal.user.get().then(function (user) {
|
|
939
|
+
var _user$userPreferences, _user$userPreferences2;
|
|
940
|
+
var preferredWebexSite = user === null || user === void 0 ? void 0 : (_user$userPreferences = user.userPreferences) === null || _user$userPreferences === void 0 ? void 0 : (_user$userPreferences2 = _user$userPreferences.userPreferencesItems) === null || _user$userPreferences2 === void 0 ? void 0 : _user$userPreferences2.preferredWebExSite;
|
|
941
|
+
if (preferredWebexSite) {
|
|
942
|
+
_this9.preferredWebexSite = preferredWebexSite;
|
|
943
|
+
} else {
|
|
944
|
+
throw new Error('site not found');
|
|
945
|
+
}
|
|
946
|
+
}).catch(function () {
|
|
947
|
+
_loggerProxy.default.logger.error('Failed to fetch preferred site from user - no site will be set');
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
return _promise.default.resolve();
|
|
796
951
|
});
|
|
797
952
|
}
|
|
798
|
-
/**
|
|
799
|
-
* gets the personal meeting room instance, for saved PMR values for this user
|
|
800
|
-
* @returns {PersonalMeetingRoom}
|
|
801
|
-
* @public
|
|
802
|
-
* @memberof Meetings
|
|
803
|
-
*/
|
|
804
953
|
|
|
954
|
+
/**
|
|
955
|
+
* gets the personal meeting room instance, for saved PMR values for this user
|
|
956
|
+
* @returns {PersonalMeetingRoom}
|
|
957
|
+
* @public
|
|
958
|
+
* @memberof Meetings
|
|
959
|
+
*/
|
|
805
960
|
}, {
|
|
806
961
|
key: "getPersonalMeetingRoom",
|
|
807
962
|
value: function getPersonalMeetingRoom() {
|
|
808
963
|
return this.personalMeetingRoom;
|
|
809
964
|
}
|
|
810
|
-
/**
|
|
811
|
-
* @param {Meeting} meeting
|
|
812
|
-
* @param {Object} reason
|
|
813
|
-
* @param {String} type
|
|
814
|
-
* @returns {Undefined}
|
|
815
|
-
* @private
|
|
816
|
-
* @memberof Meetings
|
|
817
|
-
*/
|
|
818
965
|
|
|
966
|
+
/**
|
|
967
|
+
* @param {Meeting} meeting
|
|
968
|
+
* @param {Object} reason
|
|
969
|
+
* @param {String} type
|
|
970
|
+
* @returns {Undefined}
|
|
971
|
+
* @private
|
|
972
|
+
* @memberof Meetings
|
|
973
|
+
*/
|
|
819
974
|
}, {
|
|
820
975
|
key: "destroy",
|
|
821
976
|
value: function destroy(meeting, reason) {
|
|
822
977
|
_util.default.cleanUp(meeting);
|
|
823
|
-
|
|
824
978
|
this.meetingCollection.delete(meeting.id);
|
|
825
|
-
|
|
826
979
|
_triggerProxy.default.trigger(this, {
|
|
827
980
|
file: 'meetings',
|
|
828
981
|
function: 'destroy'
|
|
@@ -831,67 +984,72 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
831
984
|
reason: reason
|
|
832
985
|
});
|
|
833
986
|
}
|
|
834
|
-
/**
|
|
835
|
-
* Create a meeting.
|
|
836
|
-
* @param {string} destination - sipURL, spaceId, phonenumber, or locus object}
|
|
837
|
-
* @param {string} [type] - the optional specified type, such as locusId
|
|
838
|
-
* @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
|
|
839
|
-
* @returns {Promise<Meeting>} A new Meeting.
|
|
840
|
-
* @public
|
|
841
|
-
* @memberof Meetings
|
|
842
|
-
*/
|
|
843
987
|
|
|
988
|
+
/**
|
|
989
|
+
* Create a meeting.
|
|
990
|
+
* @param {string} destination - sipURL, spaceId, phonenumber, or locus object}
|
|
991
|
+
* @param {string} [type] - the optional specified type, such as locusId
|
|
992
|
+
* @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
|
|
993
|
+
* @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
|
|
994
|
+
* @param {string} correlationId - the optional specified correlationId
|
|
995
|
+
* @returns {Promise<Meeting>} A new Meeting.
|
|
996
|
+
* @public
|
|
997
|
+
* @memberof Meetings
|
|
998
|
+
*/
|
|
844
999
|
}, {
|
|
845
1000
|
key: "create",
|
|
846
1001
|
value: function create(destination) {
|
|
847
1002
|
var _this10 = this;
|
|
848
|
-
|
|
849
1003
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
850
1004
|
var useRandomDelayForInfo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1005
|
+
var infoExtraParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
1006
|
+
var correlationId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
|
|
851
1007
|
// TODO: type should be from a dictionary
|
|
1008
|
+
|
|
852
1009
|
// Validate meeting information based on the provided destination and
|
|
853
1010
|
// type. This must be performed prior to determining if the meeting is
|
|
854
1011
|
// found in the collection, as we mutate the destination for hydra person
|
|
855
1012
|
// id values.
|
|
856
|
-
return this.meetingInfo.fetchInfoOptions(destination, type)
|
|
1013
|
+
return this.meetingInfo.fetchInfoOptions(destination, type)
|
|
1014
|
+
// Catch a failure to fetch info options.
|
|
857
1015
|
.catch(function (error) {
|
|
858
1016
|
_loggerProxy.default.logger.info("Meetings:index#create --> INFO, unable to determine info options: ".concat(error.message));
|
|
859
1017
|
}).then(function () {
|
|
860
1018
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
861
1019
|
// Normalize the destination.
|
|
862
|
-
var targetDest = options.destination || destination;
|
|
1020
|
+
var targetDest = options.destination || destination;
|
|
863
1021
|
|
|
1022
|
+
// check for the conversation URL then sip Url
|
|
864
1023
|
var meeting = null;
|
|
865
|
-
|
|
866
1024
|
if (type === _constants._CONVERSATION_URL_ || options.type === _constants._CONVERSATION_URL_) {
|
|
867
1025
|
var foundMeeting = _this10.meetingCollection.getByKey(_constants.CONVERSATION_URL, targetDest);
|
|
868
|
-
|
|
869
1026
|
if (foundMeeting) {
|
|
870
|
-
var foundMeetingIsNotCalendarMeeting = !foundMeeting.locusInfo.scheduledMeeting;
|
|
871
|
-
// This allows for the creation of instant-meetings when calendar meetings are present.
|
|
1027
|
+
var foundMeetingIsNotCalendarMeeting = !foundMeeting.locusInfo.scheduledMeeting;
|
|
872
1028
|
|
|
1029
|
+
// If the found meeting is not a calendar meeting, return that meeting.
|
|
1030
|
+
// This allows for the creation of instant-meetings when calendar meetings are present.
|
|
873
1031
|
if (foundMeetingIsNotCalendarMeeting) {
|
|
874
1032
|
meeting = foundMeeting;
|
|
875
1033
|
}
|
|
876
1034
|
}
|
|
877
|
-
}
|
|
878
|
-
|
|
1035
|
+
}
|
|
879
1036
|
|
|
1037
|
+
// Attempt to collect the meeting if it exists.
|
|
880
1038
|
if (!meeting) {
|
|
881
1039
|
meeting = _this10.meetingCollection.getByKey(_constants.SIP_URI, targetDest);
|
|
882
|
-
}
|
|
883
|
-
|
|
1040
|
+
}
|
|
884
1041
|
|
|
1042
|
+
// Validate if a meeting was found.
|
|
885
1043
|
if (!meeting) {
|
|
886
1044
|
// Create a meeting based on the normalized destination and type.
|
|
887
|
-
return _this10.createMeeting(targetDest, type, useRandomDelayForInfo).then(function (createdMeeting) {
|
|
1045
|
+
return _this10.createMeeting(targetDest, type, useRandomDelayForInfo, infoExtraParams, correlationId).then(function (createdMeeting) {
|
|
888
1046
|
// If the meeting was successfully created.
|
|
889
1047
|
if (createdMeeting && createdMeeting.on) {
|
|
890
1048
|
// Create a destruction event for the meeting.
|
|
891
1049
|
createdMeeting.on(_constants.EVENTS.DESTROY_MEETING, function (payload) {
|
|
1050
|
+
// @ts-ignore
|
|
892
1051
|
if (_this10.config.autoUploadLogs) {
|
|
893
1052
|
var _createdMeeting$locus, _createdMeeting$locus2, _createdMeeting$locus3, _createdMeeting$locus4;
|
|
894
|
-
|
|
895
1053
|
_this10.uploadLogs({
|
|
896
1054
|
callStart: (_createdMeeting$locus = createdMeeting.locusInfo) === null || _createdMeeting$locus === void 0 ? void 0 : (_createdMeeting$locus2 = _createdMeeting$locus.fullState) === null || _createdMeeting$locus2 === void 0 ? void 0 : _createdMeeting$locus2.lastActive,
|
|
897
1055
|
correlationId: createdMeeting.correlationId,
|
|
@@ -906,9 +1064,9 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
906
1064
|
}
|
|
907
1065
|
});
|
|
908
1066
|
createdMeeting.on(_constants.EVENTS.REQUEST_UPLOAD_LOGS, function (meetingInstance) {
|
|
1067
|
+
// @ts-ignore
|
|
909
1068
|
if (_this10.config.autoUploadLogs) {
|
|
910
1069
|
var _meetingInstance$locu, _meetingInstance$locu2, _meetingInstance$locu3, _meetingInstance$locu4;
|
|
911
|
-
|
|
912
1070
|
_this10.uploadLogs({
|
|
913
1071
|
callStart: meetingInstance === null || meetingInstance === void 0 ? void 0 : (_meetingInstance$locu = meetingInstance.locusInfo) === null || _meetingInstance$locu === void 0 ? void 0 : (_meetingInstance$locu2 = _meetingInstance$locu.fullState) === null || _meetingInstance$locu2 === void 0 ? void 0 : _meetingInstance$locu2.lastActive,
|
|
914
1072
|
correlationId: meetingInstance.correlationId,
|
|
@@ -920,183 +1078,176 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
920
1078
|
});
|
|
921
1079
|
} else {
|
|
922
1080
|
_loggerProxy.default.logger.error("Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ".concat(meeting));
|
|
923
|
-
}
|
|
924
|
-
|
|
1081
|
+
}
|
|
925
1082
|
|
|
1083
|
+
// Return the newly created meeting.
|
|
926
1084
|
return _promise.default.resolve(createdMeeting);
|
|
927
1085
|
});
|
|
928
|
-
}
|
|
929
|
-
|
|
1086
|
+
}
|
|
930
1087
|
|
|
1088
|
+
// Return the existing meeting.
|
|
931
1089
|
return _promise.default.resolve(meeting);
|
|
932
1090
|
});
|
|
933
1091
|
}
|
|
934
|
-
/**
|
|
935
|
-
* @param {String} destination see create()
|
|
936
|
-
* @param {String} type see create()
|
|
937
|
-
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
938
|
-
* @returns {Promise} a new meeting instance complete with meeting info and destination
|
|
939
|
-
* @private
|
|
940
|
-
* @memberof Meetings
|
|
941
|
-
*/
|
|
942
1092
|
|
|
1093
|
+
/**
|
|
1094
|
+
* @param {String} destination see create()
|
|
1095
|
+
* @param {String} type see create()
|
|
1096
|
+
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
1097
|
+
* @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
|
|
1098
|
+
* @param {String} correlationId the optional specified correlationId
|
|
1099
|
+
* @returns {Promise} a new meeting instance complete with meeting info and destination
|
|
1100
|
+
* @private
|
|
1101
|
+
* @memberof Meetings
|
|
1102
|
+
*/
|
|
943
1103
|
}, {
|
|
944
1104
|
key: "createMeeting",
|
|
945
1105
|
value: function () {
|
|
946
|
-
var _createMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1106
|
+
var _createMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(destination) {
|
|
947
1107
|
var type,
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
//
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
return meeting.fetchMeetingInfo({});
|
|
1007
|
-
}, waitingTime);
|
|
1008
|
-
meeting.parseMeetingInfo(undefined, destination);
|
|
1009
|
-
_context.next = 16;
|
|
1010
|
-
break;
|
|
1011
|
-
|
|
1012
|
-
case 14:
|
|
1013
|
-
_context.next = 16;
|
|
1014
|
-
return meeting.fetchMeetingInfo({});
|
|
1015
|
-
|
|
1016
|
-
case 16:
|
|
1017
|
-
_context.next = 22;
|
|
1108
|
+
useRandomDelayForInfo,
|
|
1109
|
+
infoExtraParams,
|
|
1110
|
+
correlationId,
|
|
1111
|
+
meeting,
|
|
1112
|
+
_destination$fullStat,
|
|
1113
|
+
waitingTime,
|
|
1114
|
+
startTime,
|
|
1115
|
+
startTimeDate,
|
|
1116
|
+
startTimeDatestamp,
|
|
1117
|
+
timeToStart,
|
|
1118
|
+
maxWaitingTime,
|
|
1119
|
+
isMeetingActive,
|
|
1120
|
+
enableUnifiedMeetings,
|
|
1121
|
+
meetingAddedType,
|
|
1122
|
+
_args3 = arguments;
|
|
1123
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
1124
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1125
|
+
case 0:
|
|
1126
|
+
type = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : null;
|
|
1127
|
+
useRandomDelayForInfo = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : false;
|
|
1128
|
+
infoExtraParams = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : {};
|
|
1129
|
+
correlationId = _args3.length > 4 && _args3[4] !== undefined ? _args3[4] : undefined;
|
|
1130
|
+
meeting = new _meeting.default({
|
|
1131
|
+
// @ts-ignore
|
|
1132
|
+
userId: this.webex.internal.device.userId,
|
|
1133
|
+
// @ts-ignore
|
|
1134
|
+
deviceUrl: this.webex.internal.device.url,
|
|
1135
|
+
// @ts-ignore
|
|
1136
|
+
orgId: this.webex.internal.device.orgId,
|
|
1137
|
+
locus: type === _constants._LOCUS_ID_ ? destination : null,
|
|
1138
|
+
// pass the locus object if present
|
|
1139
|
+
meetingInfoProvider: this.meetingInfo,
|
|
1140
|
+
destination: destination,
|
|
1141
|
+
destinationType: type,
|
|
1142
|
+
correlationId: correlationId
|
|
1143
|
+
}, {
|
|
1144
|
+
// @ts-ignore
|
|
1145
|
+
parent: this.webex
|
|
1146
|
+
});
|
|
1147
|
+
this.meetingCollection.set(meeting);
|
|
1148
|
+
_context3.prev = 6;
|
|
1149
|
+
// if no participant has joined the scheduled meeting (meaning meeting is not active) and we get a locusEvent,
|
|
1150
|
+
// it means the meeting will start in 5-6 min. In that case, we want to fetchMeetingInfo
|
|
1151
|
+
// between 5 and 2 min (random between 3 minutes) before the meeting starts
|
|
1152
|
+
// to avoid a spike in traffic to the wbxappi service
|
|
1153
|
+
waitingTime = 0;
|
|
1154
|
+
if (destination.meeting) {
|
|
1155
|
+
startTime = destination.meeting.startTime;
|
|
1156
|
+
startTimeDate = new Date(startTime);
|
|
1157
|
+
startTimeDatestamp = startTimeDate.getTime();
|
|
1158
|
+
timeToStart = startTimeDatestamp - (0, _now.default)();
|
|
1159
|
+
maxWaitingTime = Math.max(Math.min(timeToStart, _constants.MAX_RANDOM_DELAY_FOR_MEETING_INFO), 0);
|
|
1160
|
+
waitingTime = Math.round(Math.random() * maxWaitingTime);
|
|
1161
|
+
}
|
|
1162
|
+
isMeetingActive = !!((_destination$fullStat = destination.fullState) !== null && _destination$fullStat !== void 0 && _destination$fullStat.active); // @ts-ignore
|
|
1163
|
+
enableUnifiedMeetings = this.config.experimental.enableUnifiedMeetings;
|
|
1164
|
+
if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
|
|
1165
|
+
_context3.next = 16;
|
|
1018
1166
|
break;
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
type: meetingAddedType
|
|
1054
|
-
});
|
|
1167
|
+
}
|
|
1168
|
+
meeting.fetchMeetingInfoTimeoutId = setTimeout(function () {
|
|
1169
|
+
return meeting.fetchMeetingInfo({
|
|
1170
|
+
extraParams: infoExtraParams
|
|
1171
|
+
});
|
|
1172
|
+
}, waitingTime);
|
|
1173
|
+
meeting.parseMeetingInfo(undefined, destination);
|
|
1174
|
+
_context3.next = 18;
|
|
1175
|
+
break;
|
|
1176
|
+
case 16:
|
|
1177
|
+
_context3.next = 18;
|
|
1178
|
+
return meeting.fetchMeetingInfo({
|
|
1179
|
+
extraParams: infoExtraParams
|
|
1180
|
+
});
|
|
1181
|
+
case 18:
|
|
1182
|
+
_context3.next = 24;
|
|
1183
|
+
break;
|
|
1184
|
+
case 20:
|
|
1185
|
+
_context3.prev = 20;
|
|
1186
|
+
_context3.t0 = _context3["catch"](6);
|
|
1187
|
+
if (!(_context3.t0 instanceof _captchaError.default) && !(_context3.t0 instanceof _passwordError.default) && !(_context3.t0 instanceof _permission.default)) {
|
|
1188
|
+
// if there is no meeting info we assume its a 1:1 call or wireless share
|
|
1189
|
+
_loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
|
|
1190
|
+
_loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
|
|
1191
|
+
}
|
|
1192
|
+
_loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context3.t0, " fetching /meetingInfo for creation."));
|
|
1193
|
+
case 24:
|
|
1194
|
+
_context3.prev = 24;
|
|
1195
|
+
// For type LOCUS_ID we need to parse the locus object to get the information
|
|
1196
|
+
// about the caller and callee
|
|
1197
|
+
// Meeting Added event will be created in `handleLocusEvent`
|
|
1198
|
+
if (type !== _constants._LOCUS_ID_) {
|
|
1199
|
+
if (!meeting.sipUri) {
|
|
1200
|
+
meeting.setSipUri(destination);
|
|
1055
1201
|
}
|
|
1056
1202
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1203
|
+
// TODO: check if we have to move this to parser
|
|
1204
|
+
meetingAddedType = _util2.default.getMeetingAddedType(type); // We typically shouldn't need to trigger both and event and return a promise.
|
|
1205
|
+
// Is this a special case? We want to make the public API usage as simple as possible.
|
|
1206
|
+
_triggerProxy.default.trigger(this, {
|
|
1207
|
+
file: 'meetings',
|
|
1208
|
+
function: 'createMeeting'
|
|
1209
|
+
}, _constants.EVENT_TRIGGERS.MEETING_ADDED, {
|
|
1210
|
+
meeting: meeting,
|
|
1211
|
+
type: meetingAddedType
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
return _context3.finish(24);
|
|
1215
|
+
case 27:
|
|
1216
|
+
return _context3.abrupt("return", meeting);
|
|
1217
|
+
case 28:
|
|
1218
|
+
case "end":
|
|
1219
|
+
return _context3.stop();
|
|
1066
1220
|
}
|
|
1067
|
-
},
|
|
1221
|
+
}, _callee3, this, [[6, 20, 24, 27]]);
|
|
1068
1222
|
}));
|
|
1069
|
-
|
|
1070
|
-
function createMeeting(_x) {
|
|
1223
|
+
function createMeeting(_x3) {
|
|
1071
1224
|
return _createMeeting.apply(this, arguments);
|
|
1072
1225
|
}
|
|
1073
|
-
|
|
1074
1226
|
return createMeeting;
|
|
1075
1227
|
}()
|
|
1076
1228
|
/**
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1229
|
+
* get a specifc meeting given it's type matched to the value, i.e., locus url
|
|
1230
|
+
* @param {String} type
|
|
1231
|
+
* @param {Object} value
|
|
1232
|
+
* @returns {Meeting}
|
|
1233
|
+
* @public
|
|
1234
|
+
* @memberof Meetings
|
|
1235
|
+
*/
|
|
1085
1236
|
}, {
|
|
1086
1237
|
key: "getMeetingByType",
|
|
1087
1238
|
value: function getMeetingByType(type, value) {
|
|
1088
1239
|
return this.meetingCollection.getByKey(type, value);
|
|
1089
1240
|
}
|
|
1090
|
-
/**
|
|
1091
|
-
* Get all meetings.
|
|
1092
|
-
* @param {object} options
|
|
1093
|
-
* @param {object} options.startDate - get meetings after this start date
|
|
1094
|
-
* @param {object} options.endDate - get meetings before this end date
|
|
1095
|
-
* @returns {Object} All currently active meetings.
|
|
1096
|
-
* @public
|
|
1097
|
-
* @memberof Meetings
|
|
1098
|
-
*/
|
|
1099
1241
|
|
|
1242
|
+
/**
|
|
1243
|
+
* Get all meetings.
|
|
1244
|
+
* @param {object} options
|
|
1245
|
+
* @param {object} options.startDate - get meetings after this start date
|
|
1246
|
+
* @param {object} options.endDate - get meetings before this end date
|
|
1247
|
+
* @returns {Object} All currently active meetings.
|
|
1248
|
+
* @public
|
|
1249
|
+
* @memberof Meetings
|
|
1250
|
+
*/
|
|
1100
1251
|
}, {
|
|
1101
1252
|
key: "getAllMeetings",
|
|
1102
1253
|
value: function getAllMeetings() {
|
|
@@ -1105,57 +1256,128 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1105
1256
|
// of meetings.
|
|
1106
1257
|
return this.meetingCollection.getAll(options);
|
|
1107
1258
|
}
|
|
1108
|
-
/**
|
|
1109
|
-
* syncs all the meeting from server
|
|
1110
|
-
* @returns {undefined}
|
|
1111
|
-
* @public
|
|
1112
|
-
* @memberof Meetings
|
|
1113
|
-
*/
|
|
1114
1259
|
|
|
1260
|
+
/**
|
|
1261
|
+
* syncs all the meeting from server
|
|
1262
|
+
* @returns {undefined}
|
|
1263
|
+
* @public
|
|
1264
|
+
* @memberof Meetings
|
|
1265
|
+
*/
|
|
1115
1266
|
}, {
|
|
1116
1267
|
key: "syncMeetings",
|
|
1117
1268
|
value: function syncMeetings() {
|
|
1118
1269
|
var _this11 = this;
|
|
1119
|
-
|
|
1120
1270
|
return this.request.getActiveMeetings().then(function (locusArray) {
|
|
1121
1271
|
var activeLocusUrl = [];
|
|
1122
|
-
|
|
1123
1272
|
if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
|
|
1124
|
-
locusArray.loci
|
|
1273
|
+
var lociToUpdate = _this11.sortLocusArrayToUpdate(locusArray.loci);
|
|
1274
|
+
lociToUpdate.forEach(function (locus) {
|
|
1125
1275
|
activeLocusUrl.push(locus.url);
|
|
1126
|
-
|
|
1127
1276
|
_this11.handleLocusEvent({
|
|
1128
1277
|
locus: locus,
|
|
1129
1278
|
locusUrl: locus.url
|
|
1130
1279
|
});
|
|
1131
1280
|
});
|
|
1132
1281
|
}
|
|
1133
|
-
|
|
1134
1282
|
var meetingsCollection = _this11.meetingCollection.getAll();
|
|
1135
|
-
|
|
1136
1283
|
if ((0, _keys.default)(meetingsCollection).length > 0) {
|
|
1137
1284
|
// Some time the mercury event is missed after mercury reconnect
|
|
1138
1285
|
// if sync returns no locus then clear all the meetings
|
|
1139
1286
|
for (var _i = 0, _Object$values = (0, _values.default)(meetingsCollection); _i < _Object$values.length; _i++) {
|
|
1140
1287
|
var meeting = _Object$values[_i];
|
|
1141
|
-
|
|
1288
|
+
// @ts-ignore
|
|
1142
1289
|
if (!activeLocusUrl.includes(meeting.locusUrl)) {
|
|
1143
1290
|
// destroy function also uploads logs
|
|
1291
|
+
// @ts-ignore
|
|
1144
1292
|
_this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
1145
1293
|
}
|
|
1146
1294
|
}
|
|
1147
1295
|
}
|
|
1296
|
+
}).catch(function (error) {
|
|
1297
|
+
_loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(error));
|
|
1298
|
+
throw new Error(error);
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* sort out locus array for initial creating
|
|
1304
|
+
* @param {Array} loci original locus array
|
|
1305
|
+
* @returns {undefined}
|
|
1306
|
+
* @public
|
|
1307
|
+
* @memberof Meetings
|
|
1308
|
+
*/
|
|
1309
|
+
}, {
|
|
1310
|
+
key: "sortLocusArrayToUpdate",
|
|
1311
|
+
value: function sortLocusArrayToUpdate(loci) {
|
|
1312
|
+
var _this12 = this;
|
|
1313
|
+
var mainLoci = loci.filter(function (locus) {
|
|
1314
|
+
return !_util2.default.isBreakoutLocusDTO(locus);
|
|
1315
|
+
});
|
|
1316
|
+
var breakoutLoci = loci.filter(function (locus) {
|
|
1317
|
+
return _util2.default.isValidBreakoutLocus(locus);
|
|
1318
|
+
});
|
|
1319
|
+
this.breakoutLocusForHandleLater = [];
|
|
1320
|
+
var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
|
|
1321
|
+
breakoutLoci.forEach(function (breakoutLocus) {
|
|
1322
|
+
var associateMainLocus = mainLoci.find(function (mainLocus) {
|
|
1323
|
+
var _mainLocus$controls, _mainLocus$controls$b, _breakoutLocus$contro, _breakoutLocus$contro2;
|
|
1324
|
+
return ((_mainLocus$controls = mainLocus.controls) === null || _mainLocus$controls === void 0 ? void 0 : (_mainLocus$controls$b = _mainLocus$controls.breakout) === null || _mainLocus$controls$b === void 0 ? void 0 : _mainLocus$controls$b.url) === ((_breakoutLocus$contro = breakoutLocus.controls) === null || _breakoutLocus$contro === void 0 ? void 0 : (_breakoutLocus$contro2 = _breakoutLocus$contro.breakout) === null || _breakoutLocus$contro2 === void 0 ? void 0 : _breakoutLocus$contro2.url);
|
|
1325
|
+
});
|
|
1326
|
+
var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
|
|
1327
|
+
locus: breakoutLocus,
|
|
1328
|
+
locusUrl: breakoutLocus.url
|
|
1329
|
+
});
|
|
1330
|
+
if (associateMainLocus && !existCorrespondingMeeting) {
|
|
1331
|
+
// if exists both main session and breakout session locus of the same non-exist meeting, handle main locus first,
|
|
1332
|
+
// after meeting create with main locus, then handle the associate breakout locus.
|
|
1333
|
+
// if only handle breakout locus, will miss some date
|
|
1334
|
+
_this12.breakoutLocusForHandleLater.push(breakoutLocus);
|
|
1335
|
+
} else {
|
|
1336
|
+
lociToUpdate.push(breakoutLocus);
|
|
1337
|
+
}
|
|
1148
1338
|
});
|
|
1339
|
+
return lociToUpdate;
|
|
1149
1340
|
}
|
|
1341
|
+
|
|
1150
1342
|
/**
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1343
|
+
* check breakout locus which waiting for main locus's meeting to be created, then handle the breakout locus
|
|
1344
|
+
* @param {Object} newCreatedLocus the locus which just create meeting object of it
|
|
1345
|
+
* @returns {undefined}
|
|
1346
|
+
* @public
|
|
1347
|
+
* @memberof Meetings
|
|
1348
|
+
*/
|
|
1349
|
+
}, {
|
|
1350
|
+
key: "checkHandleBreakoutLocus",
|
|
1351
|
+
value: function checkHandleBreakoutLocus(newCreatedLocus) {
|
|
1352
|
+
if (!newCreatedLocus || !this.breakoutLocusForHandleLater || !this.breakoutLocusForHandleLater.length) {
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1355
|
+
if (_util2.default.isBreakoutLocusDTO(newCreatedLocus)) {
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
var existIndex = this.breakoutLocusForHandleLater.findIndex(function (breakoutLocus) {
|
|
1359
|
+
var _breakoutLocus$contro3, _breakoutLocus$contro4, _newCreatedLocus$cont, _newCreatedLocus$cont2;
|
|
1360
|
+
return ((_breakoutLocus$contro3 = breakoutLocus.controls) === null || _breakoutLocus$contro3 === void 0 ? void 0 : (_breakoutLocus$contro4 = _breakoutLocus$contro3.breakout) === null || _breakoutLocus$contro4 === void 0 ? void 0 : _breakoutLocus$contro4.url) === ((_newCreatedLocus$cont = newCreatedLocus.controls) === null || _newCreatedLocus$cont === void 0 ? void 0 : (_newCreatedLocus$cont2 = _newCreatedLocus$cont.breakout) === null || _newCreatedLocus$cont2 === void 0 ? void 0 : _newCreatedLocus$cont2.url);
|
|
1361
|
+
});
|
|
1362
|
+
if (existIndex < 0) {
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
var associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
|
|
1366
|
+
this.handleLocusEvent({
|
|
1367
|
+
locus: associateBreakoutLocus,
|
|
1368
|
+
locusUrl: associateBreakoutLocus.url
|
|
1369
|
+
});
|
|
1370
|
+
this.breakoutLocusForHandleLater.splice(existIndex, 1);
|
|
1371
|
+
}
|
|
1158
1372
|
|
|
1373
|
+
/**
|
|
1374
|
+
* Get all scheduled meetings.
|
|
1375
|
+
* @param {object} options
|
|
1376
|
+
* @param {object} options.startDate - get meetings after this start date
|
|
1377
|
+
* @param {object} options.endDate - get meetings before this end date
|
|
1378
|
+
* @returns {Object} All scheduled meetings.
|
|
1379
|
+
* @memberof Meetings
|
|
1380
|
+
*/
|
|
1159
1381
|
}, {
|
|
1160
1382
|
key: "getScheduledMeetings",
|
|
1161
1383
|
value: function getScheduledMeetings() {
|
|
@@ -1163,11 +1385,11 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1163
1385
|
scheduled: true
|
|
1164
1386
|
});
|
|
1165
1387
|
}
|
|
1166
|
-
/**
|
|
1167
|
-
* Get the logger instance for plugin-meetings
|
|
1168
|
-
* @returns {Logger}
|
|
1169
|
-
*/
|
|
1170
1388
|
|
|
1389
|
+
/**
|
|
1390
|
+
* Get the logger instance for plugin-meetings
|
|
1391
|
+
* @returns {Logger}
|
|
1392
|
+
*/
|
|
1171
1393
|
}, {
|
|
1172
1394
|
key: "getLogger",
|
|
1173
1395
|
value: function getLogger() {
|
|
@@ -1176,6 +1398,5 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1176
1398
|
}]);
|
|
1177
1399
|
return Meetings;
|
|
1178
1400
|
}(_webexCore.WebexPlugin);
|
|
1179
|
-
|
|
1180
1401
|
exports.default = Meetings;
|
|
1181
1402
|
//# sourceMappingURL=index.js.map
|