@webex/plugin-meetings 3.0.0-beta.2 → 3.0.0-beta.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -7
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +9 -43
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +37 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +8 -13
- package/dist/config.js.map +1 -1
- package/dist/constants.js +250 -66
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +108 -17
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +101 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +532 -240
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -37
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +54 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +284 -154
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +95 -226
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +99 -194
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +83 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +3478 -3563
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +247 -183
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +344 -344
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +529 -588
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +62 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +328 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +156 -232
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +26 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +795 -574
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +186 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +126 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +147 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +178 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +314 -260
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +264 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +66 -43
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +502 -442
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +192 -191
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +15 -23
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +384 -476
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +363 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +58 -91
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +137 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +148 -100
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +115 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +385 -460
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +143 -87
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1016 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +271 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +153 -0
- package/dist/types/meeting/index.d.ts +1471 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +257 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +78 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +62 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +367 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +159 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +208 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +46 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +200 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/internal-README.md +7 -6
- package/package.json +29 -21
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +14 -9
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +22 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +17 -17
- package/src/constants.ts +197 -22
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +39 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +518 -111
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +19 -8
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +65 -17
- package/src/locus-info/{parser.js → parser.ts} +271 -98
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +456 -0
- package/src/media/{properties.js → properties.ts} +80 -102
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +384 -0
- package/src/meeting/in-meeting-actions.ts +171 -3
- package/src/meeting/index.ts +7070 -0
- package/src/meeting/locusMediaRequest.ts +309 -0
- package/src/meeting/muteState.ts +450 -0
- package/src/meeting/{request.js → request.ts} +354 -214
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +615 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +183 -0
- package/src/meeting-info/meeting-info-v2.ts +407 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +60 -51
- package/src/meeting-info/{utilv2.js → utilv2.ts} +77 -60
- package/src/meetings/{collection.js → collection.ts} +26 -3
- package/src/meetings/index.ts +1467 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +137 -36
- package/src/member/{index.js → index.ts} +151 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +383 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +323 -145
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +339 -0
- package/src/metrics/{constants.js → constants.ts} +2 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +337 -61
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +63 -3
- package/src/multistream/remoteMediaManager.ts +263 -66
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/{index.js → index.ts} +157 -94
- package/src/reachability/request.ts +46 -35
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/{index.js → index.ts} +254 -136
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +333 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/{index.js → index.ts} +86 -78
- package/src/roap/request.ts +163 -0
- package/src/roap/turnDiscovery.ts +111 -49
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +96 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1272 -0
- package/src/statsAnalyzer/mqaUtil.ts +291 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +804 -526
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +237 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1176 -18
- package/test/unit/spec/locus-info/infoUtils.js +41 -32
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +65 -31
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +296 -12
- package/test/unit/spec/media/index.ts +162 -68
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +82 -3
- package/test/unit/spec/meeting/index.js +4569 -1773
- package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
- package/test/unit/spec/meeting/muteState.js +382 -211
- package/test/unit/spec/meeting/request.js +444 -78
- package/test/unit/spec/meeting/utils.js +517 -192
- package/test/unit/spec/meeting-info/index.js +181 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +481 -76
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +15 -1
- package/test/unit/spec/meetings/index.js +1254 -330
- package/test/unit/spec/meetings/utils.js +220 -14
- package/test/unit/spec/member/index.js +58 -5
- package/test/unit/spec/member/util.js +494 -26
- package/test/unit/spec/members/index.js +423 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +191 -4
- package/test/unit/spec/metrics/index.js +12 -66
- package/test/unit/spec/multistream/mediaRequestManager.ts +1013 -106
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +730 -65
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +176 -27
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +155 -9
- package/test/unit/spec/recording-controller/index.js +307 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +28 -52
- package/test/unit/spec/roap/request.ts +225 -0
- package/test/unit/spec/roap/turnDiscovery.ts +92 -50
- package/test/unit/spec/rtcMetrics/index.ts +60 -0
- package/test/unit/spec/stats-analyzer/index.js +116 -60
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +57 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
package/dist/locus-info/index.js
CHANGED
|
@@ -1,61 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
-
|
|
5
4
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
6
|
-
|
|
7
5
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
8
|
-
|
|
9
6
|
_Object$defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
|
-
|
|
13
9
|
exports.default = void 0;
|
|
14
|
-
|
|
15
10
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
16
|
-
|
|
17
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
18
|
-
|
|
19
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
20
|
-
|
|
13
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
21
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
22
|
-
|
|
23
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
24
|
-
|
|
25
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
26
|
-
|
|
17
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
18
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
19
|
+
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
20
|
+
var _assignWith2 = _interopRequireDefault(require("lodash/assignWith"));
|
|
27
21
|
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
28
|
-
|
|
29
22
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
30
|
-
|
|
31
23
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
32
|
-
|
|
33
24
|
var _constants = require("../constants");
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
var _selfUtils = _interopRequireDefault(require("../locus-info/selfUtils"));
|
|
44
|
-
|
|
45
|
-
var _hostUtils = _interopRequireDefault(require("../locus-info/hostUtils"));
|
|
46
|
-
|
|
47
|
-
var _controlsUtils = _interopRequireDefault(require("../locus-info/controlsUtils"));
|
|
48
|
-
|
|
49
|
-
var _embeddedAppsUtils = _interopRequireDefault(require("../locus-info/embeddedAppsUtils"));
|
|
50
|
-
|
|
51
|
-
var _mediaSharesUtils = _interopRequireDefault(require("../locus-info/mediaSharesUtils"));
|
|
52
|
-
|
|
53
|
-
var _parser = _interopRequireDefault(require("../locus-info/parser"));
|
|
54
|
-
|
|
25
|
+
var _infoUtils = _interopRequireDefault(require("./infoUtils"));
|
|
26
|
+
var _fullState = _interopRequireDefault(require("./fullState"));
|
|
27
|
+
var _selfUtils = _interopRequireDefault(require("./selfUtils"));
|
|
28
|
+
var _hostUtils = _interopRequireDefault(require("./hostUtils"));
|
|
29
|
+
var _controlsUtils = _interopRequireDefault(require("./controlsUtils"));
|
|
30
|
+
var _embeddedAppsUtils = _interopRequireDefault(require("./embeddedAppsUtils"));
|
|
31
|
+
var _mediaSharesUtils = _interopRequireDefault(require("./mediaSharesUtils"));
|
|
32
|
+
var _parser = _interopRequireDefault(require("./parser"));
|
|
55
33
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
56
|
-
|
|
57
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
58
|
-
|
|
59
35
|
/**
|
|
60
36
|
* @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
|
|
61
37
|
* @export
|
|
@@ -64,14 +40,48 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
64
40
|
*/
|
|
65
41
|
var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
66
42
|
(0, _inherits2.default)(LocusInfo, _EventsScope);
|
|
67
|
-
|
|
68
43
|
var _super = _createSuper(LocusInfo);
|
|
69
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Constructor
|
|
46
|
+
* @param {boolean} updateMeeting true if the meeting should be updated
|
|
47
|
+
* @param {object} webex
|
|
48
|
+
* @param {string} meetingId
|
|
49
|
+
* @returns {undefined}
|
|
50
|
+
*/
|
|
70
51
|
function LocusInfo(updateMeeting, webex, meetingId) {
|
|
71
52
|
var _this;
|
|
72
|
-
|
|
73
53
|
(0, _classCallCheck2.default)(this, LocusInfo);
|
|
74
54
|
_this = _super.call(this);
|
|
55
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "compareAndUpdateFlags", void 0);
|
|
56
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "emitChange", void 0);
|
|
57
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusParser", void 0);
|
|
58
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingId", void 0);
|
|
59
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parsedLocus", void 0);
|
|
60
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMeeting", void 0);
|
|
61
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "webex", void 0);
|
|
62
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "aclUrl", void 0);
|
|
63
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "baseSequence", void 0);
|
|
64
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "created", void 0);
|
|
65
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deltaParticipants", void 0);
|
|
66
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "identities", void 0);
|
|
67
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "membership", void 0);
|
|
68
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participants", void 0);
|
|
69
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participantsUrl", void 0);
|
|
70
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replaces", void 0);
|
|
71
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scheduledMeeting", void 0);
|
|
72
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sequence", void 0);
|
|
73
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "controls", void 0);
|
|
74
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
|
|
75
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "embeddedApps", void 0);
|
|
76
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fullState", void 0);
|
|
77
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "host", void 0);
|
|
78
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "info", void 0);
|
|
79
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roles", void 0);
|
|
80
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaShares", void 0);
|
|
81
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replace", void 0);
|
|
82
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "url", void 0);
|
|
83
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "services", void 0);
|
|
84
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mainSessionLocusCache", void 0);
|
|
75
85
|
_this.parsedLocus = {
|
|
76
86
|
states: []
|
|
77
87
|
};
|
|
@@ -83,52 +93,79 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
83
93
|
_this.locusParser = new _parser.default();
|
|
84
94
|
return _this;
|
|
85
95
|
}
|
|
96
|
+
|
|
86
97
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* @param {Locus} locus
|
|
98
|
+
* Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
|
|
99
|
+
*
|
|
90
100
|
* @param {Meeting} meeting
|
|
91
101
|
* @returns {undefined}
|
|
92
102
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
103
|
(0, _createClass2.default)(LocusInfo, [{
|
|
96
|
-
key: "
|
|
97
|
-
value: function
|
|
104
|
+
key: "doLocusSync",
|
|
105
|
+
value: function doLocusSync(meeting) {
|
|
98
106
|
var _this2 = this;
|
|
107
|
+
var isDelta;
|
|
108
|
+
var url;
|
|
109
|
+
if (this.locusParser.workingCopy.syncUrl) {
|
|
110
|
+
url = this.locusParser.workingCopy.syncUrl;
|
|
111
|
+
isDelta = true;
|
|
112
|
+
} else {
|
|
113
|
+
url = meeting.locusUrl;
|
|
114
|
+
isDelta = false;
|
|
115
|
+
}
|
|
116
|
+
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> doing Locus sync (getting ".concat(isDelta ? 'delta' : 'full', " DTO)"));
|
|
117
|
+
|
|
118
|
+
// return value ignored on purpose
|
|
119
|
+
meeting.meetingRequest.getLocusDTO({
|
|
120
|
+
url: url
|
|
121
|
+
}).then(function (res) {
|
|
122
|
+
if (isDelta) {
|
|
123
|
+
if (!(0, _isEmpty2.default)(res.body)) {
|
|
124
|
+
meeting.locusInfo.handleLocusDelta(res.body, meeting);
|
|
125
|
+
} else {
|
|
126
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from syncUrl, so we already have latest Locus DTO');
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
meeting.locusInfo.onFullLocus(res.body);
|
|
130
|
+
}
|
|
131
|
+
}).finally(function () {
|
|
132
|
+
// Notify parser to resume processing delta events.
|
|
133
|
+
// Any deltas in the queue that have now been superseded by this sync will simply be ignored
|
|
134
|
+
_this2.locusParser.resume();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
99
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Apply locus delta data to meeting
|
|
140
|
+
* @param {string} action Locus delta action
|
|
141
|
+
* @param {Locus} locus
|
|
142
|
+
* @param {Meeting} meeting
|
|
143
|
+
* @returns {undefined}
|
|
144
|
+
*/
|
|
145
|
+
}, {
|
|
146
|
+
key: "applyLocusDeltaData",
|
|
147
|
+
value: function applyLocusDeltaData(action, locus, meeting) {
|
|
100
148
|
var _LocusDeltaParser$loc = _parser.default.loci,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
149
|
+
DESYNC = _LocusDeltaParser$loc.DESYNC,
|
|
150
|
+
USE_CURRENT = _LocusDeltaParser$loc.USE_CURRENT,
|
|
151
|
+
USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING,
|
|
152
|
+
WAIT = _LocusDeltaParser$loc.WAIT;
|
|
105
153
|
switch (action) {
|
|
106
154
|
case USE_INCOMING:
|
|
107
155
|
meeting.locusInfo.onDeltaLocus(locus);
|
|
108
156
|
break;
|
|
109
|
-
|
|
110
157
|
case USE_CURRENT:
|
|
111
|
-
|
|
112
|
-
|
|
158
|
+
case WAIT:
|
|
159
|
+
// do nothing
|
|
113
160
|
break;
|
|
114
|
-
|
|
115
161
|
case DESYNC:
|
|
116
|
-
|
|
117
|
-
desync: true,
|
|
118
|
-
locusUrl: meeting.locusUrl
|
|
119
|
-
}).then(function (res) {
|
|
120
|
-
meeting.locusInfo.onFullLocus(res.body); // Notify parser to resume processing delta events
|
|
121
|
-
// now that we have full locus from DESYNC.
|
|
122
|
-
|
|
123
|
-
_this2.locusParser.resume();
|
|
124
|
-
});
|
|
162
|
+
this.doLocusSync(meeting);
|
|
125
163
|
break;
|
|
126
|
-
|
|
127
164
|
default:
|
|
128
165
|
_loggerProxy.default.logger.info("Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ".concat(action));
|
|
129
|
-
|
|
130
166
|
}
|
|
131
167
|
}
|
|
168
|
+
|
|
132
169
|
/**
|
|
133
170
|
* Adds locus delta to parser's queue
|
|
134
171
|
* and registers a function handler
|
|
@@ -137,12 +174,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
137
174
|
* @param {Meeting} meeting
|
|
138
175
|
* @returns {undefined}
|
|
139
176
|
*/
|
|
140
|
-
|
|
141
177
|
}, {
|
|
142
178
|
key: "handleLocusDelta",
|
|
143
179
|
value: function handleLocusDelta(locus, meeting) {
|
|
144
180
|
var _this3 = this;
|
|
145
|
-
|
|
146
181
|
// register a function to process delta actions
|
|
147
182
|
if (!this.locusParser.onDeltaAction) {
|
|
148
183
|
// delta action, along with associated loci
|
|
@@ -150,20 +185,20 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
150
185
|
this.locusParser.onDeltaAction = function (action, parsedLoci) {
|
|
151
186
|
_this3.applyLocusDeltaData(action, parsedLoci, meeting);
|
|
152
187
|
};
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
188
|
+
}
|
|
189
|
+
// queue delta event with parser
|
|
156
190
|
this.locusParser.onDeltaEvent(locus);
|
|
157
191
|
}
|
|
192
|
+
|
|
158
193
|
/**
|
|
159
194
|
* @param {Locus} locus
|
|
160
195
|
* @returns {undefined}
|
|
161
196
|
* @memberof LocusInfo
|
|
162
197
|
*/
|
|
163
|
-
|
|
164
198
|
}, {
|
|
165
199
|
key: "init",
|
|
166
200
|
value: function init() {
|
|
201
|
+
var _locus$links;
|
|
167
202
|
var locus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
168
203
|
this.created = locus.created || null;
|
|
169
204
|
this.scheduledMeeting = locus.meeting || null;
|
|
@@ -175,6 +210,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
175
210
|
this.membership = locus.membership || null;
|
|
176
211
|
this.identities = locus.identities || null;
|
|
177
212
|
this.participants = locus.participants || null;
|
|
213
|
+
|
|
178
214
|
/**
|
|
179
215
|
* Stores the delta values for a changed participant.
|
|
180
216
|
*
|
|
@@ -192,50 +228,53 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
192
228
|
* @private
|
|
193
229
|
* @member LocusInfo
|
|
194
230
|
*/
|
|
195
|
-
|
|
196
|
-
this.
|
|
231
|
+
this.deltaParticipants = [];
|
|
232
|
+
this.updateLocusCache(locus);
|
|
233
|
+
// above section only updates the locusInfo object
|
|
197
234
|
// The below section makes sure it updates the locusInfo as well as updates the meeting object
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
235
|
+
this.updateParticipants(locus.participants);
|
|
236
|
+
// For 1:1 space meeting the conversation Url does not exist in locus.conversation
|
|
201
237
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
|
202
|
-
this.updateControls(locus.controls);
|
|
238
|
+
this.updateControls(locus.controls, locus.self);
|
|
203
239
|
this.updateLocusUrl(locus.url);
|
|
204
240
|
this.updateFullState(locus.fullState);
|
|
205
241
|
this.updateMeetingInfo(locus.info);
|
|
206
|
-
this.updateEmbeddedApps(locus.embeddedApps);
|
|
207
|
-
|
|
242
|
+
this.updateEmbeddedApps(locus.embeddedApps);
|
|
243
|
+
// self and participants generate sipUrl for 1:1 meeting
|
|
208
244
|
this.updateSelf(locus.self, locus.participants);
|
|
209
245
|
this.updateHostInfo(locus.host);
|
|
210
246
|
this.updateMediaShares(locus.mediaShares);
|
|
247
|
+
this.updateServices((_locus$links = locus.links) === null || _locus$links === void 0 ? void 0 : _locus$links.services);
|
|
211
248
|
}
|
|
249
|
+
|
|
212
250
|
/**
|
|
213
251
|
* @param {Object} locus
|
|
214
252
|
* @returns {undefined}
|
|
215
253
|
* @memberof LocusInfo
|
|
216
254
|
*/
|
|
217
|
-
|
|
218
255
|
}, {
|
|
219
256
|
key: "initialSetup",
|
|
220
257
|
value: function initialSetup(locus) {
|
|
221
|
-
this.
|
|
258
|
+
this.updateLocusCache(locus);
|
|
259
|
+
this.onFullLocus(locus);
|
|
222
260
|
|
|
261
|
+
// Change it to true after it receives it first locus object
|
|
223
262
|
this.emitChange = true;
|
|
224
263
|
}
|
|
264
|
+
|
|
225
265
|
/**
|
|
226
266
|
* @param {Meeting} meeting
|
|
227
267
|
* @param {Object} data
|
|
228
268
|
* @returns {undefined}
|
|
229
269
|
* @memberof LocusInfo
|
|
230
270
|
*/
|
|
231
|
-
|
|
232
271
|
}, {
|
|
233
272
|
key: "parse",
|
|
234
273
|
value: function parse(meeting, data) {
|
|
274
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
235
275
|
var eventType = data.eventType;
|
|
236
|
-
|
|
276
|
+
var locus = this.getTheLocusToUpdate(data.locus);
|
|
237
277
|
_loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
|
|
238
|
-
|
|
239
278
|
switch (eventType) {
|
|
240
279
|
case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
|
|
241
280
|
case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
|
|
@@ -251,19 +290,18 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
251
290
|
case _constants.LOCUSEVENT.PARTICIPANT_DECLINED:
|
|
252
291
|
case _constants.LOCUSEVENT.FLOOR_GRANTED:
|
|
253
292
|
case _constants.LOCUSEVENT.FLOOR_RELEASED:
|
|
254
|
-
this.onFullLocus(
|
|
293
|
+
this.onFullLocus(locus, eventType);
|
|
255
294
|
break;
|
|
256
|
-
|
|
257
295
|
case _constants.LOCUSEVENT.DIFFERENCE:
|
|
258
|
-
this.handleLocusDelta(
|
|
296
|
+
this.handleLocusDelta(locus, meeting);
|
|
259
297
|
break;
|
|
260
|
-
|
|
261
298
|
default:
|
|
262
299
|
// Why will there be a event with no eventType ????
|
|
263
300
|
// we may not need this, we can get full locus
|
|
264
|
-
this.handleLocusDelta(
|
|
301
|
+
this.handleLocusDelta(locus, meeting);
|
|
265
302
|
}
|
|
266
303
|
}
|
|
304
|
+
|
|
267
305
|
/**
|
|
268
306
|
* @param {String} scope
|
|
269
307
|
* @param {String} eventName
|
|
@@ -271,45 +309,49 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
271
309
|
* @returns {undefined}
|
|
272
310
|
* @memberof LocusInfo
|
|
273
311
|
*/
|
|
274
|
-
|
|
275
312
|
}, {
|
|
276
313
|
key: "emitScoped",
|
|
277
314
|
value: function emitScoped(scope, eventName, args) {
|
|
278
315
|
return this.emit(scope, eventName, args);
|
|
279
316
|
}
|
|
317
|
+
|
|
280
318
|
/**
|
|
281
319
|
* updates the locus with full locus object
|
|
282
320
|
* @param {object} locus locus object
|
|
283
|
-
* @param {
|
|
321
|
+
* @param {string} eventType particulat locus event
|
|
284
322
|
* @returns {object} null
|
|
285
323
|
* @memberof LocusInfo
|
|
286
324
|
*/
|
|
287
|
-
|
|
288
325
|
}, {
|
|
289
326
|
key: "onFullLocus",
|
|
290
327
|
value: function onFullLocus(locus, eventType) {
|
|
291
328
|
if (!locus) {
|
|
292
329
|
_loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
|
|
293
330
|
}
|
|
294
|
-
|
|
331
|
+
if (!this.locusParser.isNewFullLocus(locus)) {
|
|
332
|
+
_loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=".concat(eventType));
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
295
335
|
this.updateParticipantDeltas(locus.participants);
|
|
296
336
|
this.scheduledMeeting = locus.meeting || null;
|
|
297
337
|
this.participants = locus.participants;
|
|
338
|
+
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
|
298
339
|
this.updateLocusInfo(locus);
|
|
299
|
-
this.updateParticipants(locus.participants);
|
|
340
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
|
300
341
|
this.isMeetingActive();
|
|
301
342
|
this.handleOneOnOneEvent(eventType);
|
|
302
|
-
this.updateEmbeddedApps(locus.embeddedApps);
|
|
303
|
-
|
|
343
|
+
this.updateEmbeddedApps(locus.embeddedApps);
|
|
344
|
+
// set current (working copy) for parser
|
|
304
345
|
this.locusParser.workingCopy = locus;
|
|
305
|
-
}
|
|
346
|
+
}
|
|
306
347
|
|
|
348
|
+
// used for ringing stops on one on one
|
|
307
349
|
/**
|
|
308
350
|
* @param {String} eventType
|
|
309
351
|
* @returns {undefined}
|
|
310
352
|
* @memberof LocusInfo
|
|
311
353
|
*/
|
|
312
|
-
|
|
354
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
313
355
|
}, {
|
|
314
356
|
key: "handleOneOnOneEvent",
|
|
315
357
|
value: function handleOneOnOneEvent(eventType) {
|
|
@@ -324,9 +366,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
324
366
|
remoteDeclined: true,
|
|
325
367
|
remoteAnswered: false
|
|
326
368
|
});
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
369
|
+
}
|
|
370
|
+
// for 1:1 bob calls alice and alice answers, notify the meeting state
|
|
330
371
|
if (eventType === _constants.LOCUSEVENT.PARTICIPANT_JOIN) {
|
|
331
372
|
// trigger the event for stop ringing
|
|
332
373
|
this.emitScoped({
|
|
@@ -339,29 +380,37 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
339
380
|
}
|
|
340
381
|
}
|
|
341
382
|
}
|
|
383
|
+
|
|
342
384
|
/**
|
|
343
385
|
* @param {Object} locus
|
|
344
386
|
* @returns {undefined}
|
|
345
387
|
* @memberof LocusInfo
|
|
346
388
|
*/
|
|
347
|
-
|
|
348
389
|
}, {
|
|
349
390
|
key: "onDeltaLocus",
|
|
350
391
|
value: function onDeltaLocus(locus) {
|
|
392
|
+
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
|
351
393
|
this.updateLocusInfo(locus);
|
|
352
|
-
this.updateParticipants(locus.participants);
|
|
394
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
|
353
395
|
this.isMeetingActive();
|
|
354
396
|
}
|
|
397
|
+
|
|
355
398
|
/**
|
|
356
399
|
* @param {Object} locus
|
|
357
400
|
* @returns {undefined}
|
|
358
401
|
* @memberof LocusInfo
|
|
359
402
|
*/
|
|
360
|
-
|
|
361
403
|
}, {
|
|
362
404
|
key: "updateLocusInfo",
|
|
363
405
|
value: function updateLocusInfo(locus) {
|
|
364
|
-
|
|
406
|
+
var _locus$self, _locus$self2, _locus$links2;
|
|
407
|
+
if (((_locus$self = locus.self) === null || _locus$self === void 0 ? void 0 : _locus$self.reason) === 'MOVED' && ((_locus$self2 = locus.self) === null || _locus$self2 === void 0 ? void 0 : _locus$self2.state) === 'LEFT') {
|
|
408
|
+
// When moved to a breakout session locus sends a message for the previous locus
|
|
409
|
+
// indicating that we have been moved. It isn't helpful to continue parsing this
|
|
410
|
+
// as it gets interpreted as if we have left the call
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
this.updateControls(locus.controls, locus.self);
|
|
365
414
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
|
366
415
|
this.updateCreated(locus.created);
|
|
367
416
|
this.updateFullState(locus.fullState);
|
|
@@ -378,53 +427,63 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
378
427
|
this.updateMemberShip(locus.membership);
|
|
379
428
|
this.updateIdentifiers(locus.identities);
|
|
380
429
|
this.updateEmbeddedApps(locus.embeddedApps);
|
|
381
|
-
this.
|
|
430
|
+
this.updateServices((_locus$links2 = locus.links) === null || _locus$links2 === void 0 ? void 0 : _locus$links2.services);
|
|
431
|
+
this.compareAndUpdate();
|
|
432
|
+
// update which required to compare different objects from locus
|
|
382
433
|
}
|
|
434
|
+
|
|
383
435
|
/**
|
|
384
436
|
* @param {Array} participants
|
|
385
437
|
* @param {Object} self
|
|
386
438
|
* @returns {Array}
|
|
387
439
|
* @memberof LocusInfo
|
|
388
440
|
*/
|
|
389
|
-
|
|
390
441
|
}, {
|
|
391
442
|
key: "getLocusPartner",
|
|
392
443
|
value: function getLocusPartner(participants, self) {
|
|
393
444
|
if (!participants || participants.length === 0) {
|
|
394
445
|
return null;
|
|
395
446
|
}
|
|
396
|
-
|
|
397
447
|
return participants.find(function (participant) {
|
|
398
448
|
return self && participant.identity !== self.identity && (participants.length <= 2 || participant.type === _constants._USER_ && !participant.removed);
|
|
399
|
-
}
|
|
400
|
-
|
|
449
|
+
}
|
|
450
|
+
// @ts-ignore
|
|
451
|
+
) || this.partner;
|
|
452
|
+
}
|
|
401
453
|
|
|
454
|
+
// TODO: all the leave states need to be checked
|
|
402
455
|
/**
|
|
403
456
|
* @returns {undefined}
|
|
404
457
|
* @memberof LocusInfo
|
|
405
458
|
*/
|
|
406
|
-
|
|
407
459
|
}, {
|
|
408
460
|
key: "isMeetingActive",
|
|
409
461
|
value: function isMeetingActive() {
|
|
410
462
|
if (this.parsedLocus.fullState.type === _constants._CALL_ || this.parsedLocus.fullState.type === _constants._SIP_BRIDGE_) {
|
|
463
|
+
// @ts-ignore
|
|
411
464
|
var partner = this.getLocusPartner(this.participants, this.self);
|
|
412
465
|
this.updateMeeting({
|
|
413
466
|
partner: partner
|
|
414
|
-
});
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
// Check if guest user needs to be checked here
|
|
470
|
+
|
|
415
471
|
// 1) when bob declines call from bob, (bob='DECLINED')
|
|
416
472
|
// 2) When alice rejects call to bob , (bob='NOTIFIED')
|
|
473
|
+
|
|
417
474
|
// When we dont add MEDIA for condition 2. The state of bob='IDLE'
|
|
418
475
|
|
|
419
476
|
if (this.fullState && this.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
|
|
420
477
|
// TODO: update the meeting state
|
|
421
478
|
_loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.');
|
|
422
479
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
480
|
+
// @ts-ignore
|
|
481
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
482
|
+
name: 'client.call.remote-ended',
|
|
483
|
+
options: {
|
|
484
|
+
meetingId: this.meetingId
|
|
485
|
+
}
|
|
426
486
|
});
|
|
427
|
-
|
|
428
487
|
this.emitScoped({
|
|
429
488
|
file: 'locus-info',
|
|
430
489
|
function: 'isMeetingActive'
|
|
@@ -433,11 +492,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
433
492
|
shouldLeave: false
|
|
434
493
|
});
|
|
435
494
|
} else if (partner.state === _constants.MEETING_STATE.STATES.LEFT && this.parsedLocus.self && (this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.DECLINED || this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.NOTIFIED || this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.JOINED)) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
495
|
+
// @ts-ignore
|
|
496
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
497
|
+
name: 'client.call.remote-ended',
|
|
498
|
+
options: {
|
|
499
|
+
meetingId: this.meetingId
|
|
500
|
+
}
|
|
439
501
|
});
|
|
440
|
-
|
|
441
502
|
this.emitScoped({
|
|
442
503
|
file: 'locus-info',
|
|
443
504
|
function: 'isMeetingActive'
|
|
@@ -447,11 +508,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
447
508
|
});
|
|
448
509
|
} else if (this.parsedLocus.self && this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.LEFT && (partner.state === _constants.MEETING_STATE.STATES.LEFT || partner.state === _constants.MEETING_STATE.STATES.DECLINED || partner.state === _constants.MEETING_STATE.STATES.NOTIFIED || partner.state === _constants.MEETING_STATE.STATES.IDLE) // Happens when user just joins and adds no Media
|
|
449
510
|
) {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
511
|
+
// @ts-ignore
|
|
512
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
513
|
+
name: 'client.call.remote-ended',
|
|
514
|
+
options: {
|
|
515
|
+
meetingId: this.meetingId
|
|
516
|
+
}
|
|
453
517
|
});
|
|
454
|
-
|
|
455
518
|
this.emitScoped({
|
|
456
519
|
file: 'locus-info',
|
|
457
520
|
function: 'isMeetingActive'
|
|
@@ -461,14 +524,18 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
461
524
|
});
|
|
462
525
|
}
|
|
463
526
|
} else if (this.parsedLocus.fullState.type === _constants._MEETING_) {
|
|
464
|
-
if (this.fullState && (this.fullState.state === _constants.LOCUS.STATE.INACTIVE ||
|
|
527
|
+
if (this.fullState && (this.fullState.state === _constants.LOCUS.STATE.INACTIVE ||
|
|
528
|
+
// @ts-ignore
|
|
529
|
+
this.fullState.state === _constants.LOCUS.STATE.TERMINATING)) {
|
|
465
530
|
_loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating');
|
|
466
531
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
532
|
+
// @ts-ignore
|
|
533
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
534
|
+
name: 'client.call.remote-ended',
|
|
535
|
+
options: {
|
|
536
|
+
meetingId: this.meetingId
|
|
537
|
+
}
|
|
470
538
|
});
|
|
471
|
-
|
|
472
539
|
this.emitScoped({
|
|
473
540
|
file: 'locus-info',
|
|
474
541
|
function: 'isMeetingActive'
|
|
@@ -478,11 +545,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
478
545
|
});
|
|
479
546
|
} else if (this.fullState && this.fullState.removed) {
|
|
480
547
|
// user has been dropped from a meeting
|
|
481
|
-
_metrics.default.postEvent({
|
|
482
|
-
event: _config.eventType.REMOTE_ENDED,
|
|
483
|
-
meetingId: this.meetingId
|
|
484
|
-
});
|
|
485
548
|
|
|
549
|
+
// @ts-ignore
|
|
550
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
551
|
+
name: 'client.call.remote-ended',
|
|
552
|
+
options: {
|
|
553
|
+
meetingId: this.meetingId
|
|
554
|
+
}
|
|
555
|
+
});
|
|
486
556
|
this.emitScoped({
|
|
487
557
|
file: 'locus-info',
|
|
488
558
|
function: 'isMeetingActive'
|
|
@@ -490,7 +560,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
490
560
|
reason: _constants.MEETING_REMOVED_REASON.FULLSTATE_REMOVED,
|
|
491
561
|
shouldLeave: false
|
|
492
562
|
});
|
|
493
|
-
}
|
|
563
|
+
}
|
|
564
|
+
// If you are guest and you are removed from the meeting
|
|
494
565
|
// You wont get any further events
|
|
495
566
|
else if (this.parsedLocus.self && this.parsedLocus.self.removed) {
|
|
496
567
|
// Check if we need to send an event
|
|
@@ -506,13 +577,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
506
577
|
_loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
|
|
507
578
|
}
|
|
508
579
|
}
|
|
580
|
+
|
|
509
581
|
/**
|
|
510
582
|
* checks if the host permissions have changed while in the meeting
|
|
511
583
|
* This would be the case if your role as host or moderator has been updated
|
|
512
584
|
* @returns {undefined}
|
|
513
585
|
* @memberof LocusInfo
|
|
514
586
|
*/
|
|
515
|
-
|
|
516
587
|
}, {
|
|
517
588
|
key: "compareAndUpdate",
|
|
518
589
|
value: function compareAndUpdate() {
|
|
@@ -522,17 +593,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
522
593
|
this.compareSelfAndHost();
|
|
523
594
|
}
|
|
524
595
|
}
|
|
596
|
+
|
|
525
597
|
/**
|
|
526
598
|
* compared the self object to check if the user has host permissions
|
|
527
599
|
* @returns {undefined}
|
|
528
600
|
* @memberof LocusInfo
|
|
529
601
|
*/
|
|
530
|
-
|
|
531
602
|
}, {
|
|
532
603
|
key: "compareSelfAndHost",
|
|
533
604
|
value: function compareSelfAndHost() {
|
|
534
605
|
var _this$parsedLocus$hos;
|
|
535
|
-
|
|
536
606
|
// In some cases the host info is not present but the moderator values changes from null to false so it triggers an update
|
|
537
607
|
if (this.parsedLocus.self.selfIdentity === ((_this$parsedLocus$hos = this.parsedLocus.host) === null || _this$parsedLocus$hos === void 0 ? void 0 : _this$parsedLocus$hos.hostId) && this.parsedLocus.self.moderator) {
|
|
538
608
|
this.emitScoped({
|
|
@@ -550,6 +620,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
550
620
|
});
|
|
551
621
|
}
|
|
552
622
|
}
|
|
623
|
+
|
|
553
624
|
/**
|
|
554
625
|
* Update the deltaParticipants property of this object based on a list of
|
|
555
626
|
* provided participants.
|
|
@@ -557,22 +628,19 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
557
628
|
* @param {Array} [participants] - The participants to update against.
|
|
558
629
|
* @returns {void}
|
|
559
630
|
*/
|
|
560
|
-
|
|
561
631
|
}, {
|
|
562
632
|
key: "updateParticipantDeltas",
|
|
563
633
|
value: function updateParticipantDeltas() {
|
|
564
634
|
var _this4 = this;
|
|
565
|
-
|
|
566
635
|
var participants = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
567
|
-
|
|
568
636
|
// Used to find a participant within a participants collection.
|
|
569
637
|
var findParticipant = function findParticipant(participant, collection) {
|
|
570
638
|
return collection.find(function (item) {
|
|
571
639
|
return item.person.id === participant.person.id;
|
|
572
640
|
});
|
|
573
|
-
};
|
|
574
|
-
|
|
641
|
+
};
|
|
575
642
|
|
|
643
|
+
// Generates an object that indicates which state properties have changed.
|
|
576
644
|
var generateDelta = function generateDelta() {
|
|
577
645
|
var prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
578
646
|
var newState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -581,8 +649,9 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
581
649
|
audioStatus: prevState.audioStatus !== newState.audioStatus,
|
|
582
650
|
videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
|
|
583
651
|
videoStatus: prevState.videoStatus !== newState.videoStatus
|
|
584
|
-
};
|
|
652
|
+
};
|
|
585
653
|
|
|
654
|
+
// Clean the object
|
|
586
655
|
(0, _keys.default)(deltas).forEach(function (key) {
|
|
587
656
|
if (deltas[key] !== true) {
|
|
588
657
|
delete deltas[key];
|
|
@@ -590,35 +659,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
590
659
|
});
|
|
591
660
|
return deltas;
|
|
592
661
|
};
|
|
593
|
-
|
|
594
662
|
this.deltaParticipants = participants.reduce(function (collection, participant) {
|
|
595
663
|
var existingParticipant = findParticipant(participant, _this4.participants || []) || {};
|
|
596
664
|
var delta = generateDelta(existingParticipant.status, participant.status);
|
|
597
665
|
var changed = (0, _keys.default)(delta).length > 0;
|
|
598
|
-
|
|
599
666
|
if (changed) {
|
|
600
667
|
collection.push({
|
|
601
668
|
person: participant.person,
|
|
602
669
|
delta: delta
|
|
603
670
|
});
|
|
604
671
|
}
|
|
605
|
-
|
|
606
672
|
return collection;
|
|
607
673
|
}, []);
|
|
608
674
|
}
|
|
675
|
+
|
|
609
676
|
/**
|
|
610
|
-
*
|
|
677
|
+
* update meeting's members
|
|
611
678
|
* @param {Object} participants new participants object
|
|
612
|
-
* @param {
|
|
679
|
+
* @param {Boolean} isReplace is replace the whole members
|
|
613
680
|
* @returns {Array} updatedParticipants
|
|
614
681
|
* @memberof LocusInfo
|
|
615
682
|
*/
|
|
616
|
-
|
|
617
683
|
}, {
|
|
618
684
|
key: "updateParticipants",
|
|
619
|
-
value: function updateParticipants(participants) {
|
|
685
|
+
value: function updateParticipants(participants, isReplace) {
|
|
620
686
|
var _this$parsedLocus$con;
|
|
621
|
-
|
|
622
687
|
this.emitScoped({
|
|
623
688
|
file: 'locus-info',
|
|
624
689
|
function: 'updateParticipants'
|
|
@@ -627,33 +692,99 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
627
692
|
recordingId: this.parsedLocus.controls && ((_this$parsedLocus$con = this.parsedLocus.controls.record) === null || _this$parsedLocus$con === void 0 ? void 0 : _this$parsedLocus$con.modifiedBy),
|
|
628
693
|
selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
|
|
629
694
|
selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
|
|
630
|
-
hostId: this.parsedLocus.host && this.parsedLocus.host.hostId
|
|
695
|
+
hostId: this.parsedLocus.host && this.parsedLocus.host.hostId,
|
|
696
|
+
isReplace: isReplace
|
|
631
697
|
});
|
|
632
698
|
}
|
|
699
|
+
|
|
633
700
|
/**
|
|
634
701
|
* @param {Object} controls
|
|
702
|
+
* @param {Object} self
|
|
635
703
|
* @returns {undefined}
|
|
636
704
|
* @memberof LocusInfo
|
|
637
705
|
*/
|
|
638
|
-
|
|
639
706
|
}, {
|
|
640
707
|
key: "updateControls",
|
|
641
|
-
value: function updateControls(controls) {
|
|
708
|
+
value: function updateControls(controls, self) {
|
|
642
709
|
if (controls && !(0, _isEqual2.default)(this.controls, controls)) {
|
|
643
710
|
this.parsedLocus.controls = _controlsUtils.default.parse(controls);
|
|
644
|
-
|
|
645
711
|
var _ControlsUtils$getCon = _controlsUtils.default.getControls(this.controls, controls),
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
712
|
+
_ControlsUtils$getCon2 = _ControlsUtils$getCon.updates,
|
|
713
|
+
hasRecordingChanged = _ControlsUtils$getCon2.hasRecordingChanged,
|
|
714
|
+
hasRecordingPausedChanged = _ControlsUtils$getCon2.hasRecordingPausedChanged,
|
|
715
|
+
hasMeetingContainerChanged = _ControlsUtils$getCon2.hasMeetingContainerChanged,
|
|
716
|
+
hasTranscribeChanged = _ControlsUtils$getCon2.hasTranscribeChanged,
|
|
717
|
+
hasEntryExitToneChanged = _ControlsUtils$getCon2.hasEntryExitToneChanged,
|
|
718
|
+
hasBreakoutChanged = _ControlsUtils$getCon2.hasBreakoutChanged,
|
|
719
|
+
hasVideoEnabledChanged = _ControlsUtils$getCon2.hasVideoEnabledChanged,
|
|
720
|
+
hasMuteOnEntryChanged = _ControlsUtils$getCon2.hasMuteOnEntryChanged,
|
|
721
|
+
hasShareControlChanged = _ControlsUtils$getCon2.hasShareControlChanged,
|
|
722
|
+
hasDisallowUnmuteChanged = _ControlsUtils$getCon2.hasDisallowUnmuteChanged,
|
|
723
|
+
hasReactionsChanged = _ControlsUtils$getCon2.hasReactionsChanged,
|
|
724
|
+
hasReactionDisplayNamesChanged = _ControlsUtils$getCon2.hasReactionDisplayNamesChanged,
|
|
725
|
+
hasViewTheParticipantListChanged = _ControlsUtils$getCon2.hasViewTheParticipantListChanged,
|
|
726
|
+
hasRaiseHandChanged = _ControlsUtils$getCon2.hasRaiseHandChanged,
|
|
727
|
+
hasVideoChanged = _ControlsUtils$getCon2.hasVideoChanged,
|
|
728
|
+
hasInterpretationChanged = _ControlsUtils$getCon2.hasInterpretationChanged,
|
|
729
|
+
current = _ControlsUtils$getCon.current;
|
|
730
|
+
if (hasMuteOnEntryChanged) {
|
|
731
|
+
this.emitScoped({
|
|
732
|
+
file: 'locus-info',
|
|
733
|
+
function: 'updateControls'
|
|
734
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, {
|
|
735
|
+
state: current.muteOnEntry
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
if (hasShareControlChanged) {
|
|
739
|
+
this.emitScoped({
|
|
740
|
+
file: 'locus-info',
|
|
741
|
+
function: 'updateControls'
|
|
742
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, {
|
|
743
|
+
state: current.shareControl
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
if (hasDisallowUnmuteChanged) {
|
|
747
|
+
this.emitScoped({
|
|
748
|
+
file: 'locus-info',
|
|
749
|
+
function: 'updateControls'
|
|
750
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, {
|
|
751
|
+
state: current.disallowUnmute
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
if (hasReactionsChanged || hasReactionDisplayNamesChanged) {
|
|
755
|
+
this.emitScoped({
|
|
756
|
+
file: 'locus-info',
|
|
757
|
+
function: 'updateControls'
|
|
758
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, {
|
|
759
|
+
state: current.reactions
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
if (hasViewTheParticipantListChanged) {
|
|
763
|
+
this.emitScoped({
|
|
764
|
+
file: 'locus-info',
|
|
765
|
+
function: 'updateControls'
|
|
766
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, {
|
|
767
|
+
state: current.viewTheParticipantList
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
if (hasRaiseHandChanged) {
|
|
771
|
+
this.emitScoped({
|
|
772
|
+
file: 'locus-info',
|
|
773
|
+
function: 'updateControls'
|
|
774
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, {
|
|
775
|
+
state: current.raiseHand
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
if (hasVideoChanged) {
|
|
779
|
+
this.emitScoped({
|
|
780
|
+
file: 'locus-info',
|
|
781
|
+
function: 'updateControls'
|
|
782
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, {
|
|
783
|
+
state: current.video
|
|
784
|
+
});
|
|
785
|
+
}
|
|
654
786
|
if (hasRecordingChanged || hasRecordingPausedChanged) {
|
|
655
787
|
var state = null;
|
|
656
|
-
|
|
657
788
|
if (hasRecordingPausedChanged) {
|
|
658
789
|
if (current.record.paused) {
|
|
659
790
|
state = _constants.RECORDING_STATE.PAUSED;
|
|
@@ -664,7 +795,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
664
795
|
} else if (hasRecordingChanged) {
|
|
665
796
|
state = current.record.recording ? _constants.RECORDING_STATE.RECORDING : _constants.RECORDING_STATE.IDLE;
|
|
666
797
|
}
|
|
667
|
-
|
|
668
798
|
this.emitScoped({
|
|
669
799
|
file: 'locus-info',
|
|
670
800
|
function: 'updateControls'
|
|
@@ -674,7 +804,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
674
804
|
lastModified: current.record.lastModified
|
|
675
805
|
});
|
|
676
806
|
}
|
|
677
|
-
|
|
678
807
|
if (hasMeetingContainerChanged) {
|
|
679
808
|
var meetingContainerUrl = current.meetingContainer.meetingContainerUrl;
|
|
680
809
|
this.emitScoped({
|
|
@@ -684,11 +813,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
684
813
|
meetingContainerUrl: meetingContainerUrl
|
|
685
814
|
});
|
|
686
815
|
}
|
|
687
|
-
|
|
688
816
|
if (hasTranscribeChanged) {
|
|
689
817
|
var _current$transcribe = current.transcribe,
|
|
690
|
-
|
|
691
|
-
|
|
818
|
+
transcribing = _current$transcribe.transcribing,
|
|
819
|
+
caption = _current$transcribe.caption;
|
|
692
820
|
this.emitScoped({
|
|
693
821
|
file: 'locus-info',
|
|
694
822
|
function: 'updateControls'
|
|
@@ -697,30 +825,63 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
697
825
|
caption: caption
|
|
698
826
|
});
|
|
699
827
|
}
|
|
700
|
-
|
|
828
|
+
if (hasBreakoutChanged) {
|
|
829
|
+
var breakout = current.breakout;
|
|
830
|
+
breakout.breakoutMoveId = _selfUtils.default.getReplacedBreakoutMoveId(self, this.webex.internal.device.url);
|
|
831
|
+
this.emitScoped({
|
|
832
|
+
file: 'locus-info',
|
|
833
|
+
function: 'updateControls'
|
|
834
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, {
|
|
835
|
+
breakout: breakout
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
if (hasInterpretationChanged) {
|
|
839
|
+
var interpretation = current.interpretation;
|
|
840
|
+
this.emitScoped({
|
|
841
|
+
file: 'locus-info',
|
|
842
|
+
function: 'updateControls'
|
|
843
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_INTERPRETATION_UPDATED, {
|
|
844
|
+
interpretation: interpretation
|
|
845
|
+
});
|
|
846
|
+
}
|
|
701
847
|
if (hasEntryExitToneChanged) {
|
|
702
848
|
var entryExitTone = current.entryExitTone;
|
|
849
|
+
this.updateMeeting({
|
|
850
|
+
entryExitTone: entryExitTone
|
|
851
|
+
});
|
|
703
852
|
this.emitScoped({
|
|
704
853
|
file: 'locus-info',
|
|
705
854
|
function: 'updateControls'
|
|
706
855
|
}, _constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, {
|
|
707
856
|
entryExitTone: entryExitTone
|
|
708
857
|
});
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
// videoEnabled is handled differently than other controls,
|
|
861
|
+
// to fit with audio mute status logic
|
|
862
|
+
if (hasVideoEnabledChanged) {
|
|
863
|
+
var videoEnabled = current.videoEnabled;
|
|
709
864
|
this.updateMeeting({
|
|
710
|
-
|
|
865
|
+
unmuteVideoAllowed: videoEnabled
|
|
866
|
+
});
|
|
867
|
+
this.emitScoped({
|
|
868
|
+
file: 'locus-info',
|
|
869
|
+
function: 'updateControls'
|
|
870
|
+
}, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED, {
|
|
871
|
+
// muted: not part of locus.controls
|
|
872
|
+
unmuteAllowed: videoEnabled
|
|
711
873
|
});
|
|
712
874
|
}
|
|
713
|
-
|
|
714
875
|
this.controls = controls;
|
|
715
876
|
}
|
|
716
877
|
}
|
|
878
|
+
|
|
717
879
|
/**
|
|
718
880
|
* @param {String} conversationUrl
|
|
719
881
|
* @param {Object} info
|
|
720
882
|
* @returns {undefined}
|
|
721
883
|
* @memberof LocusInfo
|
|
722
884
|
*/
|
|
723
|
-
|
|
724
885
|
}, {
|
|
725
886
|
key: "updateConversationUrl",
|
|
726
887
|
value: function updateConversationUrl(conversationUrl, info) {
|
|
@@ -736,12 +897,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
736
897
|
});
|
|
737
898
|
}
|
|
738
899
|
}
|
|
900
|
+
|
|
739
901
|
/**
|
|
740
902
|
* @param {Object} created
|
|
741
903
|
* @returns {undefined}
|
|
742
904
|
* @memberof LocusInfo
|
|
743
905
|
*/
|
|
744
|
-
|
|
745
906
|
}, {
|
|
746
907
|
key: "updateCreated",
|
|
747
908
|
value: function updateCreated(created) {
|
|
@@ -749,20 +910,37 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
749
910
|
this.created = created;
|
|
750
911
|
}
|
|
751
912
|
}
|
|
913
|
+
|
|
752
914
|
/**
|
|
753
|
-
* @param {Object}
|
|
915
|
+
* @param {Object} services
|
|
754
916
|
* @returns {undefined}
|
|
755
917
|
* @memberof LocusInfo
|
|
756
918
|
*/
|
|
919
|
+
}, {
|
|
920
|
+
key: "updateServices",
|
|
921
|
+
value: function updateServices(services) {
|
|
922
|
+
if (services && !(0, _isEqual2.default)(this.services, services)) {
|
|
923
|
+
this.services = services;
|
|
924
|
+
this.emitScoped({
|
|
925
|
+
file: 'locus-info',
|
|
926
|
+
function: 'updateServices'
|
|
927
|
+
}, _constants.LOCUSINFO.EVENTS.LINKS_SERVICES, {
|
|
928
|
+
services: services
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
}
|
|
757
932
|
|
|
933
|
+
/**
|
|
934
|
+
* @param {Object} fullState
|
|
935
|
+
* @returns {undefined}
|
|
936
|
+
* @memberof LocusInfo
|
|
937
|
+
*/
|
|
758
938
|
}, {
|
|
759
939
|
key: "updateFullState",
|
|
760
940
|
value: function updateFullState(fullState) {
|
|
761
941
|
if (fullState && !(0, _isEqual2.default)(this.fullState, fullState)) {
|
|
762
942
|
var result = _fullState.default.getFullState(this.fullState, fullState);
|
|
763
|
-
|
|
764
943
|
this.updateMeeting(result.current);
|
|
765
|
-
|
|
766
944
|
if (result.updates.meetingStateChangedTo) {
|
|
767
945
|
this.emitScoped({
|
|
768
946
|
file: 'locus-info',
|
|
@@ -772,7 +950,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
772
950
|
currentState: result.current.meetingState
|
|
773
951
|
});
|
|
774
952
|
}
|
|
775
|
-
|
|
776
953
|
if (result.updates.meetingTypeChangedTo) {
|
|
777
954
|
this.emitScoped({
|
|
778
955
|
file: 'locus-info',
|
|
@@ -781,11 +958,11 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
781
958
|
type: result.current.type
|
|
782
959
|
});
|
|
783
960
|
}
|
|
784
|
-
|
|
785
961
|
this.parsedLocus.fullState = result.current;
|
|
786
962
|
this.fullState = fullState;
|
|
787
963
|
}
|
|
788
964
|
}
|
|
965
|
+
|
|
789
966
|
/**
|
|
790
967
|
* handles when the locus.host is updated
|
|
791
968
|
* @param {Object} host the locus.host property
|
|
@@ -793,16 +970,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
793
970
|
* @memberof LocusInfo
|
|
794
971
|
* emits internal event locus_info_update_host
|
|
795
972
|
*/
|
|
796
|
-
|
|
797
973
|
}, {
|
|
798
974
|
key: "updateHostInfo",
|
|
799
975
|
value: function updateHostInfo(host) {
|
|
800
976
|
if (host && !(0, _isEqual2.default)(this.host, host)) {
|
|
801
977
|
var parsedHosts = _hostUtils.default.getHosts(this.host, host);
|
|
802
|
-
|
|
803
978
|
this.updateMeeting(parsedHosts.current);
|
|
804
979
|
this.parsedLocus.host = parsedHosts.current;
|
|
805
|
-
|
|
806
980
|
if (parsedHosts.updates.isNewHost) {
|
|
807
981
|
this.compareAndUpdateFlags.compareSelfAndHost = true;
|
|
808
982
|
this.emitScoped({
|
|
@@ -813,31 +987,26 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
813
987
|
oldHost: parsedHosts.previous
|
|
814
988
|
});
|
|
815
989
|
}
|
|
816
|
-
|
|
817
990
|
this.host = host;
|
|
818
991
|
} else {
|
|
819
992
|
this.compareAndUpdateFlags.compareSelfAndHost = false;
|
|
820
993
|
}
|
|
821
994
|
}
|
|
995
|
+
|
|
822
996
|
/**
|
|
823
997
|
* @param {Object} info
|
|
824
998
|
* @param {Object} self
|
|
825
999
|
* @returns {undefined}
|
|
826
1000
|
* @memberof LocusInfo
|
|
827
1001
|
*/
|
|
828
|
-
|
|
829
1002
|
}, {
|
|
830
1003
|
key: "updateMeetingInfo",
|
|
831
1004
|
value: function updateMeetingInfo(info, self) {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$sel = this.parsedLocus.self) === null || _this$parsedLocus$sel === void 0 ? void 0 : _this$parsedLocus$sel.roles) || [];
|
|
836
|
-
|
|
1005
|
+
var _this$parsedLocus$sel;
|
|
1006
|
+
var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$sel = this.parsedLocus.self) === null || _this$parsedLocus$sel === void 0 ? void 0 : _this$parsedLocus$sel.roles) || [];
|
|
1007
|
+
if (info && !(0, _isEqual2.default)(this.info, info) || roles.length && !(0, _isEqual2.default)(this.roles, roles) && info) {
|
|
837
1008
|
var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
|
|
838
|
-
|
|
839
1009
|
var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
|
|
840
|
-
|
|
841
1010
|
this.emitScoped({
|
|
842
1011
|
file: 'locus-info',
|
|
843
1012
|
function: 'updateMeetingInfo'
|
|
@@ -845,33 +1014,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
845
1014
|
info: parsedInfo.current,
|
|
846
1015
|
self: self
|
|
847
1016
|
});
|
|
848
|
-
|
|
849
1017
|
if (parsedInfo.updates.isLocked) {
|
|
850
1018
|
this.emitScoped({
|
|
851
1019
|
file: 'locus-info',
|
|
852
1020
|
function: 'updateMeetingInfo'
|
|
853
1021
|
}, _constants.LOCUSINFO.EVENTS.MEETING_LOCKED, info);
|
|
854
1022
|
}
|
|
855
|
-
|
|
856
1023
|
if (parsedInfo.updates.isUnlocked) {
|
|
857
1024
|
this.emitScoped({
|
|
858
1025
|
file: 'locus-info',
|
|
859
1026
|
function: 'updateMeetingInfo'
|
|
860
1027
|
}, _constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, info);
|
|
861
1028
|
}
|
|
862
|
-
|
|
863
1029
|
this.info = info;
|
|
864
|
-
this.parsedLocus.info = parsedInfo.current;
|
|
865
|
-
|
|
1030
|
+
this.parsedLocus.info = parsedInfo.current;
|
|
1031
|
+
// Parses the info and adds necessary values
|
|
866
1032
|
this.updateMeeting(parsedInfo.current);
|
|
867
1033
|
}
|
|
1034
|
+
this.roles = roles;
|
|
868
1035
|
}
|
|
1036
|
+
|
|
869
1037
|
/**
|
|
870
1038
|
* @param {Object} embeddedApps
|
|
871
1039
|
* @returns {undefined}
|
|
872
1040
|
* @memberof LocusInfo
|
|
873
1041
|
*/
|
|
874
|
-
|
|
875
1042
|
}, {
|
|
876
1043
|
key: "updateEmbeddedApps",
|
|
877
1044
|
value: function updateEmbeddedApps(embeddedApps) {
|
|
@@ -879,9 +1046,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
879
1046
|
if (_embeddedAppsUtils.default.areSimilar(this.embeddedApps, embeddedApps)) {
|
|
880
1047
|
return;
|
|
881
1048
|
}
|
|
882
|
-
|
|
883
1049
|
var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
|
|
884
|
-
|
|
885
1050
|
this.updateMeeting({
|
|
886
1051
|
embeddedApps: parsedEmbeddedApps
|
|
887
1052
|
});
|
|
@@ -891,6 +1056,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
891
1056
|
}, _constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, parsedEmbeddedApps);
|
|
892
1057
|
this.embeddedApps = embeddedApps;
|
|
893
1058
|
}
|
|
1059
|
+
|
|
894
1060
|
/**
|
|
895
1061
|
* handles when the locus.mediaShares is updated
|
|
896
1062
|
* @param {Object} mediaShares the locus.mediaShares property
|
|
@@ -898,14 +1064,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
898
1064
|
* @memberof LocusInfo
|
|
899
1065
|
* emits internal event locus_info_update_media_shares
|
|
900
1066
|
*/
|
|
901
|
-
|
|
902
1067
|
}, {
|
|
903
1068
|
key: "updateMediaShares",
|
|
904
1069
|
value: function updateMediaShares(mediaShares) {
|
|
905
1070
|
if (mediaShares && !(0, _isEqual2.default)(this.mediaShares, mediaShares)) {
|
|
906
1071
|
var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
|
|
907
|
-
|
|
908
1072
|
this.updateMeeting(parsedMediaShares.current);
|
|
1073
|
+
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
1074
|
+
this.mediaShares = mediaShares;
|
|
909
1075
|
this.emitScoped({
|
|
910
1076
|
file: 'locus-info',
|
|
911
1077
|
function: 'updateMediaShares'
|
|
@@ -913,16 +1079,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
913
1079
|
current: parsedMediaShares.current,
|
|
914
1080
|
previous: parsedMediaShares.previous
|
|
915
1081
|
});
|
|
916
|
-
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
917
|
-
this.mediaShares = mediaShares;
|
|
918
1082
|
}
|
|
919
1083
|
}
|
|
1084
|
+
|
|
920
1085
|
/**
|
|
921
1086
|
* @param {String} participantsUrl
|
|
922
1087
|
* @returns {undefined}
|
|
923
1088
|
* @memberof LocusInfo
|
|
924
1089
|
*/
|
|
925
|
-
|
|
926
1090
|
}, {
|
|
927
1091
|
key: "updateParticipantsUrl",
|
|
928
1092
|
value: function updateParticipantsUrl(participantsUrl) {
|
|
@@ -930,12 +1094,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
930
1094
|
this.participantsUrl = participantsUrl;
|
|
931
1095
|
}
|
|
932
1096
|
}
|
|
1097
|
+
|
|
933
1098
|
/**
|
|
934
1099
|
* @param {Object} replace
|
|
935
1100
|
* @returns {undefined}
|
|
936
1101
|
* @memberof LocusInfo
|
|
937
1102
|
*/
|
|
938
|
-
|
|
939
1103
|
}, {
|
|
940
1104
|
key: "updateReplace",
|
|
941
1105
|
value: function updateReplace(replace) {
|
|
@@ -943,6 +1107,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
943
1107
|
this.replace = replace;
|
|
944
1108
|
}
|
|
945
1109
|
}
|
|
1110
|
+
|
|
946
1111
|
/**
|
|
947
1112
|
* handles when the locus.self is updated
|
|
948
1113
|
* @param {Object} self the locus.mediaShares property
|
|
@@ -951,35 +1116,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
951
1116
|
* @memberof LocusInfo
|
|
952
1117
|
* emits internal events self_admitted_guest, self_unadmitted_guest, locus_info_update_self
|
|
953
1118
|
*/
|
|
954
|
-
|
|
955
1119
|
}, {
|
|
956
1120
|
key: "updateSelf",
|
|
957
1121
|
value: function updateSelf(self, participants) {
|
|
1122
|
+
// @ts-ignore - check where this.self come from
|
|
958
1123
|
if (self && !(0, _isEqual2.default)(this.self, self)) {
|
|
1124
|
+
// @ts-ignore
|
|
959
1125
|
var parsedSelves = _selfUtils.default.getSelves(this.self, self, this.webex.internal.device.url);
|
|
960
|
-
|
|
961
1126
|
this.updateMeeting(parsedSelves.current);
|
|
962
1127
|
this.parsedLocus.self = parsedSelves.current;
|
|
963
1128
|
var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
|
|
964
|
-
|
|
965
1129
|
if (element !== parsedSelves.current.state) {
|
|
966
1130
|
this.parsedLocus.states.push(parsedSelves.current.state);
|
|
967
|
-
}
|
|
968
|
-
// this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
|
|
969
|
-
|
|
1131
|
+
}
|
|
970
1132
|
|
|
1133
|
+
// TODO: check if we need to save the sipUri here as well
|
|
1134
|
+
// this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
|
|
971
1135
|
var result = _selfUtils.default.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri);
|
|
972
|
-
|
|
973
1136
|
if (result.sipUri) {
|
|
974
1137
|
this.updateMeeting(result);
|
|
975
1138
|
}
|
|
976
|
-
|
|
977
1139
|
if (parsedSelves.updates.moderatorChanged) {
|
|
978
1140
|
this.compareAndUpdateFlags.compareHostAndSelf = true;
|
|
979
1141
|
} else {
|
|
980
1142
|
this.compareAndUpdateFlags.compareHostAndSelf = false;
|
|
981
1143
|
}
|
|
982
|
-
|
|
983
1144
|
if (parsedSelves.updates.layoutChanged) {
|
|
984
1145
|
this.emitScoped({
|
|
985
1146
|
file: 'locus-info',
|
|
@@ -988,7 +1149,23 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
988
1149
|
layout: parsedSelves.current.layout
|
|
989
1150
|
});
|
|
990
1151
|
}
|
|
991
|
-
|
|
1152
|
+
if (parsedSelves.updates.breakoutsChanged) {
|
|
1153
|
+
this.emitScoped({
|
|
1154
|
+
file: 'locus-info',
|
|
1155
|
+
function: 'updateSelf'
|
|
1156
|
+
}, _constants.LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED, {
|
|
1157
|
+
breakoutSessions: parsedSelves.current.breakoutSessions
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
if (parsedSelves.updates.interpretationChanged) {
|
|
1161
|
+
this.emitScoped({
|
|
1162
|
+
file: 'locus-info',
|
|
1163
|
+
function: 'updateSelf'
|
|
1164
|
+
}, _constants.LOCUSINFO.EVENTS.SELF_MEETING_INTERPRETATION_CHANGED, {
|
|
1165
|
+
interpretation: parsedSelves.current.interpretation,
|
|
1166
|
+
selfParticipantId: parsedSelves.current.selfId
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
992
1169
|
if (parsedSelves.updates.isMediaInactiveOrReleased) {
|
|
993
1170
|
this.emitScoped({
|
|
994
1171
|
file: 'locus-info',
|
|
@@ -997,13 +1174,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
997
1174
|
reason: self.reason
|
|
998
1175
|
});
|
|
999
1176
|
}
|
|
1000
|
-
|
|
1001
1177
|
if (parsedSelves.updates.moderatorChanged) {
|
|
1002
1178
|
this.emitScoped({
|
|
1003
1179
|
file: 'locus-info',
|
|
1004
1180
|
function: 'updateSelf'
|
|
1005
1181
|
}, _constants.LOCUSINFO.EVENTS.SELF_MODERATOR_CHANGED, self);
|
|
1006
1182
|
}
|
|
1183
|
+
if (parsedSelves.updates.isRolesChanged) {
|
|
1184
|
+
var _parsedSelves$previou, _parsedSelves$current;
|
|
1185
|
+
this.emitScoped({
|
|
1186
|
+
file: 'locus-info',
|
|
1187
|
+
function: 'updateSelf'
|
|
1188
|
+
}, _constants.LOCUSINFO.EVENTS.SELF_ROLES_CHANGED, {
|
|
1189
|
+
oldRoles: (_parsedSelves$previou = parsedSelves.previous) === null || _parsedSelves$previou === void 0 ? void 0 : _parsedSelves$previou.roles,
|
|
1190
|
+
newRoles: (_parsedSelves$current = parsedSelves.current) === null || _parsedSelves$current === void 0 ? void 0 : _parsedSelves$current.roles
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
if (parsedSelves.updates.isVideoMutedByOthersChanged) {
|
|
1194
|
+
this.emitScoped({
|
|
1195
|
+
file: 'locus-info',
|
|
1196
|
+
function: 'updateSelf'
|
|
1197
|
+
}, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED, {
|
|
1198
|
+
muted: parsedSelves.current.remoteVideoMuted
|
|
1199
|
+
// unmuteAllowed: not part of .self
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1007
1202
|
|
|
1008
1203
|
if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
|
|
1009
1204
|
this.emitScoped({
|
|
@@ -1014,7 +1209,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1014
1209
|
unmuteAllowed: parsedSelves.current.unmuteAllowed
|
|
1015
1210
|
});
|
|
1016
1211
|
}
|
|
1017
|
-
|
|
1018
1212
|
if (parsedSelves.updates.isMutedByOthersChanged) {
|
|
1019
1213
|
this.emitScoped({
|
|
1020
1214
|
file: 'locus-info',
|
|
@@ -1024,55 +1218,49 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1024
1218
|
unmuteAllowed: parsedSelves.current.unmuteAllowed
|
|
1025
1219
|
});
|
|
1026
1220
|
}
|
|
1027
|
-
|
|
1028
1221
|
if (parsedSelves.updates.localAudioUnmuteRequestedByServer) {
|
|
1029
1222
|
this.emitScoped({
|
|
1030
1223
|
file: 'locus-info',
|
|
1031
1224
|
function: 'updateSelf'
|
|
1032
1225
|
}, _constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, {});
|
|
1033
1226
|
}
|
|
1034
|
-
|
|
1035
1227
|
if (parsedSelves.updates.isUserUnadmitted) {
|
|
1036
1228
|
this.emitScoped({
|
|
1037
1229
|
file: 'locus-info',
|
|
1038
1230
|
function: 'updateSelf'
|
|
1039
1231
|
}, _constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, self);
|
|
1040
1232
|
}
|
|
1041
|
-
|
|
1042
1233
|
if (parsedSelves.updates.isUserAdmitted) {
|
|
1043
1234
|
this.emitScoped({
|
|
1044
1235
|
file: 'locus-info',
|
|
1045
1236
|
function: 'updateSelf'
|
|
1046
1237
|
}, _constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, self);
|
|
1047
1238
|
}
|
|
1048
|
-
|
|
1049
1239
|
if (parsedSelves.updates.isMediaInactive) {
|
|
1050
1240
|
this.emitScoped({
|
|
1051
1241
|
file: 'locus-info',
|
|
1052
1242
|
function: 'updateSelf'
|
|
1053
|
-
},
|
|
1243
|
+
},
|
|
1244
|
+
// @ts-ignore
|
|
1245
|
+
_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
|
|
1054
1246
|
}
|
|
1055
|
-
|
|
1056
1247
|
if (parsedSelves.updates.audioStateChange || parsedSelves.updates.videoStateChange || parsedSelves.updates.shareStateChange) {
|
|
1057
|
-
var _parsedSelves$
|
|
1058
|
-
|
|
1248
|
+
var _parsedSelves$current2, _parsedSelves$current3, _parsedSelves$current4;
|
|
1059
1249
|
this.emitScoped({
|
|
1060
1250
|
file: 'locus-info',
|
|
1061
1251
|
function: 'updateSelf'
|
|
1062
1252
|
}, _constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, {
|
|
1063
|
-
audioStatus: (_parsedSelves$
|
|
1064
|
-
videoStatus: (_parsedSelves$
|
|
1065
|
-
shareStatus: (_parsedSelves$
|
|
1253
|
+
audioStatus: (_parsedSelves$current2 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current2 === void 0 ? void 0 : _parsedSelves$current2.audio,
|
|
1254
|
+
videoStatus: (_parsedSelves$current3 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current3 === void 0 ? void 0 : _parsedSelves$current3.video,
|
|
1255
|
+
shareStatus: (_parsedSelves$current4 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current4 === void 0 ? void 0 : _parsedSelves$current4.share
|
|
1066
1256
|
});
|
|
1067
1257
|
}
|
|
1068
|
-
|
|
1069
1258
|
if (parsedSelves.updates.isUserObserving) {
|
|
1070
1259
|
this.emitScoped({
|
|
1071
1260
|
file: 'locus-info',
|
|
1072
1261
|
function: 'updateSelf'
|
|
1073
1262
|
}, _constants.LOCUSINFO.EVENTS.SELF_OBSERVING);
|
|
1074
1263
|
}
|
|
1075
|
-
|
|
1076
1264
|
if (parsedSelves.updates.canNotViewTheParticipantListChanged) {
|
|
1077
1265
|
this.emitScoped({
|
|
1078
1266
|
file: 'locus-info',
|
|
@@ -1081,7 +1269,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1081
1269
|
canNotViewTheParticipantList: parsedSelves.current.canNotViewTheParticipantList
|
|
1082
1270
|
});
|
|
1083
1271
|
}
|
|
1084
|
-
|
|
1085
1272
|
if (parsedSelves.updates.isSharingBlockedChanged) {
|
|
1086
1273
|
this.emitScoped({
|
|
1087
1274
|
file: 'locus-info',
|
|
@@ -1090,7 +1277,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1090
1277
|
isSharingBlocked: parsedSelves.current.isSharingBlocked
|
|
1091
1278
|
});
|
|
1092
1279
|
}
|
|
1093
|
-
|
|
1094
1280
|
this.emitScoped({
|
|
1095
1281
|
file: 'locus-info',
|
|
1096
1282
|
function: 'updateSelf'
|
|
@@ -1099,18 +1285,19 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1099
1285
|
newSelf: parsedSelves.current
|
|
1100
1286
|
});
|
|
1101
1287
|
this.parsedLocus.self = parsedSelves.current;
|
|
1288
|
+
// @ts-ignore
|
|
1102
1289
|
this.self = self;
|
|
1103
1290
|
} else {
|
|
1104
1291
|
this.compareAndUpdateFlags.compareHostAndSelf = false;
|
|
1105
1292
|
}
|
|
1106
1293
|
}
|
|
1294
|
+
|
|
1107
1295
|
/**
|
|
1108
1296
|
* handles when the locus.url is updated
|
|
1109
1297
|
* @param {String} url
|
|
1110
1298
|
* @returns {undefined}
|
|
1111
1299
|
* emits internal event locus_info_update_url
|
|
1112
1300
|
*/
|
|
1113
|
-
|
|
1114
1301
|
}, {
|
|
1115
1302
|
key: "updateLocusUrl",
|
|
1116
1303
|
value: function updateLocusUrl(url) {
|
|
@@ -1125,12 +1312,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1125
1312
|
}, _constants.EVENTS.LOCUS_INFO_UPDATE_URL, url);
|
|
1126
1313
|
}
|
|
1127
1314
|
}
|
|
1315
|
+
|
|
1128
1316
|
/**
|
|
1129
1317
|
* @param {String} aclUrl
|
|
1130
1318
|
* @returns {undefined}
|
|
1131
1319
|
* @memberof LocusInfo
|
|
1132
1320
|
*/
|
|
1133
|
-
|
|
1134
1321
|
}, {
|
|
1135
1322
|
key: "updateAclUrl",
|
|
1136
1323
|
value: function updateAclUrl(aclUrl) {
|
|
@@ -1138,12 +1325,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1138
1325
|
this.aclUrl = aclUrl;
|
|
1139
1326
|
}
|
|
1140
1327
|
}
|
|
1328
|
+
|
|
1141
1329
|
/**
|
|
1142
1330
|
* @param {Number} baseSequence
|
|
1143
1331
|
* @returns {undefined}
|
|
1144
1332
|
* @memberof LocusInfo
|
|
1145
1333
|
*/
|
|
1146
|
-
|
|
1147
1334
|
}, {
|
|
1148
1335
|
key: "updateBasequence",
|
|
1149
1336
|
value: function updateBasequence(baseSequence) {
|
|
@@ -1151,12 +1338,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1151
1338
|
this.baseSequence = baseSequence;
|
|
1152
1339
|
}
|
|
1153
1340
|
}
|
|
1341
|
+
|
|
1154
1342
|
/**
|
|
1155
1343
|
* @param {Number} sequence
|
|
1156
1344
|
* @returns {undefined}
|
|
1157
1345
|
* @memberof LocusInfo
|
|
1158
1346
|
*/
|
|
1159
|
-
|
|
1160
1347
|
}, {
|
|
1161
1348
|
key: "updateSequence",
|
|
1162
1349
|
value: function updateSequence(sequence) {
|
|
@@ -1164,12 +1351,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1164
1351
|
this.sequence = sequence;
|
|
1165
1352
|
}
|
|
1166
1353
|
}
|
|
1354
|
+
|
|
1167
1355
|
/**
|
|
1168
1356
|
* @param {Object} membership
|
|
1169
1357
|
* @returns {undefined}
|
|
1170
1358
|
* @memberof LocusInfo
|
|
1171
1359
|
*/
|
|
1172
|
-
|
|
1173
1360
|
}, {
|
|
1174
1361
|
key: "updateMemberShip",
|
|
1175
1362
|
value: function updateMemberShip(membership) {
|
|
@@ -1177,12 +1364,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1177
1364
|
this.membership = membership;
|
|
1178
1365
|
}
|
|
1179
1366
|
}
|
|
1367
|
+
|
|
1180
1368
|
/**
|
|
1181
1369
|
* @param {Array} identities
|
|
1182
1370
|
* @returns {undefined}
|
|
1183
1371
|
* @memberof LocusInfo
|
|
1184
1372
|
*/
|
|
1185
|
-
|
|
1186
1373
|
}, {
|
|
1187
1374
|
key: "updateIdentifiers",
|
|
1188
1375
|
value: function updateIdentifiers(identities) {
|
|
@@ -1190,9 +1377,114 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
1190
1377
|
this.identities = identities;
|
|
1191
1378
|
}
|
|
1192
1379
|
}
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* check the locus is main session's one or not, if is main session's, update main session cache
|
|
1383
|
+
* @param {Object} locus
|
|
1384
|
+
* @returns {undefined}
|
|
1385
|
+
* @memberof LocusInfo
|
|
1386
|
+
*/
|
|
1387
|
+
}, {
|
|
1388
|
+
key: "updateLocusCache",
|
|
1389
|
+
value: function updateLocusCache(locus) {
|
|
1390
|
+
var isMainSessionDTO = _controlsUtils.default.isMainSessionDTO(locus);
|
|
1391
|
+
if (isMainSessionDTO) {
|
|
1392
|
+
this.updateMainSessionLocusCache(locus);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* if return from breakout to main session, need to use cached main session DTO since locus won't send the full locus (participants)
|
|
1398
|
+
* if join breakout from main session, need to query main locus url (if response with 403 means no privilege, need to clear the cache)
|
|
1399
|
+
* @param {Object} newLocus
|
|
1400
|
+
* @returns {Object}
|
|
1401
|
+
* @memberof LocusInfo
|
|
1402
|
+
*/
|
|
1403
|
+
}, {
|
|
1404
|
+
key: "getTheLocusToUpdate",
|
|
1405
|
+
value: function getTheLocusToUpdate(newLocus) {
|
|
1406
|
+
var switchStatus = _controlsUtils.default.getSessionSwitchStatus(this.controls, newLocus === null || newLocus === void 0 ? void 0 : newLocus.controls);
|
|
1407
|
+
if (switchStatus.isReturnToMain && this.mainSessionLocusCache) {
|
|
1408
|
+
return (0, _cloneDeep2.default)(this.mainSessionLocusCache);
|
|
1409
|
+
}
|
|
1410
|
+
if (switchStatus.isJoinToBreakout) {
|
|
1411
|
+
this.emitScoped({
|
|
1412
|
+
file: 'locus-info',
|
|
1413
|
+
function: 'updateControls'
|
|
1414
|
+
}, _constants.LOCUSINFO.EVENTS.CONTROLS_JOIN_BREAKOUT_FROM_MAIN, {
|
|
1415
|
+
mainLocusUrl: this.url
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
return newLocus;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* merge participants by participant id
|
|
1423
|
+
* @param {Array} participants
|
|
1424
|
+
* @param {Array} sourceParticipants
|
|
1425
|
+
* @returns {Array} merged participants
|
|
1426
|
+
* @memberof LocusInfo
|
|
1427
|
+
*/
|
|
1428
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1429
|
+
}, {
|
|
1430
|
+
key: "mergeParticipants",
|
|
1431
|
+
value: function mergeParticipants(participants, sourceParticipants) {
|
|
1432
|
+
if (!sourceParticipants || !sourceParticipants.length) return participants;
|
|
1433
|
+
if (!participants || !participants.length) {
|
|
1434
|
+
return sourceParticipants;
|
|
1435
|
+
}
|
|
1436
|
+
sourceParticipants.forEach(function (participant) {
|
|
1437
|
+
var existIndex = participants.findIndex(function (p) {
|
|
1438
|
+
return p.id === participant.id;
|
|
1439
|
+
});
|
|
1440
|
+
if (existIndex > -1) {
|
|
1441
|
+
participants.splice(existIndex, 1, participant);
|
|
1442
|
+
} else {
|
|
1443
|
+
participants.push(participant);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
return participants;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* need cache main sessions' participants since locus will not send the full list when cohost/host leave breakout
|
|
1451
|
+
* @param {Object} mainLocus
|
|
1452
|
+
* @returns {undefined}
|
|
1453
|
+
* @memberof LocusInfo
|
|
1454
|
+
*/
|
|
1455
|
+
}, {
|
|
1456
|
+
key: "updateMainSessionLocusCache",
|
|
1457
|
+
value: function updateMainSessionLocusCache(mainLocus) {
|
|
1458
|
+
var _this5 = this;
|
|
1459
|
+
if (!mainLocus) {
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
var locusClone = (0, _cloneDeep2.default)(mainLocus);
|
|
1463
|
+
if (this.mainSessionLocusCache) {
|
|
1464
|
+
// shallow merge and do special merge for participants
|
|
1465
|
+
(0, _assignWith2.default)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
|
|
1466
|
+
if (key === 'participants') {
|
|
1467
|
+
return _this5.mergeParticipants(objValue, srcValue);
|
|
1468
|
+
}
|
|
1469
|
+
return srcValue || objValue;
|
|
1470
|
+
});
|
|
1471
|
+
} else {
|
|
1472
|
+
this.mainSessionLocusCache = locusClone;
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* clear main session cache
|
|
1478
|
+
* @returns {undefined}
|
|
1479
|
+
* @memberof LocusInfo
|
|
1480
|
+
*/
|
|
1481
|
+
}, {
|
|
1482
|
+
key: "clearMainSessionLocusCache",
|
|
1483
|
+
value: function clearMainSessionLocusCache() {
|
|
1484
|
+
this.mainSessionLocusCache = null;
|
|
1485
|
+
}
|
|
1193
1486
|
}]);
|
|
1194
1487
|
return LocusInfo;
|
|
1195
1488
|
}(_eventsScope.default);
|
|
1196
|
-
|
|
1197
1489
|
exports.default = LocusInfo;
|
|
1198
1490
|
//# sourceMappingURL=index.js.map
|