@webex/plugin-meetings 3.0.0-beta.3 → 3.0.0-beta.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -8
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +41 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +9 -15
- package/dist/config.js.map +1 -1
- package/dist/constants.js +315 -68
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +114 -17
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +101 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +561 -246
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +10 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +68 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +314 -163
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +103 -231
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +137 -222
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +93 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +4624 -3740
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +249 -184
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +400 -346
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +598 -586
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +87 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +349 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +143 -234
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +26 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +813 -596
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +183 -156
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +135 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +158 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +194 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +324 -259
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +14 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +263 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +66 -43
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +536 -439
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +233 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +322 -200
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +20 -26
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +388 -476
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +362 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +99 -94
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +131 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +151 -101
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +117 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +416 -497
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +145 -88
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +71 -0
- package/dist/types/constants.d.ts +1066 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +273 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +163 -0
- package/dist/types/meeting/index.d.ts +1676 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +290 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +102 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +367 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +65 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +285 -0
- package/dist/types/multistream/sendSlotManager.d.ts +61 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +194 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +78 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +92 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +47 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +201 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/internal-README.md +7 -6
- package/package.json +29 -21
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +26 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +18 -19
- package/src/constants.ts +260 -22
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +40 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +557 -119
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +81 -17
- package/src/locus-info/{parser.js → parser.ts} +303 -104
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +458 -0
- package/src/media/properties.ts +283 -0
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +384 -0
- package/src/meeting/in-meeting-actions.ts +191 -3
- package/src/meeting/index.ts +7882 -0
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +451 -0
- package/src/meeting/{request.js → request.ts} +421 -220
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +697 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +210 -0
- package/src/meeting-info/meeting-info-v2.ts +429 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +60 -51
- package/src/meeting-info/{utilv2.js → utilv2.ts} +78 -71
- package/src/meetings/{collection.js → collection.ts} +26 -3
- package/src/meetings/index.ts +1470 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +132 -37
- package/src/member/{index.js → index.ts} +160 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +397 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +351 -146
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +353 -0
- package/src/metrics/{constants.js → constants.ts} +12 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +337 -63
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +63 -3
- package/src/multistream/remoteMediaManager.ts +300 -66
- package/src/multistream/sendSlotManager.ts +170 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/index.ts +671 -0
- package/src/reachability/request.ts +50 -35
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/{index.js → index.ts} +258 -138
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +332 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/{index.js → index.ts} +127 -79
- package/src/roap/request.ts +153 -0
- package/src/roap/turnDiscovery.ts +109 -47
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1250 -0
- package/src/statsAnalyzer/mqaUtil.ts +292 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +790 -530
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +237 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1390 -17
- package/test/unit/spec/locus-info/infoUtils.js +71 -40
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +32 -0
- package/test/unit/spec/locus-info/parser.js +119 -44
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +296 -12
- package/test/unit/spec/media/index.ts +128 -77
- package/test/unit/spec/media/properties.ts +11 -11
- package/test/unit/spec/meeting/in-meeting-actions.ts +92 -3
- package/test/unit/spec/meeting/index.js +7433 -2752
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +420 -211
- package/test/unit/spec/meeting/request.js +545 -79
- package/test/unit/spec/meeting/utils.js +722 -174
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +624 -76
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +15 -1
- package/test/unit/spec/meetings/index.js +1365 -377
- package/test/unit/spec/meetings/utils.js +216 -14
- package/test/unit/spec/member/index.js +61 -7
- package/test/unit/spec/member/util.js +526 -26
- package/test/unit/spec/members/index.js +536 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +217 -4
- package/test/unit/spec/metrics/index.js +12 -66
- package/test/unit/spec/multistream/mediaRequestManager.ts +1012 -109
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +738 -65
- package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +598 -26
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reconnection-manager/index.js +181 -12
- package/test/unit/spec/recording-controller/index.js +307 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +179 -64
- package/test/unit/spec/roap/request.ts +232 -0
- package/test/unit/spec/roap/turnDiscovery.ts +123 -58
- package/test/unit/spec/rtcMetrics/index.ts +73 -0
- package/test/unit/spec/stats-analyzer/index.js +199 -60
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +57 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/media/properties.js +0 -289
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/reachability/index.js +0 -464
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
package/src/meetings/index.js
DELETED
|
@@ -1,1015 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import '@webex/internal-plugin-mercury';
|
|
3
|
-
import '@webex/internal-plugin-conversation';
|
|
4
|
-
import {WebexPlugin} from '@webex/webex-core';
|
|
5
|
-
import {MediaConnection as MC} from '@webex/internal-media-core';
|
|
6
|
-
|
|
7
|
-
import 'webrtc-adapter';
|
|
8
|
-
|
|
9
|
-
import Metrics from '../metrics';
|
|
10
|
-
import {trigger, eventType} from '../metrics/config';
|
|
11
|
-
import LoggerConfig from '../common/logs/logger-config';
|
|
12
|
-
import StaticConfig from '../common/config';
|
|
13
|
-
import LoggerProxy from '../common/logs/logger-proxy';
|
|
14
|
-
import LoggerRequest from '../common/logs/request';
|
|
15
|
-
import Trigger from '../common/events/trigger-proxy';
|
|
16
|
-
import Media from '../media';
|
|
17
|
-
import MeetingUtil from '../meeting/util';
|
|
18
|
-
import {
|
|
19
|
-
MEETINGS,
|
|
20
|
-
EVENTS,
|
|
21
|
-
EVENT_TRIGGERS,
|
|
22
|
-
READY,
|
|
23
|
-
LOCUSEVENT,
|
|
24
|
-
LOCUS_URL,
|
|
25
|
-
MAX_RANDOM_DELAY_FOR_MEETING_INFO,
|
|
26
|
-
ROAP,
|
|
27
|
-
ONLINE,
|
|
28
|
-
OFFLINE,
|
|
29
|
-
_MEETING_,
|
|
30
|
-
_JOIN_,
|
|
31
|
-
_LOCUS_ID_,
|
|
32
|
-
_INCOMING_,
|
|
33
|
-
LOCUS,
|
|
34
|
-
CORRELATION_ID,
|
|
35
|
-
SIP_URI,
|
|
36
|
-
_LEFT_,
|
|
37
|
-
_ID_,
|
|
38
|
-
MEETING_REMOVED_REASON,
|
|
39
|
-
_CONVERSATION_URL_,
|
|
40
|
-
CONVERSATION_URL
|
|
41
|
-
} from '../constants';
|
|
42
|
-
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
43
|
-
import MeetingInfo from '../meeting-info';
|
|
44
|
-
import MeetingInfoV2 from '../meeting-info/meeting-info-v2';
|
|
45
|
-
import Meeting from '../meeting';
|
|
46
|
-
import PersonalMeetingRoom from '../personal-meeting-room';
|
|
47
|
-
import Reachability from '../reachability';
|
|
48
|
-
import Request from '../meetings/request';
|
|
49
|
-
import PasswordError from '../common/errors/password-error';
|
|
50
|
-
import CaptchaError from '../common/errors/captcha-error';
|
|
51
|
-
|
|
52
|
-
import MeetingCollection from './collection';
|
|
53
|
-
import MeetingsUtil from './util';
|
|
54
|
-
|
|
55
|
-
let mediaLogger;
|
|
56
|
-
|
|
57
|
-
class MediaLogger {
|
|
58
|
-
info(...args) {
|
|
59
|
-
LoggerProxy.logger.info(...args);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
log(...args) {
|
|
63
|
-
LoggerProxy.logger.log(...args);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
error(...args) {
|
|
67
|
-
LoggerProxy.logger.error(...args);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
warn(...args) {
|
|
71
|
-
LoggerProxy.logger.warn(...args);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
trace(...args) {
|
|
75
|
-
LoggerProxy.logger.trace(...args);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
debug(...args) {
|
|
79
|
-
LoggerProxy.logger.debug(...args);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Meetings Ready Event
|
|
84
|
-
* Emitted when the meetings instance on webex is ready
|
|
85
|
-
* @event meetings:ready
|
|
86
|
-
* @instance
|
|
87
|
-
* @memberof Meetings
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Meetings Network Disconnected Event
|
|
92
|
-
* Emitted when the meetings instance is disconnected from
|
|
93
|
-
* the internal mercury server
|
|
94
|
-
* @event network:disconnected
|
|
95
|
-
* @instance
|
|
96
|
-
* @memberof Meetings
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Meetings Registered Event
|
|
101
|
-
* Emitted when the meetings instance has been registered and listening
|
|
102
|
-
* @event meetings:registered
|
|
103
|
-
* @instance
|
|
104
|
-
* @memberof Meetings
|
|
105
|
-
*/
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Meeting Removed Event
|
|
109
|
-
* Emitted when a meeting was removed from the cache of meetings
|
|
110
|
-
* @event meeting:removed
|
|
111
|
-
* @instance
|
|
112
|
-
* @type {Object}
|
|
113
|
-
* @property {String} meetingId the removed meeting
|
|
114
|
-
* @property {Object} response the server response
|
|
115
|
-
* @property {String} type what type of meeting it was
|
|
116
|
-
* @memberof Meetings
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Meeting Added Event
|
|
121
|
-
* Emitted when a meeting was added to the cache of meetings
|
|
122
|
-
* @event meeting:added
|
|
123
|
-
* @instance
|
|
124
|
-
* @type {Object}
|
|
125
|
-
* @property {String} meetingId the added meeting
|
|
126
|
-
* @property {String} type what type of meeting it was
|
|
127
|
-
* @memberof Meetings
|
|
128
|
-
*/
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Maintain a cache of meetings and sync with services.
|
|
132
|
-
* @class
|
|
133
|
-
*/
|
|
134
|
-
export default class Meetings extends WebexPlugin {
|
|
135
|
-
namespace = MEETINGS;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Initializes the Meetings Plugin
|
|
139
|
-
* @constructor
|
|
140
|
-
* @public
|
|
141
|
-
* @memberof Meetings
|
|
142
|
-
*/
|
|
143
|
-
constructor(...args) {
|
|
144
|
-
super(...args);
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* The Meetings request to interact with server
|
|
148
|
-
* @instance
|
|
149
|
-
* @type {Object}
|
|
150
|
-
* @private
|
|
151
|
-
* @memberof Meetings
|
|
152
|
-
*/
|
|
153
|
-
this.request = new Request({}, {parent: this.webex});
|
|
154
|
-
/**
|
|
155
|
-
* Log upload request helper
|
|
156
|
-
* @instance
|
|
157
|
-
* @type {Object}
|
|
158
|
-
* @private
|
|
159
|
-
* @memberof Meetings
|
|
160
|
-
*/
|
|
161
|
-
this.loggerRequest = new LoggerRequest({webex: this.webex});
|
|
162
|
-
this.meetingCollection = new MeetingCollection();
|
|
163
|
-
/**
|
|
164
|
-
* The PersonalMeetingRoom object to interact with server
|
|
165
|
-
* @instance
|
|
166
|
-
* @type {Object}
|
|
167
|
-
* @public
|
|
168
|
-
* @memberof Meetings
|
|
169
|
-
*/
|
|
170
|
-
this.personalMeetingRoom = null;
|
|
171
|
-
/**
|
|
172
|
-
* The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called
|
|
173
|
-
* starts as null
|
|
174
|
-
* @instance
|
|
175
|
-
* @type {Object}
|
|
176
|
-
* @private
|
|
177
|
-
* @memberof Meetings
|
|
178
|
-
*/
|
|
179
|
-
this.reachability = null;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* If the meetings plugin has been registered and listening via {@link Meetings#register}
|
|
183
|
-
* @instance
|
|
184
|
-
* @type {Boolean}
|
|
185
|
-
* @public
|
|
186
|
-
* @memberof Meetings
|
|
187
|
-
*/
|
|
188
|
-
this.registered = false;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* This values indicates the preferred webex site the user will start there meeting, getsits value from {@link Meetings#register}
|
|
192
|
-
* @instance
|
|
193
|
-
* @type {String}
|
|
194
|
-
* @private
|
|
195
|
-
* @memberof Meetings
|
|
196
|
-
*/
|
|
197
|
-
this.preferredWebexSite = '';
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* The public interface for the internal Media util files. These are helpful to expose outside the context
|
|
201
|
-
* of a meeting so that a user can access media without creating a meeting instance.
|
|
202
|
-
* @instance
|
|
203
|
-
* @type {Object}
|
|
204
|
-
* @private
|
|
205
|
-
* @memberof Meetings
|
|
206
|
-
*/
|
|
207
|
-
this.media = {
|
|
208
|
-
getUserMedia: Media.getUserMedia,
|
|
209
|
-
getSupportedDevice: Media.getSupportedDevice
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
this.onReady();
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* handle locus events and takes meeting actions with them as they come in
|
|
217
|
-
* @param {Object} data a locus event
|
|
218
|
-
* @param {String} data.locusUrl
|
|
219
|
-
* @param {Object} data.locus
|
|
220
|
-
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
221
|
-
* @param {String} data.eventType
|
|
222
|
-
* @returns {undefined}
|
|
223
|
-
* @private
|
|
224
|
-
* @memberof Meetings
|
|
225
|
-
*/
|
|
226
|
-
handleLocusEvent(data, useRandomDelayForInfo = false) {
|
|
227
|
-
let meeting = null;
|
|
228
|
-
|
|
229
|
-
// getting meeting by correlationId. This will happen for the new event
|
|
230
|
-
// Either the locus
|
|
231
|
-
// TODO : Add check for the callBack Address
|
|
232
|
-
meeting = this.meetingCollection.getByKey(LOCUS_URL, data.locusUrl) ||
|
|
233
|
-
this.meetingCollection.getByKey(CORRELATION_ID, MeetingsUtil.checkForCorrelationId(this.webex.internal.device.url, data.locus)) ||
|
|
234
|
-
this.meetingCollection.getByKey(SIP_URI, data.locus.self && data.locus.self.callbackInfo && data.locus.self.callbackInfo.callbackAddress) ||
|
|
235
|
-
(data.locus.info?.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(CONVERSATION_URL, data.locus.conversationUrl));
|
|
236
|
-
|
|
237
|
-
// Special case when locus has got replaced, This only happend once if a replace locus exists
|
|
238
|
-
// https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
|
|
239
|
-
|
|
240
|
-
if (!meeting && data.locus?.replaces?.length > 0) {
|
|
241
|
-
// Always the last element in the replace is the active one
|
|
242
|
-
meeting = this.meetingCollection.getByKey(LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
if (!meeting) {
|
|
246
|
-
// TODO: create meeting when we get a meeting object
|
|
247
|
-
// const checkForEnded = (locus) => {
|
|
248
|
-
// TODO: you already ended the meeting but you got an event later
|
|
249
|
-
// Mainly for 1:1 Callsor meeting
|
|
250
|
-
// Happens mainly after refresh
|
|
251
|
-
|
|
252
|
-
// 1:1 Meeting
|
|
253
|
-
// 1) You ended a call before but you got a mercury event
|
|
254
|
-
// Make sure end the call and cleanup the meeting only if the mercury
|
|
255
|
-
// event says so
|
|
256
|
-
// 2) Maintain lastSync time in the meetings object which helps to compare
|
|
257
|
-
// If the meeting came befor or after the sync . ANy meeting start time before the sync time is invalid
|
|
258
|
-
|
|
259
|
-
// For space Meeting
|
|
260
|
-
// Check the locus object and see who has joined
|
|
261
|
-
|
|
262
|
-
// };
|
|
263
|
-
// rather then locus object change to locus url
|
|
264
|
-
|
|
265
|
-
if (data.locus && data.locus.fullState && data.locus.fullState.state === LOCUS.STATE.INACTIVE) {
|
|
266
|
-
// just ignore the event as its already ended and not active
|
|
267
|
-
LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
268
|
-
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
// When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
|
|
274
|
-
// Any future events will be neglected
|
|
275
|
-
|
|
276
|
-
if (data.locus && data.locus.self && (data.locus.self.state === _LEFT_ && data.locus.self.removed === true)) {
|
|
277
|
-
// just ignore the event as its already ended and not active
|
|
278
|
-
LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
279
|
-
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
this.create(data.locus, _LOCUS_ID_, useRandomDelayForInfo).then((newMeeting) => {
|
|
284
|
-
meeting = newMeeting;
|
|
285
|
-
|
|
286
|
-
// It's a new meeting so initialize the locus data
|
|
287
|
-
meeting.locusInfo.initialSetup(data.locus);
|
|
288
|
-
}).catch((e) => {
|
|
289
|
-
console.log(e);
|
|
290
|
-
})
|
|
291
|
-
.finally(() => {
|
|
292
|
-
// There will be cases where locus event comes in gets created and deleted because its a 1:1 and meeting gets deleted
|
|
293
|
-
// because the other user left so before sending 'added' event make sure it exists in the collection
|
|
294
|
-
|
|
295
|
-
if (this.getMeetingByType(_ID_, meeting.id)) {
|
|
296
|
-
Metrics.postEvent({event: eventType.REMOTE_STARTED, meeting, data: {trigger: trigger.MERCURY_EVENT}});
|
|
297
|
-
Trigger.trigger(
|
|
298
|
-
this,
|
|
299
|
-
{
|
|
300
|
-
file: 'meetings',
|
|
301
|
-
function: 'handleLocusEvent'
|
|
302
|
-
},
|
|
303
|
-
EVENT_TRIGGERS.MEETING_ADDED,
|
|
304
|
-
{
|
|
305
|
-
meeting,
|
|
306
|
-
type: meeting.type === _MEETING_ ? _JOIN_ : _INCOMING_
|
|
307
|
-
}
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
else {
|
|
311
|
-
// Meeting got added but was not found in the collection. It might have got destroyed
|
|
312
|
-
LoggerProxy.logger.warn('Meetings:index#handleLocusEvent --> Created and destroyed meeting object before sending an event');
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
meeting.locusInfo.parse(meeting, data);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* handles locus events through mercury that are not roap
|
|
323
|
-
* @param {Object} envelope
|
|
324
|
-
* @param {Object} envelope.data
|
|
325
|
-
* @param {String} envelope.data.eventType
|
|
326
|
-
* @returns {undefined}
|
|
327
|
-
* @private
|
|
328
|
-
* @memberof Meetings
|
|
329
|
-
*/
|
|
330
|
-
handleLocusMercury(envelope) {
|
|
331
|
-
const {data} = envelope;
|
|
332
|
-
const {eventType} = data;
|
|
333
|
-
|
|
334
|
-
if (eventType && eventType !== LOCUSEVENT.MESSAGE_ROAP) {
|
|
335
|
-
this.handleLocusEvent(data, true);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* handles mecury offline event
|
|
342
|
-
* @returns {undefined}
|
|
343
|
-
* @private
|
|
344
|
-
* @memberof Meetings
|
|
345
|
-
*/
|
|
346
|
-
handleMercuryOffline() {
|
|
347
|
-
Trigger.trigger(
|
|
348
|
-
this,
|
|
349
|
-
{
|
|
350
|
-
file: 'meetings/index',
|
|
351
|
-
function: 'handleMercuryOffline'
|
|
352
|
-
},
|
|
353
|
-
EVENT_TRIGGERS.MEETINGS_NETWORK_DISCONNECTED,
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* registers for locus and roap mercury events
|
|
360
|
-
* @returns {undefined}
|
|
361
|
-
* @private
|
|
362
|
-
* @memberof Meetings
|
|
363
|
-
*/
|
|
364
|
-
listenForEvents() {
|
|
365
|
-
this.webex.internal.mercury.on(LOCUSEVENT.LOCUS_MERCURY, (envelope) => {
|
|
366
|
-
this.handleLocusMercury(envelope);
|
|
367
|
-
});
|
|
368
|
-
this.webex.internal.mercury.on(ROAP.ROAP_MERCURY, (envelope) => {
|
|
369
|
-
MeetingsUtil.handleRoapMercury(envelope, this.meetingCollection);
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
this.webex.internal.mercury.on(ONLINE, () => {
|
|
373
|
-
this.syncMeetings();
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
this.webex.internal.mercury.on(OFFLINE, () => {
|
|
377
|
-
this.handleMercuryOffline();
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* stops listening for locus and roap mercury events
|
|
383
|
-
* @returns {undefined}
|
|
384
|
-
* @private
|
|
385
|
-
* @memberof Meetings
|
|
386
|
-
*/
|
|
387
|
-
stopListeningForEvents() {
|
|
388
|
-
this.webex.internal.mercury.off(LOCUSEVENT.LOCUS_MERCURY);
|
|
389
|
-
this.webex.internal.mercury.off(ROAP.ROAP_MERCURY);
|
|
390
|
-
this.webex.internal.mercury.off(ONLINE);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* @returns {undefined}
|
|
395
|
-
* @private
|
|
396
|
-
* @memberof Meetings
|
|
397
|
-
*/
|
|
398
|
-
onReady() {
|
|
399
|
-
this.webex.once(READY, () => {
|
|
400
|
-
StaticConfig.set(this.config);
|
|
401
|
-
LoggerConfig.set(this.config.logging);
|
|
402
|
-
LoggerProxy.set(this.webex.logger);
|
|
403
|
-
|
|
404
|
-
mediaLogger = new MediaLogger();
|
|
405
|
-
MC.setLogger(mediaLogger);
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* The MeetingInfo object to interact with server
|
|
409
|
-
* @instance
|
|
410
|
-
* @type {Object}
|
|
411
|
-
* @private
|
|
412
|
-
* @memberof Meetings
|
|
413
|
-
*/
|
|
414
|
-
this.meetingInfo = this.config.experimental.enableUnifiedMeetings ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);
|
|
415
|
-
this.personalMeetingRoom = new PersonalMeetingRoom({meetingInfo: this.meetingInfo}, {parent: this.webex});
|
|
416
|
-
|
|
417
|
-
Trigger.trigger(
|
|
418
|
-
this,
|
|
419
|
-
{
|
|
420
|
-
file: 'meetings',
|
|
421
|
-
function: 'onReady'
|
|
422
|
-
},
|
|
423
|
-
EVENT_TRIGGERS.MEETINGS_READY
|
|
424
|
-
);
|
|
425
|
-
|
|
426
|
-
MeetingsUtil.checkH264Support({disableNotifications: true});
|
|
427
|
-
Metrics.initialSetup(this.meetingCollection, this.webex);
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* API to toggle unified meetings
|
|
433
|
-
* @param {Boolean} changeState
|
|
434
|
-
* @private
|
|
435
|
-
* @memberof Meetings
|
|
436
|
-
* @returns {undefined}
|
|
437
|
-
*/
|
|
438
|
-
_toggleUnifiedMeetings(changeState) {
|
|
439
|
-
if (typeof changeState !== 'boolean') {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
if (this.config?.experimental?.enableUnifiedMeetings !== changeState) {
|
|
443
|
-
this.config.experimental.enableUnifiedMeetings = changeState;
|
|
444
|
-
this.meetingInfo = changeState ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* API to enable or disable TURN discovery
|
|
450
|
-
* @param {Boolean} enable
|
|
451
|
-
* @private
|
|
452
|
-
* @memberof Meetings
|
|
453
|
-
* @returns {undefined}
|
|
454
|
-
*/
|
|
455
|
-
_toggleTurnDiscovery(enable) {
|
|
456
|
-
if (typeof enable !== 'boolean') {
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
this.config.experimental.enableTurnDiscovery = enable;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* API to toggle starting adhoc meeting
|
|
464
|
-
* @param {Boolean} changeState
|
|
465
|
-
* @private
|
|
466
|
-
* @memberof Meetings
|
|
467
|
-
* @returns {undefined}
|
|
468
|
-
*/
|
|
469
|
-
_toggleAdhocMeetings(changeState) {
|
|
470
|
-
if (typeof changeState !== 'boolean') {
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
if (this.config?.experimental?.enableAdhocMeetings !== changeState) {
|
|
474
|
-
this.config.experimental.enableAdhocMeetings = changeState;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Explicitly sets up the meetings plugin by registering
|
|
480
|
-
* the device, connecting to mercury, and listening for locus events.
|
|
481
|
-
*
|
|
482
|
-
* @returns {Promise}
|
|
483
|
-
* @public
|
|
484
|
-
* @memberof Meetings
|
|
485
|
-
*/
|
|
486
|
-
register() {
|
|
487
|
-
if (!this.webex.canAuthorize) {
|
|
488
|
-
LoggerProxy.logger.error('Meetings:index#register --> ERROR, Unable to register, SDK cannot authorize');
|
|
489
|
-
|
|
490
|
-
return Promise.reject(new Error('SDK cannot authorize'));
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
if (this.registered) {
|
|
495
|
-
LoggerProxy.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');
|
|
496
|
-
|
|
497
|
-
return Promise.resolve();
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
return Promise.all([
|
|
501
|
-
this.fetchUserPreferredWebexSite(),
|
|
502
|
-
this.getGeoHint(),
|
|
503
|
-
this.startReachability().catch((error) => {
|
|
504
|
-
LoggerProxy.logger.error(`Meetings:index#register --> GDM error, ${error.message}`);
|
|
505
|
-
}),
|
|
506
|
-
this.webex.internal.device.register()
|
|
507
|
-
.then(() => LoggerProxy.logger.info(`Meetings:index#register --> INFO, Device registered ${this.webex.internal.device.url}`))
|
|
508
|
-
.then(() => this.webex.internal.mercury.connect()),
|
|
509
|
-
MeetingsUtil.checkH264Support.call(this)
|
|
510
|
-
]).then(() => {
|
|
511
|
-
this.listenForEvents();
|
|
512
|
-
Trigger.trigger(
|
|
513
|
-
this,
|
|
514
|
-
{
|
|
515
|
-
file: 'meetings',
|
|
516
|
-
function: 'register'
|
|
517
|
-
},
|
|
518
|
-
EVENT_TRIGGERS.MEETINGS_REGISTERED
|
|
519
|
-
);
|
|
520
|
-
this.registered = true;
|
|
521
|
-
Metrics.sendBehavioralMetric(
|
|
522
|
-
BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_SUCCESS,
|
|
523
|
-
);
|
|
524
|
-
})
|
|
525
|
-
.catch((error) => {
|
|
526
|
-
LoggerProxy.logger.error(`Meetings:index#register --> ERROR, Unable to register, ${error.message}`);
|
|
527
|
-
|
|
528
|
-
Metrics.sendBehavioralMetric(
|
|
529
|
-
BEHAVIORAL_METRICS.MEETINGS_REGISTRATION_FAILED,
|
|
530
|
-
{
|
|
531
|
-
reason: error.message,
|
|
532
|
-
stack: error.stack
|
|
533
|
-
}
|
|
534
|
-
);
|
|
535
|
-
|
|
536
|
-
return Promise.reject(error);
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Explicitly tears down the meetings plugin by deregistering
|
|
542
|
-
* the device, disconnecting from mercury, and stops listening to locus events
|
|
543
|
-
*
|
|
544
|
-
* @returns {Promise}
|
|
545
|
-
* @public
|
|
546
|
-
* @memberof Meetings
|
|
547
|
-
*/
|
|
548
|
-
unregister() {
|
|
549
|
-
if (!this.registered) {
|
|
550
|
-
LoggerProxy.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');
|
|
551
|
-
|
|
552
|
-
return Promise.resolve();
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
this.stopListeningForEvents();
|
|
556
|
-
|
|
557
|
-
return this.webex.internal.mercury.disconnect()
|
|
558
|
-
.then(() => this.webex.internal.device.unregister())
|
|
559
|
-
.then(() => {
|
|
560
|
-
Trigger.trigger(
|
|
561
|
-
this,
|
|
562
|
-
{
|
|
563
|
-
file: 'meetings',
|
|
564
|
-
function: 'unregister'
|
|
565
|
-
},
|
|
566
|
-
EVENT_TRIGGERS.MEETINGS_UNREGISTERED
|
|
567
|
-
);
|
|
568
|
-
this.registered = false;
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* Uploads logs to the webex services for tracking
|
|
574
|
-
* @param {Object} [options={}]
|
|
575
|
-
* @param {String} [options.callStart] Call Start Time
|
|
576
|
-
* @param {String} [options.feedbackId] ID used for tracking
|
|
577
|
-
* @param {String} [options.locusId]
|
|
578
|
-
* @param {String} [options.correlationId]
|
|
579
|
-
* @param {String} [options.meetingId] webex meeting ID
|
|
580
|
-
* @param {String} [options.userId] userId
|
|
581
|
-
* @param {String} [options.orgId] org id
|
|
582
|
-
* @returns {String} feedback ID logs were submitted under
|
|
583
|
-
*/
|
|
584
|
-
uploadLogs(options = {}) {
|
|
585
|
-
LoggerProxy.logger.info('Meetings:index#uploadLogs --> uploading logs');
|
|
586
|
-
|
|
587
|
-
return this.loggerRequest.uploadLogs(options)
|
|
588
|
-
.then((uploadResult) => {
|
|
589
|
-
LoggerProxy.logger.info('Meetings:index#uploadLogs --> Upload logs for meeting completed.', uploadResult);
|
|
590
|
-
Trigger.trigger(
|
|
591
|
-
this,
|
|
592
|
-
{
|
|
593
|
-
file: 'meetings',
|
|
594
|
-
function: 'uploadLogs'
|
|
595
|
-
},
|
|
596
|
-
EVENT_TRIGGERS.MEETING_LOG_UPLOAD_SUCCESS,
|
|
597
|
-
{
|
|
598
|
-
meetingId: options.meetingId,
|
|
599
|
-
details: uploadResult
|
|
600
|
-
}
|
|
601
|
-
);
|
|
602
|
-
})
|
|
603
|
-
.catch((uploadError) => {
|
|
604
|
-
LoggerProxy.logger.error('Meetings:index#uploadLogs --> Unable to upload logs for meeting', uploadError);
|
|
605
|
-
Trigger.trigger(
|
|
606
|
-
this,
|
|
607
|
-
{
|
|
608
|
-
file: 'meetings',
|
|
609
|
-
function: 'uploadLogs'
|
|
610
|
-
},
|
|
611
|
-
EVENT_TRIGGERS.MEETING_LOG_UPLOAD_FAILURE,
|
|
612
|
-
{
|
|
613
|
-
meetingId: options.meetingId,
|
|
614
|
-
reason: uploadError
|
|
615
|
-
}
|
|
616
|
-
);
|
|
617
|
-
|
|
618
|
-
Metrics.sendBehavioralMetric(
|
|
619
|
-
BEHAVIORAL_METRICS.UPLOAD_LOGS_FAILURE,
|
|
620
|
-
{
|
|
621
|
-
meetingId: options.meetingsId,
|
|
622
|
-
reason: uploadError.message,
|
|
623
|
-
stack: uploadError.stack,
|
|
624
|
-
code: uploadError.code
|
|
625
|
-
}
|
|
626
|
-
);
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* initializes the reachability instance for Meetings
|
|
632
|
-
* @returns {undefined}
|
|
633
|
-
* @public
|
|
634
|
-
* @memberof Meetings
|
|
635
|
-
*/
|
|
636
|
-
setReachability() {
|
|
637
|
-
this.reachability = new Reachability(this.webex);
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* gets the reachability instance for Meetings
|
|
642
|
-
* @returns {Reachability}
|
|
643
|
-
* @public
|
|
644
|
-
* @memberof Meetings
|
|
645
|
-
*/
|
|
646
|
-
getReachability() {
|
|
647
|
-
return this.reachability;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* initializes and starts gathering reachability for Meetings
|
|
652
|
-
* @returns {Promise}
|
|
653
|
-
* @public
|
|
654
|
-
* @memberof Meetings
|
|
655
|
-
*/
|
|
656
|
-
startReachability() {
|
|
657
|
-
if (!this.reachability) {
|
|
658
|
-
this.setReachability();
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
return this.getReachability().gatherReachability();
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Get geoHint for info for meetings
|
|
666
|
-
* @returns {Promise}
|
|
667
|
-
* @private
|
|
668
|
-
* @memberof Meetings
|
|
669
|
-
*/
|
|
670
|
-
getGeoHint() {
|
|
671
|
-
return this.request.fetchGeoHint().then((res) => {
|
|
672
|
-
this.geoHintInfo = res;
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Fetch user preferred webex site information
|
|
678
|
-
* This also has other infomation about the user
|
|
679
|
-
* @returns {Promise}
|
|
680
|
-
* @private
|
|
681
|
-
* @memberof Meetings
|
|
682
|
-
*/
|
|
683
|
-
fetchUserPreferredWebexSite() {
|
|
684
|
-
return this.request.getMeetingPreferences().then((res) => {
|
|
685
|
-
if (res) {
|
|
686
|
-
this.preferredWebexSite = MeetingsUtil.parseDefaultSiteFromMeetingPreferences(res);
|
|
687
|
-
}
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* gets the personal meeting room instance, for saved PMR values for this user
|
|
694
|
-
* @returns {PersonalMeetingRoom}
|
|
695
|
-
* @public
|
|
696
|
-
* @memberof Meetings
|
|
697
|
-
*/
|
|
698
|
-
|
|
699
|
-
getPersonalMeetingRoom() {
|
|
700
|
-
return this.personalMeetingRoom;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @param {Meeting} meeting
|
|
705
|
-
* @param {Object} reason
|
|
706
|
-
* @param {String} type
|
|
707
|
-
* @returns {Undefined}
|
|
708
|
-
* @private
|
|
709
|
-
* @memberof Meetings
|
|
710
|
-
*/
|
|
711
|
-
destroy(meeting, reason) {
|
|
712
|
-
MeetingUtil.cleanUp(meeting);
|
|
713
|
-
this.meetingCollection.delete(meeting.id);
|
|
714
|
-
Trigger.trigger(
|
|
715
|
-
this,
|
|
716
|
-
{
|
|
717
|
-
file: 'meetings',
|
|
718
|
-
function: 'destroy'
|
|
719
|
-
},
|
|
720
|
-
EVENT_TRIGGERS.MEETING_REMOVED,
|
|
721
|
-
{
|
|
722
|
-
meetingId: meeting.id,
|
|
723
|
-
reason
|
|
724
|
-
}
|
|
725
|
-
);
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Create a meeting.
|
|
730
|
-
* @param {string} destination - sipURL, spaceId, phonenumber, or locus object}
|
|
731
|
-
* @param {string} [type] - the optional specified type, such as locusId
|
|
732
|
-
* @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
|
|
733
|
-
* @returns {Promise<Meeting>} A new Meeting.
|
|
734
|
-
* @public
|
|
735
|
-
* @memberof Meetings
|
|
736
|
-
*/
|
|
737
|
-
create(destination, type = null, useRandomDelayForInfo = false) {
|
|
738
|
-
// TODO: type should be from a dictionary
|
|
739
|
-
|
|
740
|
-
// Validate meeting information based on the provided destination and
|
|
741
|
-
// type. This must be performed prior to determining if the meeting is
|
|
742
|
-
// found in the collection, as we mutate the destination for hydra person
|
|
743
|
-
// id values.
|
|
744
|
-
return this.meetingInfo.fetchInfoOptions(destination, type)
|
|
745
|
-
// Catch a failure to fetch info options.
|
|
746
|
-
.catch((error) => {
|
|
747
|
-
LoggerProxy.logger.info(`Meetings:index#create --> INFO, unable to determine info options: ${error.message}`);
|
|
748
|
-
})
|
|
749
|
-
.then((options = {}) => {
|
|
750
|
-
// Normalize the destination.
|
|
751
|
-
const targetDest = options.destination || destination;
|
|
752
|
-
|
|
753
|
-
// check for the conversation URL then sip Url
|
|
754
|
-
let meeting = null;
|
|
755
|
-
|
|
756
|
-
if (type === _CONVERSATION_URL_ || options.type === _CONVERSATION_URL_) {
|
|
757
|
-
const foundMeeting = this.meetingCollection.getByKey(CONVERSATION_URL, targetDest);
|
|
758
|
-
|
|
759
|
-
if (foundMeeting) {
|
|
760
|
-
const foundMeetingIsNotCalendarMeeting = !foundMeeting.locusInfo.scheduledMeeting;
|
|
761
|
-
|
|
762
|
-
// If the found meeting is not a calendar meeting, return that meeting.
|
|
763
|
-
// This allows for the creation of instant-meetings when calendar meetings are present.
|
|
764
|
-
if (foundMeetingIsNotCalendarMeeting) {
|
|
765
|
-
meeting = foundMeeting;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
// Attempt to collect the meeting if it exists.
|
|
771
|
-
if (!meeting) {
|
|
772
|
-
meeting = this.meetingCollection.getByKey(SIP_URI, targetDest);
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
// Validate if a meeting was found.
|
|
776
|
-
if (!meeting) {
|
|
777
|
-
// Create a meeting based on the normalized destination and type.
|
|
778
|
-
return this.createMeeting(targetDest, type, useRandomDelayForInfo)
|
|
779
|
-
.then((createdMeeting) => {
|
|
780
|
-
// If the meeting was successfully created.
|
|
781
|
-
if (createdMeeting && createdMeeting.on) {
|
|
782
|
-
// Create a destruction event for the meeting.
|
|
783
|
-
createdMeeting.on(EVENTS.DESTROY_MEETING, (payload) => {
|
|
784
|
-
if (this.config.autoUploadLogs) {
|
|
785
|
-
this.uploadLogs({
|
|
786
|
-
callStart: createdMeeting.locusInfo?.fullState?.lastActive,
|
|
787
|
-
correlationId: createdMeeting.correlationId,
|
|
788
|
-
feedbackId: createdMeeting.correlationId,
|
|
789
|
-
locusId: createdMeeting.locusId,
|
|
790
|
-
meetingId: createdMeeting.locusInfo?.info?.webExMeetingId
|
|
791
|
-
}).then(() => this.destroy(createdMeeting, payload.reason));
|
|
792
|
-
}
|
|
793
|
-
else {
|
|
794
|
-
this.destroy(createdMeeting, payload.reason);
|
|
795
|
-
}
|
|
796
|
-
});
|
|
797
|
-
|
|
798
|
-
createdMeeting.on(EVENTS.REQUEST_UPLOAD_LOGS, (meetingInstance) => {
|
|
799
|
-
if (this.config.autoUploadLogs) {
|
|
800
|
-
this.uploadLogs({
|
|
801
|
-
callStart: meetingInstance?.locusInfo?.fullState?.lastActive,
|
|
802
|
-
correlationId: meetingInstance.correlationId,
|
|
803
|
-
feedbackId: meetingInstance.correlationId,
|
|
804
|
-
locusId: meetingInstance.locusId,
|
|
805
|
-
meetingId: meetingInstance.locusInfo?.info?.webExMeetingId
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
else {
|
|
811
|
-
LoggerProxy.logger.error(`Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`);
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
// Return the newly created meeting.
|
|
815
|
-
return Promise.resolve(createdMeeting);
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
// Return the existing meeting.
|
|
820
|
-
return Promise.resolve(meeting);
|
|
821
|
-
});
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* @param {String} destination see create()
|
|
826
|
-
* @param {String} type see create()
|
|
827
|
-
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
828
|
-
* @returns {Promise} a new meeting instance complete with meeting info and destination
|
|
829
|
-
* @private
|
|
830
|
-
* @memberof Meetings
|
|
831
|
-
*/
|
|
832
|
-
async createMeeting(destination, type = null, useRandomDelayForInfo = false) {
|
|
833
|
-
const meeting = new Meeting(
|
|
834
|
-
{
|
|
835
|
-
userId: this.webex.internal.device.userId,
|
|
836
|
-
deviceUrl: this.webex.internal.device.url,
|
|
837
|
-
orgId: this.webex.internal.device.orgId,
|
|
838
|
-
locus: type === _LOCUS_ID_ ? destination : null, // pass the locus object if present
|
|
839
|
-
meetingInfoProvider: this.meetingInfo,
|
|
840
|
-
destination,
|
|
841
|
-
destinationType: type,
|
|
842
|
-
},
|
|
843
|
-
{
|
|
844
|
-
parent: this.webex
|
|
845
|
-
}
|
|
846
|
-
);
|
|
847
|
-
|
|
848
|
-
this.meetingCollection.set(meeting);
|
|
849
|
-
|
|
850
|
-
try {
|
|
851
|
-
// if no participant has joined the scheduled meeting (meaning meeting is not active) and we get a locusEvent,
|
|
852
|
-
// it means the meeting will start in 5-6 min. In that case, we want to fetchMeetingInfo
|
|
853
|
-
// between 5 and 2 min (random between 3 minutes) before the meeting starts
|
|
854
|
-
// to avoid a spike in traffic to the wbxappi service
|
|
855
|
-
let waitingTime = 0;
|
|
856
|
-
|
|
857
|
-
if (destination.meeting) {
|
|
858
|
-
const {startTime} = destination.meeting;
|
|
859
|
-
const startTimeDate = new Date(startTime);
|
|
860
|
-
const startTimeDatestamp = startTimeDate.getTime();
|
|
861
|
-
const timeToStart = startTimeDatestamp - Date.now();
|
|
862
|
-
const maxWaitingTime = Math.max(Math.min(timeToStart, MAX_RANDOM_DELAY_FOR_MEETING_INFO), 0);
|
|
863
|
-
|
|
864
|
-
waitingTime = Math.round(Math.random() * maxWaitingTime);
|
|
865
|
-
}
|
|
866
|
-
const isMeetingActive = !!destination.fullState?.active;
|
|
867
|
-
const {enableUnifiedMeetings} = this.config.experimental;
|
|
868
|
-
|
|
869
|
-
if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
|
|
870
|
-
meeting.fetchMeetingInfoTimeoutId = setTimeout(() => meeting.fetchMeetingInfo({}), waitingTime);
|
|
871
|
-
meeting.parseMeetingInfo(undefined, destination);
|
|
872
|
-
}
|
|
873
|
-
else {
|
|
874
|
-
await meeting.fetchMeetingInfo({});
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
catch (err) {
|
|
878
|
-
if (!(err instanceof CaptchaError) && !(err instanceof PasswordError)) {
|
|
879
|
-
// if there is no meeting info we assume its a 1:1 call or wireless share
|
|
880
|
-
LoggerProxy.logger.info(`Meetings:index#createMeeting --> Info Unable to fetch meeting info for ${destination}.`);
|
|
881
|
-
LoggerProxy.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
|
|
882
|
-
}
|
|
883
|
-
LoggerProxy.logger.debug(`Meetings:index#createMeeting --> Debug ${err} fetching /meetingInfo for creation.`);
|
|
884
|
-
}
|
|
885
|
-
finally {
|
|
886
|
-
// For type LOCUS_ID we need to parse the locus object to get the information
|
|
887
|
-
// about the caller and callee
|
|
888
|
-
// Meeting Added event will be created in `handleLocusEvent`
|
|
889
|
-
if (type !== _LOCUS_ID_) {
|
|
890
|
-
if (!meeting.sipUri) {
|
|
891
|
-
meeting.setSipUri(destination);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
// TODO: check if we have to move this to parser
|
|
895
|
-
const meetingAddedType = MeetingsUtil.getMeetingAddedType(type);
|
|
896
|
-
|
|
897
|
-
// We typically shouldn't need to trigger both and event and return a promise.
|
|
898
|
-
// Is this a special case? We want to make the public API usage as simple as possible.
|
|
899
|
-
Trigger.trigger(
|
|
900
|
-
this,
|
|
901
|
-
{
|
|
902
|
-
file: 'meetings',
|
|
903
|
-
function: 'createMeeting'
|
|
904
|
-
},
|
|
905
|
-
EVENT_TRIGGERS.MEETING_ADDED,
|
|
906
|
-
{
|
|
907
|
-
meeting,
|
|
908
|
-
type: meetingAddedType
|
|
909
|
-
}
|
|
910
|
-
);
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
return meeting;
|
|
915
|
-
|
|
916
|
-
// Create the meeting calling the necessary service endpoints.
|
|
917
|
-
|
|
918
|
-
// Internally, there are many more destinations:
|
|
919
|
-
//
|
|
920
|
-
// - locusID
|
|
921
|
-
// - meetingURL
|
|
922
|
-
// - globalMeetingID, e.g, *00*meetingID
|
|
923
|
-
// - meetingID
|
|
924
|
-
// - meetingURL
|
|
925
|
-
// - PSTN
|
|
926
|
-
// - phone number
|
|
927
|
-
//
|
|
928
|
-
// Our job is to determine the appropriate one
|
|
929
|
-
// and its corresponding service so that developers
|
|
930
|
-
// need only sipURL or spaceID to get a meeting
|
|
931
|
-
// and its ID, but have the option to use createWithType()
|
|
932
|
-
// and specify those types to get meetingInfo
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* get a specifc meeting given it's type matched to the value, i.e., locus url
|
|
937
|
-
* @param {String} type
|
|
938
|
-
* @param {Object} value
|
|
939
|
-
* @returns {Meeting}
|
|
940
|
-
* @public
|
|
941
|
-
* @memberof Meetings
|
|
942
|
-
*/
|
|
943
|
-
getMeetingByType(type, value) {
|
|
944
|
-
return this.meetingCollection.getByKey(type, value);
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* Get all meetings.
|
|
949
|
-
* @param {object} options
|
|
950
|
-
* @param {object} options.startDate - get meetings after this start date
|
|
951
|
-
* @param {object} options.endDate - get meetings before this end date
|
|
952
|
-
* @returns {Object} All currently active meetings.
|
|
953
|
-
* @public
|
|
954
|
-
* @memberof Meetings
|
|
955
|
-
*/
|
|
956
|
-
getAllMeetings(options = {}) {
|
|
957
|
-
// Options may include other parameters to filter this collection
|
|
958
|
-
// of meetings.
|
|
959
|
-
return this.meetingCollection.getAll(options);
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
/**
|
|
963
|
-
* syncs all the meeting from server
|
|
964
|
-
* @returns {undefined}
|
|
965
|
-
* @public
|
|
966
|
-
* @memberof Meetings
|
|
967
|
-
*/
|
|
968
|
-
syncMeetings() {
|
|
969
|
-
return this.request.getActiveMeetings().then((locusArray) => {
|
|
970
|
-
const activeLocusUrl = [];
|
|
971
|
-
|
|
972
|
-
if (locusArray?.loci && locusArray.loci.length > 0) {
|
|
973
|
-
locusArray.loci.forEach((locus) => {
|
|
974
|
-
activeLocusUrl.push(locus.url);
|
|
975
|
-
this.handleLocusEvent({
|
|
976
|
-
locus,
|
|
977
|
-
locusUrl: locus.url
|
|
978
|
-
});
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
const meetingsCollection = this.meetingCollection.getAll();
|
|
982
|
-
|
|
983
|
-
if (Object.keys(meetingsCollection).length > 0) {
|
|
984
|
-
// Some time the mercury event is missed after mercury reconnect
|
|
985
|
-
// if sync returns no locus then clear all the meetings
|
|
986
|
-
for (const meeting of Object.values(meetingsCollection)) {
|
|
987
|
-
if (!activeLocusUrl.includes(meeting.locusUrl)) {
|
|
988
|
-
// destroy function also uploads logs
|
|
989
|
-
this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* Get all scheduled meetings.
|
|
998
|
-
* @param {object} options
|
|
999
|
-
* @param {object} options.startDate - get meetings after this start date
|
|
1000
|
-
* @param {object} options.endDate - get meetings before this end date
|
|
1001
|
-
* @returns {Object} All scheduled meetings.
|
|
1002
|
-
* @memberof Meetings
|
|
1003
|
-
*/
|
|
1004
|
-
getScheduledMeetings() {
|
|
1005
|
-
return this.meetingCollection.getAll({scheduled: true});
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* Get the logger instance for plugin-meetings
|
|
1010
|
-
* @returns {Logger}
|
|
1011
|
-
*/
|
|
1012
|
-
getLogger() {
|
|
1013
|
-
return LoggerProxy.get();
|
|
1014
|
-
}
|
|
1015
|
-
}
|