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