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