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