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