@webex/plugin-meetings 3.0.0-beta.2 → 3.0.0-beta.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -7
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +9 -43
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +37 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +8 -13
- package/dist/config.js.map +1 -1
- package/dist/constants.js +250 -66
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +108 -17
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +101 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +532 -240
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -37
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +54 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +284 -154
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +95 -226
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +99 -194
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +83 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +3478 -3563
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +247 -183
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +344 -344
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +529 -588
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +62 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +328 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +156 -232
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +26 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +795 -574
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +186 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +126 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +147 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +178 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +314 -260
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +264 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +66 -43
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +502 -442
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +192 -191
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +15 -23
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +384 -476
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +363 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +58 -91
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +137 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +148 -100
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +115 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +385 -460
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +143 -87
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1016 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +271 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +153 -0
- package/dist/types/meeting/index.d.ts +1471 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +257 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +78 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +62 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +367 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +159 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +208 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +46 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +200 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/internal-README.md +7 -6
- package/package.json +29 -21
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +14 -9
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +22 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +17 -17
- package/src/constants.ts +197 -22
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +39 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +518 -111
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +19 -8
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +65 -17
- package/src/locus-info/{parser.js → parser.ts} +271 -98
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +456 -0
- package/src/media/{properties.js → properties.ts} +80 -102
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +384 -0
- package/src/meeting/in-meeting-actions.ts +171 -3
- package/src/meeting/index.ts +7070 -0
- package/src/meeting/locusMediaRequest.ts +309 -0
- package/src/meeting/muteState.ts +450 -0
- package/src/meeting/{request.js → request.ts} +354 -214
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +615 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +183 -0
- package/src/meeting-info/meeting-info-v2.ts +407 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +60 -51
- package/src/meeting-info/{utilv2.js → utilv2.ts} +77 -60
- package/src/meetings/{collection.js → collection.ts} +26 -3
- package/src/meetings/index.ts +1467 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +137 -36
- package/src/member/{index.js → index.ts} +151 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +383 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +323 -145
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +339 -0
- package/src/metrics/{constants.js → constants.ts} +2 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +337 -61
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +63 -3
- package/src/multistream/remoteMediaManager.ts +263 -66
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/{index.js → index.ts} +157 -94
- package/src/reachability/request.ts +46 -35
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/{index.js → index.ts} +254 -136
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +333 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/{index.js → index.ts} +86 -78
- package/src/roap/request.ts +163 -0
- package/src/roap/turnDiscovery.ts +111 -49
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +96 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1272 -0
- package/src/statsAnalyzer/mqaUtil.ts +291 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +804 -526
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +237 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1176 -18
- package/test/unit/spec/locus-info/infoUtils.js +41 -32
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +65 -31
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +296 -12
- package/test/unit/spec/media/index.ts +162 -68
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +82 -3
- package/test/unit/spec/meeting/index.js +4569 -1773
- package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
- package/test/unit/spec/meeting/muteState.js +382 -211
- package/test/unit/spec/meeting/request.js +444 -78
- package/test/unit/spec/meeting/utils.js +517 -192
- package/test/unit/spec/meeting-info/index.js +181 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +481 -76
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +15 -1
- package/test/unit/spec/meetings/index.js +1254 -330
- package/test/unit/spec/meetings/utils.js +220 -14
- package/test/unit/spec/member/index.js +58 -5
- package/test/unit/spec/member/util.js +494 -26
- package/test/unit/spec/members/index.js +423 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +191 -4
- package/test/unit/spec/metrics/index.js +12 -66
- package/test/unit/spec/multistream/mediaRequestManager.ts +1013 -106
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +730 -65
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +176 -27
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +155 -9
- package/test/unit/spec/recording-controller/index.js +307 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +28 -52
- package/test/unit/spec/roap/request.ts +225 -0
- package/test/unit/spec/roap/turnDiscovery.ts +92 -50
- package/test/unit/spec/rtcMetrics/index.ts +60 -0
- package/test/unit/spec/stats-analyzer/index.js +116 -60
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +57 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
|
@@ -0,0 +1,1048 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
4
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
5
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
6
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
7
|
+
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
8
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
9
|
+
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
10
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
11
|
+
value: true
|
|
12
|
+
});
|
|
13
|
+
exports.default = void 0;
|
|
14
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
15
|
+
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
16
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
17
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
19
|
+
var _forEach2 = _interopRequireDefault(require("lodash/forEach"));
|
|
20
|
+
var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
|
|
21
|
+
var _webexCore = require("@webex/webex-core");
|
|
22
|
+
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
23
|
+
var _constants = require("../constants");
|
|
24
|
+
var _breakout = _interopRequireDefault(require("./breakout"));
|
|
25
|
+
var _collection = _interopRequireDefault(require("./collection"));
|
|
26
|
+
var _request = _interopRequireDefault(require("./request"));
|
|
27
|
+
var _events = _interopRequireDefault(require("./events"));
|
|
28
|
+
var _utils = require("./utils");
|
|
29
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
/**
|
|
32
|
+
* @class Breakouts
|
|
33
|
+
*/
|
|
34
|
+
var Breakouts = _webexCore.WebexPlugin.extend({
|
|
35
|
+
namespace: _constants.MEETINGS,
|
|
36
|
+
breakoutRequest: _request.default,
|
|
37
|
+
collections: {
|
|
38
|
+
breakouts: _collection.default
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
allowBackToMain: 'boolean',
|
|
42
|
+
// only present when in a breakout session
|
|
43
|
+
delayCloseTime: 'number',
|
|
44
|
+
// appears once breakouts start
|
|
45
|
+
enableBreakoutSession: 'boolean',
|
|
46
|
+
// appears from the moment you enable breakouts
|
|
47
|
+
hasBreakoutPreAssignments: 'boolean',
|
|
48
|
+
// appears from the moment you enable breakouts
|
|
49
|
+
groupId: 'string',
|
|
50
|
+
// appears from the moment you enable breakouts
|
|
51
|
+
name: 'string',
|
|
52
|
+
// only present when in a breakout session
|
|
53
|
+
sessionId: 'string',
|
|
54
|
+
// appears from the moment you enable breakouts
|
|
55
|
+
sessionType: 'string',
|
|
56
|
+
// appears from the moment you enable breakouts
|
|
57
|
+
startTime: 'string',
|
|
58
|
+
// appears once breakouts start
|
|
59
|
+
status: 'string',
|
|
60
|
+
// only present when in a breakout session
|
|
61
|
+
url: 'string',
|
|
62
|
+
// appears from the moment you enable breakouts
|
|
63
|
+
locusUrl: 'string',
|
|
64
|
+
// the current locus url
|
|
65
|
+
breakoutServiceUrl: 'string',
|
|
66
|
+
// the current breakout resource url
|
|
67
|
+
mainLocusUrl: 'string',
|
|
68
|
+
// the locus url of the main session
|
|
69
|
+
groups: 'array',
|
|
70
|
+
// appears when create breakouts
|
|
71
|
+
manageGroups: 'array',
|
|
72
|
+
// appears when manage breakouts
|
|
73
|
+
preAssignments: 'array',
|
|
74
|
+
// appears when getPreAssignments info hasBreakoutPreAssignments = true
|
|
75
|
+
editLock: 'object',
|
|
76
|
+
// appears when getBreakout info editlock = true
|
|
77
|
+
intervalID: 'number',
|
|
78
|
+
meetingId: 'string',
|
|
79
|
+
canManageBreakouts: 'boolean' // appear the ability to manage breakouts
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
children: {
|
|
83
|
+
currentBreakoutSession: _breakout.default
|
|
84
|
+
},
|
|
85
|
+
derived: {
|
|
86
|
+
isInMainSession: {
|
|
87
|
+
cache: false,
|
|
88
|
+
deps: ['sessionType'],
|
|
89
|
+
/**
|
|
90
|
+
* Returns true if the user is in the main session
|
|
91
|
+
* @returns {boolean}
|
|
92
|
+
*/
|
|
93
|
+
fn: function fn() {
|
|
94
|
+
return this.sessionType === _constants.BREAKOUTS.SESSION_TYPES.MAIN;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
isActiveBreakout: {
|
|
98
|
+
cache: false,
|
|
99
|
+
// fix issue: sometimes the derived will not change even if the deps changed
|
|
100
|
+
deps: ['sessionType', 'status'],
|
|
101
|
+
/**
|
|
102
|
+
* Returns true if the breakout status is active
|
|
103
|
+
* @returns {boolean}
|
|
104
|
+
*/
|
|
105
|
+
fn: function fn() {
|
|
106
|
+
return this.sessionType === _constants.BREAKOUTS.SESSION_TYPES.BREAKOUT && (this.status === _constants.BREAKOUTS.STATUS.OPEN || this.status === _constants.BREAKOUTS.STATUS.CLOSING);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
breakoutGroupId: {
|
|
110
|
+
cache: false,
|
|
111
|
+
deps: ['manageGroups'],
|
|
112
|
+
/**
|
|
113
|
+
* Returns the active group id
|
|
114
|
+
* @returns {boolean}
|
|
115
|
+
*/
|
|
116
|
+
fn: function fn() {
|
|
117
|
+
var _this$manageGroups;
|
|
118
|
+
if ((_this$manageGroups = this.manageGroups) !== null && _this$manageGroups !== void 0 && _this$manageGroups.length) {
|
|
119
|
+
return this.manageGroups[0].status !== _constants.BREAKOUTS.STATUS.CLOSED ? this.manageGroups[0].id : '';
|
|
120
|
+
}
|
|
121
|
+
return '';
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
breakoutStatus: {
|
|
125
|
+
cache: true,
|
|
126
|
+
deps: ['isInMainSession', 'status', 'groups'],
|
|
127
|
+
/**
|
|
128
|
+
* Returns the breakout status
|
|
129
|
+
* @returns {boolean}
|
|
130
|
+
*/
|
|
131
|
+
fn: function fn() {
|
|
132
|
+
var _this$groups, _this$groups$;
|
|
133
|
+
return this.isInMainSession ? (_this$groups = this.groups) === null || _this$groups === void 0 ? void 0 : (_this$groups$ = _this$groups[0]) === null || _this$groups$ === void 0 ? void 0 : _this$groups$.status : this.status;
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
shouldQueryPreAssignments: {
|
|
137
|
+
cache: false,
|
|
138
|
+
deps: ['canManageBreakouts', 'enableBreakoutSession', 'hasBreakoutPreAssignments'],
|
|
139
|
+
/**
|
|
140
|
+
* Returns should query preAssignments or not
|
|
141
|
+
* @returns {boolean}
|
|
142
|
+
*/
|
|
143
|
+
fn: function fn() {
|
|
144
|
+
return !!(this.canManageBreakouts && this.enableBreakoutSession && this.hasBreakoutPreAssignments);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* initialize for the breakouts
|
|
150
|
+
* @returns {void}
|
|
151
|
+
*/
|
|
152
|
+
initialize: function initialize() {
|
|
153
|
+
var _this = this;
|
|
154
|
+
this.listenTo(this, 'change:breakoutStatus', function () {
|
|
155
|
+
if (_this.breakoutStatus === _constants.BREAKOUTS.STATUS.CLOSING) {
|
|
156
|
+
_this.trigger(_constants.BREAKOUTS.EVENTS.BREAKOUTS_CLOSING);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
this.listenTo(this, 'change:shouldQueryPreAssignments', function () {
|
|
160
|
+
if (_this.shouldQueryPreAssignments && !_this.preAssignments) {
|
|
161
|
+
_this.queryPreAssignments();
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
this.debouncedQueryRosters = (0, _debounce2.default)(this.queryRosters, 10, {
|
|
165
|
+
leading: true,
|
|
166
|
+
trailing: false
|
|
167
|
+
});
|
|
168
|
+
this.listenTo(this.breakouts, 'add', function (breakout) {
|
|
169
|
+
_this.debouncedQueryRosters();
|
|
170
|
+
_this.triggerReturnToMainEvent(breakout);
|
|
171
|
+
});
|
|
172
|
+
this.listenTo(this.breakouts, 'change:requestedLastModifiedTime', function (breakout) {
|
|
173
|
+
_this.triggerReturnToMainEvent(breakout);
|
|
174
|
+
});
|
|
175
|
+
this.listenToCurrentSessionTypeChange();
|
|
176
|
+
this.listenToBroadcastMessages();
|
|
177
|
+
this.listenToBreakoutRosters();
|
|
178
|
+
this.listenToBreakoutHelp();
|
|
179
|
+
// @ts-ignore
|
|
180
|
+
this.breakoutRequest = new _request.default({
|
|
181
|
+
webex: this.webex
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
/**
|
|
185
|
+
* Calls this to clean up listeners
|
|
186
|
+
* @returns {void}
|
|
187
|
+
*/
|
|
188
|
+
cleanUp: function cleanUp() {
|
|
189
|
+
this.stopListening();
|
|
190
|
+
},
|
|
191
|
+
/**
|
|
192
|
+
* Update the current locus url of the meeting
|
|
193
|
+
* @param {string} locusUrl // locus url
|
|
194
|
+
* @returns {void}
|
|
195
|
+
*/
|
|
196
|
+
locusUrlUpdate: function locusUrlUpdate(locusUrl) {
|
|
197
|
+
this.set('locusUrl', locusUrl);
|
|
198
|
+
var isInMainSession = this.isInMainSession,
|
|
199
|
+
mainLocusUrl = this.mainLocusUrl;
|
|
200
|
+
if (isInMainSession || !mainLocusUrl) {
|
|
201
|
+
this.set('mainLocusUrl', locusUrl);
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
/**
|
|
205
|
+
* Update whether self is moderator/cohost or not
|
|
206
|
+
* @param {boolean} canManageBreakouts
|
|
207
|
+
* @returns {void}
|
|
208
|
+
*/
|
|
209
|
+
updateCanManageBreakouts: function updateCanManageBreakouts(canManageBreakouts) {
|
|
210
|
+
this.set('canManageBreakouts', canManageBreakouts);
|
|
211
|
+
},
|
|
212
|
+
/**
|
|
213
|
+
* Update the current breakout resource url
|
|
214
|
+
* @param {string} breakoutServiceUrl
|
|
215
|
+
* @returns {void}
|
|
216
|
+
*/
|
|
217
|
+
breakoutServiceUrlUpdate: function breakoutServiceUrlUpdate(breakoutServiceUrl) {
|
|
218
|
+
this.set('breakoutServiceUrl', "".concat(breakoutServiceUrl, "/breakout/"));
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* The initial roster lists need to be queried because you don't
|
|
222
|
+
* get a breakout.roster event when you join the meeting
|
|
223
|
+
* @returns {void}
|
|
224
|
+
*/
|
|
225
|
+
queryRosters: function queryRosters() {
|
|
226
|
+
var _this2 = this;
|
|
227
|
+
this.webex.request({
|
|
228
|
+
uri: "".concat(this.url, "/roster"),
|
|
229
|
+
qs: {
|
|
230
|
+
locusUrl: btoa(this.locusUrl)
|
|
231
|
+
}
|
|
232
|
+
}).then(function (result) {
|
|
233
|
+
var rosters = result.body.rosters;
|
|
234
|
+
rosters === null || rosters === void 0 ? void 0 : rosters.forEach(function (_ref) {
|
|
235
|
+
var locus = _ref.locus;
|
|
236
|
+
_this2.handleRosterUpdate(locus);
|
|
237
|
+
});
|
|
238
|
+
_this2.trigger(_constants.BREAKOUTS.EVENTS.MEMBERS_UPDATE);
|
|
239
|
+
}).catch(function (error) {
|
|
240
|
+
_loggerProxy.default.logger.error('Meeting:breakouts#queryRosters failed', error);
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* @param {Object} locus // locus object
|
|
246
|
+
* @returns {void}
|
|
247
|
+
*/
|
|
248
|
+
handleRosterUpdate: function handleRosterUpdate(locus) {
|
|
249
|
+
var _locus$controls, _locus$controls$break;
|
|
250
|
+
var sessionId = (_locus$controls = locus.controls) === null || _locus$controls === void 0 ? void 0 : (_locus$controls$break = _locus$controls.breakout) === null || _locus$controls$break === void 0 ? void 0 : _locus$controls$break.sessionId;
|
|
251
|
+
var session = this.breakouts.get(sessionId);
|
|
252
|
+
if (!session) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
session.parseRoster(locus);
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
*Sets up listener for currentBreakoutSession sessionType changed
|
|
259
|
+
* @returns {void}
|
|
260
|
+
*/
|
|
261
|
+
listenToCurrentSessionTypeChange: function listenToCurrentSessionTypeChange() {
|
|
262
|
+
var _this3 = this;
|
|
263
|
+
this.listenTo(this.currentBreakoutSession, 'change:sessionType', function (currentBreakoutSession, sessionType) {
|
|
264
|
+
if ((0, _utils.isSessionTypeChangedFromSessionToMain)(currentBreakoutSession, sessionType)) {
|
|
265
|
+
_this3.trigger(_constants.BREAKOUTS.EVENTS.LEAVE_BREAKOUT);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
/**
|
|
270
|
+
* Sets up listener for broadcast messages sent to the breakout session
|
|
271
|
+
* @returns {void}
|
|
272
|
+
*/
|
|
273
|
+
listenToBroadcastMessages: function listenToBroadcastMessages() {
|
|
274
|
+
var _this4 = this;
|
|
275
|
+
this.listenTo(this.webex.internal.llm, 'event:breakout.message', function (event) {
|
|
276
|
+
var _event$data = event.data,
|
|
277
|
+
senderUserId = _event$data.senderUserId,
|
|
278
|
+
sentTime = _event$data.sentTime,
|
|
279
|
+
message = _event$data.message;
|
|
280
|
+
_this4.trigger(_constants.BREAKOUTS.EVENTS.MESSAGE, {
|
|
281
|
+
senderUserId: senderUserId,
|
|
282
|
+
sentTime: sentTime,
|
|
283
|
+
message: message,
|
|
284
|
+
// FIXME: This is only the current sessionId
|
|
285
|
+
// We'd need to check that the dataChannelUrl is still the same
|
|
286
|
+
// to guarantee that this message was sent to this session
|
|
287
|
+
sessionId: _this4.currentBreakoutSession.sessionId
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
},
|
|
291
|
+
/**
|
|
292
|
+
* Sets up a listener for roster messags from mecury
|
|
293
|
+
* @returns {void}
|
|
294
|
+
*/
|
|
295
|
+
listenToBreakoutRosters: function listenToBreakoutRosters() {
|
|
296
|
+
var _this5 = this;
|
|
297
|
+
this.listenTo(this.webex.internal.mercury, 'event:breakout.roster', function (event) {
|
|
298
|
+
_this5.handleRosterUpdate(event.data.locus);
|
|
299
|
+
_this5.trigger(_constants.BREAKOUTS.EVENTS.MEMBERS_UPDATE);
|
|
300
|
+
});
|
|
301
|
+
},
|
|
302
|
+
/**
|
|
303
|
+
* Sets up a listener for ask help notify from mecury
|
|
304
|
+
* @returns {void}
|
|
305
|
+
*/
|
|
306
|
+
listenToBreakoutHelp: function listenToBreakoutHelp() {
|
|
307
|
+
var _this6 = this;
|
|
308
|
+
this.listenTo(this.webex.internal.mercury, 'event:breakout.help', function (event) {
|
|
309
|
+
var _event$data2 = event.data,
|
|
310
|
+
participant = _event$data2.participant,
|
|
311
|
+
sessionId = _event$data2.sessionId;
|
|
312
|
+
_this6.trigger(_constants.BREAKOUTS.EVENTS.ASK_FOR_HELP, {
|
|
313
|
+
participant: participant,
|
|
314
|
+
sessionId: sessionId
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
},
|
|
318
|
+
/**
|
|
319
|
+
* get current breakout is in progress or not
|
|
320
|
+
* @returns {boolean}
|
|
321
|
+
*/
|
|
322
|
+
isBreakoutInProgress: function isBreakoutInProgress() {
|
|
323
|
+
var _this$groups2, _this$groups2$;
|
|
324
|
+
var currentStatus = ((_this$groups2 = this.groups) === null || _this$groups2 === void 0 ? void 0 : (_this$groups2$ = _this$groups2[0]) === null || _this$groups2$ === void 0 ? void 0 : _this$groups2$.status) || this.status;
|
|
325
|
+
return currentStatus === _constants.BREAKOUTS.STATUS.OPEN || currentStatus === _constants.BREAKOUTS.STATUS.CLOSING;
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* get current breakout is in closing or not
|
|
329
|
+
* @returns {boolean}
|
|
330
|
+
*/
|
|
331
|
+
isBreakoutIClosing: function isBreakoutIClosing() {
|
|
332
|
+
var _this$groups3, _this$groups3$;
|
|
333
|
+
return (((_this$groups3 = this.groups) === null || _this$groups3 === void 0 ? void 0 : (_this$groups3$ = _this$groups3[0]) === null || _this$groups3$ === void 0 ? void 0 : _this$groups3$.status) || this.status) === _constants.BREAKOUTS.STATUS.CLOSING;
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
* Updates the information about the current breakout
|
|
337
|
+
* @param {Object} params
|
|
338
|
+
* @returns {void}
|
|
339
|
+
*/
|
|
340
|
+
updateBreakout: function updateBreakout(params) {
|
|
341
|
+
var _this$set;
|
|
342
|
+
this.set(params);
|
|
343
|
+
// These values are set manually so they are unset when they are not included in params
|
|
344
|
+
this.set('groups', params.groups);
|
|
345
|
+
this.set('startTime', params.startTime);
|
|
346
|
+
this.set('status', params.status);
|
|
347
|
+
this.set('currentBreakoutSession', (_this$set = {
|
|
348
|
+
sessionId: params.sessionId,
|
|
349
|
+
groupId: params.groupId,
|
|
350
|
+
name: params.name,
|
|
351
|
+
current: true,
|
|
352
|
+
sessionType: params.sessionType,
|
|
353
|
+
url: params.url
|
|
354
|
+
}, (0, _defineProperty2.default)(_this$set, _constants.BREAKOUTS.SESSION_STATES.ACTIVE, false), (0, _defineProperty2.default)(_this$set, _constants.BREAKOUTS.SESSION_STATES.ALLOWED, false), (0, _defineProperty2.default)(_this$set, _constants.BREAKOUTS.SESSION_STATES.ASSIGNED, false), (0, _defineProperty2.default)(_this$set, _constants.BREAKOUTS.SESSION_STATES.ASSIGNED_CURRENT, false), (0, _defineProperty2.default)(_this$set, _constants.BREAKOUTS.SESSION_STATES.REQUESTED, false), _this$set));
|
|
355
|
+
if (!this.isBreakoutInProgress()) {
|
|
356
|
+
this.clearBreakouts();
|
|
357
|
+
}
|
|
358
|
+
if (this.currentBreakoutSession.previous('sessionId') !== this.currentBreakoutSession.sessionId || this.currentBreakoutSession.previous('groupId') !== this.currentBreakoutSession.groupId) {
|
|
359
|
+
// should report joined session changed
|
|
360
|
+
var meeting = this.webex.meetings.getMeetingByType(_constants._ID_, this.meetingId);
|
|
361
|
+
_events.default.onBreakoutJoinResponse({
|
|
362
|
+
currentSession: this.currentBreakoutSession,
|
|
363
|
+
meeting: meeting,
|
|
364
|
+
breakoutMoveId: params.breakoutMoveId
|
|
365
|
+
},
|
|
366
|
+
// @ts-ignore
|
|
367
|
+
this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics));
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Updates the information about available breakouts
|
|
372
|
+
* @param {Object} payload
|
|
373
|
+
* @returns {void}
|
|
374
|
+
*/
|
|
375
|
+
updateBreakoutSessions: function updateBreakoutSessions(payload) {
|
|
376
|
+
var _this7 = this;
|
|
377
|
+
var breakouts = {};
|
|
378
|
+
if (this.isBreakoutIClosing()) {
|
|
379
|
+
// fix issue: don't clear/update breakouts collection when in closing since locus DTO will send undefined or
|
|
380
|
+
// only the MAIN session info here, if just update it, will miss the breakout roster info during
|
|
381
|
+
// count down to end breakouts
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
if (payload.breakoutSessions) {
|
|
385
|
+
(0, _forEach2.default)(_constants.BREAKOUTS.SESSION_STATES, function (state) {
|
|
386
|
+
(0, _forEach2.default)(payload.breakoutSessions[state], function (breakout) {
|
|
387
|
+
var sessionId = breakout.sessionId;
|
|
388
|
+
if (!breakouts[sessionId]) {
|
|
389
|
+
breakouts[sessionId] = breakout;
|
|
390
|
+
breakouts[sessionId][_constants.BREAKOUTS.SESSION_STATES.ACTIVE] = false;
|
|
391
|
+
breakouts[sessionId][_constants.BREAKOUTS.SESSION_STATES.ASSIGNED] = false;
|
|
392
|
+
breakouts[sessionId][_constants.BREAKOUTS.SESSION_STATES.ALLOWED] = false;
|
|
393
|
+
breakouts[sessionId][_constants.BREAKOUTS.SESSION_STATES.ASSIGNED_CURRENT] = false;
|
|
394
|
+
breakouts[sessionId][_constants.BREAKOUTS.SESSION_STATES.REQUESTED] = false;
|
|
395
|
+
}
|
|
396
|
+
breakouts[sessionId][state] = true;
|
|
397
|
+
if (state === _constants.BREAKOUTS.SESSION_STATES.REQUESTED) {
|
|
398
|
+
breakouts[sessionId].requestedLastModifiedTime = breakout.modifiedAt;
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
(0, _forEach2.default)(breakouts, function (breakout) {
|
|
404
|
+
// eslint-disable-next-line no-param-reassign
|
|
405
|
+
breakout.url = _this7.url;
|
|
406
|
+
});
|
|
407
|
+
this.breakouts.set((0, _values.default)(breakouts));
|
|
408
|
+
},
|
|
409
|
+
/**
|
|
410
|
+
* clear breakouts collection
|
|
411
|
+
* @returns {void}
|
|
412
|
+
*/
|
|
413
|
+
clearBreakouts: function clearBreakouts() {
|
|
414
|
+
if (this.breakouts.length > 0) {
|
|
415
|
+
this.breakouts.reset();
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
/**
|
|
419
|
+
* get main session
|
|
420
|
+
* @returns {Breakout}
|
|
421
|
+
*/
|
|
422
|
+
getMainSession: function getMainSession() {
|
|
423
|
+
if (this.isInMainSession) {
|
|
424
|
+
return this.currentBreakoutSession;
|
|
425
|
+
}
|
|
426
|
+
var mainSession = this.breakouts.filter(function (breakout) {
|
|
427
|
+
return breakout.isMain;
|
|
428
|
+
})[0];
|
|
429
|
+
if (!mainSession) {
|
|
430
|
+
throw new Error('no main session found');
|
|
431
|
+
}
|
|
432
|
+
return mainSession;
|
|
433
|
+
},
|
|
434
|
+
/**
|
|
435
|
+
* Host/CoHost ask all participants return to main session
|
|
436
|
+
* @returns {Promise}
|
|
437
|
+
*/
|
|
438
|
+
askAllToReturn: function askAllToReturn() {
|
|
439
|
+
var mainSession = this.getMainSession();
|
|
440
|
+
return this.webex.request({
|
|
441
|
+
method: _constants.HTTP_VERBS.POST,
|
|
442
|
+
uri: "".concat(this.url, "/requestMove"),
|
|
443
|
+
body: {
|
|
444
|
+
groupId: mainSession.groupId,
|
|
445
|
+
sessionId: mainSession.sessionId
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
},
|
|
449
|
+
/**
|
|
450
|
+
* Broadcast message to all breakout session's participants
|
|
451
|
+
* @param {String} message
|
|
452
|
+
* @param {Object} options
|
|
453
|
+
* @returns {Promise}
|
|
454
|
+
*/
|
|
455
|
+
broadcast: function broadcast(message, options) {
|
|
456
|
+
var breakoutGroupId = this.breakoutGroupId;
|
|
457
|
+
if (!breakoutGroupId) {
|
|
458
|
+
throw new Error('Cannot broadcast, no breakout session found');
|
|
459
|
+
}
|
|
460
|
+
return this.breakoutRequest.broadcast({
|
|
461
|
+
url: this.url,
|
|
462
|
+
message: message,
|
|
463
|
+
options: options,
|
|
464
|
+
groupId: breakoutGroupId
|
|
465
|
+
});
|
|
466
|
+
},
|
|
467
|
+
/**
|
|
468
|
+
* Make enable breakout resource
|
|
469
|
+
* @returns {Promise}
|
|
470
|
+
*/
|
|
471
|
+
enableBreakouts: function enableBreakouts() {
|
|
472
|
+
if (this.breakoutServiceUrl) {
|
|
473
|
+
// @ts-ignore
|
|
474
|
+
return this.webex.request({
|
|
475
|
+
method: _constants.HTTP_VERBS.POST,
|
|
476
|
+
uri: this.breakoutServiceUrl,
|
|
477
|
+
body: {
|
|
478
|
+
locusUrl: this.locusUrl
|
|
479
|
+
}
|
|
480
|
+
}).catch(function (err) {
|
|
481
|
+
_loggerProxy.default.logger.error("Meeting:request#touchBreakout --> Error provisioning error ".concat(err));
|
|
482
|
+
throw err;
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
return _promise.default.reject(new Error("enableBreakouts: the breakoutServiceUrl is empty"));
|
|
486
|
+
},
|
|
487
|
+
/**
|
|
488
|
+
* Make the meeting enable or disable breakout session
|
|
489
|
+
* @param {boolean} enable
|
|
490
|
+
* @returns {Promise}
|
|
491
|
+
*/
|
|
492
|
+
toggleBreakout: function toggleBreakout(enable) {
|
|
493
|
+
var _this8 = this;
|
|
494
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
495
|
+
var info;
|
|
496
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
497
|
+
while (1) switch (_context.prev = _context.next) {
|
|
498
|
+
case 0:
|
|
499
|
+
if (!(_this8.enableBreakoutSession === undefined)) {
|
|
500
|
+
_context.next = 10;
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
_context.next = 3;
|
|
504
|
+
return _this8.enableBreakouts();
|
|
505
|
+
case 3:
|
|
506
|
+
info = _context.sent;
|
|
507
|
+
// first time enable, set the initial data
|
|
508
|
+
_this8.updateBreakout(info === null || info === void 0 ? void 0 : info.body);
|
|
509
|
+
if (enable) {
|
|
510
|
+
_context.next = 8;
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
_context.next = 8;
|
|
514
|
+
return _this8.doToggleBreakout(enable);
|
|
515
|
+
case 8:
|
|
516
|
+
_context.next = 12;
|
|
517
|
+
break;
|
|
518
|
+
case 10:
|
|
519
|
+
_context.next = 12;
|
|
520
|
+
return _this8.doToggleBreakout(enable);
|
|
521
|
+
case 12:
|
|
522
|
+
case "end":
|
|
523
|
+
return _context.stop();
|
|
524
|
+
}
|
|
525
|
+
}, _callee);
|
|
526
|
+
}))();
|
|
527
|
+
},
|
|
528
|
+
/**
|
|
529
|
+
* do toggle meeting breakout session enable or disable
|
|
530
|
+
* @param {boolean} enable
|
|
531
|
+
* @returns {Promise}
|
|
532
|
+
*/
|
|
533
|
+
doToggleBreakout: function doToggleBreakout(enable) {
|
|
534
|
+
var body = _objectSpread(_objectSpread({}, this.editLock && !!this.editLock.token ? {
|
|
535
|
+
editlock: {
|
|
536
|
+
token: this.editLock.token
|
|
537
|
+
}
|
|
538
|
+
} : {}), {
|
|
539
|
+
enableBreakoutSession: enable
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// @ts-ignore
|
|
543
|
+
return this.webex.request({
|
|
544
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
545
|
+
uri: this.url,
|
|
546
|
+
body: body
|
|
547
|
+
});
|
|
548
|
+
},
|
|
549
|
+
/**
|
|
550
|
+
* set groups to manageGroups prop
|
|
551
|
+
* @param {Object} breakoutInfo -- breakout groups
|
|
552
|
+
* @returns {void}
|
|
553
|
+
*/
|
|
554
|
+
_setManageGroups: function _setManageGroups(breakoutInfo) {
|
|
555
|
+
var _breakoutInfo$body;
|
|
556
|
+
if (breakoutInfo !== null && breakoutInfo !== void 0 && (_breakoutInfo$body = breakoutInfo.body) !== null && _breakoutInfo$body !== void 0 && _breakoutInfo$body.groups) {
|
|
557
|
+
this.set('manageGroups', breakoutInfo.body.groups);
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
/**
|
|
561
|
+
* Create new breakout sessions
|
|
562
|
+
* @param {object} params -- breakout session group
|
|
563
|
+
* @returns {Promise}
|
|
564
|
+
*/
|
|
565
|
+
create: function create(params) {
|
|
566
|
+
var _this9 = this;
|
|
567
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
568
|
+
var payload, body, breakoutInfo;
|
|
569
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
570
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
571
|
+
case 0:
|
|
572
|
+
payload = _objectSpread({}, params);
|
|
573
|
+
body = _objectSpread(_objectSpread({}, _this9.editLock && !!_this9.editLock.token ? {
|
|
574
|
+
editlock: {
|
|
575
|
+
token: _this9.editLock.token
|
|
576
|
+
}
|
|
577
|
+
} : {}), {
|
|
578
|
+
groups: [payload]
|
|
579
|
+
}); // @ts-ignore
|
|
580
|
+
_context2.next = 4;
|
|
581
|
+
return _this9.webex.request({
|
|
582
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
583
|
+
uri: _this9.url,
|
|
584
|
+
body: body
|
|
585
|
+
}).catch(function (error) {
|
|
586
|
+
return _promise.default.reject((0, _utils.boServiceErrorHandler)(error, 'Breakouts#create'));
|
|
587
|
+
});
|
|
588
|
+
case 4:
|
|
589
|
+
breakoutInfo = _context2.sent;
|
|
590
|
+
_this9._setManageGroups(breakoutInfo);
|
|
591
|
+
|
|
592
|
+
// clear edit lock info after save breakout session info
|
|
593
|
+
_this9._clearEditLockInfo();
|
|
594
|
+
return _context2.abrupt("return", breakoutInfo);
|
|
595
|
+
case 8:
|
|
596
|
+
case "end":
|
|
597
|
+
return _context2.stop();
|
|
598
|
+
}
|
|
599
|
+
}, _callee2);
|
|
600
|
+
}))();
|
|
601
|
+
},
|
|
602
|
+
/**
|
|
603
|
+
* Delete all breakout sessions
|
|
604
|
+
* @returns {Promise}
|
|
605
|
+
*/
|
|
606
|
+
clearSessions: function clearSessions() {
|
|
607
|
+
var _this10 = this;
|
|
608
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
609
|
+
var body, breakoutInfo;
|
|
610
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
611
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
612
|
+
case 0:
|
|
613
|
+
body = _objectSpread(_objectSpread({}, _this10.editLock && !!_this10.editLock.token ? {
|
|
614
|
+
editlock: {
|
|
615
|
+
token: _this10.editLock.token
|
|
616
|
+
}
|
|
617
|
+
} : {}), {
|
|
618
|
+
groups: [{
|
|
619
|
+
action: _constants.BREAKOUTS.ACTION.DELETE
|
|
620
|
+
}]
|
|
621
|
+
}); // @ts-ignore
|
|
622
|
+
_context3.next = 3;
|
|
623
|
+
return _this10.webex.request({
|
|
624
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
625
|
+
uri: _this10.url,
|
|
626
|
+
body: body
|
|
627
|
+
}).catch(function (error) {
|
|
628
|
+
return _promise.default.reject((0, _utils.boServiceErrorHandler)(error, 'Breakouts#clearSessions'));
|
|
629
|
+
});
|
|
630
|
+
case 3:
|
|
631
|
+
breakoutInfo = _context3.sent;
|
|
632
|
+
_this10._setManageGroups(breakoutInfo);
|
|
633
|
+
return _context3.abrupt("return", breakoutInfo);
|
|
634
|
+
case 6:
|
|
635
|
+
case "end":
|
|
636
|
+
return _context3.stop();
|
|
637
|
+
}
|
|
638
|
+
}, _callee3);
|
|
639
|
+
}))();
|
|
640
|
+
},
|
|
641
|
+
/**
|
|
642
|
+
* Host or cohost starts breakout sessions
|
|
643
|
+
* @param {object} params
|
|
644
|
+
* @returns {Promise}
|
|
645
|
+
*/
|
|
646
|
+
start: function start() {
|
|
647
|
+
var _arguments = arguments,
|
|
648
|
+
_this11 = this;
|
|
649
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
650
|
+
var params, action, payload, body, breakoutInfo;
|
|
651
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
652
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
653
|
+
case 0:
|
|
654
|
+
params = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : {};
|
|
655
|
+
action = _constants.BREAKOUTS.ACTION.START;
|
|
656
|
+
payload = _objectSpread({
|
|
657
|
+
id: _this11.breakoutGroupId,
|
|
658
|
+
action: action,
|
|
659
|
+
allowBackToMain: false,
|
|
660
|
+
allowToJoinLater: false
|
|
661
|
+
}, params);
|
|
662
|
+
body = _objectSpread(_objectSpread({}, _this11.editLock && !!_this11.editLock.token ? {
|
|
663
|
+
editlock: {
|
|
664
|
+
token: _this11.editLock.token,
|
|
665
|
+
refresh: true
|
|
666
|
+
}
|
|
667
|
+
} : {}), {
|
|
668
|
+
groups: [payload]
|
|
669
|
+
});
|
|
670
|
+
_context4.next = 6;
|
|
671
|
+
return _this11.request({
|
|
672
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
673
|
+
uri: _this11.url,
|
|
674
|
+
body: body
|
|
675
|
+
}).catch(function (error) {
|
|
676
|
+
return _promise.default.reject((0, _utils.boServiceErrorHandler)(error, 'Breakouts#start'));
|
|
677
|
+
});
|
|
678
|
+
case 6:
|
|
679
|
+
breakoutInfo = _context4.sent;
|
|
680
|
+
_this11._setManageGroups(breakoutInfo);
|
|
681
|
+
return _context4.abrupt("return", breakoutInfo);
|
|
682
|
+
case 9:
|
|
683
|
+
case "end":
|
|
684
|
+
return _context4.stop();
|
|
685
|
+
}
|
|
686
|
+
}, _callee4);
|
|
687
|
+
}))();
|
|
688
|
+
},
|
|
689
|
+
/**
|
|
690
|
+
* Host or cohost ends breakout sessions
|
|
691
|
+
* @param {object} params
|
|
692
|
+
* @returns {Promise}
|
|
693
|
+
*/
|
|
694
|
+
end: function end() {
|
|
695
|
+
var _arguments2 = arguments,
|
|
696
|
+
_this12 = this;
|
|
697
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
698
|
+
var params, delayCloseTime, id, action, payload, body, breakoutInfo;
|
|
699
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
700
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
701
|
+
case 0:
|
|
702
|
+
params = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : {};
|
|
703
|
+
delayCloseTime = _this12.delayCloseTime, id = _this12.breakoutGroupId;
|
|
704
|
+
action = _constants.BREAKOUTS.ACTION.CLOSE;
|
|
705
|
+
payload = _objectSpread({
|
|
706
|
+
id: id,
|
|
707
|
+
action: action,
|
|
708
|
+
delayCloseTime: delayCloseTime
|
|
709
|
+
}, params);
|
|
710
|
+
body = _objectSpread(_objectSpread({}, _this12.editLock && !!_this12.editLock.token ? {
|
|
711
|
+
editlock: {
|
|
712
|
+
token: _this12.editLock.token,
|
|
713
|
+
refresh: true
|
|
714
|
+
}
|
|
715
|
+
} : {}), {
|
|
716
|
+
groups: [payload]
|
|
717
|
+
});
|
|
718
|
+
_context5.next = 7;
|
|
719
|
+
return _this12.request({
|
|
720
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
721
|
+
uri: _this12.url,
|
|
722
|
+
body: body
|
|
723
|
+
}).catch(function (error) {
|
|
724
|
+
return _promise.default.reject((0, _utils.boServiceErrorHandler)(error, 'Breakouts#end'));
|
|
725
|
+
});
|
|
726
|
+
case 7:
|
|
727
|
+
breakoutInfo = _context5.sent;
|
|
728
|
+
_this12._setManageGroups(breakoutInfo);
|
|
729
|
+
return _context5.abrupt("return", breakoutInfo);
|
|
730
|
+
case 10:
|
|
731
|
+
case "end":
|
|
732
|
+
return _context5.stop();
|
|
733
|
+
}
|
|
734
|
+
}, _callee5);
|
|
735
|
+
}))();
|
|
736
|
+
},
|
|
737
|
+
/**
|
|
738
|
+
* Host or cohost update breakout sessions
|
|
739
|
+
* @param {Object} params
|
|
740
|
+
* @param {String} params.id
|
|
741
|
+
* @param {Boolean} unlockEdit
|
|
742
|
+
* @returns {Promise}
|
|
743
|
+
*/
|
|
744
|
+
update: function update(params, unlockEdit) {
|
|
745
|
+
var _this13 = this;
|
|
746
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
747
|
+
var _this13$editLock;
|
|
748
|
+
var payload, body, breakoutInfo;
|
|
749
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
750
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
751
|
+
case 0:
|
|
752
|
+
if (params.id) {
|
|
753
|
+
_context6.next = 2;
|
|
754
|
+
break;
|
|
755
|
+
}
|
|
756
|
+
return _context6.abrupt("return", _promise.default.reject(new Error('Missing breakout group id')));
|
|
757
|
+
case 2:
|
|
758
|
+
payload = _objectSpread({}, params);
|
|
759
|
+
body = _objectSpread(_objectSpread({}, (_this13$editLock = _this13.editLock) !== null && _this13$editLock !== void 0 && _this13$editLock.token ? {
|
|
760
|
+
editlock: {
|
|
761
|
+
token: _this13.editLock.token,
|
|
762
|
+
refresh: !unlockEdit
|
|
763
|
+
}
|
|
764
|
+
} : {}), {
|
|
765
|
+
groups: [payload]
|
|
766
|
+
});
|
|
767
|
+
_context6.next = 6;
|
|
768
|
+
return _this13.request({
|
|
769
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
770
|
+
uri: _this13.url,
|
|
771
|
+
body: body
|
|
772
|
+
}).catch(function (error) {
|
|
773
|
+
return _promise.default.reject((0, _utils.boServiceErrorHandler)(error, 'Breakouts#update'));
|
|
774
|
+
});
|
|
775
|
+
case 6:
|
|
776
|
+
breakoutInfo = _context6.sent;
|
|
777
|
+
if (unlockEdit) {
|
|
778
|
+
_this13._clearEditLockInfo();
|
|
779
|
+
}
|
|
780
|
+
_this13._setManageGroups(breakoutInfo);
|
|
781
|
+
return _context6.abrupt("return", breakoutInfo);
|
|
782
|
+
case 10:
|
|
783
|
+
case "end":
|
|
784
|
+
return _context6.stop();
|
|
785
|
+
}
|
|
786
|
+
}, _callee6);
|
|
787
|
+
}))();
|
|
788
|
+
},
|
|
789
|
+
/**
|
|
790
|
+
* get existed breakout sessions
|
|
791
|
+
* @param {boolean} editlock -- lock operations of the breakout sessions
|
|
792
|
+
* @returns {Promise}
|
|
793
|
+
*/
|
|
794
|
+
getBreakout: function getBreakout(editlock) {
|
|
795
|
+
var _this14 = this;
|
|
796
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
797
|
+
var _breakout$body, _breakout$body$editlo;
|
|
798
|
+
var breakout;
|
|
799
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
800
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
801
|
+
case 0:
|
|
802
|
+
_context7.next = 2;
|
|
803
|
+
return _this14.request({
|
|
804
|
+
method: _constants.HTTP_VERBS.GET,
|
|
805
|
+
uri: _this14.url + (editlock ? "?editlock=".concat(editlock) : '')
|
|
806
|
+
});
|
|
807
|
+
case 2:
|
|
808
|
+
breakout = _context7.sent;
|
|
809
|
+
_this14._setManageGroups(breakout);
|
|
810
|
+
if (editlock && (_breakout$body = breakout.body) !== null && _breakout$body !== void 0 && (_breakout$body$editlo = _breakout$body.editlock) !== null && _breakout$body$editlo !== void 0 && _breakout$body$editlo.token) {
|
|
811
|
+
_this14.set('editLock', breakout.body.editlock);
|
|
812
|
+
_this14.keepEditLockAlive();
|
|
813
|
+
}
|
|
814
|
+
return _context7.abrupt("return", breakout);
|
|
815
|
+
case 6:
|
|
816
|
+
case "end":
|
|
817
|
+
return _context7.stop();
|
|
818
|
+
}
|
|
819
|
+
}, _callee7);
|
|
820
|
+
}))();
|
|
821
|
+
},
|
|
822
|
+
/**
|
|
823
|
+
* enable and edit lock breakout
|
|
824
|
+
* @returns {void}
|
|
825
|
+
*/
|
|
826
|
+
enableAndLockBreakout: function enableAndLockBreakout() {
|
|
827
|
+
var _this15 = this;
|
|
828
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
829
|
+
var info;
|
|
830
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
831
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
832
|
+
case 0:
|
|
833
|
+
if (!_this15.enableBreakoutSession) {
|
|
834
|
+
_context8.next = 4;
|
|
835
|
+
break;
|
|
836
|
+
}
|
|
837
|
+
_this15.lockBreakout();
|
|
838
|
+
_context8.next = 8;
|
|
839
|
+
break;
|
|
840
|
+
case 4:
|
|
841
|
+
_context8.next = 6;
|
|
842
|
+
return _this15.enableBreakouts();
|
|
843
|
+
case 6:
|
|
844
|
+
info = _context8.sent;
|
|
845
|
+
if (info.body) {
|
|
846
|
+
_this15.lockBreakout();
|
|
847
|
+
}
|
|
848
|
+
case 8:
|
|
849
|
+
case "end":
|
|
850
|
+
return _context8.stop();
|
|
851
|
+
}
|
|
852
|
+
}, _callee8);
|
|
853
|
+
}))();
|
|
854
|
+
},
|
|
855
|
+
/**
|
|
856
|
+
* breakout edit locked by yourself or not
|
|
857
|
+
* @returns {boolean}
|
|
858
|
+
*/
|
|
859
|
+
hasBreakoutLocked: function hasBreakoutLocked() {
|
|
860
|
+
return this.editLock && this.editLock.token && this.editLock.state === _constants.BREAKOUTS.EDIT_LOCK_STATUS.LOCKED;
|
|
861
|
+
},
|
|
862
|
+
/**
|
|
863
|
+
* send breakout edit lock
|
|
864
|
+
* @returns {void}
|
|
865
|
+
*/
|
|
866
|
+
lockBreakout: function lockBreakout() {
|
|
867
|
+
var _this16 = this;
|
|
868
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
869
|
+
var _breakout$body2, breakout;
|
|
870
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
871
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
872
|
+
case 0:
|
|
873
|
+
if (!(_this16.editLock && !!_this16.editLock.token)) {
|
|
874
|
+
_context9.next = 8;
|
|
875
|
+
break;
|
|
876
|
+
}
|
|
877
|
+
if (!(_this16.editLock.state === _constants.BREAKOUTS.EDIT_LOCK_STATUS.LOCKED)) {
|
|
878
|
+
_context9.next = 5;
|
|
879
|
+
break;
|
|
880
|
+
}
|
|
881
|
+
throw new Error('Breakout already locked');
|
|
882
|
+
case 5:
|
|
883
|
+
_this16.keepEditLockAlive();
|
|
884
|
+
case 6:
|
|
885
|
+
_context9.next = 12;
|
|
886
|
+
break;
|
|
887
|
+
case 8:
|
|
888
|
+
_context9.next = 10;
|
|
889
|
+
return _this16.getBreakout(true);
|
|
890
|
+
case 10:
|
|
891
|
+
breakout = _context9.sent;
|
|
892
|
+
if ((_breakout$body2 = breakout.body) !== null && _breakout$body2 !== void 0 && _breakout$body2.editlock) {
|
|
893
|
+
_this16.keepEditLockAlive();
|
|
894
|
+
}
|
|
895
|
+
case 12:
|
|
896
|
+
case "end":
|
|
897
|
+
return _context9.stop();
|
|
898
|
+
}
|
|
899
|
+
}, _callee9);
|
|
900
|
+
}))();
|
|
901
|
+
},
|
|
902
|
+
/**
|
|
903
|
+
* keep edit lock alive
|
|
904
|
+
* @returns {void}
|
|
905
|
+
*/
|
|
906
|
+
keepEditLockAlive: function keepEditLockAlive() {
|
|
907
|
+
var _this17 = this;
|
|
908
|
+
if (this.editLock && !!this.editLock.token) {
|
|
909
|
+
var ttl = this.editLock.ttl < 30 ? _constants.BREAKOUTS.DEFAULT_TTL : this.editLock.ttl;
|
|
910
|
+
if (this.intervalID) {
|
|
911
|
+
window.clearInterval(this.intervalID);
|
|
912
|
+
}
|
|
913
|
+
this.intervalID = window.setInterval(function () {
|
|
914
|
+
_this17.request({
|
|
915
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
916
|
+
uri: "".concat(_this17.url, "/editlock/").concat(_this17.editLock.token)
|
|
917
|
+
}).catch(function (error) {
|
|
918
|
+
_this17._clearEditLockInfo();
|
|
919
|
+
return _promise.default.reject((0, _utils.boServiceErrorHandler)(error, 'Breakouts#keepEditLockAlive'));
|
|
920
|
+
});
|
|
921
|
+
}, ttl / 2 * 1000);
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
/**
|
|
925
|
+
* unlock edit breakout
|
|
926
|
+
* @returns {void}
|
|
927
|
+
*/
|
|
928
|
+
unLockEditBreakout: function unLockEditBreakout() {
|
|
929
|
+
var _this18 = this;
|
|
930
|
+
if (this.editLock && !!this.editLock.token) {
|
|
931
|
+
this.request({
|
|
932
|
+
method: _constants.HTTP_VERBS.DELETE,
|
|
933
|
+
uri: "".concat(this.url, "/editlock/").concat(this.editLock.token)
|
|
934
|
+
}).then(function () {
|
|
935
|
+
_this18._clearEditLockInfo();
|
|
936
|
+
}).catch(function (error) {
|
|
937
|
+
return _promise.default.reject((0, _utils.boServiceErrorHandler)(error, 'Breakouts#unLockEditBreakout'));
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
/**
|
|
942
|
+
* clear interval and edit lock info
|
|
943
|
+
* @private
|
|
944
|
+
* @returns {void}
|
|
945
|
+
*/
|
|
946
|
+
_clearEditLockInfo: function _clearEditLockInfo() {
|
|
947
|
+
if (this.intervalID) {
|
|
948
|
+
clearInterval(this.intervalID);
|
|
949
|
+
}
|
|
950
|
+
this.set('editLock', {});
|
|
951
|
+
},
|
|
952
|
+
/**
|
|
953
|
+
* assign participants to breakout session
|
|
954
|
+
* @param {Array} sessions
|
|
955
|
+
* @returns {void}
|
|
956
|
+
*/
|
|
957
|
+
assign: function assign(sessions) {
|
|
958
|
+
var internalSessions = sessions.map(function (item) {
|
|
959
|
+
return {
|
|
960
|
+
id: item.id,
|
|
961
|
+
assigned: item.memberIds,
|
|
962
|
+
assignedEmails: item.emails,
|
|
963
|
+
anyoneCanJoin: !!item.anyone
|
|
964
|
+
};
|
|
965
|
+
});
|
|
966
|
+
var body = _objectSpread(_objectSpread({}, this.editLock && !!this.editLock.token ? {
|
|
967
|
+
editlock: {
|
|
968
|
+
token: this.editLock.token,
|
|
969
|
+
refresh: true
|
|
970
|
+
}
|
|
971
|
+
} : {}), {
|
|
972
|
+
groups: [{
|
|
973
|
+
id: this.breakoutGroupId,
|
|
974
|
+
sessions: internalSessions
|
|
975
|
+
}]
|
|
976
|
+
});
|
|
977
|
+
return this.request({
|
|
978
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
979
|
+
uri: this.url,
|
|
980
|
+
body: body
|
|
981
|
+
});
|
|
982
|
+
},
|
|
983
|
+
/**
|
|
984
|
+
* query preAssignments
|
|
985
|
+
* @returns {void}
|
|
986
|
+
*/
|
|
987
|
+
queryPreAssignments: function queryPreAssignments() {
|
|
988
|
+
var _this19 = this;
|
|
989
|
+
this.webex.request({
|
|
990
|
+
uri: "".concat(this.url, "/preassignments"),
|
|
991
|
+
qs: {
|
|
992
|
+
locusUrl: btoa(this.locusUrl)
|
|
993
|
+
}
|
|
994
|
+
}).then(function (result) {
|
|
995
|
+
var _result$body;
|
|
996
|
+
if ((_result$body = result.body) !== null && _result$body !== void 0 && _result$body.groups) {
|
|
997
|
+
_this19.set('preAssignments', result.body.groups);
|
|
998
|
+
_this19.trigger(_constants.BREAKOUTS.EVENTS.PRE_ASSIGNMENTS_UPDATE);
|
|
999
|
+
}
|
|
1000
|
+
}).catch(function (error) {
|
|
1001
|
+
_loggerProxy.default.logger.error('Meeting:breakouts#queryPreAssignments failed', error);
|
|
1002
|
+
});
|
|
1003
|
+
},
|
|
1004
|
+
/**
|
|
1005
|
+
* assign participants dynamically after breakout sessions started,
|
|
1006
|
+
* but currently it only used for admitting participants from lobby into breakout directly
|
|
1007
|
+
* @param {Array} sessions
|
|
1008
|
+
* @returns {void}
|
|
1009
|
+
*/
|
|
1010
|
+
dynamicAssign: function dynamicAssign(sessions) {
|
|
1011
|
+
var updatedSessions = sessions.map(function (item) {
|
|
1012
|
+
return {
|
|
1013
|
+
id: item.id,
|
|
1014
|
+
participants: item.participants,
|
|
1015
|
+
targetState: item.targetState
|
|
1016
|
+
};
|
|
1017
|
+
});
|
|
1018
|
+
var body = {
|
|
1019
|
+
groups: [{
|
|
1020
|
+
id: this.breakoutGroupId,
|
|
1021
|
+
sessions: updatedSessions
|
|
1022
|
+
}],
|
|
1023
|
+
editlock: null
|
|
1024
|
+
};
|
|
1025
|
+
if (this.editLock && this.editLock.token) {
|
|
1026
|
+
body.editlock = this.editLock;
|
|
1027
|
+
}
|
|
1028
|
+
return this.request({
|
|
1029
|
+
method: _constants.HTTP_VERBS.PUT,
|
|
1030
|
+
uri: "".concat(this.url, "/dynamicAssign"),
|
|
1031
|
+
body: body
|
|
1032
|
+
});
|
|
1033
|
+
},
|
|
1034
|
+
/**
|
|
1035
|
+
* trigger ASK_RETURN_TO_MAIN event when main session requested
|
|
1036
|
+
* @param {Object} breakout
|
|
1037
|
+
* @returns {void}
|
|
1038
|
+
*/
|
|
1039
|
+
triggerReturnToMainEvent: function triggerReturnToMainEvent(breakout) {
|
|
1040
|
+
if (breakout.isMain && breakout.requested) {
|
|
1041
|
+
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
version: "3.0.0-beta.200"
|
|
1045
|
+
});
|
|
1046
|
+
var _default = Breakouts;
|
|
1047
|
+
exports.default = _default;
|
|
1048
|
+
//# sourceMappingURL=index.js.map
|