@webex/plugin-meetings 3.0.0-beta.9 → 3.0.0-beta.90
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/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 +48 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +325 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +180 -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/index.js +868 -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 +5 -26
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +5 -26
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +6 -27
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +5 -26
- 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 +5 -26
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +4 -25
- 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 +5 -26
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +5 -26
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +6 -41
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -24
- 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 +35 -61
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +7 -6
- package/dist/config.js.map +1 -1
- package/dist/constants.js +167 -52
- 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 +25 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +292 -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 +250 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +72 -17
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +56 -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 +325 -208
- 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 +12 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +88 -123
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +87 -91
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +62 -147
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +71 -117
- 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 +35 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2249 -2269
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +252 -113
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +318 -283
- 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 +69 -217
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +10 -33
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +258 -281
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -16
- 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 +154 -232
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +24 -20
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +573 -587
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +23 -42
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +164 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +80 -88
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +15 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +90 -69
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +12 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +162 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +58 -53
- 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 +107 -44
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +4 -14
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +3 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +56 -159
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +167 -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 +74 -93
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +55 -74
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +6 -40
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +466 -442
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +32 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +10 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -33
- 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 +190 -199
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +14 -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 +326 -465
- 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 +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +38 -67
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +143 -134
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +149 -101
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +369 -461
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +144 -94
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +13 -45
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +33 -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/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 +32 -0
- package/dist/types/config.d.ts +78 -0
- package/dist/types/constants.d.ts +963 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +13 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +37 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -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 +314 -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 +212 -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 +108 -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 +105 -0
- package/dist/types/meeting/index.d.ts +1727 -0
- package/dist/types/meeting/muteState.d.ts +185 -0
- package/dist/types/meeting/request.d.ts +275 -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 +2 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +57 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +111 -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 +316 -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 +156 -0
- package/dist/types/member/types.d.ts +21 -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 +69 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +2 -0
- package/dist/types/metrics/config.d.ts +171 -0
- package/dist/types/metrics/constants.d.ts +54 -0
- package/dist/types/metrics/index.d.ts +152 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +101 -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 +263 -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 +193 -0
- package/dist/types/recording-controller/util.d.ts +13 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +38 -0
- package/dist/types/roap/turnDiscovery.d.ts +88 -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 +28 -20
- package/src/annotation/annotation.types.ts +37 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +314 -0
- package/src/breakouts/README.md +219 -0
- package/src/breakouts/breakout.ts +154 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/index.ts +776 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/browser-detection.ts +9 -6
- package/src/common/collection.ts +3 -1
- package/src/common/errors/captcha-error.ts +6 -6
- package/src/common/errors/intent-to-join.ts +6 -6
- package/src/common/errors/join-meeting.ts +12 -8
- package/src/common/errors/media.ts +6 -6
- package/src/common/errors/parameter.ts +9 -6
- package/src/common/errors/password-error.ts +6 -6
- package/src/common/errors/permission.ts +5 -5
- package/src/common/errors/reconnection.ts +6 -6
- package/src/common/errors/stats.ts +6 -6
- package/src/common/errors/webex-errors.ts +7 -5
- package/src/common/errors/webex-meetings-error.ts +1 -1
- package/src/common/events/events-scope.ts +5 -1
- package/src/common/events/events.ts +5 -1
- package/src/common/events/trigger-proxy.ts +8 -3
- package/src/common/events/util.ts +1 -2
- package/src/common/logs/logger-proxy.ts +21 -10
- package/src/common/logs/request.ts +11 -8
- package/src/config.ts +17 -12
- package/src/constants.ts +114 -6
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +16 -0
- package/src/controls-options-manager/index.ts +275 -0
- package/src/controls-options-manager/types.ts +49 -0
- package/src/controls-options-manager/util.ts +229 -0
- package/src/index.ts +33 -0
- package/src/locus-info/controlsUtils.ts +91 -24
- package/src/locus-info/fullState.ts +15 -11
- package/src/locus-info/hostUtils.ts +4 -3
- package/src/locus-info/index.ts +265 -51
- package/src/locus-info/infoUtils.ts +16 -4
- package/src/locus-info/mediaSharesUtils.ts +4 -4
- package/src/locus-info/parser.ts +46 -68
- package/src/locus-info/selfUtils.ts +178 -57
- package/src/media/index.ts +142 -172
- package/src/media/properties.ts +43 -36
- package/src/media/util.ts +1 -1
- package/src/mediaQualityMetrics/config.ts +380 -378
- package/src/meeting/in-meeting-actions.ts +75 -3
- package/src/meeting/index.ts +2484 -1524
- package/src/meeting/muteState.ts +271 -68
- package/src/meeting/request.ts +251 -132
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/state.ts +45 -30
- package/src/meeting/util.ts +132 -111
- package/src/meeting-info/collection.ts +2 -1
- package/src/meeting-info/index.ts +32 -30
- package/src/meeting-info/meeting-info-v2.ts +178 -109
- package/src/meeting-info/request.ts +9 -3
- package/src/meeting-info/util.ts +54 -46
- package/src/meeting-info/utilv2.ts +69 -57
- package/src/meetings/collection.ts +21 -1
- package/src/meetings/index.ts +687 -467
- package/src/meetings/request.ts +29 -25
- package/src/meetings/util.ts +108 -33
- package/src/member/index.ts +86 -49
- package/src/member/types.ts +24 -0
- package/src/member/util.ts +92 -13
- package/src/members/collection.ts +8 -1
- package/src/members/index.ts +281 -129
- package/src/members/request.ts +87 -14
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +140 -49
- package/src/metrics/config.ts +255 -90
- package/src/metrics/constants.ts +1 -6
- package/src/metrics/index.ts +91 -94
- package/src/multistream/mediaRequestManager.ts +201 -43
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +62 -38
- package/src/multistream/remoteMedia.ts +30 -4
- package/src/multistream/remoteMediaGroup.ts +4 -3
- package/src/multistream/remoteMediaManager.ts +230 -66
- package/src/networkQualityMonitor/index.ts +24 -27
- package/src/personal-meeting-room/index.ts +12 -16
- package/src/personal-meeting-room/request.ts +10 -3
- package/src/personal-meeting-room/util.ts +3 -3
- package/src/reachability/index.ts +131 -79
- package/src/reachability/request.ts +43 -34
- 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.ts +193 -111
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/index.ts +63 -51
- package/src/roap/request.ts +86 -53
- package/src/roap/turnDiscovery.ts +105 -46
- package/src/statsAnalyzer/global.ts +8 -104
- package/src/statsAnalyzer/index.ts +624 -376
- package/src/statsAnalyzer/mqaUtil.ts +203 -90
- package/src/transcription/index.ts +34 -32
- package/test/integration/spec/converged-space-meetings.js +177 -0
- package/test/integration/spec/journey.js +666 -464
- package/test/integration/spec/space-meeting.js +320 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +420 -0
- package/test/unit/spec/breakouts/breakout.ts +178 -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/index.ts +1416 -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/controls-options-manager/index.js +280 -0
- package/test/unit/spec/controls-options-manager/util.js +403 -0
- package/test/unit/spec/fixture/locus.js +92 -90
- package/test/unit/spec/locus-info/controlsUtils.js +177 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +484 -3
- 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/parser.js +3 -9
- package/test/unit/spec/locus-info/selfConstant.js +101 -103
- package/test/unit/spec/locus-info/selfUtils.js +191 -12
- package/test/unit/spec/media/index.ts +104 -8
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +34 -3
- package/test/unit/spec/meeting/index.js +2651 -829
- package/test/unit/spec/meeting/muteState.js +368 -70
- package/test/unit/spec/meeting/request.js +217 -43
- package/test/unit/spec/meeting/utils.js +167 -163
- package/test/unit/spec/meeting-info/meetinginfov2.js +241 -74
- 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 +110 -74
- package/test/unit/spec/meetings/collection.js +15 -1
- package/test/unit/spec/meetings/index.js +701 -273
- package/test/unit/spec/meetings/utils.js +105 -14
- package/test/unit/spec/member/index.js +24 -1
- package/test/unit/spec/member/util.js +359 -32
- package/test/unit/spec/members/index.js +402 -54
- package/test/unit/spec/members/request.js +76 -20
- package/test/unit/spec/members/utils.js +191 -4
- package/test/unit/spec/metrics/index.js +46 -20
- package/test/unit/spec/multistream/mediaRequestManager.ts +650 -105
- package/test/unit/spec/multistream/receiveSlot.ts +76 -17
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +32 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +549 -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 +62 -31
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +21 -16
- package/test/unit/spec/roap/request.ts +217 -0
- package/test/unit/spec/roap/turnDiscovery.ts +93 -49
- 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 +64 -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 -334
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/src/index.js +0 -15
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/meeting/effectsState.ts +0 -211
- package/src/multistream/multistreamMedia.ts +0 -92
- package/test/unit/spec/meeting/effectsState.js +0 -291
package/src/meetings/index.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
/* eslint no-shadow: ["error", { "allow": ["eventType"] }] */
|
|
2
|
+
|
|
1
3
|
import '@webex/internal-plugin-mercury';
|
|
2
4
|
import '@webex/internal-plugin-conversation';
|
|
3
5
|
// @ts-ignore
|
|
4
6
|
import {WebexPlugin} from '@webex/webex-core';
|
|
5
|
-
import {
|
|
7
|
+
import {setLogger} from '@webex/internal-media-core';
|
|
8
|
+
|
|
9
|
+
import * as mediaHelpersModule from '@webex/media-helpers';
|
|
6
10
|
|
|
7
11
|
import 'webrtc-adapter';
|
|
8
12
|
|
|
@@ -37,7 +41,11 @@ import {
|
|
|
37
41
|
_ID_,
|
|
38
42
|
MEETING_REMOVED_REASON,
|
|
39
43
|
_CONVERSATION_URL_,
|
|
40
|
-
CONVERSATION_URL
|
|
44
|
+
CONVERSATION_URL,
|
|
45
|
+
MEETINGNUMBER,
|
|
46
|
+
BREAKOUTS,
|
|
47
|
+
_JOINED_,
|
|
48
|
+
_MOVED_,
|
|
41
49
|
} from '../constants';
|
|
42
50
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
43
51
|
import MeetingInfo from '../meeting-info';
|
|
@@ -45,12 +53,13 @@ import MeetingInfoV2 from '../meeting-info/meeting-info-v2';
|
|
|
45
53
|
import Meeting from '../meeting';
|
|
46
54
|
import PersonalMeetingRoom from '../personal-meeting-room';
|
|
47
55
|
import Reachability from '../reachability';
|
|
48
|
-
import Request from '
|
|
56
|
+
import Request from './request';
|
|
49
57
|
import PasswordError from '../common/errors/password-error';
|
|
50
58
|
import CaptchaError from '../common/errors/captcha-error';
|
|
51
59
|
|
|
52
60
|
import MeetingCollection from './collection';
|
|
53
61
|
import MeetingsUtil from './util';
|
|
62
|
+
import PermissionError from '../common/errors/permission';
|
|
54
63
|
|
|
55
64
|
let mediaLogger;
|
|
56
65
|
|
|
@@ -80,21 +89,21 @@ class MediaLogger {
|
|
|
80
89
|
}
|
|
81
90
|
}
|
|
82
91
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
* Meetings Ready Event
|
|
93
|
+
* Emitted when the meetings instance on webex is ready
|
|
94
|
+
* @event meetings:ready
|
|
95
|
+
* @instance
|
|
96
|
+
* @memberof Meetings
|
|
97
|
+
*/
|
|
89
98
|
|
|
90
99
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
* Meetings Network Disconnected Event
|
|
101
|
+
* Emitted when the meetings instance is disconnected from
|
|
102
|
+
* the internal mercury server
|
|
103
|
+
* @event network:disconnected
|
|
104
|
+
* @instance
|
|
105
|
+
* @memberof Meetings
|
|
106
|
+
*/
|
|
98
107
|
|
|
99
108
|
/**
|
|
100
109
|
* Meetings Registered Event
|
|
@@ -105,32 +114,32 @@ class MediaLogger {
|
|
|
105
114
|
*/
|
|
106
115
|
|
|
107
116
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
* Meeting Removed Event
|
|
118
|
+
* Emitted when a meeting was removed from the cache of meetings
|
|
119
|
+
* @event meeting:removed
|
|
120
|
+
* @instance
|
|
121
|
+
* @type {Object}
|
|
122
|
+
* @property {String} meetingId the removed meeting
|
|
123
|
+
* @property {Object} response the server response
|
|
124
|
+
* @property {String} type what type of meeting it was
|
|
125
|
+
* @memberof Meetings
|
|
126
|
+
*/
|
|
118
127
|
|
|
119
128
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
* Meeting Added Event
|
|
130
|
+
* Emitted when a meeting was added to the cache of meetings
|
|
131
|
+
* @event meeting:added
|
|
132
|
+
* @instance
|
|
133
|
+
* @type {Object}
|
|
134
|
+
* @property {String} meetingId the added meeting
|
|
135
|
+
* @property {String} type what type of meeting it was
|
|
136
|
+
* @memberof Meetings
|
|
137
|
+
*/
|
|
129
138
|
|
|
130
139
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
* Maintain a cache of meetings and sync with services.
|
|
141
|
+
* @class
|
|
142
|
+
*/
|
|
134
143
|
export default class Meetings extends WebexPlugin {
|
|
135
144
|
loggerRequest: any;
|
|
136
145
|
media: any;
|
|
@@ -142,120 +151,259 @@ export default class Meetings extends WebexPlugin {
|
|
|
142
151
|
request: any;
|
|
143
152
|
geoHintInfo: any;
|
|
144
153
|
meetingInfo: any;
|
|
154
|
+
mediaHelpers: any;
|
|
145
155
|
|
|
146
156
|
namespace = MEETINGS;
|
|
147
157
|
|
|
148
158
|
/**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
159
|
+
* Initializes the Meetings Plugin
|
|
160
|
+
* @constructor
|
|
161
|
+
* @public
|
|
162
|
+
* @memberof Meetings
|
|
163
|
+
*/
|
|
154
164
|
constructor(...args) {
|
|
155
165
|
super(...args);
|
|
156
166
|
|
|
157
167
|
/**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
* The webrtc-core media helpers. This is a temporary solution required for the SDK sample app
|
|
169
|
+
* to be able to call media helper functions.
|
|
170
|
+
*
|
|
171
|
+
* @instance
|
|
172
|
+
* @type {Object}
|
|
173
|
+
* @private
|
|
174
|
+
* @memberof Meetings
|
|
175
|
+
*/
|
|
176
|
+
this.mediaHelpers = mediaHelpersModule;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The Meetings request to interact with server
|
|
180
|
+
* @instance
|
|
181
|
+
* @type {Object}
|
|
182
|
+
* @private
|
|
183
|
+
* @memberof Meetings
|
|
184
|
+
*/
|
|
164
185
|
// @ts-ignore
|
|
165
186
|
this.request = new Request({}, {parent: this.webex});
|
|
166
187
|
/**
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
188
|
+
* Log upload request helper
|
|
189
|
+
* @instance
|
|
190
|
+
* @type {Object}
|
|
191
|
+
* @private
|
|
192
|
+
* @memberof Meetings
|
|
193
|
+
*/
|
|
173
194
|
// @ts-ignore
|
|
174
195
|
this.loggerRequest = new LoggerRequest({webex: this.webex});
|
|
175
196
|
this.meetingCollection = new MeetingCollection();
|
|
176
197
|
/**
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
198
|
+
* The PersonalMeetingRoom object to interact with server
|
|
199
|
+
* @instance
|
|
200
|
+
* @type {Object}
|
|
201
|
+
* @public
|
|
202
|
+
* @memberof Meetings
|
|
203
|
+
*/
|
|
183
204
|
this.personalMeetingRoom = null;
|
|
184
205
|
/**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
206
|
+
* The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called
|
|
207
|
+
* starts as null
|
|
208
|
+
* @instance
|
|
209
|
+
* @type {Object}
|
|
210
|
+
* @private
|
|
211
|
+
* @memberof Meetings
|
|
212
|
+
*/
|
|
192
213
|
this.reachability = null;
|
|
193
214
|
|
|
194
215
|
/**
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
216
|
+
* If the meetings plugin has been registered and listening via {@link Meetings#register}
|
|
217
|
+
* @instance
|
|
218
|
+
* @type {Boolean}
|
|
219
|
+
* @public
|
|
220
|
+
* @memberof Meetings
|
|
221
|
+
*/
|
|
201
222
|
this.registered = false;
|
|
202
223
|
|
|
203
224
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
225
|
+
* This values indicates the preferred webex site the user will start there meeting, getsits value from {@link Meetings#register}
|
|
226
|
+
* @instance
|
|
227
|
+
* @type {String}
|
|
228
|
+
* @private
|
|
229
|
+
* @memberof Meetings
|
|
230
|
+
*/
|
|
210
231
|
this.preferredWebexSite = '';
|
|
211
232
|
|
|
212
233
|
/**
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
234
|
+
* The public interface for the internal Media util files. These are helpful to expose outside the context
|
|
235
|
+
* of a meeting so that a user can access media without creating a meeting instance.
|
|
236
|
+
* @instance
|
|
237
|
+
* @type {Object}
|
|
238
|
+
* @private
|
|
239
|
+
* @memberof Meetings
|
|
240
|
+
*/
|
|
220
241
|
this.media = {
|
|
221
242
|
getUserMedia: Media.getUserMedia,
|
|
222
|
-
getSupportedDevice: Media.getSupportedDevice
|
|
243
|
+
getSupportedDevice: Media.getSupportedDevice,
|
|
223
244
|
};
|
|
224
245
|
|
|
225
246
|
this.onReady();
|
|
226
247
|
}
|
|
227
248
|
|
|
228
249
|
/**
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
250
|
+
* check whether you need to handle this main session's locus data or not
|
|
251
|
+
* @param {Object} meeting current meeting data
|
|
252
|
+
* @param {Object} newLocus new locus data
|
|
253
|
+
* @returns {boolean}
|
|
254
|
+
* @private
|
|
255
|
+
* @memberof Meetings
|
|
256
|
+
*/
|
|
257
|
+
private isNeedHandleMainLocus(meeting: any, newLocus: any) {
|
|
258
|
+
const breakoutUrl = newLocus.controls?.breakout?.url;
|
|
259
|
+
const breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
|
|
260
|
+
|
|
261
|
+
const isSelfJoined = newLocus?.self?.state === _JOINED_;
|
|
262
|
+
const isSelfMoved = newLocus?.self?.state === _LEFT_ && newLocus?.self?.reason === _MOVED_;
|
|
263
|
+
// @ts-ignore
|
|
264
|
+
const deviceFromNewLocus = MeetingsUtil.getThisDevice(newLocus, this.webex.internal.device.url);
|
|
265
|
+
const isNewLocusJoinThisDevice = MeetingsUtil.joinedOnThisDevice(
|
|
266
|
+
meeting,
|
|
267
|
+
newLocus,
|
|
268
|
+
// @ts-ignore
|
|
269
|
+
this.webex.internal.device.url
|
|
270
|
+
);
|
|
271
|
+
const isBreakoutLocusJoinThisDevice =
|
|
272
|
+
breakoutLocus?.joinedWith?.correlationId &&
|
|
273
|
+
breakoutLocus.joinedWith.correlationId === meeting?.correlationId;
|
|
274
|
+
|
|
275
|
+
if (isSelfJoined && isNewLocusJoinThisDevice) {
|
|
276
|
+
LoggerProxy.logger.log(
|
|
277
|
+
'Meetings:index#isNeedHandleMainLocus --> self this device shown as JOINED in the main session'
|
|
278
|
+
);
|
|
279
|
+
if (breakoutLocus?.joinedWith && deviceFromNewLocus) {
|
|
280
|
+
const breakoutReplaceAt =
|
|
281
|
+
breakoutLocus.joinedWith.replaces?.length > 0
|
|
282
|
+
? breakoutLocus.joinedWith.replaces[0].replaceAt
|
|
283
|
+
: '';
|
|
284
|
+
const newLocusReplaceAt =
|
|
285
|
+
deviceFromNewLocus.replaces?.length > 0 ? deviceFromNewLocus.replaces[0].replaceAt : '';
|
|
286
|
+
if (breakoutReplaceAt && newLocusReplaceAt && breakoutReplaceAt > newLocusReplaceAt) {
|
|
287
|
+
LoggerProxy.logger.log(
|
|
288
|
+
`Meetings:index#isNeedHandleMainLocus --> this is expired main joined status locus_dto replacedAt ${newLocusReplaceAt} bo replacedAt ${breakoutReplaceAt}`
|
|
289
|
+
);
|
|
290
|
+
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
if (isBreakoutLocusJoinThisDevice) {
|
|
298
|
+
LoggerProxy.logger.log(
|
|
299
|
+
`Meetings:index#isNeedHandleMainLocus --> there is active breakout session and joined on this device, and don't need to handle main session: ${breakoutUrl}`
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
if (isSelfMoved && newLocus?.self?.removed) {
|
|
305
|
+
LoggerProxy.logger.log(
|
|
306
|
+
'Meetings:index#isNeedHandleMainLocus --> self moved main locus with self removed status, not need to handle'
|
|
307
|
+
);
|
|
308
|
+
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
LoggerProxy.logger.log(
|
|
312
|
+
'Meetings:index#isNeedHandleMainLocus --> this is a normal main session locusDTO update case'
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* check whether you need to handle this locus data or not
|
|
320
|
+
* @param {Object} meeting old locus data
|
|
321
|
+
* @param {Object} newLocus new locus data
|
|
322
|
+
* @returns {boolean}
|
|
323
|
+
* @private
|
|
324
|
+
* @memberof Meetings
|
|
325
|
+
*/
|
|
326
|
+
private isNeedHandleLocusDTO(meeting: any, newLocus: any) {
|
|
327
|
+
if (newLocus) {
|
|
328
|
+
const isNewLocusAsBreakout = MeetingsUtil.isBreakoutLocusDTO(newLocus);
|
|
329
|
+
const isSelfMoved = newLocus?.self?.state === _LEFT_ && newLocus?.self?.reason === _MOVED_;
|
|
330
|
+
if (!meeting) {
|
|
331
|
+
if (isNewLocusAsBreakout) {
|
|
332
|
+
LoggerProxy.logger.log(
|
|
333
|
+
`Meetings:index#isNeedHandleLocusDTO --> the first breakout session locusDTO active status: ${newLocus.fullState?.active}`
|
|
334
|
+
);
|
|
335
|
+
|
|
336
|
+
return newLocus.self?.state === _JOINED_;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return this.isNeedHandleMainLocus(meeting, newLocus);
|
|
340
|
+
}
|
|
341
|
+
if (!isNewLocusAsBreakout) {
|
|
342
|
+
return this.isNeedHandleMainLocus(meeting, newLocus);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return !isSelfMoved;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return true;
|
|
349
|
+
}
|
|
241
350
|
|
|
351
|
+
/**
|
|
352
|
+
* handle locus events and takes meeting actions with them as they come in
|
|
353
|
+
* @param {Object} data a locus event
|
|
354
|
+
* @param {String} data.locusUrl
|
|
355
|
+
* @param {Object} data.locus
|
|
356
|
+
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
357
|
+
* @param {String} data.eventType
|
|
358
|
+
* @returns {undefined}
|
|
359
|
+
* @private
|
|
360
|
+
* @memberof Meetings
|
|
361
|
+
*/
|
|
362
|
+
private handleLocusEvent(data: {locusUrl: string; locus: any}, useRandomDelayForInfo = false) {
|
|
363
|
+
let meeting = null;
|
|
242
364
|
// getting meeting by correlationId. This will happen for the new event
|
|
243
365
|
// Either the locus
|
|
244
366
|
// TODO : Add check for the callBack Address
|
|
245
|
-
meeting =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
this.meetingCollection.getByKey(
|
|
249
|
-
|
|
367
|
+
meeting =
|
|
368
|
+
this.meetingCollection.getByKey(LOCUS_URL, data.locusUrl) ||
|
|
369
|
+
// @ts-ignore
|
|
370
|
+
this.meetingCollection.getByKey(
|
|
371
|
+
CORRELATION_ID,
|
|
372
|
+
// @ts-ignore
|
|
373
|
+
MeetingsUtil.checkForCorrelationId(this.webex.internal.device.url, data.locus)
|
|
374
|
+
) ||
|
|
375
|
+
this.meetingCollection.getByKey(
|
|
376
|
+
SIP_URI,
|
|
377
|
+
data.locus.self &&
|
|
378
|
+
data.locus.self.callbackInfo &&
|
|
379
|
+
data.locus.self.callbackInfo.callbackAddress
|
|
380
|
+
) ||
|
|
381
|
+
(data.locus.info?.isUnifiedSpaceMeeting
|
|
382
|
+
? undefined
|
|
383
|
+
: this.meetingCollection.getByKey(CONVERSATION_URL, data.locus.conversationUrl)) ||
|
|
384
|
+
this.meetingCollection.getByKey(MEETINGNUMBER, data.locus?.info?.webExMeetingId);
|
|
250
385
|
|
|
251
386
|
// Special case when locus has got replaced, This only happend once if a replace locus exists
|
|
252
387
|
// https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
|
|
253
388
|
|
|
254
389
|
if (!meeting && data.locus?.replaces?.length > 0) {
|
|
255
390
|
// Always the last element in the replace is the active one
|
|
256
|
-
meeting = this.meetingCollection.getByKey(
|
|
391
|
+
meeting = this.meetingCollection.getByKey(
|
|
392
|
+
LOCUS_URL,
|
|
393
|
+
data.locus.replaces[data.locus.replaces.length - 1].locusUrl
|
|
394
|
+
);
|
|
257
395
|
}
|
|
258
396
|
|
|
397
|
+
if (meeting && !MeetingsUtil.isBreakoutLocusDTO(data.locus)) {
|
|
398
|
+
meeting.locusInfo.updateMainSessionLocusCache(data.locus);
|
|
399
|
+
}
|
|
400
|
+
if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
|
|
401
|
+
LoggerProxy.logger.log(
|
|
402
|
+
`Meetings:index#handleLocusEvent --> doesn't need to process locus event`
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
259
407
|
if (!meeting) {
|
|
260
408
|
// TODO: create meeting when we get a meeting object
|
|
261
409
|
// const checkForEnded = (locus) => {
|
|
@@ -276,73 +424,92 @@ export default class Meetings extends WebexPlugin {
|
|
|
276
424
|
// };
|
|
277
425
|
// rather then locus object change to locus url
|
|
278
426
|
|
|
279
|
-
if (
|
|
427
|
+
if (
|
|
428
|
+
data.locus &&
|
|
429
|
+
data.locus.fullState &&
|
|
430
|
+
data.locus.fullState.state === LOCUS.STATE.INACTIVE
|
|
431
|
+
) {
|
|
280
432
|
// just ignore the event as its already ended and not active
|
|
281
|
-
LoggerProxy.logger.warn(
|
|
433
|
+
LoggerProxy.logger.warn(
|
|
434
|
+
'Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.'
|
|
435
|
+
);
|
|
282
436
|
|
|
283
437
|
return;
|
|
284
438
|
}
|
|
285
439
|
|
|
286
|
-
|
|
287
440
|
// When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
|
|
288
441
|
// Any future events will be neglected
|
|
289
442
|
|
|
290
|
-
if (
|
|
443
|
+
if (
|
|
444
|
+
data.locus &&
|
|
445
|
+
data.locus.self &&
|
|
446
|
+
data.locus.self.state === _LEFT_ &&
|
|
447
|
+
data.locus.self.removed === true
|
|
448
|
+
) {
|
|
291
449
|
// just ignore the event as its already ended and not active
|
|
292
|
-
LoggerProxy.logger.warn(
|
|
450
|
+
LoggerProxy.logger.warn(
|
|
451
|
+
'Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.'
|
|
452
|
+
);
|
|
293
453
|
|
|
294
454
|
return;
|
|
295
455
|
}
|
|
296
456
|
|
|
297
|
-
this.create(data.locus, _LOCUS_ID_, useRandomDelayForInfo)
|
|
298
|
-
|
|
457
|
+
this.create(data.locus, _LOCUS_ID_, useRandomDelayForInfo)
|
|
458
|
+
.then((newMeeting) => {
|
|
459
|
+
meeting = newMeeting;
|
|
299
460
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
461
|
+
// It's a new meeting so initialize the locus data
|
|
462
|
+
meeting.locusInfo.initialSetup(data.locus);
|
|
463
|
+
})
|
|
464
|
+
.catch((e) => {
|
|
465
|
+
LoggerProxy.logger.error(e);
|
|
466
|
+
})
|
|
305
467
|
.finally(() => {
|
|
306
468
|
// There will be cases where locus event comes in gets created and deleted because its a 1:1 and meeting gets deleted
|
|
307
469
|
// because the other user left so before sending 'added' event make sure it exists in the collection
|
|
308
470
|
|
|
309
471
|
if (this.getMeetingByType(_ID_, meeting.id)) {
|
|
310
|
-
Metrics.postEvent({
|
|
472
|
+
Metrics.postEvent({
|
|
473
|
+
event: eventType.REMOTE_STARTED,
|
|
474
|
+
meeting,
|
|
475
|
+
data: {trigger: trigger.MERCURY_EVENT},
|
|
476
|
+
});
|
|
311
477
|
Trigger.trigger(
|
|
312
478
|
this,
|
|
313
479
|
{
|
|
314
480
|
file: 'meetings',
|
|
315
|
-
function: 'handleLocusEvent'
|
|
481
|
+
function: 'handleLocusEvent',
|
|
316
482
|
},
|
|
317
483
|
EVENT_TRIGGERS.MEETING_ADDED,
|
|
318
484
|
{
|
|
319
485
|
meeting,
|
|
320
|
-
type: meeting.type === _MEETING_ ? _JOIN_ : _INCOMING_
|
|
486
|
+
type: meeting.type === _MEETING_ ? _JOIN_ : _INCOMING_,
|
|
321
487
|
}
|
|
322
488
|
);
|
|
323
|
-
}
|
|
324
|
-
else {
|
|
489
|
+
} else {
|
|
325
490
|
// Meeting got added but was not found in the collection. It might have got destroyed
|
|
326
|
-
LoggerProxy.logger.warn(
|
|
491
|
+
LoggerProxy.logger.warn(
|
|
492
|
+
'Meetings:index#handleLocusEvent --> Created and destroyed meeting object before sending an event'
|
|
493
|
+
);
|
|
327
494
|
}
|
|
328
495
|
});
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
496
|
+
} else {
|
|
331
497
|
meeting.locusInfo.parse(meeting, data);
|
|
332
498
|
}
|
|
333
499
|
}
|
|
334
500
|
|
|
335
501
|
/**
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
private handleLocusMercury(envelope: {
|
|
502
|
+
* handles locus events through mercury that are not roap
|
|
503
|
+
* @param {Object} envelope
|
|
504
|
+
* @param {Object} envelope.data
|
|
505
|
+
* @param {String} envelope.data.eventType
|
|
506
|
+
* @returns {undefined}
|
|
507
|
+
* @private
|
|
508
|
+
* @memberof Meetings
|
|
509
|
+
*/
|
|
510
|
+
private handleLocusMercury(envelope: {data: any}) {
|
|
345
511
|
const {data} = envelope;
|
|
512
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
346
513
|
const {eventType} = data;
|
|
347
514
|
|
|
348
515
|
if (eventType && eventType !== LOCUSEVENT.MESSAGE_ROAP) {
|
|
@@ -350,31 +517,29 @@ export default class Meetings extends WebexPlugin {
|
|
|
350
517
|
}
|
|
351
518
|
}
|
|
352
519
|
|
|
353
|
-
|
|
354
520
|
/**
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
521
|
+
* handles mecury offline event
|
|
522
|
+
* @returns {undefined}
|
|
523
|
+
* @private
|
|
524
|
+
* @memberof Meetings
|
|
525
|
+
*/
|
|
360
526
|
private handleMercuryOffline() {
|
|
361
527
|
Trigger.trigger(
|
|
362
528
|
this,
|
|
363
529
|
{
|
|
364
530
|
file: 'meetings/index',
|
|
365
|
-
function: 'handleMercuryOffline'
|
|
531
|
+
function: 'handleMercuryOffline',
|
|
366
532
|
},
|
|
367
|
-
EVENT_TRIGGERS.MEETINGS_NETWORK_DISCONNECTED
|
|
533
|
+
EVENT_TRIGGERS.MEETINGS_NETWORK_DISCONNECTED
|
|
368
534
|
);
|
|
369
535
|
}
|
|
370
536
|
|
|
371
|
-
|
|
372
537
|
/**
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
538
|
+
* registers for locus and roap mercury events
|
|
539
|
+
* @returns {undefined}
|
|
540
|
+
* @private
|
|
541
|
+
* @memberof Meetings
|
|
542
|
+
*/
|
|
378
543
|
private listenForEvents() {
|
|
379
544
|
// @ts-ignore
|
|
380
545
|
this.webex.internal.mercury.on(LOCUSEVENT.LOCUS_MERCURY, (envelope) => {
|
|
@@ -397,11 +562,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
397
562
|
}
|
|
398
563
|
|
|
399
564
|
/**
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
565
|
+
* stops listening for locus and roap mercury events
|
|
566
|
+
* @returns {undefined}
|
|
567
|
+
* @private
|
|
568
|
+
* @memberof Meetings
|
|
569
|
+
*/
|
|
405
570
|
private stopListeningForEvents() {
|
|
406
571
|
// @ts-ignore
|
|
407
572
|
this.webex.internal.mercury.off(LOCUSEVENT.LOCUS_MERCURY);
|
|
@@ -412,10 +577,10 @@ export default class Meetings extends WebexPlugin {
|
|
|
412
577
|
}
|
|
413
578
|
|
|
414
579
|
/**
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
580
|
+
* @returns {undefined}
|
|
581
|
+
* @private
|
|
582
|
+
* @memberof Meetings
|
|
583
|
+
*/
|
|
419
584
|
private onReady() {
|
|
420
585
|
// @ts-ignore
|
|
421
586
|
this.webex.once(READY, () => {
|
|
@@ -427,7 +592,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
427
592
|
LoggerProxy.set(this.webex.logger);
|
|
428
593
|
|
|
429
594
|
mediaLogger = new MediaLogger();
|
|
430
|
-
|
|
595
|
+
setLogger(mediaLogger);
|
|
431
596
|
|
|
432
597
|
/**
|
|
433
598
|
* The MeetingInfo object to interact with server
|
|
@@ -437,15 +602,23 @@ export default class Meetings extends WebexPlugin {
|
|
|
437
602
|
* @memberof Meetings
|
|
438
603
|
*/
|
|
439
604
|
// @ts-ignore
|
|
440
|
-
this.meetingInfo = this.config.experimental.enableUnifiedMeetings
|
|
605
|
+
this.meetingInfo = this.config.experimental.enableUnifiedMeetings
|
|
606
|
+
? // @ts-ignore
|
|
607
|
+
new MeetingInfoV2(this.webex)
|
|
608
|
+
: // @ts-ignore
|
|
609
|
+
new MeetingInfo(this.webex);
|
|
441
610
|
// @ts-ignore
|
|
442
|
-
this.personalMeetingRoom = new PersonalMeetingRoom(
|
|
611
|
+
this.personalMeetingRoom = new PersonalMeetingRoom(
|
|
612
|
+
{meetingInfo: this.meetingInfo},
|
|
613
|
+
// @ts-ignore
|
|
614
|
+
{parent: this.webex}
|
|
615
|
+
);
|
|
443
616
|
|
|
444
617
|
Trigger.trigger(
|
|
445
618
|
this,
|
|
446
619
|
{
|
|
447
620
|
file: 'meetings',
|
|
448
|
-
function: 'onReady'
|
|
621
|
+
function: 'onReady',
|
|
449
622
|
},
|
|
450
623
|
EVENT_TRIGGERS.MEETINGS_READY
|
|
451
624
|
);
|
|
@@ -457,12 +630,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
457
630
|
}
|
|
458
631
|
|
|
459
632
|
/**
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
633
|
+
* API to toggle unified meetings
|
|
634
|
+
* @param {Boolean} changeState
|
|
635
|
+
* @private
|
|
636
|
+
* @memberof Meetings
|
|
637
|
+
* @returns {undefined}
|
|
638
|
+
*/
|
|
466
639
|
private _toggleUnifiedMeetings(changeState: boolean) {
|
|
467
640
|
if (typeof changeState !== 'boolean') {
|
|
468
641
|
return;
|
|
@@ -477,12 +650,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
477
650
|
}
|
|
478
651
|
|
|
479
652
|
/**
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
653
|
+
* API to enable or disable TURN discovery
|
|
654
|
+
* @param {Boolean} enable
|
|
655
|
+
* @private
|
|
656
|
+
* @memberof Meetings
|
|
657
|
+
* @returns {undefined}
|
|
658
|
+
*/
|
|
486
659
|
private _toggleTurnDiscovery(enable: boolean) {
|
|
487
660
|
if (typeof enable !== 'boolean') {
|
|
488
661
|
return;
|
|
@@ -492,12 +665,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
492
665
|
}
|
|
493
666
|
|
|
494
667
|
/**
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
668
|
+
* API to toggle starting adhoc meeting
|
|
669
|
+
* @param {Boolean} changeState
|
|
670
|
+
* @private
|
|
671
|
+
* @memberof Meetings
|
|
672
|
+
* @returns {undefined}
|
|
673
|
+
*/
|
|
501
674
|
private _toggleAdhocMeetings(changeState: boolean) {
|
|
502
675
|
if (typeof changeState !== 'boolean') {
|
|
503
676
|
return;
|
|
@@ -510,24 +683,27 @@ export default class Meetings extends WebexPlugin {
|
|
|
510
683
|
}
|
|
511
684
|
|
|
512
685
|
/**
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
686
|
+
* Explicitly sets up the meetings plugin by registering
|
|
687
|
+
* the device, connecting to mercury, and listening for locus events.
|
|
688
|
+
*
|
|
689
|
+
* @returns {Promise}
|
|
690
|
+
* @public
|
|
691
|
+
* @memberof Meetings
|
|
692
|
+
*/
|
|
520
693
|
public register() {
|
|
521
694
|
// @ts-ignore
|
|
522
695
|
if (!this.webex.canAuthorize) {
|
|
523
|
-
LoggerProxy.logger.error(
|
|
696
|
+
LoggerProxy.logger.error(
|
|
697
|
+
'Meetings:index#register --> ERROR, Unable to register, SDK cannot authorize'
|
|
698
|
+
);
|
|
524
699
|
|
|
525
700
|
return Promise.reject(new Error('SDK cannot authorize'));
|
|
526
701
|
}
|
|
527
702
|
|
|
528
|
-
|
|
529
703
|
if (this.registered) {
|
|
530
|
-
LoggerProxy.logger.info(
|
|
704
|
+
LoggerProxy.logger.info(
|
|
705
|
+
'Meetings:index#register --> INFO, Meetings plugin already registered'
|
|
706
|
+
);
|
|
531
707
|
|
|
532
708
|
return Promise.resolve();
|
|
533
709
|
}
|
|
@@ -539,88 +715,97 @@ export default class Meetings extends WebexPlugin {
|
|
|
539
715
|
LoggerProxy.logger.error(`Meetings:index#register --> GDM error, ${error.message}`);
|
|
540
716
|
}),
|
|
541
717
|
// @ts-ignore
|
|
542
|
-
this.webex.internal.device
|
|
543
|
-
|
|
544
|
-
|
|
718
|
+
this.webex.internal.device
|
|
719
|
+
.register()
|
|
720
|
+
// @ts-ignore
|
|
721
|
+
.then(() =>
|
|
722
|
+
LoggerProxy.logger.info(
|
|
723
|
+
// @ts-ignore
|
|
724
|
+
`Meetings:index#register --> INFO, Device registered ${this.webex.internal.device.url}`
|
|
725
|
+
)
|
|
726
|
+
)
|
|
545
727
|
// @ts-ignore
|
|
546
728
|
.then(() => this.webex.internal.mercury.connect()),
|
|
547
|
-
MeetingsUtil.checkH264Support.call(this)
|
|
548
|
-
])
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
file: 'meetings',
|
|
554
|
-
function: 'register'
|
|
555
|
-
},
|
|
556
|
-
EVENT_TRIGGERS.MEETINGS_REGISTERED
|
|
557
|
-
);
|
|
558
|
-
this.registered = true;
|
|
559
|
-
Metrics.sendBehavioralMetric(
|
|
560
|
-
BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_SUCCESS,
|
|
561
|
-
);
|
|
562
|
-
})
|
|
563
|
-
.catch((error) => {
|
|
564
|
-
LoggerProxy.logger.error(`Meetings:index#register --> ERROR, Unable to register, ${error.message}`);
|
|
565
|
-
|
|
566
|
-
Metrics.sendBehavioralMetric(
|
|
567
|
-
BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_FAILED,
|
|
729
|
+
MeetingsUtil.checkH264Support.call(this),
|
|
730
|
+
])
|
|
731
|
+
.then(() => {
|
|
732
|
+
this.listenForEvents();
|
|
733
|
+
Trigger.trigger(
|
|
734
|
+
this,
|
|
568
735
|
{
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
}
|
|
736
|
+
file: 'meetings',
|
|
737
|
+
function: 'register',
|
|
738
|
+
},
|
|
739
|
+
EVENT_TRIGGERS.MEETINGS_REGISTERED
|
|
740
|
+
);
|
|
741
|
+
this.registered = true;
|
|
742
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_SUCCESS);
|
|
743
|
+
})
|
|
744
|
+
.catch((error) => {
|
|
745
|
+
LoggerProxy.logger.error(
|
|
746
|
+
`Meetings:index#register --> ERROR, Unable to register, ${error.message}`
|
|
572
747
|
);
|
|
573
748
|
|
|
749
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_FAILED, {
|
|
750
|
+
reason: error.message,
|
|
751
|
+
stack: error.stack,
|
|
752
|
+
});
|
|
753
|
+
|
|
574
754
|
return Promise.reject(error);
|
|
575
755
|
});
|
|
576
756
|
}
|
|
577
757
|
|
|
578
758
|
/**
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
759
|
+
* Explicitly tears down the meetings plugin by deregistering
|
|
760
|
+
* the device, disconnecting from mercury, and stops listening to locus events
|
|
761
|
+
*
|
|
762
|
+
* @returns {Promise}
|
|
763
|
+
* @public
|
|
764
|
+
* @memberof Meetings
|
|
765
|
+
*/
|
|
586
766
|
unregister() {
|
|
587
767
|
if (!this.registered) {
|
|
588
|
-
LoggerProxy.logger.info(
|
|
768
|
+
LoggerProxy.logger.info(
|
|
769
|
+
'Meetings:index#unregister --> INFO, Meetings plugin already unregistered'
|
|
770
|
+
);
|
|
589
771
|
|
|
590
772
|
return Promise.resolve();
|
|
591
773
|
}
|
|
592
774
|
|
|
593
775
|
this.stopListeningForEvents();
|
|
594
776
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
777
|
+
return (
|
|
778
|
+
// @ts-ignore
|
|
779
|
+
this.webex.internal.mercury
|
|
780
|
+
.disconnect()
|
|
781
|
+
// @ts-ignore
|
|
782
|
+
.then(() => this.webex.internal.device.unregister())
|
|
783
|
+
.then(() => {
|
|
784
|
+
Trigger.trigger(
|
|
785
|
+
this,
|
|
786
|
+
{
|
|
787
|
+
file: 'meetings',
|
|
788
|
+
function: 'unregister',
|
|
789
|
+
},
|
|
790
|
+
EVENT_TRIGGERS.MEETINGS_UNREGISTERED
|
|
791
|
+
);
|
|
792
|
+
this.registered = false;
|
|
793
|
+
})
|
|
794
|
+
);
|
|
610
795
|
}
|
|
611
796
|
|
|
612
797
|
/**
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
798
|
+
* Uploads logs to the webex services for tracking
|
|
799
|
+
* @param {Object} [options={}]
|
|
800
|
+
* @param {String} [options.callStart] Call Start Time
|
|
801
|
+
* @param {String} [options.feedbackId] ID used for tracking
|
|
802
|
+
* @param {String} [options.locusId]
|
|
803
|
+
* @param {String} [options.correlationId]
|
|
804
|
+
* @param {String} [options.meetingId] webex meeting ID
|
|
805
|
+
* @param {String} [options.userId] userId
|
|
806
|
+
* @param {String} [options.orgId] org id
|
|
807
|
+
* @returns {String} feedback ID logs were submitted under
|
|
808
|
+
*/
|
|
624
809
|
uploadLogs(
|
|
625
810
|
options: {
|
|
626
811
|
callStart?: string;
|
|
@@ -634,79 +819,83 @@ export default class Meetings extends WebexPlugin {
|
|
|
634
819
|
) {
|
|
635
820
|
LoggerProxy.logger.info('Meetings:index#uploadLogs --> uploading logs');
|
|
636
821
|
|
|
637
|
-
return this.loggerRequest
|
|
822
|
+
return this.loggerRequest
|
|
823
|
+
.uploadLogs(options)
|
|
638
824
|
.then((uploadResult) => {
|
|
639
|
-
LoggerProxy.logger.info(
|
|
825
|
+
LoggerProxy.logger.info(
|
|
826
|
+
'Meetings:index#uploadLogs --> Upload logs for meeting completed.',
|
|
827
|
+
uploadResult
|
|
828
|
+
);
|
|
640
829
|
Trigger.trigger(
|
|
641
830
|
this,
|
|
642
831
|
{
|
|
643
832
|
file: 'meetings',
|
|
644
|
-
function: 'uploadLogs'
|
|
833
|
+
function: 'uploadLogs',
|
|
645
834
|
},
|
|
646
835
|
EVENT_TRIGGERS.MEETING_LOG_UPLOAD_SUCCESS,
|
|
647
836
|
{
|
|
648
837
|
meetingId: options.meetingId,
|
|
649
|
-
details: uploadResult
|
|
838
|
+
details: uploadResult,
|
|
650
839
|
}
|
|
651
840
|
);
|
|
652
841
|
|
|
653
842
|
return uploadResult;
|
|
654
843
|
})
|
|
655
844
|
.catch((uploadError) => {
|
|
656
|
-
LoggerProxy.logger.error(
|
|
845
|
+
LoggerProxy.logger.error(
|
|
846
|
+
'Meetings:index#uploadLogs --> Unable to upload logs for meeting',
|
|
847
|
+
uploadError
|
|
848
|
+
);
|
|
657
849
|
Trigger.trigger(
|
|
658
850
|
this,
|
|
659
851
|
{
|
|
660
852
|
file: 'meetings',
|
|
661
|
-
function: 'uploadLogs'
|
|
853
|
+
function: 'uploadLogs',
|
|
662
854
|
},
|
|
663
855
|
EVENT_TRIGGERS.MEETING_LOG_UPLOAD_FAILURE,
|
|
664
856
|
{
|
|
665
857
|
meetingId: options.meetingId,
|
|
666
|
-
reason: uploadError
|
|
858
|
+
reason: uploadError,
|
|
667
859
|
}
|
|
668
860
|
);
|
|
669
861
|
|
|
670
|
-
Metrics.sendBehavioralMetric(
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
code: uploadError.code
|
|
678
|
-
}
|
|
679
|
-
);
|
|
862
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.UPLOAD_LOGS_FAILURE, {
|
|
863
|
+
// @ts-ignore - seems like typo
|
|
864
|
+
meetingId: options.meetingsId,
|
|
865
|
+
reason: uploadError.message,
|
|
866
|
+
stack: uploadError.stack,
|
|
867
|
+
code: uploadError.code,
|
|
868
|
+
});
|
|
680
869
|
});
|
|
681
870
|
}
|
|
682
871
|
|
|
683
872
|
/**
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
873
|
+
* initializes the reachability instance for Meetings
|
|
874
|
+
* @returns {undefined}
|
|
875
|
+
* @public
|
|
876
|
+
* @memberof Meetings
|
|
877
|
+
*/
|
|
689
878
|
setReachability() {
|
|
690
879
|
// @ts-ignore
|
|
691
880
|
this.reachability = new Reachability(this.webex);
|
|
692
881
|
}
|
|
693
882
|
|
|
694
883
|
/**
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
884
|
+
* gets the reachability instance for Meetings
|
|
885
|
+
* @returns {Reachability}
|
|
886
|
+
* @public
|
|
887
|
+
* @memberof Meetings
|
|
888
|
+
*/
|
|
700
889
|
getReachability() {
|
|
701
890
|
return this.reachability;
|
|
702
891
|
}
|
|
703
892
|
|
|
704
893
|
/**
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
894
|
+
* initializes and starts gathering reachability for Meetings
|
|
895
|
+
* @returns {Promise}
|
|
896
|
+
* @public
|
|
897
|
+
* @memberof Meetings
|
|
898
|
+
*/
|
|
710
899
|
startReachability() {
|
|
711
900
|
if (!this.reachability) {
|
|
712
901
|
this.setReachability();
|
|
@@ -716,11 +905,11 @@ export default class Meetings extends WebexPlugin {
|
|
|
716
905
|
}
|
|
717
906
|
|
|
718
907
|
/**
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
908
|
+
* Get geoHint for info for meetings
|
|
909
|
+
* @returns {Promise}
|
|
910
|
+
* @private
|
|
911
|
+
* @memberof Meetings
|
|
912
|
+
*/
|
|
724
913
|
getGeoHint() {
|
|
725
914
|
return this.request.fetchGeoHint().then((res) => {
|
|
726
915
|
this.geoHintInfo = res;
|
|
@@ -728,12 +917,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
728
917
|
}
|
|
729
918
|
|
|
730
919
|
/**
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
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
|
+
*/
|
|
737
926
|
fetchUserPreferredWebexSite() {
|
|
738
927
|
return this.request.getMeetingPreferences().then((res) => {
|
|
739
928
|
if (res) {
|
|
@@ -743,24 +932,24 @@ export default class Meetings extends WebexPlugin {
|
|
|
743
932
|
}
|
|
744
933
|
|
|
745
934
|
/**
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
935
|
+
* gets the personal meeting room instance, for saved PMR values for this user
|
|
936
|
+
* @returns {PersonalMeetingRoom}
|
|
937
|
+
* @public
|
|
938
|
+
* @memberof Meetings
|
|
939
|
+
*/
|
|
751
940
|
|
|
752
941
|
getPersonalMeetingRoom() {
|
|
753
942
|
return this.personalMeetingRoom;
|
|
754
943
|
}
|
|
755
944
|
|
|
756
945
|
/**
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
946
|
+
* @param {Meeting} meeting
|
|
947
|
+
* @param {Object} reason
|
|
948
|
+
* @param {String} type
|
|
949
|
+
* @returns {Undefined}
|
|
950
|
+
* @private
|
|
951
|
+
* @memberof Meetings
|
|
952
|
+
*/
|
|
764
953
|
private destroy(meeting: Meeting, reason: object) {
|
|
765
954
|
MeetingUtil.cleanUp(meeting);
|
|
766
955
|
this.meetingCollection.delete(meeting.id);
|
|
@@ -768,123 +957,133 @@ export default class Meetings extends WebexPlugin {
|
|
|
768
957
|
this,
|
|
769
958
|
{
|
|
770
959
|
file: 'meetings',
|
|
771
|
-
function: 'destroy'
|
|
960
|
+
function: 'destroy',
|
|
772
961
|
},
|
|
773
962
|
EVENT_TRIGGERS.MEETING_REMOVED,
|
|
774
963
|
{
|
|
775
964
|
meetingId: meeting.id,
|
|
776
|
-
reason
|
|
965
|
+
reason,
|
|
777
966
|
}
|
|
778
967
|
);
|
|
779
968
|
}
|
|
780
969
|
|
|
781
970
|
/**
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
public create(destination: string, type: string = null, useRandomDelayForInfo
|
|
971
|
+
* Create a meeting.
|
|
972
|
+
* @param {string} destination - sipURL, spaceId, phonenumber, or locus object}
|
|
973
|
+
* @param {string} [type] - the optional specified type, such as locusId
|
|
974
|
+
* @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
|
|
975
|
+
* @returns {Promise<Meeting>} A new Meeting.
|
|
976
|
+
* @public
|
|
977
|
+
* @memberof Meetings
|
|
978
|
+
*/
|
|
979
|
+
public create(destination: string, type: string = null, useRandomDelayForInfo = false) {
|
|
791
980
|
// TODO: type should be from a dictionary
|
|
792
981
|
|
|
793
982
|
// Validate meeting information based on the provided destination and
|
|
794
983
|
// type. This must be performed prior to determining if the meeting is
|
|
795
984
|
// found in the collection, as we mutate the destination for hydra person
|
|
796
985
|
// id values.
|
|
797
|
-
return
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
986
|
+
return (
|
|
987
|
+
this.meetingInfo
|
|
988
|
+
.fetchInfoOptions(destination, type)
|
|
989
|
+
// Catch a failure to fetch info options.
|
|
990
|
+
.catch((error) => {
|
|
991
|
+
LoggerProxy.logger.info(
|
|
992
|
+
`Meetings:index#create --> INFO, unable to determine info options: ${error.message}`
|
|
993
|
+
);
|
|
994
|
+
})
|
|
995
|
+
.then((options: any = {}) => {
|
|
996
|
+
// Normalize the destination.
|
|
997
|
+
const targetDest = options.destination || destination;
|
|
998
|
+
|
|
999
|
+
// check for the conversation URL then sip Url
|
|
1000
|
+
let meeting = null;
|
|
1001
|
+
|
|
1002
|
+
if (type === _CONVERSATION_URL_ || options.type === _CONVERSATION_URL_) {
|
|
1003
|
+
const foundMeeting = this.meetingCollection.getByKey(CONVERSATION_URL, targetDest);
|
|
1004
|
+
|
|
1005
|
+
if (foundMeeting) {
|
|
1006
|
+
const foundMeetingIsNotCalendarMeeting = !foundMeeting.locusInfo.scheduledMeeting;
|
|
1007
|
+
|
|
1008
|
+
// If the found meeting is not a calendar meeting, return that meeting.
|
|
1009
|
+
// This allows for the creation of instant-meetings when calendar meetings are present.
|
|
1010
|
+
if (foundMeetingIsNotCalendarMeeting) {
|
|
1011
|
+
meeting = foundMeeting;
|
|
1012
|
+
}
|
|
819
1013
|
}
|
|
820
1014
|
}
|
|
821
|
-
}
|
|
822
1015
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1016
|
+
// Attempt to collect the meeting if it exists.
|
|
1017
|
+
if (!meeting) {
|
|
1018
|
+
meeting = this.meetingCollection.getByKey(SIP_URI, targetDest);
|
|
1019
|
+
}
|
|
827
1020
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
}
|
|
1021
|
+
// Validate if a meeting was found.
|
|
1022
|
+
if (!meeting) {
|
|
1023
|
+
// Create a meeting based on the normalized destination and type.
|
|
1024
|
+
return this.createMeeting(targetDest, type, useRandomDelayForInfo).then(
|
|
1025
|
+
(createdMeeting: any) => {
|
|
1026
|
+
// If the meeting was successfully created.
|
|
1027
|
+
if (createdMeeting && createdMeeting.on) {
|
|
1028
|
+
// Create a destruction event for the meeting.
|
|
1029
|
+
createdMeeting.on(EVENTS.DESTROY_MEETING, (payload) => {
|
|
1030
|
+
// @ts-ignore
|
|
1031
|
+
if (this.config.autoUploadLogs) {
|
|
1032
|
+
this.uploadLogs({
|
|
1033
|
+
callStart: createdMeeting.locusInfo?.fullState?.lastActive,
|
|
1034
|
+
correlationId: createdMeeting.correlationId,
|
|
1035
|
+
feedbackId: createdMeeting.correlationId,
|
|
1036
|
+
locusId: createdMeeting.locusId,
|
|
1037
|
+
meetingId: createdMeeting.locusInfo?.info?.webExMeetingId,
|
|
1038
|
+
}).then(() => this.destroy(createdMeeting, payload.reason));
|
|
1039
|
+
} else {
|
|
1040
|
+
this.destroy(createdMeeting, payload.reason);
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
createdMeeting.on(EVENTS.REQUEST_UPLOAD_LOGS, (meetingInstance) => {
|
|
1045
|
+
// @ts-ignore
|
|
1046
|
+
if (this.config.autoUploadLogs) {
|
|
1047
|
+
this.uploadLogs({
|
|
1048
|
+
callStart: meetingInstance?.locusInfo?.fullState?.lastActive,
|
|
1049
|
+
correlationId: meetingInstance.correlationId,
|
|
1050
|
+
feedbackId: meetingInstance.correlationId,
|
|
1051
|
+
locusId: meetingInstance.locusId,
|
|
1052
|
+
meetingId: meetingInstance.locusInfo?.info?.webExMeetingId,
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
} else {
|
|
1057
|
+
LoggerProxy.logger.error(
|
|
1058
|
+
`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`
|
|
1059
|
+
);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// Return the newly created meeting.
|
|
1063
|
+
return Promise.resolve(createdMeeting);
|
|
864
1064
|
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
// Return the newly created meeting.
|
|
870
|
-
return Promise.resolve(createdMeeting);
|
|
871
|
-
});
|
|
872
|
-
}
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
873
1067
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1068
|
+
// Return the existing meeting.
|
|
1069
|
+
return Promise.resolve(meeting);
|
|
1070
|
+
})
|
|
1071
|
+
);
|
|
877
1072
|
}
|
|
878
1073
|
|
|
879
1074
|
/**
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
private async createMeeting(
|
|
1075
|
+
* @param {String} destination see create()
|
|
1076
|
+
* @param {String} type see create()
|
|
1077
|
+
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
1078
|
+
* @returns {Promise} a new meeting instance complete with meeting info and destination
|
|
1079
|
+
* @private
|
|
1080
|
+
* @memberof Meetings
|
|
1081
|
+
*/
|
|
1082
|
+
private async createMeeting(
|
|
1083
|
+
destination: any,
|
|
1084
|
+
type: string = null,
|
|
1085
|
+
useRandomDelayForInfo = false
|
|
1086
|
+
) {
|
|
888
1087
|
const meeting = new Meeting(
|
|
889
1088
|
{
|
|
890
1089
|
// @ts-ignore
|
|
@@ -900,7 +1099,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
900
1099
|
},
|
|
901
1100
|
{
|
|
902
1101
|
// @ts-ignore
|
|
903
|
-
parent: this.webex
|
|
1102
|
+
parent: this.webex,
|
|
904
1103
|
}
|
|
905
1104
|
);
|
|
906
1105
|
|
|
@@ -918,7 +1117,10 @@ export default class Meetings extends WebexPlugin {
|
|
|
918
1117
|
const startTimeDate = new Date(startTime);
|
|
919
1118
|
const startTimeDatestamp = startTimeDate.getTime();
|
|
920
1119
|
const timeToStart = startTimeDatestamp - Date.now();
|
|
921
|
-
const maxWaitingTime = Math.max(
|
|
1120
|
+
const maxWaitingTime = Math.max(
|
|
1121
|
+
Math.min(timeToStart, MAX_RANDOM_DELAY_FOR_MEETING_INFO),
|
|
1122
|
+
0
|
|
1123
|
+
);
|
|
922
1124
|
|
|
923
1125
|
waitingTime = Math.round(Math.random() * maxWaitingTime);
|
|
924
1126
|
}
|
|
@@ -927,22 +1129,32 @@ export default class Meetings extends WebexPlugin {
|
|
|
927
1129
|
const {enableUnifiedMeetings} = this.config.experimental;
|
|
928
1130
|
|
|
929
1131
|
if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
|
|
930
|
-
meeting.fetchMeetingInfoTimeoutId = setTimeout(
|
|
1132
|
+
meeting.fetchMeetingInfoTimeoutId = setTimeout(
|
|
1133
|
+
() => meeting.fetchMeetingInfo({}),
|
|
1134
|
+
waitingTime
|
|
1135
|
+
);
|
|
931
1136
|
meeting.parseMeetingInfo(undefined, destination);
|
|
932
|
-
}
|
|
933
|
-
else {
|
|
1137
|
+
} else {
|
|
934
1138
|
await meeting.fetchMeetingInfo({});
|
|
935
1139
|
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
|
|
1140
|
+
} catch (err) {
|
|
1141
|
+
if (
|
|
1142
|
+
!(err instanceof CaptchaError) &&
|
|
1143
|
+
!(err instanceof PasswordError) &&
|
|
1144
|
+
!(err instanceof PermissionError)
|
|
1145
|
+
) {
|
|
939
1146
|
// if there is no meeting info we assume its a 1:1 call or wireless share
|
|
940
|
-
LoggerProxy.logger.info(
|
|
941
|
-
|
|
1147
|
+
LoggerProxy.logger.info(
|
|
1148
|
+
`Meetings:index#createMeeting --> Info Unable to fetch meeting info for ${destination}.`
|
|
1149
|
+
);
|
|
1150
|
+
LoggerProxy.logger.info(
|
|
1151
|
+
'Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share'
|
|
1152
|
+
);
|
|
942
1153
|
}
|
|
943
|
-
LoggerProxy.logger.debug(
|
|
944
|
-
|
|
945
|
-
|
|
1154
|
+
LoggerProxy.logger.debug(
|
|
1155
|
+
`Meetings:index#createMeeting --> Debug ${err} fetching /meetingInfo for creation.`
|
|
1156
|
+
);
|
|
1157
|
+
} finally {
|
|
946
1158
|
// For type LOCUS_ID we need to parse the locus object to get the information
|
|
947
1159
|
// about the caller and callee
|
|
948
1160
|
// Meeting Added event will be created in `handleLocusEvent`
|
|
@@ -960,12 +1172,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
960
1172
|
this,
|
|
961
1173
|
{
|
|
962
1174
|
file: 'meetings',
|
|
963
|
-
function: 'createMeeting'
|
|
1175
|
+
function: 'createMeeting',
|
|
964
1176
|
},
|
|
965
1177
|
EVENT_TRIGGERS.MEETING_ADDED,
|
|
966
1178
|
{
|
|
967
1179
|
meeting,
|
|
968
|
-
type: meetingAddedType
|
|
1180
|
+
type: meetingAddedType,
|
|
969
1181
|
}
|
|
970
1182
|
);
|
|
971
1183
|
}
|
|
@@ -993,26 +1205,26 @@ export default class Meetings extends WebexPlugin {
|
|
|
993
1205
|
}
|
|
994
1206
|
|
|
995
1207
|
/**
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1208
|
+
* get a specifc meeting given it's type matched to the value, i.e., locus url
|
|
1209
|
+
* @param {String} type
|
|
1210
|
+
* @param {Object} value
|
|
1211
|
+
* @returns {Meeting}
|
|
1212
|
+
* @public
|
|
1213
|
+
* @memberof Meetings
|
|
1214
|
+
*/
|
|
1003
1215
|
public getMeetingByType(type: string, value: object) {
|
|
1004
1216
|
return this.meetingCollection.getByKey(type, value);
|
|
1005
1217
|
}
|
|
1006
1218
|
|
|
1007
1219
|
/**
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1220
|
+
* Get all meetings.
|
|
1221
|
+
* @param {object} options
|
|
1222
|
+
* @param {object} options.startDate - get meetings after this start date
|
|
1223
|
+
* @param {object} options.endDate - get meetings before this end date
|
|
1224
|
+
* @returns {Object} All currently active meetings.
|
|
1225
|
+
* @public
|
|
1226
|
+
* @memberof Meetings
|
|
1227
|
+
*/
|
|
1016
1228
|
public getAllMeetings(
|
|
1017
1229
|
options: {
|
|
1018
1230
|
startDate: object;
|
|
@@ -1025,57 +1237,65 @@ export default class Meetings extends WebexPlugin {
|
|
|
1025
1237
|
}
|
|
1026
1238
|
|
|
1027
1239
|
/**
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1240
|
+
* syncs all the meeting from server
|
|
1241
|
+
* @returns {undefined}
|
|
1242
|
+
* @public
|
|
1243
|
+
* @memberof Meetings
|
|
1244
|
+
*/
|
|
1033
1245
|
public syncMeetings() {
|
|
1034
|
-
return this.request
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
locus
|
|
1042
|
-
|
|
1246
|
+
return this.request
|
|
1247
|
+
.getActiveMeetings()
|
|
1248
|
+
.then((locusArray) => {
|
|
1249
|
+
const activeLocusUrl = [];
|
|
1250
|
+
|
|
1251
|
+
if (locusArray?.loci && locusArray.loci.length > 0) {
|
|
1252
|
+
locusArray.loci.forEach((locus) => {
|
|
1253
|
+
activeLocusUrl.push(locus.url);
|
|
1254
|
+
this.handleLocusEvent({
|
|
1255
|
+
locus,
|
|
1256
|
+
locusUrl: locus.url,
|
|
1257
|
+
});
|
|
1043
1258
|
});
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
for (const meeting of Object.values(meetingsCollection)) {
|
|
1052
|
-
// @ts-ignore
|
|
1053
|
-
if (!activeLocusUrl.includes(meeting.locusUrl)) {
|
|
1054
|
-
// destroy function also uploads logs
|
|
1259
|
+
}
|
|
1260
|
+
const meetingsCollection = this.meetingCollection.getAll();
|
|
1261
|
+
|
|
1262
|
+
if (Object.keys(meetingsCollection).length > 0) {
|
|
1263
|
+
// Some time the mercury event is missed after mercury reconnect
|
|
1264
|
+
// if sync returns no locus then clear all the meetings
|
|
1265
|
+
for (const meeting of Object.values(meetingsCollection)) {
|
|
1055
1266
|
// @ts-ignore
|
|
1056
|
-
|
|
1267
|
+
if (!activeLocusUrl.includes(meeting.locusUrl)) {
|
|
1268
|
+
// destroy function also uploads logs
|
|
1269
|
+
// @ts-ignore
|
|
1270
|
+
this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
1271
|
+
}
|
|
1057
1272
|
}
|
|
1058
1273
|
}
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1274
|
+
})
|
|
1275
|
+
.catch((error) => {
|
|
1276
|
+
LoggerProxy.logger.error(
|
|
1277
|
+
`Meetings:index#syncMeetings --> failed to sync meetings, ${error}`
|
|
1278
|
+
);
|
|
1279
|
+
throw new Error(error);
|
|
1280
|
+
});
|
|
1061
1281
|
}
|
|
1062
1282
|
|
|
1063
1283
|
/**
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1284
|
+
* Get all scheduled meetings.
|
|
1285
|
+
* @param {object} options
|
|
1286
|
+
* @param {object} options.startDate - get meetings after this start date
|
|
1287
|
+
* @param {object} options.endDate - get meetings before this end date
|
|
1288
|
+
* @returns {Object} All scheduled meetings.
|
|
1289
|
+
* @memberof Meetings
|
|
1290
|
+
*/
|
|
1071
1291
|
getScheduledMeetings() {
|
|
1072
1292
|
return this.meetingCollection.getAll({scheduled: true});
|
|
1073
1293
|
}
|
|
1074
1294
|
|
|
1075
1295
|
/**
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1296
|
+
* Get the logger instance for plugin-meetings
|
|
1297
|
+
* @returns {Logger}
|
|
1298
|
+
*/
|
|
1079
1299
|
getLogger() {
|
|
1080
1300
|
return LoggerProxy.get();
|
|
1081
1301
|
}
|