@webex/plugin-meetings 3.0.0-beta.13 → 3.0.0-beta.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -1
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +48 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +355 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +193 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +43 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +994 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +5 -26
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +5 -26
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +6 -27
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +5 -26
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +5 -26
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +4 -25
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +5 -26
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +5 -26
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +6 -41
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -24
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +35 -61
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +6 -6
- package/dist/config.js.map +1 -1
- package/dist/constants.js +203 -53
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +294 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +72 -17
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +100 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +406 -216
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +0 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +54 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +88 -123
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +105 -91
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +55 -165
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +71 -117
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +77 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2603 -2462
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +292 -138
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +315 -336
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +463 -583
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +10 -33
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +305 -286
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -16
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +156 -232
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +24 -20
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +692 -593
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +23 -42
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +186 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +89 -88
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +15 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +101 -69
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +12 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +166 -205
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +120 -85
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +314 -260
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +50 -16
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +4 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +93 -162
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +167 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +74 -93
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +55 -74
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +6 -40
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +466 -442
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +32 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +10 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -33
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +190 -199
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +14 -23
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +2 -4
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +19 -23
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +326 -465
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +31 -75
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +129 -136
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +143 -103
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +369 -461
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +144 -94
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +13 -45
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +35 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +124 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +2 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +32 -0
- package/dist/types/config.d.ts +78 -0
- package/dist/types/constants.d.ts +993 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +315 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +212 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +108 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +147 -0
- package/dist/types/meeting/index.d.ts +1762 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +186 -0
- package/dist/types/meeting/request.d.ts +269 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +76 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +57 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +345 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +157 -0
- package/dist/types/member/types.d.ts +21 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/config.d.ts +195 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +169 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +101 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +263 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +193 -0
- package/dist/types/recording-controller/util.d.ts +13 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +200 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/internal-README.md +7 -6
- package/package.json +28 -21
- package/src/annotation/annotation.types.ts +42 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +339 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +163 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +37 -0
- package/src/breakouts/index.ts +860 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/browser-detection.ts +9 -6
- package/src/common/collection.ts +3 -1
- package/src/common/errors/captcha-error.ts +6 -6
- package/src/common/errors/intent-to-join.ts +6 -6
- package/src/common/errors/join-meeting.ts +12 -8
- package/src/common/errors/media.ts +6 -6
- package/src/common/errors/parameter.ts +9 -6
- package/src/common/errors/password-error.ts +6 -6
- package/src/common/errors/permission.ts +5 -5
- package/src/common/errors/reconnection.ts +6 -6
- package/src/common/errors/stats.ts +6 -6
- package/src/common/errors/webex-errors.ts +7 -5
- package/src/common/errors/webex-meetings-error.ts +1 -1
- package/src/common/events/events-scope.ts +5 -1
- package/src/common/events/events.ts +5 -1
- package/src/common/events/trigger-proxy.ts +8 -3
- package/src/common/events/util.ts +1 -2
- package/src/common/logs/logger-proxy.ts +21 -10
- package/src/common/logs/request.ts +11 -8
- package/src/config.ts +16 -12
- package/src/constants.ts +153 -7
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +281 -0
- package/src/index.ts +33 -0
- package/src/locus-info/controlsUtils.ts +142 -24
- package/src/locus-info/fullState.ts +15 -11
- package/src/locus-info/hostUtils.ts +4 -3
- package/src/locus-info/index.ts +346 -55
- package/src/locus-info/infoUtils.ts +12 -4
- package/src/locus-info/mediaSharesUtils.ts +52 -4
- package/src/locus-info/parser.ts +46 -68
- package/src/locus-info/selfUtils.ts +195 -56
- package/src/media/index.ts +139 -196
- package/src/media/properties.ts +43 -36
- package/src/media/util.ts +1 -1
- package/src/mediaQualityMetrics/config.ts +380 -378
- package/src/meeting/in-meeting-actions.ts +159 -3
- package/src/meeting/index.ts +2803 -1584
- package/src/meeting/locusMediaRequest.ts +309 -0
- package/src/meeting/muteState.ts +290 -72
- package/src/meeting/request.ts +247 -178
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/state.ts +45 -30
- package/src/meeting/util.ts +445 -395
- package/src/meeting-info/collection.ts +2 -1
- package/src/meeting-info/index.ts +32 -30
- package/src/meeting-info/meeting-info-v2.ts +235 -116
- package/src/meeting-info/request.ts +9 -3
- package/src/meeting-info/util.ts +54 -46
- package/src/meeting-info/utilv2.ts +71 -55
- package/src/meetings/collection.ts +21 -1
- package/src/meetings/index.ts +772 -437
- package/src/meetings/request.ts +29 -25
- package/src/meetings/util.ts +132 -33
- package/src/member/index.ts +95 -49
- package/src/member/types.ts +24 -0
- package/src/member/util.ts +106 -13
- package/src/members/collection.ts +8 -1
- package/src/members/index.ts +288 -130
- package/src/members/request.ts +144 -31
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +316 -235
- package/src/metrics/config.ts +302 -90
- package/src/metrics/constants.ts +2 -6
- package/src/metrics/index.ts +124 -95
- package/src/multistream/mediaRequestManager.ts +203 -45
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +62 -38
- package/src/multistream/remoteMedia.ts +30 -4
- package/src/multistream/remoteMediaGroup.ts +4 -3
- package/src/multistream/remoteMediaManager.ts +230 -66
- package/src/networkQualityMonitor/index.ts +24 -27
- package/src/personal-meeting-room/index.ts +12 -16
- package/src/personal-meeting-room/request.ts +10 -3
- package/src/personal-meeting-room/util.ts +3 -3
- package/src/reachability/index.ts +131 -79
- package/src/reachability/request.ts +43 -34
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +8 -8
- package/src/reactions/reactions.type.ts +31 -5
- package/src/reconnection-manager/index.ts +193 -111
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/index.ts +53 -53
- package/src/roap/request.ts +77 -64
- package/src/roap/turnDiscovery.ts +101 -48
- package/src/statsAnalyzer/global.ts +8 -104
- package/src/statsAnalyzer/index.ts +624 -376
- package/src/statsAnalyzer/mqaUtil.ts +203 -90
- package/src/transcription/index.ts +34 -32
- package/test/integration/spec/converged-space-meetings.js +177 -0
- package/test/integration/spec/journey.js +670 -466
- package/test/integration/spec/space-meeting.js +320 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +433 -0
- package/test/unit/spec/breakouts/breakout.ts +203 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +77 -0
- package/test/unit/spec/breakouts/index.ts +1609 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +504 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/locus-info/controlsUtils.js +305 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +636 -5
- package/test/unit/spec/locus-info/infoUtils.js +26 -33
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +3 -9
- package/test/unit/spec/locus-info/selfConstant.js +110 -103
- package/test/unit/spec/locus-info/selfUtils.js +252 -12
- package/test/unit/spec/media/index.ts +104 -8
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +76 -3
- package/test/unit/spec/meeting/index.js +3112 -921
- package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
- package/test/unit/spec/meeting/muteState.js +421 -94
- package/test/unit/spec/meeting/request.js +421 -79
- package/test/unit/spec/meeting/utils.js +326 -189
- package/test/unit/spec/meeting-info/meetinginfov2.js +481 -76
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +15 -1
- package/test/unit/spec/meetings/index.js +1126 -328
- package/test/unit/spec/meetings/utils.js +220 -14
- package/test/unit/spec/member/index.js +24 -1
- package/test/unit/spec/member/util.js +383 -32
- package/test/unit/spec/members/index.js +424 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +191 -4
- package/test/unit/spec/metrics/index.js +113 -20
- package/test/unit/spec/multistream/mediaRequestManager.ts +650 -105
- package/test/unit/spec/multistream/receiveSlot.ts +76 -17
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +32 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +549 -65
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +176 -27
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +62 -31
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +19 -49
- package/test/unit/spec/roap/request.ts +187 -0
- package/test/unit/spec/roap/turnDiscovery.ts +92 -50
- package/test/unit/spec/stats-analyzer/index.js +116 -60
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +64 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +57 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -334
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/src/index.js +0 -15
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/meeting/effectsState.ts +0 -211
- package/src/multistream/multistreamMedia.ts +0 -92
- package/test/unit/spec/meeting/effectsState.js +0 -291
package/dist/meeting/util.js
CHANGED
|
@@ -1,641 +1,521 @@
|
|
|
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);
|
|
210
|
-
}
|
|
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);
|
|
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.'));
|
|
248
93
|
}
|
|
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.
|
|
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.closeLocalStream();
|
|
141
|
+
}).then(function () {
|
|
142
|
+
return meeting.closeLocalShare();
|
|
143
|
+
}).then(function () {
|
|
144
|
+
return meeting.closeRemoteTracks();
|
|
145
|
+
}).then(function () {
|
|
146
|
+
return meeting.closePeerConnections();
|
|
147
|
+
}).then(function () {
|
|
148
|
+
meeting.unsetLocalVideoTrack();
|
|
149
|
+
meeting.unsetLocalShareTrack();
|
|
150
|
+
meeting.unsetRemoteTracks();
|
|
151
|
+
meeting.unsetPeerConnections();
|
|
152
|
+
meeting.reconnectionManager.cleanUp();
|
|
153
|
+
}).then(function () {
|
|
154
|
+
return meeting.stopKeepAlive();
|
|
155
|
+
}).then(function () {
|
|
156
|
+
return meeting.updateLLMConnection();
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
disconnectPhoneAudio: function disconnectPhoneAudio(meeting, phoneUrl) {
|
|
160
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
161
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
162
|
+
}
|
|
163
|
+
var options = {
|
|
164
|
+
locusUrl: meeting.locusUrl,
|
|
165
|
+
selfId: meeting.selfId,
|
|
166
|
+
correlationId: meeting.correlationId,
|
|
167
|
+
phoneUrl: phoneUrl
|
|
168
|
+
};
|
|
169
|
+
return meeting.meetingRequest.disconnectPhoneAudio(options).catch(function (err) {
|
|
170
|
+
_loggerProxy.default.logger.error("Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ".concat(meeting.id, ", error: ").concat(err));
|
|
171
|
+
return _promise.default.reject(err);
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
// by default will leave on meeting's resourceId
|
|
175
|
+
// if you explicity want it not to leave on resource id, pass
|
|
176
|
+
// {resourceId: null}
|
|
177
|
+
// TODO: chris, you can modify this however you want
|
|
178
|
+
leaveMeeting: function leaveMeeting(meeting) {
|
|
179
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
180
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
181
|
+
// TODO: clean up if the meeting is already inactive
|
|
182
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
183
|
+
}
|
|
184
|
+
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
185
|
+
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
186
|
+
}
|
|
187
|
+
var defaultOptions = {
|
|
188
|
+
locusUrl: meeting.locusUrl,
|
|
189
|
+
selfId: meeting.selfId,
|
|
190
|
+
correlationId: meeting.correlationId,
|
|
191
|
+
resourceId: meeting.resourceId,
|
|
192
|
+
deviceUrl: meeting.deviceUrl
|
|
193
|
+
};
|
|
194
|
+
var leaveOptions = _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
195
|
+
return meeting.meetingRequest.leaveMeeting(leaveOptions).then(function () {
|
|
196
|
+
if (options.moveMeeting) {
|
|
197
|
+
return _promise.default.resolve();
|
|
198
|
+
}
|
|
199
|
+
return MeetingUtil.cleanUp(meeting);
|
|
200
|
+
}).catch(function (err) {
|
|
201
|
+
// TODO: If the meeting state comes as LEFT or INACTIVE as response then
|
|
202
|
+
// 1) on leave clean up the meeting or simply do a sync on the meeting
|
|
203
|
+
// 2) If the error says meeting is inactive then destroy the meeting object
|
|
204
|
+
_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));
|
|
205
|
+
return _promise.default.reject(err);
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
declineMeeting: function declineMeeting(meeting, reason) {
|
|
209
|
+
return meeting.meetingRequest.declineMeeting({
|
|
210
|
+
locusUrl: meeting.locusUrl,
|
|
211
|
+
deviceUrl: meeting.deviceUrl,
|
|
212
|
+
reason: reason
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
isUserInLeftState: function isUserInLeftState(locusInfo) {
|
|
216
|
+
var _locusInfo$parsedLocu, _locusInfo$parsedLocu2;
|
|
217
|
+
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_;
|
|
218
|
+
},
|
|
219
|
+
isUserInIdleState: function isUserInIdleState(locusInfo) {
|
|
220
|
+
var _locusInfo$parsedLocu3, _locusInfo$parsedLocu4;
|
|
221
|
+
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_;
|
|
222
|
+
},
|
|
223
|
+
isUserInJoinedState: function isUserInJoinedState(locusInfo) {
|
|
224
|
+
var _locusInfo$parsedLocu5, _locusInfo$parsedLocu6;
|
|
225
|
+
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_;
|
|
226
|
+
},
|
|
227
|
+
isMediaEstablished: function isMediaEstablished(currentMediaStatus) {
|
|
228
|
+
return currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
|
|
229
|
+
},
|
|
230
|
+
joinMeetingOptions: function joinMeetingOptions(meeting) {
|
|
231
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
232
|
+
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
233
|
+
if (meeting.requiredCaptcha) {
|
|
234
|
+
return _promise.default.reject(new _captchaError.default());
|
|
235
|
+
}
|
|
236
|
+
if (meeting.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED) {
|
|
237
|
+
return _promise.default.reject(new _passwordError.default());
|
|
238
|
+
}
|
|
239
|
+
if (options.pin) {
|
|
240
|
+
_metrics.default.postEvent({
|
|
241
|
+
event: _config.eventType.PIN_COLLECTED,
|
|
325
242
|
meeting: meeting
|
|
326
|
-
});
|
|
327
|
-
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
return _promise.default.reject(new _intentToJoin.default('Error Joining Meeting', err));
|
|
243
|
+
});
|
|
331
244
|
}
|
|
332
245
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
MeetingUtil.
|
|
340
|
-
|
|
246
|
+
// normal join meeting, scenario A, D
|
|
247
|
+
return MeetingUtil.joinMeeting(meeting, options).then(function (response) {
|
|
248
|
+
meeting.setLocus(response);
|
|
249
|
+
return _promise.default.resolve(response);
|
|
250
|
+
}).catch(function (err) {
|
|
251
|
+
// joining a claimed PMR that is not my own, scenario B
|
|
252
|
+
if (MeetingUtil.isPinOrGuest(err)) {
|
|
253
|
+
_metrics.default.postEvent({
|
|
254
|
+
event: _config.eventType.PIN_PROMPT,
|
|
255
|
+
meeting: meeting
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// request host pin or non host for unclaimed PMR, start of Scenario C
|
|
259
|
+
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
260
|
+
return _promise.default.reject(new _intentToJoin.default('Error Joining Meeting', err));
|
|
261
|
+
}
|
|
262
|
+
_loggerProxy.default.logger.error('Meeting:util#joinMeetingOptions --> Error joining the call, ', err);
|
|
263
|
+
return _promise.default.reject(new _joinMeeting.default(options, 'Error Joining Meeting', err));
|
|
264
|
+
});
|
|
265
|
+
},
|
|
266
|
+
validateOptions: function validateOptions(options) {
|
|
267
|
+
var sendVideo = options.sendVideo,
|
|
341
268
|
sendAudio = options.sendAudio,
|
|
342
269
|
sendShare = options.sendShare,
|
|
343
270
|
localStream = options.localStream,
|
|
344
271
|
localShare = options.localShare;
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
272
|
+
if (sendVideo && !MeetingUtil.getTrack(localStream).videoTrack) {
|
|
273
|
+
return _promise.default.reject(new _parameter.default('please pass valid video streams'));
|
|
274
|
+
}
|
|
275
|
+
if (sendAudio && !MeetingUtil.getTrack(localStream).audioTrack) {
|
|
276
|
+
return _promise.default.reject(new _parameter.default('please pass valid audio streams'));
|
|
277
|
+
}
|
|
278
|
+
if (sendShare && !MeetingUtil.getTrack(localShare).videoTrack) {
|
|
279
|
+
return _promise.default.reject(new _parameter.default('please pass valid share streams'));
|
|
280
|
+
}
|
|
281
|
+
return _promise.default.resolve();
|
|
282
|
+
},
|
|
283
|
+
getTrack: function getTrack(stream) {
|
|
284
|
+
var audioTrack = null;
|
|
285
|
+
var videoTrack = null;
|
|
286
|
+
var audioTracks = null;
|
|
287
|
+
var videoTracks = null;
|
|
288
|
+
if (!stream) {
|
|
289
|
+
return {
|
|
290
|
+
audioTrack: null,
|
|
291
|
+
videoTrack: null
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (stream.getAudioTracks) {
|
|
295
|
+
audioTracks = stream.getAudioTracks();
|
|
296
|
+
}
|
|
297
|
+
if (stream.getVideoTracks) {
|
|
298
|
+
videoTracks = stream.getVideoTracks();
|
|
299
|
+
}
|
|
300
|
+
if (audioTracks && audioTracks.length > 0) {
|
|
301
|
+
var _audioTracks = audioTracks;
|
|
302
|
+
var _audioTracks2 = (0, _slicedToArray2.default)(_audioTracks, 1);
|
|
303
|
+
audioTrack = _audioTracks2[0];
|
|
304
|
+
}
|
|
305
|
+
if (videoTracks && videoTracks.length > 0) {
|
|
306
|
+
var _videoTracks = videoTracks;
|
|
307
|
+
var _videoTracks2 = (0, _slicedToArray2.default)(_videoTracks, 1);
|
|
308
|
+
videoTrack = _videoTracks2[0];
|
|
309
|
+
}
|
|
368
310
|
return {
|
|
369
|
-
audioTrack:
|
|
370
|
-
videoTrack:
|
|
311
|
+
audioTrack: audioTrack,
|
|
312
|
+
videoTrack: videoTrack
|
|
371
313
|
};
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
MeetingUtil.pauseRecording = function (request, locusUrl, locusInfo) {
|
|
465
|
-
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
466
|
-
|
|
467
|
-
if (MeetingUtil.canUserPause(displayHints)) {
|
|
468
|
-
return request.recordMeeting({
|
|
469
|
-
locusUrl: locusUrl,
|
|
470
|
-
recording: true,
|
|
471
|
-
paused: true
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
return _promise.default.reject(new _permission.default('Pause recording not allowed, due to moderator property.'));
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
MeetingUtil.resumeRecording = function (request, locusUrl, locusInfo) {
|
|
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
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
return _promise.default.reject(new _permission.default('Resume recording not allowed, due to moderator property.'));
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
MeetingUtil.stopRecording = function (request, locusUrl, locusInfo) {
|
|
493
|
-
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
494
|
-
|
|
495
|
-
if (MeetingUtil.canUserStop(displayHints)) {
|
|
496
|
-
return request.recordMeeting({
|
|
497
|
-
locusUrl: locusUrl,
|
|
498
|
-
recording: false,
|
|
499
|
-
paused: false
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
return _promise.default.reject(new _permission.default('Stop recording not allowed, due to moderator property.'));
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
MeetingUtil.canUserRaiseHand = function (displayHints) {
|
|
507
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RAISE_HAND);
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
MeetingUtil.canUserLowerAllHands = function (displayHints) {
|
|
511
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_ALL_HANDS);
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
MeetingUtil.canUserLowerSomeoneElsesHand = function (displayHints) {
|
|
515
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND);
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
MeetingUtil.bothLeaveAndEndMeetingAvailable = function (displayHints) {
|
|
519
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) || displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_END_MEETING);
|
|
520
|
-
};
|
|
521
|
-
|
|
522
|
-
MeetingUtil.lockMeeting = function (actions, request, locusUrl) {
|
|
523
|
-
if (actions && actions.canLock) {
|
|
524
|
-
return request.lockMeeting({
|
|
525
|
-
locusUrl: locusUrl,
|
|
526
|
-
lock: true
|
|
314
|
+
},
|
|
315
|
+
getModeratorFromLocusInfo: function getModeratorFromLocusInfo(locusInfo) {
|
|
316
|
+
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.moderator;
|
|
317
|
+
},
|
|
318
|
+
getPolicyFromLocusInfo: function getPolicyFromLocusInfo(locusInfo) {
|
|
319
|
+
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.policy;
|
|
320
|
+
},
|
|
321
|
+
getUserDisplayHintsFromLocusInfo: function getUserDisplayHintsFromLocusInfo(locusInfo) {
|
|
322
|
+
var _locusInfo$parsedLocu7, _locusInfo$parsedLocu8;
|
|
323
|
+
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) || [];
|
|
324
|
+
},
|
|
325
|
+
canInviteNewParticipants: function canInviteNewParticipants(displayHints) {
|
|
326
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ADD_GUEST);
|
|
327
|
+
},
|
|
328
|
+
canAdmitParticipant: function canAdmitParticipant(displayHints) {
|
|
329
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);
|
|
330
|
+
},
|
|
331
|
+
canUserLock: function canUserLock(displayHints) {
|
|
332
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_LOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);
|
|
333
|
+
},
|
|
334
|
+
canUserUnlock: function canUserUnlock(displayHints) {
|
|
335
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_LOCKED);
|
|
336
|
+
},
|
|
337
|
+
canUserRaiseHand: function canUserRaiseHand(displayHints) {
|
|
338
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.RAISE_HAND);
|
|
339
|
+
},
|
|
340
|
+
canUserLowerAllHands: function canUserLowerAllHands(displayHints) {
|
|
341
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_ALL_HANDS);
|
|
342
|
+
},
|
|
343
|
+
canUserLowerSomeoneElsesHand: function canUserLowerSomeoneElsesHand(displayHints) {
|
|
344
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND);
|
|
345
|
+
},
|
|
346
|
+
bothLeaveAndEndMeetingAvailable: function bothLeaveAndEndMeetingAvailable(displayHints) {
|
|
347
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) || displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_END_MEETING);
|
|
348
|
+
},
|
|
349
|
+
canManageBreakout: function canManageBreakout(displayHints) {
|
|
350
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.BREAKOUT_MANAGEMENT);
|
|
351
|
+
},
|
|
352
|
+
isSuppressBreakoutSupport: function isSuppressBreakoutSupport(displayHints) {
|
|
353
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT);
|
|
354
|
+
},
|
|
355
|
+
canAdmitLobbyToBreakout: function canAdmitLobbyToBreakout(displayHints) {
|
|
356
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT);
|
|
357
|
+
},
|
|
358
|
+
isBreakoutPreassignmentsEnabled: function isBreakoutPreassignmentsEnabled(displayHints) {
|
|
359
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS);
|
|
360
|
+
},
|
|
361
|
+
canUserAskForHelp: function canUserAskForHelp(displayHints) {
|
|
362
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_ASK_FOR_HELP);
|
|
363
|
+
},
|
|
364
|
+
lockMeeting: function lockMeeting(actions, request, locusUrl) {
|
|
365
|
+
if (actions && actions.canLock) {
|
|
366
|
+
return request.lockMeeting({
|
|
367
|
+
locusUrl: locusUrl,
|
|
368
|
+
lock: true
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
return _promise.default.reject(new _permission.default('Lock not allowed, due to joined property.'));
|
|
372
|
+
},
|
|
373
|
+
unlockMeeting: function unlockMeeting(actions, request, locusUrl) {
|
|
374
|
+
if (actions && actions.canUnlock) {
|
|
375
|
+
return request.lockMeeting({
|
|
376
|
+
locusUrl: locusUrl,
|
|
377
|
+
lock: false
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
return _promise.default.reject(new _permission.default('Unlock not allowed, due to joined property.'));
|
|
381
|
+
},
|
|
382
|
+
handleAudioLogging: function handleAudioLogging(audioTrack) {
|
|
383
|
+
var LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';
|
|
384
|
+
if (audioTrack) {
|
|
385
|
+
var settings = audioTrack.underlyingTrack.getSettings();
|
|
386
|
+
var deviceId = settings.deviceId;
|
|
387
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
388
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
handleVideoLogging: function handleVideoLogging(videoTrack) {
|
|
392
|
+
var LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';
|
|
393
|
+
if (videoTrack) {
|
|
394
|
+
var settings = videoTrack.underlyingTrack.getSettings();
|
|
395
|
+
var deviceId = settings.deviceId;
|
|
396
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
397
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
handleDeviceLogging: function handleDeviceLogging() {
|
|
401
|
+
var devices = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
402
|
+
var LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';
|
|
403
|
+
devices.forEach(function (device) {
|
|
404
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(device.deviceId));
|
|
405
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings', (0, _stringify.default)(device));
|
|
527
406
|
});
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
407
|
+
},
|
|
408
|
+
endMeetingForAll: function endMeetingForAll(meeting) {
|
|
409
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
410
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
411
|
+
}
|
|
412
|
+
var endOptions = {
|
|
413
|
+
locusUrl: meeting.locusUrl
|
|
414
|
+
};
|
|
415
|
+
return meeting.meetingRequest.endMeetingForAll(endOptions).then(function () {
|
|
416
|
+
return MeetingUtil.cleanUp(meeting);
|
|
417
|
+
}).catch(function (err) {
|
|
418
|
+
_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));
|
|
419
|
+
return _promise.default.reject(err);
|
|
538
420
|
});
|
|
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);
|
|
421
|
+
},
|
|
422
|
+
canEnableClosedCaption: function canEnableClosedCaption(displayHints) {
|
|
423
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_START);
|
|
424
|
+
},
|
|
425
|
+
isSaveTranscriptsEnabled: function isSaveTranscriptsEnabled(displayHints) {
|
|
426
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED);
|
|
427
|
+
},
|
|
428
|
+
canStartTranscribing: function canStartTranscribing(displayHints) {
|
|
429
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START);
|
|
430
|
+
},
|
|
431
|
+
canStopTranscribing: function canStopTranscribing(displayHints) {
|
|
432
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);
|
|
433
|
+
},
|
|
434
|
+
isClosedCaptionActive: function isClosedCaptionActive(displayHints) {
|
|
435
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_STATUS_ACTIVE);
|
|
436
|
+
},
|
|
437
|
+
isWebexAssistantActive: function isWebexAssistantActive(displayHints) {
|
|
438
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE);
|
|
439
|
+
},
|
|
440
|
+
canViewCaptionPanel: function canViewCaptionPanel(displayHints) {
|
|
441
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ENABLE_CAPTION_PANEL);
|
|
442
|
+
},
|
|
443
|
+
isRealTimeTranslationEnabled: function isRealTimeTranslationEnabled(displayHints) {
|
|
444
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION);
|
|
445
|
+
},
|
|
446
|
+
canSelectSpokenLanguages: function canSelectSpokenLanguages(displayHints) {
|
|
447
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR);
|
|
448
|
+
},
|
|
449
|
+
waitingForOthersToJoin: function waitingForOthersToJoin(displayHints) {
|
|
450
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.WAITING_FOR_OTHERS);
|
|
451
|
+
},
|
|
452
|
+
canSendReactions: function canSendReactions(originalValue, displayHints) {
|
|
453
|
+
if (displayHints.includes(_constants.DISPLAY_HINTS.REACTIONS_ACTIVE)) {
|
|
454
|
+
return true;
|
|
591
455
|
}
|
|
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
|
-
|
|
456
|
+
if (displayHints.includes(_constants.DISPLAY_HINTS.REACTIONS_INACTIVE)) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
return originalValue;
|
|
460
|
+
},
|
|
461
|
+
canUserRenameSelfAndObserved: function canUserRenameSelfAndObserved(displayHints) {
|
|
462
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED);
|
|
463
|
+
},
|
|
464
|
+
canUserRenameOthers: function canUserRenameOthers(displayHints) {
|
|
465
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_OTHERS);
|
|
466
|
+
},
|
|
467
|
+
/**
|
|
468
|
+
* Adds the current locus sequence information to a request body
|
|
469
|
+
* @param {Object} meeting The meeting object
|
|
470
|
+
* @param {Object} requestBody The body of a request to locus
|
|
471
|
+
* @returns {void}
|
|
472
|
+
*/
|
|
473
|
+
addSequence: function addSequence(meeting, requestBody) {
|
|
474
|
+
var _meeting$locusInfo;
|
|
475
|
+
var sequence = meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.sequence;
|
|
476
|
+
if (!sequence) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
requestBody.sequence = sequence;
|
|
480
|
+
},
|
|
481
|
+
/**
|
|
482
|
+
* Updates the locus info for the meeting with the delta locus
|
|
483
|
+
* returned from requests that include the sequence information
|
|
484
|
+
* Returns the original response object
|
|
485
|
+
* @param {Object} meeting The meeting object
|
|
486
|
+
* @param {Object} response The response of the http request
|
|
487
|
+
* @returns {Object}
|
|
488
|
+
*/
|
|
489
|
+
updateLocusWithDelta: function updateLocusWithDelta(meeting, response) {
|
|
490
|
+
var _response$body2;
|
|
491
|
+
if (!meeting) {
|
|
492
|
+
return response;
|
|
493
|
+
}
|
|
494
|
+
var locus = response === null || response === void 0 ? void 0 : (_response$body2 = response.body) === null || _response$body2 === void 0 ? void 0 : _response$body2.locus;
|
|
495
|
+
if (locus) {
|
|
496
|
+
meeting.locusInfo.onDeltaLocus(locus);
|
|
497
|
+
}
|
|
498
|
+
return response;
|
|
499
|
+
},
|
|
500
|
+
generateLocusDeltaRequest: function generateLocusDeltaRequest(originalMeeting) {
|
|
501
|
+
var meetingRef = new WeakRef(originalMeeting);
|
|
502
|
+
var locusDeltaRequest = function locusDeltaRequest(originalOptions) {
|
|
503
|
+
var meeting = meetingRef.deref();
|
|
504
|
+
if (!meeting) {
|
|
505
|
+
return _promise.default.resolve();
|
|
506
|
+
}
|
|
507
|
+
var options = (0, _cloneDeep2.default)(originalOptions);
|
|
508
|
+
if (!options.body) {
|
|
509
|
+
options.body = {};
|
|
510
|
+
}
|
|
511
|
+
MeetingUtil.addSequence(meeting, options.body);
|
|
512
|
+
return meeting.request(options).then(function (response) {
|
|
513
|
+
return MeetingUtil.updateLocusWithDelta(meeting, response);
|
|
514
|
+
});
|
|
515
|
+
};
|
|
516
|
+
return locusDeltaRequest;
|
|
517
|
+
}
|
|
637
518
|
};
|
|
638
|
-
|
|
639
519
|
var _default = MeetingUtil;
|
|
640
520
|
exports.default = _default;
|
|
641
521
|
//# sourceMappingURL=util.js.map
|