@webex/plugin-meetings 3.0.0-beta.16 → 3.0.0-beta.161
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/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +359 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +212 -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 +1046 -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/errors/webex-errors.js +3 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/config.js +6 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +175 -26
- 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 +300 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +214 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +92 -2
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +317 -24
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +43 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +2 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +97 -14
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +39 -134
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +19 -97
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -493
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +79 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2349 -2178
- 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 +229 -124
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +191 -167
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +444 -443
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +157 -49
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +20 -5
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +22 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +365 -73
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +16 -12
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +88 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +43 -0
- 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 +97 -3
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +10 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +94 -11
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +109 -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 +316 -233
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +50 -14
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +3 -5
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +48 -29
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +265 -36
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +52 -19
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +53 -33
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +44 -18
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +60 -3
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +322 -103
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +4 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/reachability/index.js +117 -60
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -5
- 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 -2
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +18 -18
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +190 -145
- 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 +21 -29
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +127 -92
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +135 -53
- 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 +329 -314
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +103 -54
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +43 -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 +72 -0
- package/dist/types/constants.d.ts +987 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +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 +86 -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 +149 -0
- package/dist/types/meeting/index.d.ts +1524 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +270 -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 +75 -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 +364 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +158 -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 +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +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/package.json +28 -21
- package/src/annotation/annotation.types.ts +52 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +343 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +180 -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 +921 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/errors/webex-errors.ts +6 -2
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/config.ts +5 -7
- package/src/constants.ts +165 -20
- 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 +286 -0
- package/src/index.ts +34 -0
- package/src/interpretation/README.md +51 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +182 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +110 -0
- package/src/locus-info/index.ts +339 -21
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +2 -1
- package/src/locus-info/selfUtils.ts +86 -2
- package/src/media/index.ts +70 -142
- package/src/media/properties.ts +41 -104
- package/src/mediaQualityMetrics/config.ts +379 -377
- package/src/meeting/in-meeting-actions.ts +156 -0
- package/src/meeting/index.ts +1779 -1741
- package/src/meeting/locusMediaRequest.ts +309 -0
- package/src/meeting/muteState.ts +228 -132
- package/src/meeting/request.ts +100 -91
- package/src/meeting/request.type.ts +2 -0
- package/src/meeting/util.ts +422 -421
- package/src/meeting-info/meeting-info-v2.ts +134 -13
- package/src/meeting-info/utilv2.ts +13 -3
- package/src/meetings/collection.ts +20 -0
- package/src/meetings/index.ts +385 -83
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +3 -1
- package/src/meetings/util.ts +103 -4
- package/src/member/index.ts +42 -0
- package/src/member/types.ts +24 -0
- package/src/member/util.ts +95 -1
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +108 -6
- package/src/members/request.ts +98 -17
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +319 -240
- package/src/metrics/config.ts +49 -10
- package/src/metrics/constants.ts +2 -4
- package/src/metrics/index.ts +43 -27
- package/src/multistream/mediaRequestManager.ts +337 -63
- package/src/multistream/receiveSlot.ts +68 -26
- package/src/multistream/receiveSlotManager.ts +61 -38
- package/src/multistream/remoteMedia.ts +29 -3
- package/src/multistream/remoteMediaGroup.ts +61 -2
- package/src/multistream/remoteMediaManager.ts +260 -66
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/reachability/index.ts +75 -25
- package/src/reachability/request.ts +10 -5
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +28 -3
- package/src/reconnection-manager/index.ts +53 -32
- 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 +21 -30
- package/src/roap/request.ts +51 -52
- package/src/roap/turnDiscovery.ts +51 -27
- package/src/statsAnalyzer/global.ts +1 -94
- package/src/statsAnalyzer/index.ts +380 -390
- package/src/statsAnalyzer/mqaUtil.ts +106 -99
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +331 -254
- package/test/integration/spec/space-meeting.js +77 -4
- package/test/unit/spec/annotation/index.ts +436 -0
- package/test/unit/spec/breakouts/breakout.ts +233 -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 +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +518 -0
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +329 -0
- package/test/unit/spec/interpretation/siLanguage.ts +26 -0
- package/test/unit/spec/locus-info/controlsUtils.js +323 -30
- package/test/unit/spec/locus-info/index.js +680 -4
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/selfConstant.js +48 -0
- package/test/unit/spec/locus-info/selfUtils.js +275 -0
- package/test/unit/spec/media/index.ts +118 -22
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +76 -0
- package/test/unit/spec/meeting/index.js +2695 -1513
- package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
- package/test/unit/spec/meeting/muteState.js +370 -208
- package/test/unit/spec/meeting/request.js +354 -42
- package/test/unit/spec/meeting/utils.js +270 -156
- package/test/unit/spec/meeting-info/meetinginfov2.js +383 -5
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +14 -0
- package/test/unit/spec/meetings/index.js +866 -120
- package/test/unit/spec/meetings/utils.js +206 -2
- package/test/unit/spec/member/index.js +31 -0
- package/test/unit/spec/member/util.js +408 -32
- package/test/unit/spec/members/index.js +320 -1
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +184 -0
- package/test/unit/spec/metrics/index.js +98 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +1012 -109
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +32 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +672 -65
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/reachability/index.ts +176 -25
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +46 -13
- 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 +21 -51
- package/test/unit/spec/roap/request.ts +187 -0
- package/test/unit/spec/roap/turnDiscovery.ts +73 -34
- package/test/unit/spec/stats-analyzer/index.js +94 -43
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -45
- package/test/utils/webex-config.js +4 -0
- package/test/utils/webex-test-users.js +7 -3
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -18
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -262
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -106
- 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 -93
- package/test/unit/spec/meeting/effectsState.js +0 -281
package/src/locus-info/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {isEqual} from 'lodash';
|
|
1
|
+
import {isEqual, assignWith, cloneDeep} from 'lodash';
|
|
2
2
|
|
|
3
3
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
4
4
|
import EventsScope from '../common/events/events-scope';
|
|
@@ -59,10 +59,19 @@ export default class LocusInfo extends EventsScope {
|
|
|
59
59
|
fullState: any;
|
|
60
60
|
host: any;
|
|
61
61
|
info: any;
|
|
62
|
+
roles: any;
|
|
62
63
|
mediaShares: any;
|
|
63
64
|
replace: any;
|
|
64
65
|
url: any;
|
|
65
|
-
|
|
66
|
+
services: any;
|
|
67
|
+
mainSessionLocusCache: any;
|
|
68
|
+
/**
|
|
69
|
+
* Constructor
|
|
70
|
+
* @param {boolean} updateMeeting true if the meeting should be updated
|
|
71
|
+
* @param {object} webex
|
|
72
|
+
* @param {string} meetingId
|
|
73
|
+
* @returns {undefined}
|
|
74
|
+
*/
|
|
66
75
|
constructor(updateMeeting, webex, meetingId) {
|
|
67
76
|
super();
|
|
68
77
|
this.parsedLocus = {
|
|
@@ -98,7 +107,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
98
107
|
meeting.meetingRequest
|
|
99
108
|
.getFullLocus({
|
|
100
109
|
desync: true,
|
|
101
|
-
locusUrl: meeting.locusUrl,
|
|
110
|
+
locusUrl: locus.url ? locus.url : meeting.locusUrl,
|
|
102
111
|
})
|
|
103
112
|
.then((res) => {
|
|
104
113
|
meeting.locusInfo.onFullLocus(res.body);
|
|
@@ -171,12 +180,13 @@ export default class LocusInfo extends EventsScope {
|
|
|
171
180
|
*/
|
|
172
181
|
this.deltaParticipants = [];
|
|
173
182
|
|
|
183
|
+
this.updateLocusCache(locus);
|
|
174
184
|
// above section only updates the locusInfo object
|
|
175
185
|
// The below section makes sure it updates the locusInfo as well as updates the meeting object
|
|
176
186
|
this.updateParticipants(locus.participants);
|
|
177
187
|
// For 1:1 space meeting the conversation Url does not exist in locus.conversation
|
|
178
188
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
|
179
|
-
this.updateControls(locus.controls);
|
|
189
|
+
this.updateControls(locus.controls, locus.self);
|
|
180
190
|
this.updateLocusUrl(locus.url);
|
|
181
191
|
this.updateFullState(locus.fullState);
|
|
182
192
|
this.updateMeetingInfo(locus.info);
|
|
@@ -185,6 +195,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
185
195
|
this.updateSelf(locus.self, locus.participants);
|
|
186
196
|
this.updateHostInfo(locus.host);
|
|
187
197
|
this.updateMediaShares(locus.mediaShares);
|
|
198
|
+
this.updateServices(locus.links?.services);
|
|
188
199
|
}
|
|
189
200
|
|
|
190
201
|
/**
|
|
@@ -193,6 +204,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
193
204
|
* @memberof LocusInfo
|
|
194
205
|
*/
|
|
195
206
|
initialSetup(locus: object) {
|
|
207
|
+
this.updateLocusCache(locus);
|
|
196
208
|
this.onFullLocus(locus);
|
|
197
209
|
|
|
198
210
|
// Change it to true after it receives it first locus object
|
|
@@ -208,7 +220,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
208
220
|
parse(meeting: any, data: any) {
|
|
209
221
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
210
222
|
const {eventType} = data;
|
|
211
|
-
|
|
223
|
+
const locus = this.getTheLocusToUpdate(data.locus);
|
|
212
224
|
LoggerProxy.logger.info(`Locus-info:index#parse --> received locus data: ${eventType}`);
|
|
213
225
|
|
|
214
226
|
switch (eventType) {
|
|
@@ -226,16 +238,16 @@ export default class LocusInfo extends EventsScope {
|
|
|
226
238
|
case LOCUSEVENT.PARTICIPANT_DECLINED:
|
|
227
239
|
case LOCUSEVENT.FLOOR_GRANTED:
|
|
228
240
|
case LOCUSEVENT.FLOOR_RELEASED:
|
|
229
|
-
this.onFullLocus(
|
|
241
|
+
this.onFullLocus(locus, eventType);
|
|
230
242
|
break;
|
|
231
243
|
case LOCUSEVENT.DIFFERENCE:
|
|
232
|
-
this.handleLocusDelta(
|
|
244
|
+
this.handleLocusDelta(locus, meeting);
|
|
233
245
|
break;
|
|
234
246
|
|
|
235
247
|
default:
|
|
236
248
|
// Why will there be a event with no eventType ????
|
|
237
249
|
// we may not need this, we can get full locus
|
|
238
|
-
this.handleLocusDelta(
|
|
250
|
+
this.handleLocusDelta(locus, meeting);
|
|
239
251
|
}
|
|
240
252
|
}
|
|
241
253
|
|
|
@@ -267,8 +279,9 @@ export default class LocusInfo extends EventsScope {
|
|
|
267
279
|
this.updateParticipantDeltas(locus.participants);
|
|
268
280
|
this.scheduledMeeting = locus.meeting || null;
|
|
269
281
|
this.participants = locus.participants;
|
|
282
|
+
const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
|
|
270
283
|
this.updateLocusInfo(locus);
|
|
271
|
-
this.updateParticipants(locus.participants);
|
|
284
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
|
272
285
|
this.isMeetingActive();
|
|
273
286
|
this.handleOneOnOneEvent(eventType);
|
|
274
287
|
this.updateEmbeddedApps(locus.embeddedApps);
|
|
@@ -327,8 +340,9 @@ export default class LocusInfo extends EventsScope {
|
|
|
327
340
|
* @memberof LocusInfo
|
|
328
341
|
*/
|
|
329
342
|
onDeltaLocus(locus: any) {
|
|
343
|
+
const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
|
|
330
344
|
this.updateLocusInfo(locus);
|
|
331
|
-
this.updateParticipants(locus.participants);
|
|
345
|
+
this.updateParticipants(locus.participants, isReplaceMembers);
|
|
332
346
|
this.isMeetingActive();
|
|
333
347
|
}
|
|
334
348
|
|
|
@@ -337,8 +351,15 @@ export default class LocusInfo extends EventsScope {
|
|
|
337
351
|
* @returns {undefined}
|
|
338
352
|
* @memberof LocusInfo
|
|
339
353
|
*/
|
|
340
|
-
updateLocusInfo(locus
|
|
341
|
-
|
|
354
|
+
updateLocusInfo(locus) {
|
|
355
|
+
if (locus.self?.reason === 'MOVED' && locus.self?.state === 'LEFT') {
|
|
356
|
+
// When moved to a breakout session locus sends a message for the previous locus
|
|
357
|
+
// indicating that we have been moved. It isn't helpful to continue parsing this
|
|
358
|
+
// as it gets interpreted as if we have left the call
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
this.updateControls(locus.controls, locus.self);
|
|
342
363
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
|
343
364
|
this.updateCreated(locus.created);
|
|
344
365
|
this.updateFullState(locus.fullState);
|
|
@@ -355,6 +376,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
355
376
|
this.updateMemberShip(locus.membership);
|
|
356
377
|
this.updateIdentifiers(locus.identities);
|
|
357
378
|
this.updateEmbeddedApps(locus.embeddedApps);
|
|
379
|
+
this.updateServices(locus.links?.services);
|
|
358
380
|
this.compareAndUpdate();
|
|
359
381
|
// update which required to compare different objects from locus
|
|
360
382
|
}
|
|
@@ -636,13 +658,13 @@ export default class LocusInfo extends EventsScope {
|
|
|
636
658
|
}
|
|
637
659
|
|
|
638
660
|
/**
|
|
639
|
-
*
|
|
661
|
+
* update meeting's members
|
|
640
662
|
* @param {Object} participants new participants object
|
|
641
|
-
* @param {
|
|
663
|
+
* @param {Boolean} isReplace is replace the whole members
|
|
642
664
|
* @returns {Array} updatedParticipants
|
|
643
665
|
* @memberof LocusInfo
|
|
644
666
|
*/
|
|
645
|
-
updateParticipants(participants: object) {
|
|
667
|
+
updateParticipants(participants: object, isReplace?: boolean) {
|
|
646
668
|
this.emitScoped(
|
|
647
669
|
{
|
|
648
670
|
file: 'locus-info',
|
|
@@ -655,16 +677,18 @@ export default class LocusInfo extends EventsScope {
|
|
|
655
677
|
selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
|
|
656
678
|
selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
|
|
657
679
|
hostId: this.parsedLocus.host && this.parsedLocus.host.hostId,
|
|
680
|
+
isReplace,
|
|
658
681
|
}
|
|
659
682
|
);
|
|
660
683
|
}
|
|
661
684
|
|
|
662
685
|
/**
|
|
663
686
|
* @param {Object} controls
|
|
687
|
+
* @param {Object} self
|
|
664
688
|
* @returns {undefined}
|
|
665
689
|
* @memberof LocusInfo
|
|
666
690
|
*/
|
|
667
|
-
updateControls(controls: object) {
|
|
691
|
+
updateControls(controls: object, self: object) {
|
|
668
692
|
if (controls && !isEqual(this.controls, controls)) {
|
|
669
693
|
this.parsedLocus.controls = ControlsUtils.parse(controls);
|
|
670
694
|
const {
|
|
@@ -674,10 +698,77 @@ export default class LocusInfo extends EventsScope {
|
|
|
674
698
|
hasMeetingContainerChanged,
|
|
675
699
|
hasTranscribeChanged,
|
|
676
700
|
hasEntryExitToneChanged,
|
|
701
|
+
hasBreakoutChanged,
|
|
702
|
+
hasVideoEnabledChanged,
|
|
703
|
+
hasMuteOnEntryChanged,
|
|
704
|
+
hasShareControlChanged,
|
|
705
|
+
hasDisallowUnmuteChanged,
|
|
706
|
+
hasReactionsChanged,
|
|
707
|
+
hasReactionDisplayNamesChanged,
|
|
708
|
+
hasViewTheParticipantListChanged,
|
|
709
|
+
hasRaiseHandChanged,
|
|
710
|
+
hasVideoChanged,
|
|
711
|
+
hasInterpretationChanged,
|
|
677
712
|
},
|
|
678
713
|
current,
|
|
679
714
|
} = ControlsUtils.getControls(this.controls, controls);
|
|
680
715
|
|
|
716
|
+
if (hasMuteOnEntryChanged) {
|
|
717
|
+
this.emitScoped(
|
|
718
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
719
|
+
LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED,
|
|
720
|
+
{state: current.muteOnEntry}
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
if (hasShareControlChanged) {
|
|
725
|
+
this.emitScoped(
|
|
726
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
727
|
+
LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED,
|
|
728
|
+
{state: current.shareControl}
|
|
729
|
+
);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
if (hasDisallowUnmuteChanged) {
|
|
733
|
+
this.emitScoped(
|
|
734
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
735
|
+
LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED,
|
|
736
|
+
{state: current.disallowUnmute}
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
if (hasReactionsChanged || hasReactionDisplayNamesChanged) {
|
|
741
|
+
this.emitScoped(
|
|
742
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
743
|
+
LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED,
|
|
744
|
+
{state: current.reactions}
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
if (hasViewTheParticipantListChanged) {
|
|
749
|
+
this.emitScoped(
|
|
750
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
751
|
+
LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED,
|
|
752
|
+
{state: current.viewTheParticipantList}
|
|
753
|
+
);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
if (hasRaiseHandChanged) {
|
|
757
|
+
this.emitScoped(
|
|
758
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
759
|
+
LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED,
|
|
760
|
+
{state: current.raiseHand}
|
|
761
|
+
);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
if (hasVideoChanged) {
|
|
765
|
+
this.emitScoped(
|
|
766
|
+
{file: 'locus-info', function: 'updateControls'},
|
|
767
|
+
LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED,
|
|
768
|
+
{state: current.video}
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
|
|
681
772
|
if (hasRecordingChanged || hasRecordingPausedChanged) {
|
|
682
773
|
let state = null;
|
|
683
774
|
|
|
@@ -737,9 +828,43 @@ export default class LocusInfo extends EventsScope {
|
|
|
737
828
|
);
|
|
738
829
|
}
|
|
739
830
|
|
|
831
|
+
if (hasBreakoutChanged) {
|
|
832
|
+
const {breakout} = current;
|
|
833
|
+
breakout.breakoutMoveId = SelfUtils.getReplacedBreakoutMoveId(
|
|
834
|
+
self,
|
|
835
|
+
this.webex.internal.device.url
|
|
836
|
+
);
|
|
837
|
+
this.emitScoped(
|
|
838
|
+
{
|
|
839
|
+
file: 'locus-info',
|
|
840
|
+
function: 'updateControls',
|
|
841
|
+
},
|
|
842
|
+
LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED,
|
|
843
|
+
{
|
|
844
|
+
breakout,
|
|
845
|
+
}
|
|
846
|
+
);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
if (hasInterpretationChanged) {
|
|
850
|
+
const {interpretation} = current;
|
|
851
|
+
this.emitScoped(
|
|
852
|
+
{
|
|
853
|
+
file: 'locus-info',
|
|
854
|
+
function: 'updateControls',
|
|
855
|
+
},
|
|
856
|
+
LOCUSINFO.EVENTS.CONTROLS_MEETING_INTERPRETATION_UPDATED,
|
|
857
|
+
{
|
|
858
|
+
interpretation,
|
|
859
|
+
}
|
|
860
|
+
);
|
|
861
|
+
}
|
|
862
|
+
|
|
740
863
|
if (hasEntryExitToneChanged) {
|
|
741
864
|
const {entryExitTone} = current;
|
|
742
865
|
|
|
866
|
+
this.updateMeeting({entryExitTone});
|
|
867
|
+
|
|
743
868
|
this.emitScoped(
|
|
744
869
|
{
|
|
745
870
|
file: 'locus-info',
|
|
@@ -750,8 +875,26 @@ export default class LocusInfo extends EventsScope {
|
|
|
750
875
|
entryExitTone,
|
|
751
876
|
}
|
|
752
877
|
);
|
|
878
|
+
}
|
|
753
879
|
|
|
754
|
-
|
|
880
|
+
// videoEnabled is handled differently than other controls,
|
|
881
|
+
// to fit with audio mute status logic
|
|
882
|
+
if (hasVideoEnabledChanged) {
|
|
883
|
+
const {videoEnabled} = current;
|
|
884
|
+
|
|
885
|
+
this.updateMeeting({unmuteVideoAllowed: videoEnabled});
|
|
886
|
+
|
|
887
|
+
this.emitScoped(
|
|
888
|
+
{
|
|
889
|
+
file: 'locus-info',
|
|
890
|
+
function: 'updateControls',
|
|
891
|
+
},
|
|
892
|
+
LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED,
|
|
893
|
+
{
|
|
894
|
+
// muted: not part of locus.controls
|
|
895
|
+
unmuteAllowed: videoEnabled,
|
|
896
|
+
}
|
|
897
|
+
);
|
|
755
898
|
}
|
|
756
899
|
|
|
757
900
|
this.controls = controls;
|
|
@@ -789,6 +932,27 @@ export default class LocusInfo extends EventsScope {
|
|
|
789
932
|
}
|
|
790
933
|
}
|
|
791
934
|
|
|
935
|
+
/**
|
|
936
|
+
* @param {Object} services
|
|
937
|
+
* @returns {undefined}
|
|
938
|
+
* @memberof LocusInfo
|
|
939
|
+
*/
|
|
940
|
+
updateServices(services: Record<'breakout' | 'record', {url: string}>) {
|
|
941
|
+
if (services && !isEqual(this.services, services)) {
|
|
942
|
+
this.services = services;
|
|
943
|
+
this.emitScoped(
|
|
944
|
+
{
|
|
945
|
+
file: 'locus-info',
|
|
946
|
+
function: 'updateServices',
|
|
947
|
+
},
|
|
948
|
+
LOCUSINFO.EVENTS.LINKS_SERVICES,
|
|
949
|
+
{
|
|
950
|
+
services,
|
|
951
|
+
}
|
|
952
|
+
);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
|
|
792
956
|
/**
|
|
793
957
|
* @param {Object} fullState
|
|
794
958
|
* @returns {undefined}
|
|
@@ -871,8 +1035,11 @@ export default class LocusInfo extends EventsScope {
|
|
|
871
1035
|
* @memberof LocusInfo
|
|
872
1036
|
*/
|
|
873
1037
|
updateMeetingInfo(info: object, self?: object) {
|
|
874
|
-
|
|
875
|
-
|
|
1038
|
+
const roles = self ? SelfUtils.getRoles(self) : this.parsedLocus.self?.roles || [];
|
|
1039
|
+
if (
|
|
1040
|
+
(info && !isEqual(this.info, info)) ||
|
|
1041
|
+
(roles.length && !isEqual(this.roles, roles) && info)
|
|
1042
|
+
) {
|
|
876
1043
|
const isJoined = SelfUtils.isJoined(self || this.parsedLocus.self);
|
|
877
1044
|
const parsedInfo = InfoUtils.getInfos(this.parsedLocus.info, info, roles, isJoined);
|
|
878
1045
|
|
|
@@ -911,6 +1078,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
911
1078
|
// Parses the info and adds necessary values
|
|
912
1079
|
this.updateMeeting(parsedInfo.current);
|
|
913
1080
|
}
|
|
1081
|
+
this.roles = roles;
|
|
914
1082
|
}
|
|
915
1083
|
|
|
916
1084
|
/**
|
|
@@ -951,6 +1119,8 @@ export default class LocusInfo extends EventsScope {
|
|
|
951
1119
|
const parsedMediaShares = MediaSharesUtils.getMediaShares(this.mediaShares, mediaShares);
|
|
952
1120
|
|
|
953
1121
|
this.updateMeeting(parsedMediaShares.current);
|
|
1122
|
+
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
1123
|
+
this.mediaShares = mediaShares;
|
|
954
1124
|
this.emitScoped(
|
|
955
1125
|
{
|
|
956
1126
|
file: 'locus-info',
|
|
@@ -962,8 +1132,6 @@ export default class LocusInfo extends EventsScope {
|
|
|
962
1132
|
previous: parsedMediaShares.previous,
|
|
963
1133
|
}
|
|
964
1134
|
);
|
|
965
|
-
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
966
|
-
this.mediaShares = mediaShares;
|
|
967
1135
|
}
|
|
968
1136
|
}
|
|
969
1137
|
|
|
@@ -1041,6 +1209,31 @@ export default class LocusInfo extends EventsScope {
|
|
|
1041
1209
|
);
|
|
1042
1210
|
}
|
|
1043
1211
|
|
|
1212
|
+
if (parsedSelves.updates.breakoutsChanged) {
|
|
1213
|
+
this.emitScoped(
|
|
1214
|
+
{
|
|
1215
|
+
file: 'locus-info',
|
|
1216
|
+
function: 'updateSelf',
|
|
1217
|
+
},
|
|
1218
|
+
LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED,
|
|
1219
|
+
{breakoutSessions: parsedSelves.current.breakoutSessions}
|
|
1220
|
+
);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
if (parsedSelves.updates.interpretationChanged) {
|
|
1224
|
+
this.emitScoped(
|
|
1225
|
+
{
|
|
1226
|
+
file: 'locus-info',
|
|
1227
|
+
function: 'updateSelf',
|
|
1228
|
+
},
|
|
1229
|
+
LOCUSINFO.EVENTS.SELF_MEETING_INTERPRETATION_CHANGED,
|
|
1230
|
+
{
|
|
1231
|
+
interpretation: parsedSelves.current.interpretation,
|
|
1232
|
+
selfParticipantId: parsedSelves.current.selfId,
|
|
1233
|
+
}
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1044
1237
|
if (parsedSelves.updates.isMediaInactiveOrReleased) {
|
|
1045
1238
|
this.emitScoped(
|
|
1046
1239
|
{
|
|
@@ -1062,6 +1255,31 @@ export default class LocusInfo extends EventsScope {
|
|
|
1062
1255
|
self
|
|
1063
1256
|
);
|
|
1064
1257
|
}
|
|
1258
|
+
|
|
1259
|
+
if (parsedSelves.updates.isRolesChanged) {
|
|
1260
|
+
this.emitScoped(
|
|
1261
|
+
{
|
|
1262
|
+
file: 'locus-info',
|
|
1263
|
+
function: 'updateSelf',
|
|
1264
|
+
},
|
|
1265
|
+
LOCUSINFO.EVENTS.SELF_ROLES_CHANGED,
|
|
1266
|
+
{oldRoles: parsedSelves.previous?.roles, newRoles: parsedSelves.current?.roles}
|
|
1267
|
+
);
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
if (parsedSelves.updates.isVideoMutedByOthersChanged) {
|
|
1271
|
+
this.emitScoped(
|
|
1272
|
+
{
|
|
1273
|
+
file: 'locus-info',
|
|
1274
|
+
function: 'updateSelf',
|
|
1275
|
+
},
|
|
1276
|
+
LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED,
|
|
1277
|
+
{
|
|
1278
|
+
muted: parsedSelves.current.remoteVideoMuted,
|
|
1279
|
+
// unmuteAllowed: not part of .self
|
|
1280
|
+
}
|
|
1281
|
+
);
|
|
1282
|
+
}
|
|
1065
1283
|
if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
|
|
1066
1284
|
this.emitScoped(
|
|
1067
1285
|
{
|
|
@@ -1276,4 +1494,104 @@ export default class LocusInfo extends EventsScope {
|
|
|
1276
1494
|
this.identities = identities;
|
|
1277
1495
|
}
|
|
1278
1496
|
}
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* check the locus is main session's one or not, if is main session's, update main session cache
|
|
1500
|
+
* @param {Object} locus
|
|
1501
|
+
* @returns {undefined}
|
|
1502
|
+
* @memberof LocusInfo
|
|
1503
|
+
*/
|
|
1504
|
+
updateLocusCache(locus: any) {
|
|
1505
|
+
const isMainSessionDTO = ControlsUtils.isMainSessionDTO(locus);
|
|
1506
|
+
if (isMainSessionDTO) {
|
|
1507
|
+
this.updateMainSessionLocusCache(locus);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* if return from breakout to main session, need to use cached main session DTO since locus won't send the full locus (participants)
|
|
1513
|
+
* if join breakout from main session, need to query main locus url (if response with 403 means no privilege, need to clear the cache)
|
|
1514
|
+
* @param {Object} newLocus
|
|
1515
|
+
* @returns {Object}
|
|
1516
|
+
* @memberof LocusInfo
|
|
1517
|
+
*/
|
|
1518
|
+
getTheLocusToUpdate(newLocus: any) {
|
|
1519
|
+
const switchStatus = ControlsUtils.getSessionSwitchStatus(this.controls, newLocus?.controls);
|
|
1520
|
+
if (switchStatus.isReturnToMain && this.mainSessionLocusCache) {
|
|
1521
|
+
return cloneDeep(this.mainSessionLocusCache);
|
|
1522
|
+
}
|
|
1523
|
+
if (switchStatus.isJoinToBreakout) {
|
|
1524
|
+
this.emitScoped(
|
|
1525
|
+
{
|
|
1526
|
+
file: 'locus-info',
|
|
1527
|
+
function: 'updateControls',
|
|
1528
|
+
},
|
|
1529
|
+
LOCUSINFO.EVENTS.CONTROLS_JOIN_BREAKOUT_FROM_MAIN,
|
|
1530
|
+
{
|
|
1531
|
+
mainLocusUrl: this.url,
|
|
1532
|
+
}
|
|
1533
|
+
);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
return newLocus;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* merge participants by participant id
|
|
1541
|
+
* @param {Array} participants
|
|
1542
|
+
* @param {Array} sourceParticipants
|
|
1543
|
+
* @returns {Array} merged participants
|
|
1544
|
+
* @memberof LocusInfo
|
|
1545
|
+
*/
|
|
1546
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1547
|
+
mergeParticipants(participants, sourceParticipants) {
|
|
1548
|
+
if (!sourceParticipants || !sourceParticipants.length) return participants;
|
|
1549
|
+
if (!participants || !participants.length) {
|
|
1550
|
+
return sourceParticipants;
|
|
1551
|
+
}
|
|
1552
|
+
sourceParticipants.forEach((participant) => {
|
|
1553
|
+
const existIndex = participants.findIndex((p) => p.id === participant.id);
|
|
1554
|
+
if (existIndex > -1) {
|
|
1555
|
+
participants.splice(existIndex, 1, participant);
|
|
1556
|
+
} else {
|
|
1557
|
+
participants.push(participant);
|
|
1558
|
+
}
|
|
1559
|
+
});
|
|
1560
|
+
|
|
1561
|
+
return participants;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
/**
|
|
1565
|
+
* need cache main sessions' participants since locus will not send the full list when cohost/host leave breakout
|
|
1566
|
+
* @param {Object} mainLocus
|
|
1567
|
+
* @returns {undefined}
|
|
1568
|
+
* @memberof LocusInfo
|
|
1569
|
+
*/
|
|
1570
|
+
updateMainSessionLocusCache(mainLocus: any) {
|
|
1571
|
+
if (!mainLocus) {
|
|
1572
|
+
return;
|
|
1573
|
+
}
|
|
1574
|
+
const locusClone = cloneDeep(mainLocus);
|
|
1575
|
+
if (this.mainSessionLocusCache) {
|
|
1576
|
+
// shallow merge and do special merge for participants
|
|
1577
|
+
assignWith(this.mainSessionLocusCache, locusClone, (objValue, srcValue, key) => {
|
|
1578
|
+
if (key === 'participants') {
|
|
1579
|
+
return this.mergeParticipants(objValue, srcValue);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
return srcValue || objValue;
|
|
1583
|
+
});
|
|
1584
|
+
} else {
|
|
1585
|
+
this.mainSessionLocusCache = locusClone;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* clear main session cache
|
|
1591
|
+
* @returns {undefined}
|
|
1592
|
+
* @memberof LocusInfo
|
|
1593
|
+
*/
|
|
1594
|
+
clearMainSessionLocusCache() {
|
|
1595
|
+
this.mainSessionLocusCache = null;
|
|
1596
|
+
}
|
|
1279
1597
|
}
|
|
@@ -13,6 +13,9 @@ MediaSharesUtils.parse = (mediaShares: object) => {
|
|
|
13
13
|
content: {
|
|
14
14
|
beneficiaryId: MediaSharesUtils.getContentBeneficiaryId(mediaShares),
|
|
15
15
|
disposition: MediaSharesUtils.getContentDisposition(mediaShares),
|
|
16
|
+
annotation: MediaSharesUtils.getContentAnnotation(mediaShares),
|
|
17
|
+
url: MediaSharesUtils.getContentUrl(mediaShares),
|
|
18
|
+
shareInstanceId: MediaSharesUtils.getShareInstanceId(mediaShares),
|
|
16
19
|
},
|
|
17
20
|
whiteboard: {
|
|
18
21
|
beneficiaryId: MediaSharesUtils.getWhiteboardBeneficiaryId(mediaShares),
|
|
@@ -140,6 +143,51 @@ MediaSharesUtils.getContentBeneficiaryId = (mediaShares: object) => {
|
|
|
140
143
|
return contentFloor.beneficiary.id;
|
|
141
144
|
};
|
|
142
145
|
|
|
146
|
+
/**
|
|
147
|
+
* get live annotation is sharing from media shares (content)
|
|
148
|
+
* @param {Object} mediaShares
|
|
149
|
+
* @returns {Object}
|
|
150
|
+
*/
|
|
151
|
+
MediaSharesUtils.getContentAnnotation = (mediaShares: object) => {
|
|
152
|
+
const extractContent = MediaSharesUtils.extractContent(mediaShares);
|
|
153
|
+
|
|
154
|
+
if (!extractContent || !extractContent.annotation) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return extractContent.annotation;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* get url is sharing from media shares (content)
|
|
163
|
+
* @param {Object} mediaShares
|
|
164
|
+
* @returns {Object}
|
|
165
|
+
*/
|
|
166
|
+
MediaSharesUtils.getContentUrl = (mediaShares: object) => {
|
|
167
|
+
const extractContent = MediaSharesUtils.extractContent(mediaShares);
|
|
168
|
+
|
|
169
|
+
if (!extractContent || !extractContent.url) {
|
|
170
|
+
return undefined;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return extractContent.url;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* get shareInstanceId is sharing from media shares (content)
|
|
178
|
+
* @param {Object} mediaShares
|
|
179
|
+
* @returns {Object}
|
|
180
|
+
*/
|
|
181
|
+
MediaSharesUtils.getShareInstanceId = (mediaShares: object) => {
|
|
182
|
+
const extractContent = MediaSharesUtils.extractContent(mediaShares);
|
|
183
|
+
|
|
184
|
+
if (!extractContent || !extractContent.floor || !extractContent.floor.shareInstanceId) {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return extractContent.floor.shareInstanceId;
|
|
189
|
+
};
|
|
190
|
+
|
|
143
191
|
/**
|
|
144
192
|
* get who is sharing from media shares (whiteboard)
|
|
145
193
|
* @param {Object} mediaShares
|
package/src/locus-info/parser.ts
CHANGED
|
@@ -397,6 +397,7 @@ export default class Parser {
|
|
|
397
397
|
const {isLoci} = Parser;
|
|
398
398
|
// @ts-ignore
|
|
399
399
|
const setStatus = (status) => {
|
|
400
|
+
// @ts-ignore
|
|
400
401
|
this.status = status;
|
|
401
402
|
};
|
|
402
403
|
|
|
@@ -477,7 +478,7 @@ export default class Parser {
|
|
|
477
478
|
* @param {Types~Locus} locus Locus delta
|
|
478
479
|
* @returns {undefined}
|
|
479
480
|
*/
|
|
480
|
-
// eslint-disable-next-line no-unused-vars
|
|
481
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
481
482
|
onDeltaAction(action: string, locus) {}
|
|
482
483
|
|
|
483
484
|
/**
|