@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {isEqual} from 'lodash';
|
|
1
|
+
import {isEqual, assignWith, cloneDeep, isEmpty} from 'lodash';
|
|
2
2
|
|
|
3
3
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
4
4
|
import EventsScope from '../common/events/events-scope';
|
|
@@ -17,16 +17,14 @@ import {
|
|
|
17
17
|
CALL_REMOVED_REASON,
|
|
18
18
|
RECORDING_STATE,
|
|
19
19
|
} from '../constants';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import MediaSharesUtils from '../locus-info/mediaSharesUtils';
|
|
29
|
-
import LocusDeltaParser from '../locus-info/parser';
|
|
20
|
+
import InfoUtils from './infoUtils';
|
|
21
|
+
import FullState from './fullState';
|
|
22
|
+
import SelfUtils from './selfUtils';
|
|
23
|
+
import HostUtils from './hostUtils';
|
|
24
|
+
import ControlsUtils from './controlsUtils';
|
|
25
|
+
import EmbeddedAppsUtils from './embeddedAppsUtils';
|
|
26
|
+
import MediaSharesUtils from './mediaSharesUtils';
|
|
27
|
+
import LocusDeltaParser from './parser';
|
|
30
28
|
|
|
31
29
|
/**
|
|
32
30
|
* @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
|
|
@@ -35,6 +33,43 @@ import LocusDeltaParser from '../locus-info/parser';
|
|
|
35
33
|
* @class LocusInfo
|
|
36
34
|
*/
|
|
37
35
|
export default class LocusInfo extends EventsScope {
|
|
36
|
+
compareAndUpdateFlags: any;
|
|
37
|
+
emitChange: any;
|
|
38
|
+
locusParser: any;
|
|
39
|
+
meetingId: any;
|
|
40
|
+
parsedLocus: any;
|
|
41
|
+
updateMeeting: any;
|
|
42
|
+
webex: any;
|
|
43
|
+
aclUrl: any;
|
|
44
|
+
baseSequence: any;
|
|
45
|
+
created: any;
|
|
46
|
+
deltaParticipants: any;
|
|
47
|
+
identities: any;
|
|
48
|
+
membership: any;
|
|
49
|
+
participants: any;
|
|
50
|
+
participantsUrl: any;
|
|
51
|
+
replaces: any;
|
|
52
|
+
scheduledMeeting: any;
|
|
53
|
+
sequence: any;
|
|
54
|
+
controls: any;
|
|
55
|
+
conversationUrl: any;
|
|
56
|
+
embeddedApps: any;
|
|
57
|
+
fullState: any;
|
|
58
|
+
host: any;
|
|
59
|
+
info: any;
|
|
60
|
+
roles: any;
|
|
61
|
+
mediaShares: any;
|
|
62
|
+
replace: any;
|
|
63
|
+
url: any;
|
|
64
|
+
services: any;
|
|
65
|
+
mainSessionLocusCache: any;
|
|
66
|
+
/**
|
|
67
|
+
* Constructor
|
|
68
|
+
* @param {boolean} updateMeeting true if the meeting should be updated
|
|
69
|
+
* @param {object} webex
|
|
70
|
+
* @param {string} meetingId
|
|
71
|
+
* @returns {undefined}
|
|
72
|
+
*/
|
|
38
73
|
constructor(updateMeeting, webex, meetingId) {
|
|
39
74
|
super();
|
|
40
75
|
this.parsedLocus = {
|
|
@@ -48,6 +83,53 @@ export default class LocusInfo extends EventsScope {
|
|
|
48
83
|
this.locusParser = new LocusDeltaParser();
|
|
49
84
|
}
|
|
50
85
|
|
|
86
|
+
/**
|
|
87
|
+
* 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.
|
|
88
|
+
*
|
|
89
|
+
* @param {Meeting} meeting
|
|
90
|
+
* @returns {undefined}
|
|
91
|
+
*/
|
|
92
|
+
private doLocusSync(meeting: any) {
|
|
93
|
+
let isDelta;
|
|
94
|
+
let url;
|
|
95
|
+
|
|
96
|
+
if (this.locusParser.workingCopy.syncUrl) {
|
|
97
|
+
url = this.locusParser.workingCopy.syncUrl;
|
|
98
|
+
isDelta = true;
|
|
99
|
+
} else {
|
|
100
|
+
url = meeting.locusUrl;
|
|
101
|
+
isDelta = false;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
LoggerProxy.logger.info(
|
|
105
|
+
`Locus-info:index#doLocusSync --> doing Locus sync (getting ${
|
|
106
|
+
isDelta ? 'delta' : 'full'
|
|
107
|
+
} DTO)`
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
// return value ignored on purpose
|
|
111
|
+
meeting.meetingRequest
|
|
112
|
+
.getLocusDTO({url})
|
|
113
|
+
.then((res) => {
|
|
114
|
+
if (isDelta) {
|
|
115
|
+
if (!isEmpty(res.body)) {
|
|
116
|
+
meeting.locusInfo.handleLocusDelta(res.body, meeting);
|
|
117
|
+
} else {
|
|
118
|
+
LoggerProxy.logger.info(
|
|
119
|
+
'Locus-info:index#doLocusSync --> received empty body from syncUrl, so we already have latest Locus DTO'
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
} else {
|
|
123
|
+
meeting.locusInfo.onFullLocus(res.body);
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
.finally(() => {
|
|
127
|
+
// Notify parser to resume processing delta events.
|
|
128
|
+
// Any deltas in the queue that have now been superseded by this sync will simply be ignored
|
|
129
|
+
this.locusParser.resume();
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
51
133
|
/**
|
|
52
134
|
* Apply locus delta data to meeting
|
|
53
135
|
* @param {string} action Locus delta action
|
|
@@ -55,29 +137,19 @@ export default class LocusInfo extends EventsScope {
|
|
|
55
137
|
* @param {Meeting} meeting
|
|
56
138
|
* @returns {undefined}
|
|
57
139
|
*/
|
|
58
|
-
applyLocusDeltaData(action, locus, meeting) {
|
|
59
|
-
const {DESYNC, USE_CURRENT, USE_INCOMING} = LocusDeltaParser.loci;
|
|
140
|
+
applyLocusDeltaData(action: string, locus: any, meeting: any) {
|
|
141
|
+
const {DESYNC, USE_CURRENT, USE_INCOMING, WAIT} = LocusDeltaParser.loci;
|
|
60
142
|
|
|
61
143
|
switch (action) {
|
|
62
144
|
case USE_INCOMING:
|
|
63
145
|
meeting.locusInfo.onDeltaLocus(locus);
|
|
64
146
|
break;
|
|
65
147
|
case USE_CURRENT:
|
|
66
|
-
|
|
67
|
-
|
|
148
|
+
case WAIT:
|
|
149
|
+
// do nothing
|
|
68
150
|
break;
|
|
69
151
|
case DESYNC:
|
|
70
|
-
meeting
|
|
71
|
-
.getFullLocus({
|
|
72
|
-
desync: true,
|
|
73
|
-
locusUrl: meeting.locusUrl,
|
|
74
|
-
})
|
|
75
|
-
.then((res) => {
|
|
76
|
-
meeting.locusInfo.onFullLocus(res.body);
|
|
77
|
-
// Notify parser to resume processing delta events
|
|
78
|
-
// now that we have full locus from DESYNC.
|
|
79
|
-
this.locusParser.resume();
|
|
80
|
-
});
|
|
152
|
+
this.doLocusSync(meeting);
|
|
81
153
|
break;
|
|
82
154
|
default:
|
|
83
155
|
LoggerProxy.logger.info(
|
|
@@ -94,7 +166,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
94
166
|
* @param {Meeting} meeting
|
|
95
167
|
* @returns {undefined}
|
|
96
168
|
*/
|
|
97
|
-
handleLocusDelta(locus, meeting) {
|
|
169
|
+
handleLocusDelta(locus: any, meeting: any) {
|
|
98
170
|
// register a function to process delta actions
|
|
99
171
|
if (!this.locusParser.onDeltaAction) {
|
|
100
172
|
// delta action, along with associated loci
|
|
@@ -112,7 +184,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
112
184
|
* @returns {undefined}
|
|
113
185
|
* @memberof LocusInfo
|
|
114
186
|
*/
|
|
115
|
-
init(locus = {}) {
|
|
187
|
+
init(locus: any = {}) {
|
|
116
188
|
this.created = locus.created || null;
|
|
117
189
|
this.scheduledMeeting = locus.meeting || null;
|
|
118
190
|
this.participantsUrl = locus.participantsUrl || null;
|
|
@@ -143,12 +215,13 @@ export default class LocusInfo extends EventsScope {
|
|
|
143
215
|
*/
|
|
144
216
|
this.deltaParticipants = [];
|
|
145
217
|
|
|
218
|
+
this.updateLocusCache(locus);
|
|
146
219
|
// above section only updates the locusInfo object
|
|
147
220
|
// The below section makes sure it updates the locusInfo as well as updates the meeting object
|
|
148
221
|
this.updateParticipants(locus.participants);
|
|
149
222
|
// For 1:1 space meeting the conversation Url does not exist in locus.conversation
|
|
150
223
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
|
151
|
-
this.updateControls(locus.controls);
|
|
224
|
+
this.updateControls(locus.controls, locus.self);
|
|
152
225
|
this.updateLocusUrl(locus.url);
|
|
153
226
|
this.updateFullState(locus.fullState);
|
|
154
227
|
this.updateMeetingInfo(locus.info);
|
|
@@ -157,6 +230,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
157
230
|
this.updateSelf(locus.self, locus.participants);
|
|
158
231
|
this.updateHostInfo(locus.host);
|
|
159
232
|
this.updateMediaShares(locus.mediaShares);
|
|
233
|
+
this.updateServices(locus.links?.services);
|
|
160
234
|
}
|
|
161
235
|
|
|
162
236
|
/**
|
|
@@ -164,7 +238,8 @@ export default class LocusInfo extends EventsScope {
|
|
|
164
238
|
* @returns {undefined}
|
|
165
239
|
* @memberof LocusInfo
|
|
166
240
|
*/
|
|
167
|
-
initialSetup(locus) {
|
|
241
|
+
initialSetup(locus: object) {
|
|
242
|
+
this.updateLocusCache(locus);
|
|
168
243
|
this.onFullLocus(locus);
|
|
169
244
|
|
|
170
245
|
// Change it to true after it receives it first locus object
|
|
@@ -177,9 +252,10 @@ export default class LocusInfo extends EventsScope {
|
|
|
177
252
|
* @returns {undefined}
|
|
178
253
|
* @memberof LocusInfo
|
|
179
254
|
*/
|
|
180
|
-
parse(meeting, data) {
|
|
255
|
+
parse(meeting: any, data: any) {
|
|
256
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
181
257
|
const {eventType} = data;
|
|
182
|
-
|
|
258
|
+
const locus = this.getTheLocusToUpdate(data.locus);
|
|
183
259
|
LoggerProxy.logger.info(`Locus-info:index#parse --> received locus data: ${eventType}`);
|
|
184
260
|
|
|
185
261
|
switch (eventType) {
|
|
@@ -197,16 +273,16 @@ export default class LocusInfo extends EventsScope {
|
|
|
197
273
|
case LOCUSEVENT.PARTICIPANT_DECLINED:
|
|
198
274
|
case LOCUSEVENT.FLOOR_GRANTED:
|
|
199
275
|
case LOCUSEVENT.FLOOR_RELEASED:
|
|
200
|
-
this.onFullLocus(
|
|
276
|
+
this.onFullLocus(locus, eventType);
|
|
201
277
|
break;
|
|
202
278
|
case LOCUSEVENT.DIFFERENCE:
|
|
203
|
-
this.handleLocusDelta(
|
|
279
|
+
this.handleLocusDelta(locus, meeting);
|
|
204
280
|
break;
|
|
205
281
|
|
|
206
282
|
default:
|
|
207
283
|
// Why will there be a event with no eventType ????
|
|
208
284
|
// we may not need this, we can get full locus
|
|
209
|
-
this.handleLocusDelta(
|
|
285
|
+
this.handleLocusDelta(locus, meeting);
|
|
210
286
|
}
|
|
211
287
|
}
|
|
212
288
|
|
|
@@ -217,28 +293,38 @@ export default class LocusInfo extends EventsScope {
|
|
|
217
293
|
* @returns {undefined}
|
|
218
294
|
* @memberof LocusInfo
|
|
219
295
|
*/
|
|
220
|
-
emitScoped(scope, eventName, args) {
|
|
296
|
+
emitScoped(scope?: any, eventName?: string, args?: any) {
|
|
221
297
|
return this.emit(scope, eventName, args);
|
|
222
298
|
}
|
|
223
299
|
|
|
224
300
|
/**
|
|
225
301
|
* updates the locus with full locus object
|
|
226
302
|
* @param {object} locus locus object
|
|
227
|
-
* @param {
|
|
303
|
+
* @param {string} eventType particulat locus event
|
|
228
304
|
* @returns {object} null
|
|
229
305
|
* @memberof LocusInfo
|
|
230
306
|
*/
|
|
231
|
-
onFullLocus(locus, eventType) {
|
|
307
|
+
onFullLocus(locus: any, eventType?: string) {
|
|
232
308
|
if (!locus) {
|
|
233
309
|
LoggerProxy.logger.error(
|
|
234
310
|
'Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.'
|
|
235
311
|
);
|
|
236
312
|
}
|
|
313
|
+
|
|
314
|
+
if (!this.locusParser.isNewFullLocus(locus)) {
|
|
315
|
+
LoggerProxy.logger.info(
|
|
316
|
+
`Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=${eventType}`
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
237
322
|
this.updateParticipantDeltas(locus.participants);
|
|
238
323
|
this.scheduledMeeting = locus.meeting || null;
|
|
239
324
|
this.participants = locus.participants;
|
|
325
|
+
const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
|
|
240
326
|
this.updateLocusInfo(locus);
|
|
241
|
-
this.updateParticipants(locus.participants);
|
|
327
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
|
242
328
|
this.isMeetingActive();
|
|
243
329
|
this.handleOneOnOneEvent(eventType);
|
|
244
330
|
this.updateEmbeddedApps(locus.embeddedApps);
|
|
@@ -252,7 +338,8 @@ export default class LocusInfo extends EventsScope {
|
|
|
252
338
|
* @returns {undefined}
|
|
253
339
|
* @memberof LocusInfo
|
|
254
340
|
*/
|
|
255
|
-
|
|
341
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
342
|
+
handleOneOnOneEvent(eventType: string) {
|
|
256
343
|
if (
|
|
257
344
|
this.parsedLocus.fullState.type === _CALL_ ||
|
|
258
345
|
this.parsedLocus.fullState.type === _SIP_BRIDGE_
|
|
@@ -295,9 +382,10 @@ export default class LocusInfo extends EventsScope {
|
|
|
295
382
|
* @returns {undefined}
|
|
296
383
|
* @memberof LocusInfo
|
|
297
384
|
*/
|
|
298
|
-
onDeltaLocus(locus) {
|
|
385
|
+
onDeltaLocus(locus: any) {
|
|
386
|
+
const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
|
|
299
387
|
this.updateLocusInfo(locus);
|
|
300
|
-
this.updateParticipants(locus.participants);
|
|
388
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
|
301
389
|
this.isMeetingActive();
|
|
302
390
|
}
|
|
303
391
|
|
|
@@ -307,7 +395,14 @@ export default class LocusInfo extends EventsScope {
|
|
|
307
395
|
* @memberof LocusInfo
|
|
308
396
|
*/
|
|
309
397
|
updateLocusInfo(locus) {
|
|
310
|
-
|
|
398
|
+
if (locus.self?.reason === 'MOVED' && locus.self?.state === 'LEFT') {
|
|
399
|
+
// When moved to a breakout session locus sends a message for the previous locus
|
|
400
|
+
// indicating that we have been moved. It isn't helpful to continue parsing this
|
|
401
|
+
// as it gets interpreted as if we have left the call
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
this.updateControls(locus.controls, locus.self);
|
|
311
406
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
|
312
407
|
this.updateCreated(locus.created);
|
|
313
408
|
this.updateFullState(locus.fullState);
|
|
@@ -324,6 +419,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
324
419
|
this.updateMemberShip(locus.membership);
|
|
325
420
|
this.updateIdentifiers(locus.identities);
|
|
326
421
|
this.updateEmbeddedApps(locus.embeddedApps);
|
|
422
|
+
this.updateServices(locus.links?.services);
|
|
327
423
|
this.compareAndUpdate();
|
|
328
424
|
// update which required to compare different objects from locus
|
|
329
425
|
}
|
|
@@ -334,7 +430,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
334
430
|
* @returns {Array}
|
|
335
431
|
* @memberof LocusInfo
|
|
336
432
|
*/
|
|
337
|
-
getLocusPartner(participants
|
|
433
|
+
getLocusPartner(participants: Array<any>, self: any) {
|
|
338
434
|
if (!participants || participants.length === 0) {
|
|
339
435
|
return null;
|
|
340
436
|
}
|
|
@@ -345,6 +441,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
345
441
|
self &&
|
|
346
442
|
participant.identity !== self.identity &&
|
|
347
443
|
(participants.length <= 2 || (participant.type === _USER_ && !participant.removed))
|
|
444
|
+
// @ts-ignore
|
|
348
445
|
) || this.partner
|
|
349
446
|
);
|
|
350
447
|
}
|
|
@@ -359,6 +456,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
359
456
|
this.parsedLocus.fullState.type === _CALL_ ||
|
|
360
457
|
this.parsedLocus.fullState.type === _SIP_BRIDGE_
|
|
361
458
|
) {
|
|
459
|
+
// @ts-ignore
|
|
362
460
|
const partner = this.getLocusPartner(this.participants, this.self);
|
|
363
461
|
|
|
364
462
|
this.updateMeeting({partner});
|
|
@@ -375,10 +473,15 @@ export default class LocusInfo extends EventsScope {
|
|
|
375
473
|
LoggerProxy.logger.warn(
|
|
376
474
|
'Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.'
|
|
377
475
|
);
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
476
|
+
|
|
477
|
+
// @ts-ignore
|
|
478
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
479
|
+
name: 'client.call.remote-ended',
|
|
480
|
+
options: {
|
|
481
|
+
meetingId: this.meetingId,
|
|
482
|
+
},
|
|
381
483
|
});
|
|
484
|
+
|
|
382
485
|
this.emitScoped(
|
|
383
486
|
{
|
|
384
487
|
file: 'locus-info',
|
|
@@ -390,17 +493,19 @@ export default class LocusInfo extends EventsScope {
|
|
|
390
493
|
shouldLeave: false,
|
|
391
494
|
}
|
|
392
495
|
);
|
|
393
|
-
}
|
|
394
|
-
else if (
|
|
496
|
+
} else if (
|
|
395
497
|
partner.state === MEETING_STATE.STATES.LEFT &&
|
|
396
498
|
this.parsedLocus.self &&
|
|
397
499
|
(this.parsedLocus.self.state === MEETING_STATE.STATES.DECLINED ||
|
|
398
500
|
this.parsedLocus.self.state === MEETING_STATE.STATES.NOTIFIED ||
|
|
399
501
|
this.parsedLocus.self.state === MEETING_STATE.STATES.JOINED)
|
|
400
502
|
) {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
503
|
+
// @ts-ignore
|
|
504
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
505
|
+
name: 'client.call.remote-ended',
|
|
506
|
+
options: {
|
|
507
|
+
meetingId: this.meetingId,
|
|
508
|
+
},
|
|
404
509
|
});
|
|
405
510
|
this.emitScoped(
|
|
406
511
|
{
|
|
@@ -414,8 +519,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
414
519
|
this.parsedLocus.self.joinedWith && this.parsedLocus.self.joinedWith.state !== _LEFT_,
|
|
415
520
|
}
|
|
416
521
|
);
|
|
417
|
-
}
|
|
418
|
-
else if (
|
|
522
|
+
} else if (
|
|
419
523
|
this.parsedLocus.self &&
|
|
420
524
|
this.parsedLocus.self.state === MEETING_STATE.STATES.LEFT &&
|
|
421
525
|
(partner.state === MEETING_STATE.STATES.LEFT ||
|
|
@@ -423,10 +527,14 @@ export default class LocusInfo extends EventsScope {
|
|
|
423
527
|
partner.state === MEETING_STATE.STATES.NOTIFIED ||
|
|
424
528
|
partner.state === MEETING_STATE.STATES.IDLE) // Happens when user just joins and adds no Media
|
|
425
529
|
) {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
530
|
+
// @ts-ignore
|
|
531
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
532
|
+
name: 'client.call.remote-ended',
|
|
533
|
+
options: {
|
|
534
|
+
meetingId: this.meetingId,
|
|
535
|
+
},
|
|
429
536
|
});
|
|
537
|
+
|
|
430
538
|
this.emitScoped(
|
|
431
539
|
{
|
|
432
540
|
file: 'locus-info',
|
|
@@ -439,19 +547,23 @@ export default class LocusInfo extends EventsScope {
|
|
|
439
547
|
}
|
|
440
548
|
);
|
|
441
549
|
}
|
|
442
|
-
}
|
|
443
|
-
else if (this.parsedLocus.fullState.type === _MEETING_) {
|
|
550
|
+
} else if (this.parsedLocus.fullState.type === _MEETING_) {
|
|
444
551
|
if (
|
|
445
552
|
this.fullState &&
|
|
446
553
|
(this.fullState.state === LOCUS.STATE.INACTIVE ||
|
|
554
|
+
// @ts-ignore
|
|
447
555
|
this.fullState.state === LOCUS.STATE.TERMINATING)
|
|
448
556
|
) {
|
|
449
557
|
LoggerProxy.logger.warn(
|
|
450
558
|
'Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating'
|
|
451
559
|
);
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
560
|
+
|
|
561
|
+
// @ts-ignore
|
|
562
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
563
|
+
name: 'client.call.remote-ended',
|
|
564
|
+
options: {
|
|
565
|
+
meetingId: this.meetingId,
|
|
566
|
+
},
|
|
455
567
|
});
|
|
456
568
|
this.emitScoped(
|
|
457
569
|
{
|
|
@@ -464,12 +576,15 @@ export default class LocusInfo extends EventsScope {
|
|
|
464
576
|
shouldLeave: false,
|
|
465
577
|
}
|
|
466
578
|
);
|
|
467
|
-
}
|
|
468
|
-
else if (this.fullState && this.fullState.removed) {
|
|
579
|
+
} else if (this.fullState && this.fullState.removed) {
|
|
469
580
|
// user has been dropped from a meeting
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
581
|
+
|
|
582
|
+
// @ts-ignore
|
|
583
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
584
|
+
name: 'client.call.remote-ended',
|
|
585
|
+
options: {
|
|
586
|
+
meetingId: this.meetingId,
|
|
587
|
+
},
|
|
473
588
|
});
|
|
474
589
|
this.emitScoped(
|
|
475
590
|
{
|
|
@@ -499,8 +614,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
499
614
|
}
|
|
500
615
|
);
|
|
501
616
|
}
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
617
|
+
} else {
|
|
504
618
|
LoggerProxy.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
|
|
505
619
|
}
|
|
506
620
|
}
|
|
@@ -543,8 +657,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
543
657
|
canAssignHost: true,
|
|
544
658
|
}
|
|
545
659
|
);
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
660
|
+
} else {
|
|
548
661
|
this.emitScoped(
|
|
549
662
|
{
|
|
550
663
|
file: 'locus-info',
|
|
@@ -565,13 +678,13 @@ export default class LocusInfo extends EventsScope {
|
|
|
565
678
|
* @param {Array} [participants] - The participants to update against.
|
|
566
679
|
* @returns {void}
|
|
567
680
|
*/
|
|
568
|
-
updateParticipantDeltas(participants = []) {
|
|
681
|
+
updateParticipantDeltas(participants: Array<any> = []) {
|
|
569
682
|
// Used to find a participant within a participants collection.
|
|
570
683
|
const findParticipant = (participant, collection) =>
|
|
571
684
|
collection.find((item) => item.person.id === participant.person.id);
|
|
572
685
|
|
|
573
686
|
// Generates an object that indicates which state properties have changed.
|
|
574
|
-
const generateDelta = (prevState = {}, newState = {}) => {
|
|
687
|
+
const generateDelta = (prevState: any = {}, newState: any = {}) => {
|
|
575
688
|
// Setup deltas.
|
|
576
689
|
const deltas = {
|
|
577
690
|
audioStatus: prevState.audioStatus !== newState.audioStatus,
|
|
@@ -608,13 +721,13 @@ export default class LocusInfo extends EventsScope {
|
|
|
608
721
|
}
|
|
609
722
|
|
|
610
723
|
/**
|
|
611
|
-
*
|
|
724
|
+
* update meeting's members
|
|
612
725
|
* @param {Object} participants new participants object
|
|
613
|
-
* @param {
|
|
726
|
+
* @param {Boolean} isReplace is replace the whole members
|
|
614
727
|
* @returns {Array} updatedParticipants
|
|
615
728
|
* @memberof LocusInfo
|
|
616
729
|
*/
|
|
617
|
-
updateParticipants(participants) {
|
|
730
|
+
updateParticipants(participants: object, isReplace?: boolean) {
|
|
618
731
|
this.emitScoped(
|
|
619
732
|
{
|
|
620
733
|
file: 'locus-info',
|
|
@@ -627,16 +740,18 @@ export default class LocusInfo extends EventsScope {
|
|
|
627
740
|
selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
|
|
628
741
|
selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
|
|
629
742
|
hostId: this.parsedLocus.host && this.parsedLocus.host.hostId,
|
|
743
|
+
isReplace,
|
|
630
744
|
}
|
|
631
745
|
);
|
|
632
746
|
}
|
|
633
747
|
|
|
634
748
|
/**
|
|
635
749
|
* @param {Object} controls
|
|
750
|
+
* @param {Object} self
|
|
636
751
|
* @returns {undefined}
|
|
637
752
|
* @memberof LocusInfo
|
|
638
753
|
*/
|
|
639
|
-
updateControls(controls) {
|
|
754
|
+
updateControls(controls: object, self: object) {
|
|
640
755
|
if (controls && !isEqual(this.controls, controls)) {
|
|
641
756
|
this.parsedLocus.controls = ControlsUtils.parse(controls);
|
|
642
757
|
const {
|
|
@@ -646,23 +761,88 @@ export default class LocusInfo extends EventsScope {
|
|
|
646
761
|
hasMeetingContainerChanged,
|
|
647
762
|
hasTranscribeChanged,
|
|
648
763
|
hasEntryExitToneChanged,
|
|
764
|
+
hasBreakoutChanged,
|
|
765
|
+
hasVideoEnabledChanged,
|
|
766
|
+
hasMuteOnEntryChanged,
|
|
767
|
+
hasShareControlChanged,
|
|
768
|
+
hasDisallowUnmuteChanged,
|
|
769
|
+
hasReactionsChanged,
|
|
770
|
+
hasReactionDisplayNamesChanged,
|
|
771
|
+
hasViewTheParticipantListChanged,
|
|
772
|
+
hasRaiseHandChanged,
|
|
773
|
+
hasVideoChanged,
|
|
774
|
+
hasInterpretationChanged,
|
|
649
775
|
},
|
|
650
776
|
current,
|
|
651
777
|
} = ControlsUtils.getControls(this.controls, controls);
|
|
652
778
|
|
|
779
|
+
if (hasMuteOnEntryChanged) {
|
|
780
|
+
this.emitScoped(
|
|
781
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
782
|
+
LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED,
|
|
783
|
+
{state: current.muteOnEntry}
|
|
784
|
+
);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
if (hasShareControlChanged) {
|
|
788
|
+
this.emitScoped(
|
|
789
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
790
|
+
LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED,
|
|
791
|
+
{state: current.shareControl}
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
if (hasDisallowUnmuteChanged) {
|
|
796
|
+
this.emitScoped(
|
|
797
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
798
|
+
LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED,
|
|
799
|
+
{state: current.disallowUnmute}
|
|
800
|
+
);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
if (hasReactionsChanged || hasReactionDisplayNamesChanged) {
|
|
804
|
+
this.emitScoped(
|
|
805
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
806
|
+
LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED,
|
|
807
|
+
{state: current.reactions}
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
if (hasViewTheParticipantListChanged) {
|
|
812
|
+
this.emitScoped(
|
|
813
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
814
|
+
LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED,
|
|
815
|
+
{state: current.viewTheParticipantList}
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
if (hasRaiseHandChanged) {
|
|
820
|
+
this.emitScoped(
|
|
821
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
822
|
+
LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED,
|
|
823
|
+
{state: current.raiseHand}
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
if (hasVideoChanged) {
|
|
828
|
+
this.emitScoped(
|
|
829
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
830
|
+
LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED,
|
|
831
|
+
{state: current.video}
|
|
832
|
+
);
|
|
833
|
+
}
|
|
834
|
+
|
|
653
835
|
if (hasRecordingChanged || hasRecordingPausedChanged) {
|
|
654
836
|
let state = null;
|
|
655
837
|
|
|
656
838
|
if (hasRecordingPausedChanged) {
|
|
657
839
|
if (current.record.paused) {
|
|
658
840
|
state = RECORDING_STATE.PAUSED;
|
|
659
|
-
}
|
|
660
|
-
else {
|
|
841
|
+
} else {
|
|
661
842
|
// state will be `IDLE` if the recording is not active, even when there is a `pause` status change.
|
|
662
843
|
state = current.record.recording ? RECORDING_STATE.RESUMED : RECORDING_STATE.IDLE;
|
|
663
844
|
}
|
|
664
|
-
}
|
|
665
|
-
else if (hasRecordingChanged) {
|
|
845
|
+
} else if (hasRecordingChanged) {
|
|
666
846
|
state = current.record.recording ? RECORDING_STATE.RECORDING : RECORDING_STATE.IDLE;
|
|
667
847
|
}
|
|
668
848
|
|
|
@@ -711,9 +891,43 @@ export default class LocusInfo extends EventsScope {
|
|
|
711
891
|
);
|
|
712
892
|
}
|
|
713
893
|
|
|
894
|
+
if (hasBreakoutChanged) {
|
|
895
|
+
const {breakout} = current;
|
|
896
|
+
breakout.breakoutMoveId = SelfUtils.getReplacedBreakoutMoveId(
|
|
897
|
+
self,
|
|
898
|
+
this.webex.internal.device.url
|
|
899
|
+
);
|
|
900
|
+
this.emitScoped(
|
|
901
|
+
{
|
|
902
|
+
file: 'locus-info',
|
|
903
|
+
function: 'updateControls',
|
|
904
|
+
},
|
|
905
|
+
LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED,
|
|
906
|
+
{
|
|
907
|
+
breakout,
|
|
908
|
+
}
|
|
909
|
+
);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
if (hasInterpretationChanged) {
|
|
913
|
+
const {interpretation} = current;
|
|
914
|
+
this.emitScoped(
|
|
915
|
+
{
|
|
916
|
+
file: 'locus-info',
|
|
917
|
+
function: 'updateControls',
|
|
918
|
+
},
|
|
919
|
+
LOCUSINFO.EVENTS.CONTROLS_MEETING_INTERPRETATION_UPDATED,
|
|
920
|
+
{
|
|
921
|
+
interpretation,
|
|
922
|
+
}
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
|
|
714
926
|
if (hasEntryExitToneChanged) {
|
|
715
927
|
const {entryExitTone} = current;
|
|
716
928
|
|
|
929
|
+
this.updateMeeting({entryExitTone});
|
|
930
|
+
|
|
717
931
|
this.emitScoped(
|
|
718
932
|
{
|
|
719
933
|
file: 'locus-info',
|
|
@@ -721,11 +935,29 @@ export default class LocusInfo extends EventsScope {
|
|
|
721
935
|
},
|
|
722
936
|
LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED,
|
|
723
937
|
{
|
|
724
|
-
entryExitTone
|
|
938
|
+
entryExitTone,
|
|
725
939
|
}
|
|
726
940
|
);
|
|
941
|
+
}
|
|
727
942
|
|
|
728
|
-
|
|
943
|
+
// videoEnabled is handled differently than other controls,
|
|
944
|
+
// to fit with audio mute status logic
|
|
945
|
+
if (hasVideoEnabledChanged) {
|
|
946
|
+
const {videoEnabled} = current;
|
|
947
|
+
|
|
948
|
+
this.updateMeeting({unmuteVideoAllowed: videoEnabled});
|
|
949
|
+
|
|
950
|
+
this.emitScoped(
|
|
951
|
+
{
|
|
952
|
+
file: 'locus-info',
|
|
953
|
+
function: 'updateControls',
|
|
954
|
+
},
|
|
955
|
+
LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED,
|
|
956
|
+
{
|
|
957
|
+
// muted: not part of locus.controls
|
|
958
|
+
unmuteAllowed: videoEnabled,
|
|
959
|
+
}
|
|
960
|
+
);
|
|
729
961
|
}
|
|
730
962
|
|
|
731
963
|
this.controls = controls;
|
|
@@ -738,12 +970,11 @@ export default class LocusInfo extends EventsScope {
|
|
|
738
970
|
* @returns {undefined}
|
|
739
971
|
* @memberof LocusInfo
|
|
740
972
|
*/
|
|
741
|
-
updateConversationUrl(conversationUrl, info) {
|
|
973
|
+
updateConversationUrl(conversationUrl: string, info: any) {
|
|
742
974
|
if (conversationUrl && !isEqual(this.conversationUrl, conversationUrl)) {
|
|
743
975
|
this.conversationUrl = conversationUrl;
|
|
744
976
|
this.updateMeeting({conversationUrl});
|
|
745
|
-
}
|
|
746
|
-
else if (
|
|
977
|
+
} else if (
|
|
747
978
|
info &&
|
|
748
979
|
info.conversationUrl &&
|
|
749
980
|
!isEqual(this.conversationUrl, info.conversationUrl)
|
|
@@ -758,18 +989,39 @@ export default class LocusInfo extends EventsScope {
|
|
|
758
989
|
* @returns {undefined}
|
|
759
990
|
* @memberof LocusInfo
|
|
760
991
|
*/
|
|
761
|
-
updateCreated(created) {
|
|
992
|
+
updateCreated(created: object) {
|
|
762
993
|
if (created && !isEqual(this.created, created)) {
|
|
763
994
|
this.created = created;
|
|
764
995
|
}
|
|
765
996
|
}
|
|
766
997
|
|
|
998
|
+
/**
|
|
999
|
+
* @param {Object} services
|
|
1000
|
+
* @returns {undefined}
|
|
1001
|
+
* @memberof LocusInfo
|
|
1002
|
+
*/
|
|
1003
|
+
updateServices(services: Record<'breakout' | 'record', {url: string}>) {
|
|
1004
|
+
if (services && !isEqual(this.services, services)) {
|
|
1005
|
+
this.services = services;
|
|
1006
|
+
this.emitScoped(
|
|
1007
|
+
{
|
|
1008
|
+
file: 'locus-info',
|
|
1009
|
+
function: 'updateServices',
|
|
1010
|
+
},
|
|
1011
|
+
LOCUSINFO.EVENTS.LINKS_SERVICES,
|
|
1012
|
+
{
|
|
1013
|
+
services,
|
|
1014
|
+
}
|
|
1015
|
+
);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
767
1019
|
/**
|
|
768
1020
|
* @param {Object} fullState
|
|
769
1021
|
* @returns {undefined}
|
|
770
1022
|
* @memberof LocusInfo
|
|
771
1023
|
*/
|
|
772
|
-
updateFullState(fullState) {
|
|
1024
|
+
updateFullState(fullState: object) {
|
|
773
1025
|
if (fullState && !isEqual(this.fullState, fullState)) {
|
|
774
1026
|
const result = FullState.getFullState(this.fullState, fullState);
|
|
775
1027
|
|
|
@@ -813,7 +1065,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
813
1065
|
* @memberof LocusInfo
|
|
814
1066
|
* emits internal event locus_info_update_host
|
|
815
1067
|
*/
|
|
816
|
-
updateHostInfo(host) {
|
|
1068
|
+
updateHostInfo(host: object) {
|
|
817
1069
|
if (host && !isEqual(this.host, host)) {
|
|
818
1070
|
const parsedHosts = HostUtils.getHosts(this.host, host);
|
|
819
1071
|
|
|
@@ -834,8 +1086,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
834
1086
|
);
|
|
835
1087
|
}
|
|
836
1088
|
this.host = host;
|
|
837
|
-
}
|
|
838
|
-
else {
|
|
1089
|
+
} else {
|
|
839
1090
|
this.compareAndUpdateFlags.compareSelfAndHost = false;
|
|
840
1091
|
}
|
|
841
1092
|
}
|
|
@@ -846,9 +1097,12 @@ export default class LocusInfo extends EventsScope {
|
|
|
846
1097
|
* @returns {undefined}
|
|
847
1098
|
* @memberof LocusInfo
|
|
848
1099
|
*/
|
|
849
|
-
updateMeetingInfo(info, self) {
|
|
850
|
-
|
|
851
|
-
|
|
1100
|
+
updateMeetingInfo(info: object, self?: object) {
|
|
1101
|
+
const roles = self ? SelfUtils.getRoles(self) : this.parsedLocus.self?.roles || [];
|
|
1102
|
+
if (
|
|
1103
|
+
(info && !isEqual(this.info, info)) ||
|
|
1104
|
+
(roles.length && !isEqual(this.roles, roles) && info)
|
|
1105
|
+
) {
|
|
852
1106
|
const isJoined = SelfUtils.isJoined(self || this.parsedLocus.self);
|
|
853
1107
|
const parsedInfo = InfoUtils.getInfos(this.parsedLocus.info, info, roles, isJoined);
|
|
854
1108
|
|
|
@@ -887,6 +1141,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
887
1141
|
// Parses the info and adds necessary values
|
|
888
1142
|
this.updateMeeting(parsedInfo.current);
|
|
889
1143
|
}
|
|
1144
|
+
this.roles = roles;
|
|
890
1145
|
}
|
|
891
1146
|
|
|
892
1147
|
/**
|
|
@@ -894,7 +1149,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
894
1149
|
* @returns {undefined}
|
|
895
1150
|
* @memberof LocusInfo
|
|
896
1151
|
*/
|
|
897
|
-
updateEmbeddedApps(embeddedApps) {
|
|
1152
|
+
updateEmbeddedApps(embeddedApps: object) {
|
|
898
1153
|
// don't do anything if the arrays of apps haven't changed significantly
|
|
899
1154
|
if (EmbeddedAppsUtils.areSimilar(this.embeddedApps, embeddedApps)) {
|
|
900
1155
|
return;
|
|
@@ -922,11 +1177,13 @@ export default class LocusInfo extends EventsScope {
|
|
|
922
1177
|
* @memberof LocusInfo
|
|
923
1178
|
* emits internal event locus_info_update_media_shares
|
|
924
1179
|
*/
|
|
925
|
-
updateMediaShares(mediaShares) {
|
|
1180
|
+
updateMediaShares(mediaShares: object) {
|
|
926
1181
|
if (mediaShares && !isEqual(this.mediaShares, mediaShares)) {
|
|
927
1182
|
const parsedMediaShares = MediaSharesUtils.getMediaShares(this.mediaShares, mediaShares);
|
|
928
1183
|
|
|
929
1184
|
this.updateMeeting(parsedMediaShares.current);
|
|
1185
|
+
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
1186
|
+
this.mediaShares = mediaShares;
|
|
930
1187
|
this.emitScoped(
|
|
931
1188
|
{
|
|
932
1189
|
file: 'locus-info',
|
|
@@ -938,8 +1195,6 @@ export default class LocusInfo extends EventsScope {
|
|
|
938
1195
|
previous: parsedMediaShares.previous,
|
|
939
1196
|
}
|
|
940
1197
|
);
|
|
941
|
-
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
942
|
-
this.mediaShares = mediaShares;
|
|
943
1198
|
}
|
|
944
1199
|
}
|
|
945
1200
|
|
|
@@ -948,7 +1203,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
948
1203
|
* @returns {undefined}
|
|
949
1204
|
* @memberof LocusInfo
|
|
950
1205
|
*/
|
|
951
|
-
updateParticipantsUrl(participantsUrl) {
|
|
1206
|
+
updateParticipantsUrl(participantsUrl: string) {
|
|
952
1207
|
if (participantsUrl && !isEqual(this.participantsUrl, participantsUrl)) {
|
|
953
1208
|
this.participantsUrl = participantsUrl;
|
|
954
1209
|
}
|
|
@@ -959,7 +1214,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
959
1214
|
* @returns {undefined}
|
|
960
1215
|
* @memberof LocusInfo
|
|
961
1216
|
*/
|
|
962
|
-
updateReplace(replace) {
|
|
1217
|
+
updateReplace(replace: object) {
|
|
963
1218
|
if (replace && !isEqual(this.replace, replace)) {
|
|
964
1219
|
this.replace = replace;
|
|
965
1220
|
}
|
|
@@ -973,8 +1228,10 @@ export default class LocusInfo extends EventsScope {
|
|
|
973
1228
|
* @memberof LocusInfo
|
|
974
1229
|
* emits internal events self_admitted_guest, self_unadmitted_guest, locus_info_update_self
|
|
975
1230
|
*/
|
|
976
|
-
updateSelf(self, participants) {
|
|
1231
|
+
updateSelf(self: any, participants: Array<any>) {
|
|
1232
|
+
// @ts-ignore - check where this.self come from
|
|
977
1233
|
if (self && !isEqual(this.self, self)) {
|
|
1234
|
+
// @ts-ignore
|
|
978
1235
|
const parsedSelves = SelfUtils.getSelves(this.self, self, this.webex.internal.device.url);
|
|
979
1236
|
|
|
980
1237
|
this.updateMeeting(parsedSelves.current);
|
|
@@ -1000,8 +1257,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1000
1257
|
|
|
1001
1258
|
if (parsedSelves.updates.moderatorChanged) {
|
|
1002
1259
|
this.compareAndUpdateFlags.compareHostAndSelf = true;
|
|
1003
|
-
}
|
|
1004
|
-
else {
|
|
1260
|
+
} else {
|
|
1005
1261
|
this.compareAndUpdateFlags.compareHostAndSelf = false;
|
|
1006
1262
|
}
|
|
1007
1263
|
|
|
@@ -1016,6 +1272,31 @@ export default class LocusInfo extends EventsScope {
|
|
|
1016
1272
|
);
|
|
1017
1273
|
}
|
|
1018
1274
|
|
|
1275
|
+
if (parsedSelves.updates.breakoutsChanged) {
|
|
1276
|
+
this.emitScoped(
|
|
1277
|
+
{
|
|
1278
|
+
file: 'locus-info',
|
|
1279
|
+
function: 'updateSelf',
|
|
1280
|
+
},
|
|
1281
|
+
LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED,
|
|
1282
|
+
{breakoutSessions: parsedSelves.current.breakoutSessions}
|
|
1283
|
+
);
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
if (parsedSelves.updates.interpretationChanged) {
|
|
1287
|
+
this.emitScoped(
|
|
1288
|
+
{
|
|
1289
|
+
file: 'locus-info',
|
|
1290
|
+
function: 'updateSelf',
|
|
1291
|
+
},
|
|
1292
|
+
LOCUSINFO.EVENTS.SELF_MEETING_INTERPRETATION_CHANGED,
|
|
1293
|
+
{
|
|
1294
|
+
interpretation: parsedSelves.current.interpretation,
|
|
1295
|
+
selfParticipantId: parsedSelves.current.selfId,
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1019
1300
|
if (parsedSelves.updates.isMediaInactiveOrReleased) {
|
|
1020
1301
|
this.emitScoped(
|
|
1021
1302
|
{
|
|
@@ -1037,6 +1318,31 @@ export default class LocusInfo extends EventsScope {
|
|
|
1037
1318
|
self
|
|
1038
1319
|
);
|
|
1039
1320
|
}
|
|
1321
|
+
|
|
1322
|
+
if (parsedSelves.updates.isRolesChanged) {
|
|
1323
|
+
this.emitScoped(
|
|
1324
|
+
{
|
|
1325
|
+
file: 'locus-info',
|
|
1326
|
+
function: 'updateSelf',
|
|
1327
|
+
},
|
|
1328
|
+
LOCUSINFO.EVENTS.SELF_ROLES_CHANGED,
|
|
1329
|
+
{oldRoles: parsedSelves.previous?.roles, newRoles: parsedSelves.current?.roles}
|
|
1330
|
+
);
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
if (parsedSelves.updates.isVideoMutedByOthersChanged) {
|
|
1334
|
+
this.emitScoped(
|
|
1335
|
+
{
|
|
1336
|
+
file: 'locus-info',
|
|
1337
|
+
function: 'updateSelf',
|
|
1338
|
+
},
|
|
1339
|
+
LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED,
|
|
1340
|
+
{
|
|
1341
|
+
muted: parsedSelves.current.remoteVideoMuted,
|
|
1342
|
+
// unmuteAllowed: not part of .self
|
|
1343
|
+
}
|
|
1344
|
+
);
|
|
1345
|
+
}
|
|
1040
1346
|
if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
|
|
1041
1347
|
this.emitScoped(
|
|
1042
1348
|
{
|
|
@@ -1100,6 +1406,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1100
1406
|
file: 'locus-info',
|
|
1101
1407
|
function: 'updateSelf',
|
|
1102
1408
|
},
|
|
1409
|
+
// @ts-ignore
|
|
1103
1410
|
LOCUSINFO.EVENTS.MEDIA_INACTIVITY,
|
|
1104
1411
|
SelfUtils.getMediaStatus(self.mediaSessions)
|
|
1105
1412
|
);
|
|
@@ -1168,9 +1475,9 @@ export default class LocusInfo extends EventsScope {
|
|
|
1168
1475
|
}
|
|
1169
1476
|
);
|
|
1170
1477
|
this.parsedLocus.self = parsedSelves.current;
|
|
1478
|
+
// @ts-ignore
|
|
1171
1479
|
this.self = self;
|
|
1172
|
-
}
|
|
1173
|
-
else {
|
|
1480
|
+
} else {
|
|
1174
1481
|
this.compareAndUpdateFlags.compareHostAndSelf = false;
|
|
1175
1482
|
}
|
|
1176
1483
|
}
|
|
@@ -1181,7 +1488,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1181
1488
|
* @returns {undefined}
|
|
1182
1489
|
* emits internal event locus_info_update_url
|
|
1183
1490
|
*/
|
|
1184
|
-
updateLocusUrl(url) {
|
|
1491
|
+
updateLocusUrl(url: string) {
|
|
1185
1492
|
if (url && this.url !== url) {
|
|
1186
1493
|
this.url = url;
|
|
1187
1494
|
this.updateMeeting({locusUrl: url});
|
|
@@ -1201,7 +1508,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1201
1508
|
* @returns {undefined}
|
|
1202
1509
|
* @memberof LocusInfo
|
|
1203
1510
|
*/
|
|
1204
|
-
updateAclUrl(aclUrl) {
|
|
1511
|
+
updateAclUrl(aclUrl: string) {
|
|
1205
1512
|
if (aclUrl && !isEqual(this.aclUrl, aclUrl)) {
|
|
1206
1513
|
this.aclUrl = aclUrl;
|
|
1207
1514
|
}
|
|
@@ -1212,7 +1519,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1212
1519
|
* @returns {undefined}
|
|
1213
1520
|
* @memberof LocusInfo
|
|
1214
1521
|
*/
|
|
1215
|
-
updateBasequence(baseSequence) {
|
|
1522
|
+
updateBasequence(baseSequence: number) {
|
|
1216
1523
|
if (baseSequence && !isEqual(this.baseSequence, baseSequence)) {
|
|
1217
1524
|
this.baseSequence = baseSequence;
|
|
1218
1525
|
}
|
|
@@ -1223,7 +1530,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1223
1530
|
* @returns {undefined}
|
|
1224
1531
|
* @memberof LocusInfo
|
|
1225
1532
|
*/
|
|
1226
|
-
updateSequence(sequence) {
|
|
1533
|
+
updateSequence(sequence: number) {
|
|
1227
1534
|
if (sequence && !isEqual(this.sequence, sequence)) {
|
|
1228
1535
|
this.sequence = sequence;
|
|
1229
1536
|
}
|
|
@@ -1234,7 +1541,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
1234
1541
|
* @returns {undefined}
|
|
1235
1542
|
* @memberof LocusInfo
|
|
1236
1543
|
*/
|
|
1237
|
-
updateMemberShip(membership) {
|
|
1544
|
+
updateMemberShip(membership: object) {
|
|
1238
1545
|
if (membership && !isEqual(this.membership, membership)) {
|
|
1239
1546
|
this.membership = membership;
|
|
1240
1547
|
}
|
|
@@ -1245,9 +1552,109 @@ export default class LocusInfo extends EventsScope {
|
|
|
1245
1552
|
* @returns {undefined}
|
|
1246
1553
|
* @memberof LocusInfo
|
|
1247
1554
|
*/
|
|
1248
|
-
updateIdentifiers(identities) {
|
|
1555
|
+
updateIdentifiers(identities: Array<any>) {
|
|
1249
1556
|
if (identities && !isEqual(this.identities, identities)) {
|
|
1250
1557
|
this.identities = identities;
|
|
1251
1558
|
}
|
|
1252
1559
|
}
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* check the locus is main session's one or not, if is main session's, update main session cache
|
|
1563
|
+
* @param {Object} locus
|
|
1564
|
+
* @returns {undefined}
|
|
1565
|
+
* @memberof LocusInfo
|
|
1566
|
+
*/
|
|
1567
|
+
updateLocusCache(locus: any) {
|
|
1568
|
+
const isMainSessionDTO = ControlsUtils.isMainSessionDTO(locus);
|
|
1569
|
+
if (isMainSessionDTO) {
|
|
1570
|
+
this.updateMainSessionLocusCache(locus);
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* if return from breakout to main session, need to use cached main session DTO since locus won't send the full locus (participants)
|
|
1576
|
+
* if join breakout from main session, need to query main locus url (if response with 403 means no privilege, need to clear the cache)
|
|
1577
|
+
* @param {Object} newLocus
|
|
1578
|
+
* @returns {Object}
|
|
1579
|
+
* @memberof LocusInfo
|
|
1580
|
+
*/
|
|
1581
|
+
getTheLocusToUpdate(newLocus: any) {
|
|
1582
|
+
const switchStatus = ControlsUtils.getSessionSwitchStatus(this.controls, newLocus?.controls);
|
|
1583
|
+
if (switchStatus.isReturnToMain && this.mainSessionLocusCache) {
|
|
1584
|
+
return cloneDeep(this.mainSessionLocusCache);
|
|
1585
|
+
}
|
|
1586
|
+
if (switchStatus.isJoinToBreakout) {
|
|
1587
|
+
this.emitScoped(
|
|
1588
|
+
{
|
|
1589
|
+
file: 'locus-info',
|
|
1590
|
+
function: 'updateControls',
|
|
1591
|
+
},
|
|
1592
|
+
LOCUSINFO.EVENTS.CONTROLS_JOIN_BREAKOUT_FROM_MAIN,
|
|
1593
|
+
{
|
|
1594
|
+
mainLocusUrl: this.url,
|
|
1595
|
+
}
|
|
1596
|
+
);
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
return newLocus;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* merge participants by participant id
|
|
1604
|
+
* @param {Array} participants
|
|
1605
|
+
* @param {Array} sourceParticipants
|
|
1606
|
+
* @returns {Array} merged participants
|
|
1607
|
+
* @memberof LocusInfo
|
|
1608
|
+
*/
|
|
1609
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1610
|
+
mergeParticipants(participants, sourceParticipants) {
|
|
1611
|
+
if (!sourceParticipants || !sourceParticipants.length) return participants;
|
|
1612
|
+
if (!participants || !participants.length) {
|
|
1613
|
+
return sourceParticipants;
|
|
1614
|
+
}
|
|
1615
|
+
sourceParticipants.forEach((participant) => {
|
|
1616
|
+
const existIndex = participants.findIndex((p) => p.id === participant.id);
|
|
1617
|
+
if (existIndex > -1) {
|
|
1618
|
+
participants.splice(existIndex, 1, participant);
|
|
1619
|
+
} else {
|
|
1620
|
+
participants.push(participant);
|
|
1621
|
+
}
|
|
1622
|
+
});
|
|
1623
|
+
|
|
1624
|
+
return participants;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* need cache main sessions' participants since locus will not send the full list when cohost/host leave breakout
|
|
1629
|
+
* @param {Object} mainLocus
|
|
1630
|
+
* @returns {undefined}
|
|
1631
|
+
* @memberof LocusInfo
|
|
1632
|
+
*/
|
|
1633
|
+
updateMainSessionLocusCache(mainLocus: any) {
|
|
1634
|
+
if (!mainLocus) {
|
|
1635
|
+
return;
|
|
1636
|
+
}
|
|
1637
|
+
const locusClone = cloneDeep(mainLocus);
|
|
1638
|
+
if (this.mainSessionLocusCache) {
|
|
1639
|
+
// shallow merge and do special merge for participants
|
|
1640
|
+
assignWith(this.mainSessionLocusCache, locusClone, (objValue, srcValue, key) => {
|
|
1641
|
+
if (key === 'participants') {
|
|
1642
|
+
return this.mergeParticipants(objValue, srcValue);
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
return srcValue || objValue;
|
|
1646
|
+
});
|
|
1647
|
+
} else {
|
|
1648
|
+
this.mainSessionLocusCache = locusClone;
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* clear main session cache
|
|
1654
|
+
* @returns {undefined}
|
|
1655
|
+
* @memberof LocusInfo
|
|
1656
|
+
*/
|
|
1657
|
+
clearMainSessionLocusCache() {
|
|
1658
|
+
this.mainSessionLocusCache = null;
|
|
1659
|
+
}
|
|
1253
1660
|
}
|