@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/meeting/util.js
CHANGED
|
@@ -1,641 +1,502 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
4
|
-
|
|
5
4
|
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
6
|
-
|
|
7
5
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
8
|
-
|
|
9
6
|
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
10
|
-
|
|
11
7
|
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
12
|
-
|
|
13
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
14
|
-
|
|
15
9
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
16
|
-
|
|
17
10
|
_Object$defineProperty(exports, "__esModule", {
|
|
18
11
|
value: true
|
|
19
12
|
});
|
|
20
|
-
|
|
21
13
|
exports.default = void 0;
|
|
22
|
-
|
|
23
14
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
24
|
-
|
|
25
15
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
26
|
-
|
|
27
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
28
|
-
|
|
29
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
30
|
-
|
|
31
|
-
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
32
|
-
|
|
18
|
+
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
33
19
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
34
|
-
|
|
35
20
|
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
36
|
-
|
|
37
21
|
var _config = require("../metrics/config");
|
|
38
|
-
|
|
39
|
-
var _media = _interopRequireDefault(require("../media"));
|
|
40
|
-
|
|
41
22
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
42
|
-
|
|
43
23
|
var _constants = require("../constants");
|
|
44
|
-
|
|
45
24
|
var _intentToJoin = _interopRequireDefault(require("../common/errors/intent-to-join"));
|
|
46
|
-
|
|
47
25
|
var _joinMeeting = _interopRequireDefault(require("../common/errors/join-meeting"));
|
|
48
|
-
|
|
49
26
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
50
|
-
|
|
51
27
|
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
52
|
-
|
|
53
28
|
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
54
|
-
|
|
55
29
|
var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
|
|
56
|
-
|
|
57
30
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
58
|
-
|
|
59
31
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
32
|
+
var MeetingUtil = {
|
|
33
|
+
parseLocusJoin: function parseLocusJoin(response) {
|
|
34
|
+
var parsed = {};
|
|
35
|
+
|
|
36
|
+
// First todo: add check for existance
|
|
37
|
+
parsed.locus = response.body.locus;
|
|
38
|
+
parsed.mediaConnections = response.body.mediaConnections;
|
|
39
|
+
parsed.locusUrl = parsed.locus.url;
|
|
40
|
+
parsed.locusId = parsed.locus.url.split('/').pop();
|
|
41
|
+
parsed.selfId = parsed.locus.self.id;
|
|
42
|
+
|
|
43
|
+
// we need mediaId before making roap calls
|
|
44
|
+
parsed.mediaConnections.forEach(function (mediaConnection) {
|
|
45
|
+
if (mediaConnection.mediaId) {
|
|
46
|
+
parsed.mediaId = mediaConnection.mediaId;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return parsed;
|
|
50
|
+
},
|
|
51
|
+
remoteUpdateAudioVideo: function remoteUpdateAudioVideo(meeting, audioMuted, videoMuted) {
|
|
52
|
+
if (!meeting) {
|
|
53
|
+
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
54
|
+
}
|
|
55
|
+
if (!meeting.locusMediaRequest) {
|
|
56
|
+
return _promise.default.reject(new _parameter.default('You need a meeting with a media connection, call Meeting.addMedia() first.'));
|
|
75
57
|
}
|
|
76
|
-
});
|
|
77
|
-
return parsed;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
MeetingUtil.remoteUpdateAudioVideo = function (audioMuted, videoMuted, meeting) {
|
|
81
|
-
if (!meeting) {
|
|
82
|
-
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
var localMedias = _media.default.generateLocalMedias(meeting.mediaId, audioMuted, videoMuted);
|
|
86
|
-
|
|
87
|
-
if ((0, _isEmpty2.default)(localMedias)) {
|
|
88
|
-
return _promise.default.reject(new _parameter.default('You need a media id on the meeting to change remote audio.'));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
_metrics.default.postEvent({
|
|
92
|
-
event: _config.eventType.MEDIA_REQUEST,
|
|
93
|
-
meeting: meeting
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
return meeting.meetingRequest.remoteAudioVideoToggle({
|
|
97
|
-
locusUrl: meeting.locusUrl,
|
|
98
|
-
selfId: meeting.selfId,
|
|
99
|
-
localMedias: localMedias,
|
|
100
|
-
deviceUrl: meeting.deviceUrl,
|
|
101
|
-
correlationId: meeting.correlationId,
|
|
102
|
-
preferTranscoding: !meeting.isMultistream
|
|
103
|
-
}).then(function (response) {
|
|
104
58
|
_metrics.default.postEvent({
|
|
105
|
-
event: _config.eventType.
|
|
59
|
+
event: _config.eventType.MEDIA_REQUEST,
|
|
106
60
|
meeting: meeting
|
|
107
61
|
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
MeetingUtil.isOwnerSelf = function (owner, selfId) {
|
|
118
|
-
return owner === selfId;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
MeetingUtil.isPinOrGuest = function (err) {
|
|
122
|
-
var _err$body;
|
|
123
|
-
|
|
124
|
-
return (err === null || err === void 0 ? void 0 : (_err$body = err.body) === null || _err$body === void 0 ? void 0 : _err$body.errorCode) && _constants.INTENT_TO_JOIN.includes(err.body.errorCode);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
MeetingUtil.joinMeeting = function (meeting, options) {
|
|
128
|
-
if (!meeting) {
|
|
129
|
-
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
_metrics.default.postEvent({
|
|
133
|
-
event: _config.eventType.LOCUS_JOIN_REQUEST,
|
|
134
|
-
meeting: meeting
|
|
135
|
-
}); // eslint-disable-next-line no-warning-comments
|
|
136
|
-
// TODO: check if the meeting is in JOINING state
|
|
137
|
-
// if Joining state termintate the request as user might click multiple times
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return meeting.meetingRequest.joinMeeting({
|
|
141
|
-
inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,
|
|
142
|
-
meetingNumber: meeting.meetingNumber,
|
|
143
|
-
deviceUrl: meeting.deviceUrl,
|
|
144
|
-
locusUrl: meeting.locusUrl,
|
|
145
|
-
correlationId: meeting.correlationId,
|
|
146
|
-
roapMessage: options.roapMessage,
|
|
147
|
-
permissionToken: meeting.permissionToken,
|
|
148
|
-
resourceId: options.resourceId || null,
|
|
149
|
-
moderator: options.moderator,
|
|
150
|
-
pin: options.pin,
|
|
151
|
-
moveToResource: options.moveToResource,
|
|
152
|
-
preferTranscoding: !meeting.isMultistream,
|
|
153
|
-
asResourceOccupant: options.asResourceOccupant
|
|
154
|
-
}).then(function (res) {
|
|
155
|
-
_metrics.default.postEvent({
|
|
156
|
-
event: _config.eventType.LOCUS_JOIN_RESPONSE,
|
|
157
|
-
meeting: meeting,
|
|
158
|
-
data: {
|
|
159
|
-
trigger: _config.trigger.LOCI_UPDATE,
|
|
160
|
-
locus: res.body.locus,
|
|
161
|
-
mediaConnections: res.body.mediaConnections,
|
|
162
|
-
trackingId: res.headers.trackingid
|
|
62
|
+
return meeting.locusMediaRequest.send({
|
|
63
|
+
type: 'LocalMute',
|
|
64
|
+
selfUrl: meeting.selfUrl,
|
|
65
|
+
mediaId: meeting.mediaId,
|
|
66
|
+
sequence: meeting.locusInfo.sequence,
|
|
67
|
+
muteOptions: {
|
|
68
|
+
audioMuted: audioMuted,
|
|
69
|
+
videoMuted: videoMuted
|
|
163
70
|
}
|
|
71
|
+
}).then(function (response) {
|
|
72
|
+
var _response$body;
|
|
73
|
+
_metrics.default.postEvent({
|
|
74
|
+
event: _config.eventType.MEDIA_RESPONSE,
|
|
75
|
+
meeting: meeting
|
|
76
|
+
});
|
|
77
|
+
return response === null || response === void 0 ? void 0 : (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.locus;
|
|
164
78
|
});
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}).then(function () {
|
|
180
|
-
return meeting.closePeerConnections();
|
|
181
|
-
}).then(function () {
|
|
182
|
-
meeting.unsetLocalVideoTrack();
|
|
183
|
-
meeting.unsetLocalShareTrack();
|
|
184
|
-
meeting.unsetRemoteTracks();
|
|
185
|
-
meeting.unsetPeerConnections();
|
|
186
|
-
meeting.reconnectionManager.cleanUp();
|
|
187
|
-
}).then(function () {
|
|
188
|
-
return meeting.stopKeepAlive();
|
|
189
|
-
}).then(function () {
|
|
190
|
-
return meeting.updateLLMConnection();
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
MeetingUtil.disconnectPhoneAudio = function (meeting, phoneUrl) {
|
|
195
|
-
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
196
|
-
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
var options = {
|
|
200
|
-
locusUrl: meeting.locusUrl,
|
|
201
|
-
selfId: meeting.selfId,
|
|
202
|
-
correlationId: meeting.correlationId,
|
|
203
|
-
phoneUrl: phoneUrl
|
|
204
|
-
};
|
|
205
|
-
return meeting.meetingRequest.disconnectPhoneAudio(options).then(function (response) {
|
|
206
|
-
var _response$body;
|
|
207
|
-
|
|
208
|
-
if (response !== null && response !== void 0 && (_response$body = response.body) !== null && _response$body !== void 0 && _response$body.locus) {
|
|
209
|
-
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
79
|
+
},
|
|
80
|
+
hasOwner: function hasOwner(info) {
|
|
81
|
+
return info && info.owner;
|
|
82
|
+
},
|
|
83
|
+
isOwnerSelf: function isOwnerSelf(owner, selfId) {
|
|
84
|
+
return owner === selfId;
|
|
85
|
+
},
|
|
86
|
+
isPinOrGuest: function isPinOrGuest(err) {
|
|
87
|
+
var _err$body;
|
|
88
|
+
return (err === null || err === void 0 ? void 0 : (_err$body = err.body) === null || _err$body === void 0 ? void 0 : _err$body.errorCode) && _constants.INTENT_TO_JOIN.includes(err.body.errorCode);
|
|
89
|
+
},
|
|
90
|
+
joinMeeting: function joinMeeting(meeting, options) {
|
|
91
|
+
if (!meeting) {
|
|
92
|
+
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
210
93
|
}
|
|
211
|
-
}).catch(function (err) {
|
|
212
|
-
_loggerProxy.default.logger.error("Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ".concat(meeting.id, ", error: ").concat(err));
|
|
213
|
-
|
|
214
|
-
return _promise.default.reject(err);
|
|
215
|
-
});
|
|
216
|
-
}; // by default will leave on meeting's resourceId
|
|
217
|
-
// if you explicity want it not to leave on resource id, pass
|
|
218
|
-
// {resourceId: null}
|
|
219
|
-
// TODO: chris, you can modify this however you want
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
MeetingUtil.leaveMeeting = function (meeting) {
|
|
223
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
224
|
-
|
|
225
|
-
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
226
|
-
// TODO: clean up if the meeting is already inactive
|
|
227
|
-
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
231
|
-
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
var defaultOptions = {
|
|
235
|
-
locusUrl: meeting.locusUrl,
|
|
236
|
-
selfId: meeting.selfId,
|
|
237
|
-
correlationId: meeting.correlationId,
|
|
238
|
-
resourceId: meeting.resourceId,
|
|
239
|
-
deviceUrl: meeting.deviceUrl
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
var leaveOptions = _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
243
|
-
|
|
244
|
-
return meeting.meetingRequest.leaveMeeting(leaveOptions).then(function (response) {
|
|
245
|
-
if (response && response.body && response.body.locus) {
|
|
246
|
-
// && !options.moveMeeting) {
|
|
247
|
-
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
return _promise.default.resolve();
|
|
251
|
-
}).then(function () {
|
|
252
|
-
if (options.moveMeeting) {
|
|
253
|
-
return _promise.default.resolve();
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
return MeetingUtil.cleanUp(meeting);
|
|
257
|
-
}).catch(function (err) {
|
|
258
|
-
// TODO: If the meeting state comes as LEFT or INACTIVE as response then
|
|
259
|
-
// 1) on leave clean up the meeting or simply do a sync on the meeting
|
|
260
|
-
// 2) If the error says meeting is inactive then destroy the meeting object
|
|
261
|
-
_loggerProxy.default.logger.error("Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ".concat(meeting.id, ", error: ").concat(err));
|
|
262
|
-
|
|
263
|
-
return _promise.default.reject(err);
|
|
264
|
-
});
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
MeetingUtil.declineMeeting = function (meeting, reason) {
|
|
268
|
-
return meeting.meetingRequest.declineMeeting({
|
|
269
|
-
locusUrl: meeting.locusUrl,
|
|
270
|
-
deviceUrl: meeting.deviceUrl,
|
|
271
|
-
reason: reason
|
|
272
|
-
});
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
MeetingUtil.isUserInLeftState = function (locusInfo) {
|
|
276
|
-
var _locusInfo$parsedLocu, _locusInfo$parsedLocu2;
|
|
277
|
-
|
|
278
|
-
return ((_locusInfo$parsedLocu = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu === void 0 ? void 0 : (_locusInfo$parsedLocu2 = _locusInfo$parsedLocu.self) === null || _locusInfo$parsedLocu2 === void 0 ? void 0 : _locusInfo$parsedLocu2.state) === _constants._LEFT_;
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
MeetingUtil.isUserInIdleState = function (locusInfo) {
|
|
282
|
-
var _locusInfo$parsedLocu3, _locusInfo$parsedLocu4;
|
|
283
|
-
|
|
284
|
-
return ((_locusInfo$parsedLocu3 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu3 === void 0 ? void 0 : (_locusInfo$parsedLocu4 = _locusInfo$parsedLocu3.self) === null || _locusInfo$parsedLocu4 === void 0 ? void 0 : _locusInfo$parsedLocu4.state) === _constants._IDLE_;
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
MeetingUtil.isUserInJoinedState = function (locusInfo) {
|
|
288
|
-
var _locusInfo$parsedLocu5, _locusInfo$parsedLocu6;
|
|
289
|
-
|
|
290
|
-
return ((_locusInfo$parsedLocu5 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu5 === void 0 ? void 0 : (_locusInfo$parsedLocu6 = _locusInfo$parsedLocu5.self) === null || _locusInfo$parsedLocu6 === void 0 ? void 0 : _locusInfo$parsedLocu6.state) === _constants._JOINED_;
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
MeetingUtil.isMediaEstablished = function (currentMediaStatus) {
|
|
294
|
-
return currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
MeetingUtil.joinMeetingOptions = function (meeting) {
|
|
298
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
299
|
-
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
300
|
-
|
|
301
|
-
if (meeting.requiredCaptcha) {
|
|
302
|
-
return _promise.default.reject(new _captchaError.default());
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if (meeting.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED) {
|
|
306
|
-
return _promise.default.reject(new _passwordError.default());
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
if (options.pin) {
|
|
310
94
|
_metrics.default.postEvent({
|
|
311
|
-
event: _config.eventType.
|
|
95
|
+
event: _config.eventType.LOCUS_JOIN_REQUEST,
|
|
312
96
|
meeting: meeting
|
|
313
97
|
});
|
|
314
|
-
} // normal join meeting, scenario A, D
|
|
315
|
-
|
|
316
98
|
|
|
317
|
-
|
|
318
|
-
meeting
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
99
|
+
// eslint-disable-next-line no-warning-comments
|
|
100
|
+
// TODO: check if the meeting is in JOINING state
|
|
101
|
+
// if Joining state termintate the request as user might click multiple times
|
|
102
|
+
return meeting.meetingRequest.joinMeeting({
|
|
103
|
+
inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,
|
|
104
|
+
meetingNumber: meeting.meetingNumber,
|
|
105
|
+
deviceUrl: meeting.deviceUrl,
|
|
106
|
+
locusUrl: meeting.locusUrl,
|
|
107
|
+
correlationId: meeting.correlationId,
|
|
108
|
+
roapMessage: options.roapMessage,
|
|
109
|
+
permissionToken: meeting.permissionToken,
|
|
110
|
+
resourceId: options.resourceId || null,
|
|
111
|
+
moderator: options.moderator,
|
|
112
|
+
pin: options.pin,
|
|
113
|
+
moveToResource: options.moveToResource,
|
|
114
|
+
preferTranscoding: !meeting.isMultistream,
|
|
115
|
+
asResourceOccupant: options.asResourceOccupant,
|
|
116
|
+
breakoutsSupported: options.breakoutsSupported,
|
|
117
|
+
locale: options.locale,
|
|
118
|
+
deviceCapabilities: options.deviceCapabilities,
|
|
119
|
+
liveAnnotationSupported: options.liveAnnotationSupported
|
|
120
|
+
}).then(function (res) {
|
|
323
121
|
_metrics.default.postEvent({
|
|
324
|
-
event: _config.eventType.
|
|
325
|
-
meeting: meeting
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
122
|
+
event: _config.eventType.LOCUS_JOIN_RESPONSE,
|
|
123
|
+
meeting: meeting,
|
|
124
|
+
data: {
|
|
125
|
+
trigger: _config.trigger.LOCI_UPDATE,
|
|
126
|
+
locus: res.body.locus,
|
|
127
|
+
mediaConnections: res.body.mediaConnections,
|
|
128
|
+
trackingId: res.headers.trackingid
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
return MeetingUtil.parseLocusJoin(res);
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
cleanUp: function cleanUp(meeting) {
|
|
135
|
+
meeting.breakouts.cleanUp();
|
|
136
|
+
|
|
137
|
+
// make sure we send last metrics before we close the peerconnection
|
|
138
|
+
var stopStatsAnalyzer = meeting.statsAnalyzer ? meeting.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
139
|
+
return stopStatsAnalyzer.then(function () {
|
|
140
|
+
return meeting.closeRemoteTracks();
|
|
141
|
+
}).then(function () {
|
|
142
|
+
return meeting.closePeerConnections();
|
|
143
|
+
}).then(function () {
|
|
144
|
+
meeting.cleanupLocalTracks();
|
|
145
|
+
meeting.unsetRemoteTracks();
|
|
146
|
+
meeting.unsetPeerConnections();
|
|
147
|
+
meeting.reconnectionManager.cleanUp();
|
|
148
|
+
}).then(function () {
|
|
149
|
+
return meeting.stopKeepAlive();
|
|
150
|
+
}).then(function () {
|
|
151
|
+
return meeting.updateLLMConnection();
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
disconnectPhoneAudio: function disconnectPhoneAudio(meeting, phoneUrl) {
|
|
155
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
156
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
331
157
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
MeetingUtil.validateOptions = function (options) {
|
|
340
|
-
var sendVideo = options.sendVideo,
|
|
341
|
-
sendAudio = options.sendAudio,
|
|
342
|
-
sendShare = options.sendShare,
|
|
343
|
-
localStream = options.localStream,
|
|
344
|
-
localShare = options.localShare;
|
|
345
|
-
|
|
346
|
-
if (sendVideo && !MeetingUtil.getTrack(localStream).videoTrack) {
|
|
347
|
-
return _promise.default.reject(new _parameter.default('please pass valid video streams'));
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
if (sendAudio && !MeetingUtil.getTrack(localStream).audioTrack) {
|
|
351
|
-
return _promise.default.reject(new _parameter.default('please pass valid audio streams'));
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
if (sendShare && !MeetingUtil.getTrack(localShare).videoTrack) {
|
|
355
|
-
return _promise.default.reject(new _parameter.default('please pass valid share streams'));
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
return _promise.default.resolve();
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
MeetingUtil.getTrack = function (stream) {
|
|
362
|
-
var audioTrack = null;
|
|
363
|
-
var videoTrack = null;
|
|
364
|
-
var audioTracks = null;
|
|
365
|
-
var videoTracks = null;
|
|
366
|
-
|
|
367
|
-
if (!stream) {
|
|
368
|
-
return {
|
|
369
|
-
audioTrack: null,
|
|
370
|
-
videoTrack: null
|
|
158
|
+
var options = {
|
|
159
|
+
locusUrl: meeting.locusUrl,
|
|
160
|
+
selfId: meeting.selfId,
|
|
161
|
+
correlationId: meeting.correlationId,
|
|
162
|
+
phoneUrl: phoneUrl
|
|
371
163
|
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
audioTracks = stream.getAudioTracks();
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
if (stream.getVideoTracks) {
|
|
379
|
-
videoTracks = stream.getVideoTracks();
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
if (audioTracks && audioTracks.length > 0) {
|
|
383
|
-
var _audioTracks = audioTracks;
|
|
384
|
-
|
|
385
|
-
var _audioTracks2 = (0, _slicedToArray2.default)(_audioTracks, 1);
|
|
386
|
-
|
|
387
|
-
audioTrack = _audioTracks2[0];
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
if (videoTracks && videoTracks.length > 0) {
|
|
391
|
-
var _videoTracks = videoTracks;
|
|
392
|
-
|
|
393
|
-
var _videoTracks2 = (0, _slicedToArray2.default)(_videoTracks, 1);
|
|
394
|
-
|
|
395
|
-
videoTrack = _videoTracks2[0];
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
return {
|
|
399
|
-
audioTrack: audioTrack,
|
|
400
|
-
videoTrack: videoTrack
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
MeetingUtil.getModeratorFromLocusInfo = function (locusInfo) {
|
|
405
|
-
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.moderator;
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
MeetingUtil.getPolicyFromLocusInfo = function (locusInfo) {
|
|
409
|
-
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.policy;
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
MeetingUtil.getUserDisplayHintsFromLocusInfo = function (locusInfo) {
|
|
413
|
-
var _locusInfo$parsedLocu7, _locusInfo$parsedLocu8;
|
|
414
|
-
|
|
415
|
-
return (locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$parsedLocu7 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu7 === void 0 ? void 0 : (_locusInfo$parsedLocu8 = _locusInfo$parsedLocu7.info) === null || _locusInfo$parsedLocu8 === void 0 ? void 0 : _locusInfo$parsedLocu8.userDisplayHints) || [];
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
MeetingUtil.canInviteNewParticipants = function (displayHints) {
|
|
419
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.ADD_GUEST);
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
MeetingUtil.canAdmitParticipant = function (displayHints) {
|
|
423
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
MeetingUtil.canUserLock = function (displayHints) {
|
|
427
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_LOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
MeetingUtil.canUserUnlock = function (displayHints) {
|
|
431
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_LOCKED);
|
|
432
|
-
};
|
|
433
|
-
|
|
434
|
-
MeetingUtil.canUserRecord = function (displayHints) {
|
|
435
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_START);
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
MeetingUtil.canUserPause = function (displayHints) {
|
|
439
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_PAUSE);
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
MeetingUtil.canUserResume = function (displayHints) {
|
|
443
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_RESUME);
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
MeetingUtil.canUserStop = function (displayHints) {
|
|
447
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_STOP);
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
MeetingUtil.startRecording = function (request, locusUrl, locusInfo) {
|
|
451
|
-
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
452
|
-
|
|
453
|
-
if (MeetingUtil.canUserRecord(displayHints)) {
|
|
454
|
-
return request.recordMeeting({
|
|
455
|
-
locusUrl: locusUrl,
|
|
456
|
-
recording: true,
|
|
457
|
-
paused: false
|
|
164
|
+
return meeting.meetingRequest.disconnectPhoneAudio(options).catch(function (err) {
|
|
165
|
+
_loggerProxy.default.logger.error("Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ".concat(meeting.id, ", error: ").concat(err));
|
|
166
|
+
return _promise.default.reject(err);
|
|
458
167
|
});
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
168
|
+
},
|
|
169
|
+
// by default will leave on meeting's resourceId
|
|
170
|
+
// if you explicity want it not to leave on resource id, pass
|
|
171
|
+
// {resourceId: null}
|
|
172
|
+
// TODO: chris, you can modify this however you want
|
|
173
|
+
leaveMeeting: function leaveMeeting(meeting) {
|
|
174
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
175
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
176
|
+
// TODO: clean up if the meeting is already inactive
|
|
177
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
178
|
+
}
|
|
179
|
+
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
180
|
+
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
181
|
+
}
|
|
182
|
+
var defaultOptions = {
|
|
183
|
+
locusUrl: meeting.locusUrl,
|
|
184
|
+
selfId: meeting.selfId,
|
|
185
|
+
correlationId: meeting.correlationId,
|
|
186
|
+
resourceId: meeting.resourceId,
|
|
187
|
+
deviceUrl: meeting.deviceUrl
|
|
188
|
+
};
|
|
189
|
+
var leaveOptions = _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
190
|
+
return meeting.meetingRequest.leaveMeeting(leaveOptions).then(function () {
|
|
191
|
+
if (options.moveMeeting) {
|
|
192
|
+
return _promise.default.resolve();
|
|
193
|
+
}
|
|
194
|
+
return MeetingUtil.cleanUp(meeting);
|
|
195
|
+
}).catch(function (err) {
|
|
196
|
+
// TODO: If the meeting state comes as LEFT or INACTIVE as response then
|
|
197
|
+
// 1) on leave clean up the meeting or simply do a sync on the meeting
|
|
198
|
+
// 2) If the error says meeting is inactive then destroy the meeting object
|
|
199
|
+
_loggerProxy.default.logger.error("Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ".concat(meeting.id, ", error: ").concat(err));
|
|
200
|
+
return _promise.default.reject(err);
|
|
472
201
|
});
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
480
|
-
|
|
481
|
-
if (MeetingUtil.canUserResume(displayHints)) {
|
|
482
|
-
return request.recordMeeting({
|
|
483
|
-
locusUrl: locusUrl,
|
|
484
|
-
recording: true,
|
|
485
|
-
paused: false
|
|
202
|
+
},
|
|
203
|
+
declineMeeting: function declineMeeting(meeting, reason) {
|
|
204
|
+
return meeting.meetingRequest.declineMeeting({
|
|
205
|
+
locusUrl: meeting.locusUrl,
|
|
206
|
+
deviceUrl: meeting.deviceUrl,
|
|
207
|
+
reason: reason
|
|
486
208
|
});
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
209
|
+
},
|
|
210
|
+
isUserInLeftState: function isUserInLeftState(locusInfo) {
|
|
211
|
+
var _locusInfo$parsedLocu, _locusInfo$parsedLocu2;
|
|
212
|
+
return ((_locusInfo$parsedLocu = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu === void 0 ? void 0 : (_locusInfo$parsedLocu2 = _locusInfo$parsedLocu.self) === null || _locusInfo$parsedLocu2 === void 0 ? void 0 : _locusInfo$parsedLocu2.state) === _constants._LEFT_;
|
|
213
|
+
},
|
|
214
|
+
isUserInIdleState: function isUserInIdleState(locusInfo) {
|
|
215
|
+
var _locusInfo$parsedLocu3, _locusInfo$parsedLocu4;
|
|
216
|
+
return ((_locusInfo$parsedLocu3 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu3 === void 0 ? void 0 : (_locusInfo$parsedLocu4 = _locusInfo$parsedLocu3.self) === null || _locusInfo$parsedLocu4 === void 0 ? void 0 : _locusInfo$parsedLocu4.state) === _constants._IDLE_;
|
|
217
|
+
},
|
|
218
|
+
isUserInJoinedState: function isUserInJoinedState(locusInfo) {
|
|
219
|
+
var _locusInfo$parsedLocu5, _locusInfo$parsedLocu6;
|
|
220
|
+
return ((_locusInfo$parsedLocu5 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu5 === void 0 ? void 0 : (_locusInfo$parsedLocu6 = _locusInfo$parsedLocu5.self) === null || _locusInfo$parsedLocu6 === void 0 ? void 0 : _locusInfo$parsedLocu6.state) === _constants._JOINED_;
|
|
221
|
+
},
|
|
222
|
+
isMediaEstablished: function isMediaEstablished(currentMediaStatus) {
|
|
223
|
+
return currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
|
|
224
|
+
},
|
|
225
|
+
joinMeetingOptions: function joinMeetingOptions(meeting) {
|
|
226
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
227
|
+
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
228
|
+
if (meeting.requiredCaptcha) {
|
|
229
|
+
return _promise.default.reject(new _captchaError.default());
|
|
230
|
+
}
|
|
231
|
+
if (meeting.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED) {
|
|
232
|
+
return _promise.default.reject(new _passwordError.default());
|
|
233
|
+
}
|
|
234
|
+
if (options.pin) {
|
|
235
|
+
_metrics.default.postEvent({
|
|
236
|
+
event: _config.eventType.PIN_COLLECTED,
|
|
237
|
+
meeting: meeting
|
|
238
|
+
});
|
|
239
|
+
}
|
|
494
240
|
|
|
495
|
-
|
|
496
|
-
return
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
241
|
+
// normal join meeting, scenario A, D
|
|
242
|
+
return MeetingUtil.joinMeeting(meeting, options).then(function (response) {
|
|
243
|
+
meeting.setLocus(response);
|
|
244
|
+
return _promise.default.resolve(response);
|
|
245
|
+
}).catch(function (err) {
|
|
246
|
+
// joining a claimed PMR that is not my own, scenario B
|
|
247
|
+
if (MeetingUtil.isPinOrGuest(err)) {
|
|
248
|
+
_metrics.default.postEvent({
|
|
249
|
+
event: _config.eventType.PIN_PROMPT,
|
|
250
|
+
meeting: meeting
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// request host pin or non host for unclaimed PMR, start of Scenario C
|
|
254
|
+
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
255
|
+
return _promise.default.reject(new _intentToJoin.default('Error Joining Meeting', err));
|
|
256
|
+
}
|
|
257
|
+
_loggerProxy.default.logger.error('Meeting:util#joinMeetingOptions --> Error joining the call, ', err);
|
|
258
|
+
return _promise.default.reject(new _joinMeeting.default(options, 'Error Joining Meeting', err));
|
|
500
259
|
});
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
260
|
+
},
|
|
261
|
+
getTrack: function getTrack(stream) {
|
|
262
|
+
var audioTrack = null;
|
|
263
|
+
var videoTrack = null;
|
|
264
|
+
var audioTracks = null;
|
|
265
|
+
var videoTracks = null;
|
|
266
|
+
if (!stream) {
|
|
267
|
+
return {
|
|
268
|
+
audioTrack: null,
|
|
269
|
+
videoTrack: null
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
if (stream.getAudioTracks) {
|
|
273
|
+
audioTracks = stream.getAudioTracks();
|
|
274
|
+
}
|
|
275
|
+
if (stream.getVideoTracks) {
|
|
276
|
+
videoTracks = stream.getVideoTracks();
|
|
277
|
+
}
|
|
278
|
+
if (audioTracks && audioTracks.length > 0) {
|
|
279
|
+
var _audioTracks = audioTracks;
|
|
280
|
+
var _audioTracks2 = (0, _slicedToArray2.default)(_audioTracks, 1);
|
|
281
|
+
audioTrack = _audioTracks2[0];
|
|
282
|
+
}
|
|
283
|
+
if (videoTracks && videoTracks.length > 0) {
|
|
284
|
+
var _videoTracks = videoTracks;
|
|
285
|
+
var _videoTracks2 = (0, _slicedToArray2.default)(_videoTracks, 1);
|
|
286
|
+
videoTrack = _videoTracks2[0];
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
audioTrack: audioTrack,
|
|
290
|
+
videoTrack: videoTrack
|
|
291
|
+
};
|
|
292
|
+
},
|
|
293
|
+
getModeratorFromLocusInfo: function getModeratorFromLocusInfo(locusInfo) {
|
|
294
|
+
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.moderator;
|
|
295
|
+
},
|
|
296
|
+
getPolicyFromLocusInfo: function getPolicyFromLocusInfo(locusInfo) {
|
|
297
|
+
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.policy;
|
|
298
|
+
},
|
|
299
|
+
getUserDisplayHintsFromLocusInfo: function getUserDisplayHintsFromLocusInfo(locusInfo) {
|
|
300
|
+
var _locusInfo$parsedLocu7, _locusInfo$parsedLocu8;
|
|
301
|
+
return (locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$parsedLocu7 = locusInfo.parsedLocus) === null || _locusInfo$parsedLocu7 === void 0 ? void 0 : (_locusInfo$parsedLocu8 = _locusInfo$parsedLocu7.info) === null || _locusInfo$parsedLocu8 === void 0 ? void 0 : _locusInfo$parsedLocu8.userDisplayHints) || [];
|
|
302
|
+
},
|
|
303
|
+
canInviteNewParticipants: function canInviteNewParticipants(displayHints) {
|
|
304
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ADD_GUEST);
|
|
305
|
+
},
|
|
306
|
+
canAdmitParticipant: function canAdmitParticipant(displayHints) {
|
|
307
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);
|
|
308
|
+
},
|
|
309
|
+
canUserLock: function canUserLock(displayHints) {
|
|
310
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_LOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);
|
|
311
|
+
},
|
|
312
|
+
canUserUnlock: function canUserUnlock(displayHints) {
|
|
313
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_LOCKED);
|
|
314
|
+
},
|
|
315
|
+
canUserRaiseHand: function canUserRaiseHand(displayHints) {
|
|
316
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.RAISE_HAND);
|
|
317
|
+
},
|
|
318
|
+
canUserLowerAllHands: function canUserLowerAllHands(displayHints) {
|
|
319
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_ALL_HANDS);
|
|
320
|
+
},
|
|
321
|
+
canUserLowerSomeoneElsesHand: function canUserLowerSomeoneElsesHand(displayHints) {
|
|
322
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND);
|
|
323
|
+
},
|
|
324
|
+
bothLeaveAndEndMeetingAvailable: function bothLeaveAndEndMeetingAvailable(displayHints) {
|
|
325
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) || displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_END_MEETING);
|
|
326
|
+
},
|
|
327
|
+
canManageBreakout: function canManageBreakout(displayHints) {
|
|
328
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.BREAKOUT_MANAGEMENT);
|
|
329
|
+
},
|
|
330
|
+
canBroadcastMessageToBreakout: function canBroadcastMessageToBreakout(displayHints) {
|
|
331
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.BROADCAST_MESSAGE_TO_BREAKOUT);
|
|
332
|
+
},
|
|
333
|
+
isSuppressBreakoutSupport: function isSuppressBreakoutSupport(displayHints) {
|
|
334
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT);
|
|
335
|
+
},
|
|
336
|
+
canAdmitLobbyToBreakout: function canAdmitLobbyToBreakout(displayHints) {
|
|
337
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT);
|
|
338
|
+
},
|
|
339
|
+
isBreakoutPreassignmentsEnabled: function isBreakoutPreassignmentsEnabled(displayHints) {
|
|
340
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS);
|
|
341
|
+
},
|
|
342
|
+
canUserAskForHelp: function canUserAskForHelp(displayHints) {
|
|
343
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_ASK_FOR_HELP);
|
|
344
|
+
},
|
|
345
|
+
lockMeeting: function lockMeeting(actions, request, locusUrl) {
|
|
346
|
+
if (actions && actions.canLock) {
|
|
347
|
+
return request.lockMeeting({
|
|
348
|
+
locusUrl: locusUrl,
|
|
349
|
+
lock: true
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
return _promise.default.reject(new _permission.default('Lock not allowed, due to joined property.'));
|
|
353
|
+
},
|
|
354
|
+
unlockMeeting: function unlockMeeting(actions, request, locusUrl) {
|
|
355
|
+
if (actions && actions.canUnlock) {
|
|
356
|
+
return request.lockMeeting({
|
|
357
|
+
locusUrl: locusUrl,
|
|
358
|
+
lock: false
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
return _promise.default.reject(new _permission.default('Unlock not allowed, due to joined property.'));
|
|
362
|
+
},
|
|
363
|
+
handleAudioLogging: function handleAudioLogging(audioTrack) {
|
|
364
|
+
var LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';
|
|
365
|
+
if (audioTrack) {
|
|
366
|
+
var settings = audioTrack.underlyingTrack.getSettings();
|
|
367
|
+
var deviceId = settings.deviceId;
|
|
368
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
369
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
handleVideoLogging: function handleVideoLogging(videoTrack) {
|
|
373
|
+
var LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';
|
|
374
|
+
if (videoTrack) {
|
|
375
|
+
var settings = videoTrack.underlyingTrack.getSettings();
|
|
376
|
+
var deviceId = settings.deviceId;
|
|
377
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
378
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
handleDeviceLogging: function handleDeviceLogging() {
|
|
382
|
+
var devices = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
383
|
+
var LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';
|
|
384
|
+
devices.forEach(function (device) {
|
|
385
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(device.deviceId));
|
|
386
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings', (0, _stringify.default)(device));
|
|
527
387
|
});
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
388
|
+
},
|
|
389
|
+
endMeetingForAll: function endMeetingForAll(meeting) {
|
|
390
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
391
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
392
|
+
}
|
|
393
|
+
var endOptions = {
|
|
394
|
+
locusUrl: meeting.locusUrl
|
|
395
|
+
};
|
|
396
|
+
return meeting.meetingRequest.endMeetingForAll(endOptions).then(function () {
|
|
397
|
+
return MeetingUtil.cleanUp(meeting);
|
|
398
|
+
}).catch(function (err) {
|
|
399
|
+
_loggerProxy.default.logger.error("Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ".concat(meeting.id, ", error: ").concat(err));
|
|
400
|
+
return _promise.default.reject(err);
|
|
538
401
|
});
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
devices.forEach(function (device) {
|
|
574
|
-
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(device.deviceId));
|
|
575
|
-
|
|
576
|
-
_loggerProxy.default.logger.log(LOG_HEADER, 'settings', (0, _stringify.default)(device));
|
|
577
|
-
});
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
MeetingUtil.endMeetingForAll = function (meeting) {
|
|
581
|
-
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
582
|
-
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
var endOptions = {
|
|
586
|
-
locusUrl: meeting.locusUrl
|
|
587
|
-
};
|
|
588
|
-
return meeting.meetingRequest.endMeetingForAll(endOptions).then(function (response) {
|
|
589
|
-
if (response && response.body && response.body.locus) {
|
|
590
|
-
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
402
|
+
},
|
|
403
|
+
canEnableClosedCaption: function canEnableClosedCaption(displayHints) {
|
|
404
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_START);
|
|
405
|
+
},
|
|
406
|
+
isSaveTranscriptsEnabled: function isSaveTranscriptsEnabled(displayHints) {
|
|
407
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED);
|
|
408
|
+
},
|
|
409
|
+
canStartTranscribing: function canStartTranscribing(displayHints) {
|
|
410
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START);
|
|
411
|
+
},
|
|
412
|
+
canStopTranscribing: function canStopTranscribing(displayHints) {
|
|
413
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);
|
|
414
|
+
},
|
|
415
|
+
isClosedCaptionActive: function isClosedCaptionActive(displayHints) {
|
|
416
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_STATUS_ACTIVE);
|
|
417
|
+
},
|
|
418
|
+
isWebexAssistantActive: function isWebexAssistantActive(displayHints) {
|
|
419
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE);
|
|
420
|
+
},
|
|
421
|
+
canViewCaptionPanel: function canViewCaptionPanel(displayHints) {
|
|
422
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ENABLE_CAPTION_PANEL);
|
|
423
|
+
},
|
|
424
|
+
isRealTimeTranslationEnabled: function isRealTimeTranslationEnabled(displayHints) {
|
|
425
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION);
|
|
426
|
+
},
|
|
427
|
+
canSelectSpokenLanguages: function canSelectSpokenLanguages(displayHints) {
|
|
428
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR);
|
|
429
|
+
},
|
|
430
|
+
waitingForOthersToJoin: function waitingForOthersToJoin(displayHints) {
|
|
431
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.WAITING_FOR_OTHERS);
|
|
432
|
+
},
|
|
433
|
+
canSendReactions: function canSendReactions(originalValue, displayHints) {
|
|
434
|
+
if (displayHints.includes(_constants.DISPLAY_HINTS.REACTIONS_ACTIVE)) {
|
|
435
|
+
return true;
|
|
591
436
|
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
return
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
437
|
+
if (displayHints.includes(_constants.DISPLAY_HINTS.REACTIONS_INACTIVE)) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
return originalValue;
|
|
441
|
+
},
|
|
442
|
+
canUserRenameSelfAndObserved: function canUserRenameSelfAndObserved(displayHints) {
|
|
443
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED);
|
|
444
|
+
},
|
|
445
|
+
canUserRenameOthers: function canUserRenameOthers(displayHints) {
|
|
446
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_OTHERS);
|
|
447
|
+
},
|
|
448
|
+
/**
|
|
449
|
+
* Adds the current locus sequence information to a request body
|
|
450
|
+
* @param {Object} meeting The meeting object
|
|
451
|
+
* @param {Object} requestBody The body of a request to locus
|
|
452
|
+
* @returns {void}
|
|
453
|
+
*/
|
|
454
|
+
addSequence: function addSequence(meeting, requestBody) {
|
|
455
|
+
var _meeting$locusInfo;
|
|
456
|
+
var sequence = meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.sequence;
|
|
457
|
+
if (!sequence) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
requestBody.sequence = sequence;
|
|
461
|
+
},
|
|
462
|
+
/**
|
|
463
|
+
* Updates the locus info for the meeting with the delta locus
|
|
464
|
+
* returned from requests that include the sequence information
|
|
465
|
+
* Returns the original response object
|
|
466
|
+
* @param {Object} meeting The meeting object
|
|
467
|
+
* @param {Object} response The response of the http request
|
|
468
|
+
* @returns {Object}
|
|
469
|
+
*/
|
|
470
|
+
updateLocusWithDelta: function updateLocusWithDelta(meeting, response) {
|
|
471
|
+
var _response$body2;
|
|
472
|
+
if (!meeting) {
|
|
473
|
+
return response;
|
|
474
|
+
}
|
|
475
|
+
var locus = response === null || response === void 0 ? void 0 : (_response$body2 = response.body) === null || _response$body2 === void 0 ? void 0 : _response$body2.locus;
|
|
476
|
+
if (locus) {
|
|
477
|
+
meeting.locusInfo.onDeltaLocus(locus);
|
|
478
|
+
}
|
|
479
|
+
return response;
|
|
480
|
+
},
|
|
481
|
+
generateLocusDeltaRequest: function generateLocusDeltaRequest(originalMeeting) {
|
|
482
|
+
var meetingRef = new WeakRef(originalMeeting);
|
|
483
|
+
var locusDeltaRequest = function locusDeltaRequest(originalOptions) {
|
|
484
|
+
var meeting = meetingRef.deref();
|
|
485
|
+
if (!meeting) {
|
|
486
|
+
return _promise.default.resolve();
|
|
487
|
+
}
|
|
488
|
+
var options = (0, _cloneDeep2.default)(originalOptions);
|
|
489
|
+
if (!options.body) {
|
|
490
|
+
options.body = {};
|
|
491
|
+
}
|
|
492
|
+
MeetingUtil.addSequence(meeting, options.body);
|
|
493
|
+
return meeting.request(options).then(function (response) {
|
|
494
|
+
return MeetingUtil.updateLocusWithDelta(meeting, response);
|
|
495
|
+
});
|
|
496
|
+
};
|
|
497
|
+
return locusDeltaRequest;
|
|
498
|
+
}
|
|
637
499
|
};
|
|
638
|
-
|
|
639
500
|
var _default = MeetingUtil;
|
|
640
501
|
exports.default = _default;
|
|
641
502
|
//# sourceMappingURL=util.js.map
|