@webex/plugin-meetings 3.0.0-beta.21 → 3.0.0-beta.211
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 -7
- 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 +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +114 -14
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +841 -19
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/errors/webex-errors.js +3 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/queue.js +24 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +3 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +179 -30
- 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 +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +106 -1
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +91 -2
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +359 -64
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +7 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +43 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +219 -63
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +89 -14
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +48 -135
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +29 -90
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -493
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +90 -2
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2770 -2547
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +229 -124
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +199 -193
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +532 -414
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +48 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +171 -51
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +20 -5
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +22 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +357 -66
- 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 +2 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +88 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +49 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +121 -25
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +10 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +86 -5
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +106 -38
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +316 -233
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +3 -5
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +1 -468
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +238 -49
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +49 -16
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +52 -34
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +44 -18
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +60 -3
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +173 -59
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +4 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/reachability/index.js +72 -27
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -5
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +196 -155
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +21 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +9 -8
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +21 -29
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +110 -89
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +93 -36
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +117 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -93
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +326 -311
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +90 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -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 +8 -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 +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1020 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -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 +271 -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 +93 -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 +163 -0
- package/dist/types/meeting/index.d.ts +1482 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +72 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +257 -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 +79 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +62 -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 +367 -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 +159 -0
- package/dist/types/member/types.d.ts +32 -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/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -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/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +46 -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 +23 -20
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +44 -14
- package/src/breakouts/breakout.ts +87 -9
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +710 -10
- 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/common/queue.ts +22 -8
- package/src/config.ts +2 -7
- package/src/constants.ts +165 -21
- 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 +300 -0
- package/src/index.ts +39 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +108 -0
- package/src/locus-info/index.ts +383 -61
- package/src/locus-info/infoUtils.ts +10 -2
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +224 -39
- package/src/locus-info/selfUtils.ts +81 -5
- package/src/media/index.ts +87 -140
- package/src/media/properties.ts +49 -90
- package/src/mediaQualityMetrics/config.ts +379 -377
- package/src/meeting/in-meeting-actions.ts +179 -3
- package/src/meeting/index.ts +2099 -2083
- package/src/meeting/locusMediaRequest.ts +311 -0
- package/src/meeting/muteState.ts +228 -132
- package/src/meeting/request.ts +105 -115
- package/src/meeting/util.ts +511 -397
- package/src/meeting-info/index.ts +54 -8
- package/src/meeting-info/meeting-info-v2.ts +148 -14
- package/src/meeting-info/utilv2.ts +13 -3
- package/src/meetings/collection.ts +20 -0
- package/src/meetings/index.ts +392 -84
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +2 -0
- package/src/meetings/util.ts +103 -4
- package/src/member/index.ts +49 -0
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +127 -25
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +107 -6
- package/src/members/request.ts +97 -17
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +319 -240
- package/src/metrics/constants.ts +2 -4
- package/src/metrics/index.ts +1 -490
- package/src/multistream/mediaRequestManager.ts +289 -79
- package/src/multistream/receiveSlot.ts +55 -18
- package/src/multistream/receiveSlotManager.ts +46 -24
- package/src/multistream/remoteMedia.ts +27 -2
- package/src/multistream/remoteMediaGroup.ts +59 -0
- package/src/multistream/remoteMediaManager.ts +113 -32
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/reachability/index.ts +62 -15
- package/src/reachability/request.ts +10 -5
- package/src/reconnection-manager/index.ts +68 -43
- package/src/recording-controller/index.ts +20 -3
- package/src/recording-controller/util.ts +26 -9
- package/src/roap/index.ts +21 -30
- package/src/roap/request.ts +101 -95
- package/src/roap/turnDiscovery.ts +47 -25
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/global.ts +1 -94
- package/src/statsAnalyzer/index.ts +376 -386
- package/src/statsAnalyzer/mqaUtil.ts +100 -99
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +336 -259
- package/test/integration/spec/space-meeting.js +77 -4
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +142 -24
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1545 -48
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +316 -43
- package/test/unit/spec/locus-info/index.js +1169 -36
- package/test/unit/spec/locus-info/infoUtils.js +37 -15
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +62 -22
- package/test/unit/spec/locus-info/selfConstant.js +27 -4
- package/test/unit/spec/locus-info/selfUtils.js +208 -17
- package/test/unit/spec/media/index.ts +138 -28
- package/test/unit/spec/meeting/in-meeting-actions.ts +89 -3
- package/test/unit/spec/meeting/index.js +3573 -1663
- package/test/unit/spec/meeting/locusMediaRequest.ts +438 -0
- package/test/unit/spec/meeting/muteState.js +370 -208
- package/test/unit/spec/meeting/request.js +339 -44
- package/test/unit/spec/meeting/utils.js +456 -53
- package/test/unit/spec/meeting-info/index.js +181 -0
- 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 +867 -125
- package/test/unit/spec/meetings/utils.js +206 -2
- package/test/unit/spec/member/index.js +58 -4
- package/test/unit/spec/member/util.js +479 -35
- package/test/unit/spec/members/index.js +319 -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 +1 -50
- package/test/unit/spec/multistream/mediaRequestManager.ts +803 -162
- package/test/unit/spec/multistream/receiveSlot.ts +72 -13
- package/test/unit/spec/multistream/receiveSlotManager.ts +58 -28
- package/test/unit/spec/multistream/remoteMedia.ts +30 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +266 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +318 -0
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/reachability/index.ts +125 -8
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +59 -6
- package/test/unit/spec/recording-controller/index.js +294 -218
- package/test/unit/spec/recording-controller/util.js +223 -96
- package/test/unit/spec/roap/index.ts +26 -51
- package/test/unit/spec/roap/request.ts +196 -85
- package/test/unit/spec/roap/turnDiscovery.ts +30 -7
- package/test/unit/spec/rtcMetrics/index.ts +60 -0
- package/test/unit/spec/stats-analyzer/index.js +92 -41
- 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 +6 -3
- package/dist/meeting/effectsState.js +0 -262
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -299
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -110
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/src/index.js +0 -16
- package/src/meeting/effectsState.ts +0 -211
- package/src/metrics/config.ts +0 -495
- package/src/multistream/multistreamMedia.ts +0 -97
- package/test/unit/spec/meeting/effectsState.js +0 -285
package/src/meeting/util.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {LocalCameraTrack, LocalMicrophoneTrack} from '@webex/media-helpers';
|
|
2
|
+
import {cloneDeep} from 'lodash';
|
|
3
3
|
import {MeetingNotActiveError, UserNotJoinedError} from '../common/errors/webex-errors';
|
|
4
|
-
import Metrics from '../metrics';
|
|
5
|
-
import {eventType, trigger} from '../metrics/config';
|
|
6
|
-
import Media from '../media';
|
|
7
4
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
8
5
|
import {
|
|
9
6
|
INTENT_TO_JOIN,
|
|
@@ -13,6 +10,8 @@ import {
|
|
|
13
10
|
PASSWORD_STATUS,
|
|
14
11
|
DISPLAY_HINTS,
|
|
15
12
|
FULL_STATE,
|
|
13
|
+
SELF_POLICY,
|
|
14
|
+
EVENT_TRIGGERS,
|
|
16
15
|
} from '../constants';
|
|
17
16
|
import IntentToJoinError from '../common/errors/intent-to-join';
|
|
18
17
|
import JoinMeetingError from '../common/errors/join-meeting';
|
|
@@ -20,484 +19,599 @@ import ParameterError from '../common/errors/parameter';
|
|
|
20
19
|
import PermissionError from '../common/errors/permission';
|
|
21
20
|
import PasswordError from '../common/errors/password-error';
|
|
22
21
|
import CaptchaError from '../common/errors/captcha-error';
|
|
22
|
+
import Trigger from '../common/events/trigger-proxy';
|
|
23
|
+
|
|
24
|
+
const MeetingUtil = {
|
|
25
|
+
parseLocusJoin: (response) => {
|
|
26
|
+
const parsed: any = {};
|
|
27
|
+
|
|
28
|
+
// First todo: add check for existance
|
|
29
|
+
parsed.locus = response.body.locus;
|
|
30
|
+
parsed.mediaConnections = response.body.mediaConnections;
|
|
31
|
+
parsed.locusUrl = parsed.locus.url;
|
|
32
|
+
parsed.locusId = parsed.locus.url.split('/').pop();
|
|
33
|
+
parsed.selfId = parsed.locus.self.id;
|
|
34
|
+
|
|
35
|
+
// we need mediaId before making roap calls
|
|
36
|
+
parsed.mediaConnections.forEach((mediaConnection) => {
|
|
37
|
+
if (mediaConnection.mediaId) {
|
|
38
|
+
parsed.mediaId = mediaConnection.mediaId;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
23
41
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
MeetingUtil.parseLocusJoin = (response) => {
|
|
27
|
-
const parsed: any = {};
|
|
42
|
+
return parsed;
|
|
43
|
+
},
|
|
28
44
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
parsed.selfId = parsed.locus.self.id;
|
|
45
|
+
remoteUpdateAudioVideo: (meeting, audioMuted?: boolean, videoMuted?: boolean) => {
|
|
46
|
+
const webex = meeting.getWebexObject();
|
|
47
|
+
if (!meeting) {
|
|
48
|
+
return Promise.reject(new ParameterError('You need a meeting object.'));
|
|
49
|
+
}
|
|
35
50
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
if (!meeting.locusMediaRequest) {
|
|
52
|
+
return Promise.reject(
|
|
53
|
+
new ParameterError(
|
|
54
|
+
'You need a meeting with a media connection, call Meeting.addMedia() first.'
|
|
55
|
+
)
|
|
56
|
+
);
|
|
40
57
|
}
|
|
41
|
-
});
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
61
|
+
name: 'client.locus.media.request',
|
|
62
|
+
options: {meetingId: meeting.id},
|
|
63
|
+
});
|
|
45
64
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
65
|
+
return meeting.locusMediaRequest
|
|
66
|
+
.send({
|
|
67
|
+
type: 'LocalMute',
|
|
68
|
+
selfUrl: meeting.selfUrl,
|
|
69
|
+
mediaId: meeting.mediaId,
|
|
70
|
+
sequence: meeting.locusInfo.sequence,
|
|
71
|
+
muteOptions: {
|
|
72
|
+
audioMuted,
|
|
73
|
+
videoMuted,
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
.then((response) => {
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
79
|
+
name: 'client.locus.media.response',
|
|
80
|
+
options: {meetingId: meeting.id},
|
|
81
|
+
});
|
|
51
82
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
83
|
+
return response?.body?.locus;
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
hasOwner: (info) => info && info.owner,
|
|
88
|
+
|
|
89
|
+
isOwnerSelf: (owner, selfId) => owner === selfId,
|
|
90
|
+
|
|
91
|
+
isPinOrGuest: (err) => err?.body?.errorCode && INTENT_TO_JOIN.includes(err.body.errorCode),
|
|
92
|
+
|
|
93
|
+
joinMeeting: (meeting, options) => {
|
|
94
|
+
if (!meeting) {
|
|
95
|
+
return Promise.reject(new ParameterError('You need a meeting object.'));
|
|
96
|
+
}
|
|
97
|
+
const webex = meeting.getWebexObject();
|
|
98
|
+
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
101
|
+
name: 'client.locus.join.request',
|
|
102
|
+
options: {meetingId: meeting.id},
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// eslint-disable-next-line no-warning-comments
|
|
106
|
+
// TODO: check if the meeting is in JOINING state
|
|
107
|
+
// if Joining state termintate the request as user might click multiple times
|
|
108
|
+
return meeting.meetingRequest
|
|
109
|
+
.joinMeeting({
|
|
110
|
+
inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,
|
|
111
|
+
meetingNumber: meeting.meetingNumber,
|
|
112
|
+
deviceUrl: meeting.deviceUrl,
|
|
113
|
+
locusUrl: meeting.locusUrl,
|
|
114
|
+
correlationId: meeting.correlationId,
|
|
115
|
+
roapMessage: options.roapMessage,
|
|
116
|
+
permissionToken: meeting.permissionToken,
|
|
117
|
+
resourceId: options.resourceId || null,
|
|
118
|
+
moderator: options.moderator,
|
|
119
|
+
pin: options.pin,
|
|
120
|
+
moveToResource: options.moveToResource,
|
|
121
|
+
preferTranscoding: !meeting.isMultistream,
|
|
122
|
+
asResourceOccupant: options.asResourceOccupant,
|
|
123
|
+
breakoutsSupported: options.breakoutsSupported,
|
|
124
|
+
locale: options.locale,
|
|
125
|
+
deviceCapabilities: options.deviceCapabilities,
|
|
126
|
+
liveAnnotationSupported: options.liveAnnotationSupported,
|
|
127
|
+
})
|
|
128
|
+
.then((res) => {
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
131
|
+
name: 'client.locus.join.response',
|
|
132
|
+
payload: {
|
|
133
|
+
trigger: 'loci-update',
|
|
134
|
+
identifiers: {
|
|
135
|
+
trackingId: res.headers.trackingid,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
options: {
|
|
139
|
+
meetingId: meeting.id,
|
|
140
|
+
mediaConnections: res.body.mediaConnections,
|
|
141
|
+
},
|
|
142
|
+
});
|
|
57
143
|
|
|
58
|
-
|
|
144
|
+
return MeetingUtil.parseLocusJoin(res);
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
cleanUp: (meeting) => {
|
|
149
|
+
meeting.breakouts.cleanUp();
|
|
150
|
+
meeting.simultaneousInterpretation.cleanUp();
|
|
151
|
+
|
|
152
|
+
// make sure we send last metrics before we close the peerconnection
|
|
153
|
+
const stopStatsAnalyzer = meeting.statsAnalyzer
|
|
154
|
+
? meeting.statsAnalyzer.stopAnalyzer()
|
|
155
|
+
: Promise.resolve();
|
|
156
|
+
|
|
157
|
+
return stopStatsAnalyzer
|
|
158
|
+
.then(() => meeting.closeRemoteTracks())
|
|
159
|
+
.then(() => meeting.closePeerConnections())
|
|
160
|
+
.then(() => {
|
|
161
|
+
meeting.cleanupLocalTracks();
|
|
162
|
+
meeting.unsetRemoteTracks();
|
|
163
|
+
meeting.unsetPeerConnections();
|
|
164
|
+
meeting.reconnectionManager.cleanUp();
|
|
165
|
+
})
|
|
166
|
+
.then(() => meeting.stopKeepAlive())
|
|
167
|
+
.then(() => meeting.updateLLMConnection());
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
disconnectPhoneAudio: (meeting, phoneUrl) => {
|
|
171
|
+
if (meeting.meetingState === FULL_STATE.INACTIVE) {
|
|
172
|
+
return Promise.reject(new MeetingNotActiveError());
|
|
173
|
+
}
|
|
59
174
|
|
|
60
|
-
|
|
61
|
-
.remoteAudioVideoToggle({
|
|
175
|
+
const options = {
|
|
62
176
|
locusUrl: meeting.locusUrl,
|
|
63
177
|
selfId: meeting.selfId,
|
|
64
|
-
localMedias,
|
|
65
|
-
deviceUrl: meeting.deviceUrl,
|
|
66
178
|
correlationId: meeting.correlationId,
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
.then((response) => {
|
|
70
|
-
Metrics.postEvent({event: eventType.MEDIA_RESPONSE, meeting});
|
|
179
|
+
phoneUrl,
|
|
180
|
+
};
|
|
71
181
|
|
|
72
|
-
|
|
182
|
+
return meeting.meetingRequest.disconnectPhoneAudio(options).catch((err) => {
|
|
183
|
+
LoggerProxy.logger.error(
|
|
184
|
+
`Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ${meeting.id}, error: ${err}`
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
return Promise.reject(err);
|
|
73
188
|
});
|
|
74
|
-
}
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
// by default will leave on meeting's resourceId
|
|
192
|
+
// if you explicity want it not to leave on resource id, pass
|
|
193
|
+
// {resourceId: null}
|
|
194
|
+
// TODO: chris, you can modify this however you want
|
|
195
|
+
leaveMeeting: (meeting, options: any = {}) => {
|
|
196
|
+
if (meeting.meetingState === FULL_STATE.INACTIVE) {
|
|
197
|
+
// TODO: clean up if the meeting is already inactive
|
|
198
|
+
return Promise.reject(new MeetingNotActiveError());
|
|
199
|
+
}
|
|
75
200
|
|
|
76
|
-
MeetingUtil.
|
|
201
|
+
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
202
|
+
return Promise.reject(new UserNotJoinedError());
|
|
203
|
+
}
|
|
77
204
|
|
|
78
|
-
|
|
205
|
+
const defaultOptions = {
|
|
206
|
+
locusUrl: meeting.locusUrl,
|
|
207
|
+
selfId: meeting.selfId,
|
|
208
|
+
correlationId: meeting.correlationId,
|
|
209
|
+
resourceId: meeting.resourceId,
|
|
210
|
+
deviceUrl: meeting.deviceUrl,
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
const leaveOptions = {...defaultOptions, ...options};
|
|
214
|
+
|
|
215
|
+
return meeting.meetingRequest
|
|
216
|
+
.leaveMeeting(leaveOptions)
|
|
217
|
+
.then(() => {
|
|
218
|
+
if (options.moveMeeting) {
|
|
219
|
+
return Promise.resolve();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return MeetingUtil.cleanUp(meeting);
|
|
223
|
+
})
|
|
224
|
+
.catch((err) => {
|
|
225
|
+
// TODO: If the meeting state comes as LEFT or INACTIVE as response then
|
|
226
|
+
// 1) on leave clean up the meeting or simply do a sync on the meeting
|
|
227
|
+
// 2) If the error says meeting is inactive then destroy the meeting object
|
|
228
|
+
LoggerProxy.logger.error(
|
|
229
|
+
`Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ${meeting.id}, error: ${err}`
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
return Promise.reject(err);
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
declineMeeting: (meeting, reason) =>
|
|
236
|
+
meeting.meetingRequest.declineMeeting({
|
|
237
|
+
locusUrl: meeting.locusUrl,
|
|
238
|
+
deviceUrl: meeting.deviceUrl,
|
|
239
|
+
reason,
|
|
240
|
+
}),
|
|
79
241
|
|
|
80
|
-
|
|
81
|
-
err?.body?.errorCode && INTENT_TO_JOIN.includes(err.body.errorCode);
|
|
242
|
+
isUserInLeftState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _LEFT_,
|
|
82
243
|
|
|
83
|
-
|
|
84
|
-
if (!meeting) {
|
|
85
|
-
return Promise.reject(new ParameterError('You need a meeting object.'));
|
|
86
|
-
}
|
|
244
|
+
isUserInIdleState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _IDLE_,
|
|
87
245
|
|
|
88
|
-
|
|
246
|
+
isUserInJoinedState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _JOINED_,
|
|
89
247
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
event: eventType.LOCUS_JOIN_RESPONSE,
|
|
113
|
-
meeting,
|
|
114
|
-
data: {
|
|
115
|
-
trigger: trigger.LOCI_UPDATE,
|
|
116
|
-
locus: res.body.locus,
|
|
117
|
-
mediaConnections: res.body.mediaConnections,
|
|
118
|
-
trackingId: res.headers.trackingid,
|
|
248
|
+
isMediaEstablished: (currentMediaStatus) =>
|
|
249
|
+
currentMediaStatus &&
|
|
250
|
+
(currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share),
|
|
251
|
+
|
|
252
|
+
joinMeetingOptions: (meeting, options: any = {}) => {
|
|
253
|
+
const webex = meeting.getWebexObject();
|
|
254
|
+
|
|
255
|
+
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
256
|
+
|
|
257
|
+
if (meeting.requiredCaptcha) {
|
|
258
|
+
return Promise.reject(new CaptchaError());
|
|
259
|
+
}
|
|
260
|
+
if (meeting.passwordStatus === PASSWORD_STATUS.REQUIRED) {
|
|
261
|
+
return Promise.reject(new PasswordError());
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (options.pin) {
|
|
265
|
+
// @ts-ignore
|
|
266
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
267
|
+
name: 'client.pin.collected',
|
|
268
|
+
options: {
|
|
269
|
+
meetingId: meeting.id,
|
|
119
270
|
},
|
|
120
271
|
});
|
|
272
|
+
}
|
|
121
273
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
274
|
+
// normal join meeting, scenario A, D
|
|
275
|
+
return MeetingUtil.joinMeeting(meeting, options)
|
|
276
|
+
.then((response) => {
|
|
277
|
+
meeting.setLocus(response);
|
|
278
|
+
|
|
279
|
+
return Promise.resolve(response);
|
|
280
|
+
})
|
|
281
|
+
.catch((err) => {
|
|
282
|
+
// joining a claimed PMR that is not my own, scenario B
|
|
283
|
+
if (MeetingUtil.isPinOrGuest(err)) {
|
|
284
|
+
// @ts-ignore
|
|
285
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
286
|
+
name: 'client.pin.prompt',
|
|
287
|
+
options: {
|
|
288
|
+
meetingId: meeting.id,
|
|
289
|
+
},
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
// request host pin or non host for unclaimed PMR, start of Scenario C
|
|
293
|
+
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
294
|
+
return Promise.reject(new IntentToJoinError('Error Joining Meeting', err));
|
|
295
|
+
}
|
|
296
|
+
LoggerProxy.logger.error(
|
|
297
|
+
'Meeting:util#joinMeetingOptions --> Error joining the call, ',
|
|
298
|
+
err
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
return Promise.reject(new JoinMeetingError(options, 'Error Joining Meeting', err));
|
|
302
|
+
});
|
|
303
|
+
},
|
|
125
304
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
? meeting.statsAnalyzer.stopAnalyzer()
|
|
132
|
-
: Promise.resolve();
|
|
133
|
-
|
|
134
|
-
return stopStatsAnalyzer
|
|
135
|
-
.then(() => meeting.closeLocalStream())
|
|
136
|
-
.then(() => meeting.closeLocalShare())
|
|
137
|
-
.then(() => meeting.closeRemoteTracks())
|
|
138
|
-
.then(() => meeting.closePeerConnections())
|
|
139
|
-
.then(() => {
|
|
140
|
-
meeting.unsetLocalVideoTrack();
|
|
141
|
-
meeting.unsetLocalShareTrack();
|
|
142
|
-
meeting.unsetRemoteTracks();
|
|
143
|
-
meeting.unsetPeerConnections();
|
|
144
|
-
meeting.reconnectionManager.cleanUp();
|
|
145
|
-
})
|
|
146
|
-
.then(() => meeting.stopKeepAlive())
|
|
147
|
-
.then(() => meeting.updateLLMConnection());
|
|
148
|
-
};
|
|
305
|
+
getTrack: (stream) => {
|
|
306
|
+
let audioTrack = null;
|
|
307
|
+
let videoTrack = null;
|
|
308
|
+
let audioTracks = null;
|
|
309
|
+
let videoTracks = null;
|
|
149
310
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
phoneUrl,
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
return meeting.meetingRequest
|
|
163
|
-
.disconnectPhoneAudio(options)
|
|
164
|
-
.then((response) => {
|
|
165
|
-
if (response?.body?.locus) {
|
|
166
|
-
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
167
|
-
}
|
|
168
|
-
})
|
|
169
|
-
.catch((err) => {
|
|
170
|
-
LoggerProxy.logger.error(
|
|
171
|
-
`Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ${meeting.id}, error: ${err}`
|
|
172
|
-
);
|
|
311
|
+
if (!stream) {
|
|
312
|
+
return {audioTrack: null, videoTrack: null};
|
|
313
|
+
}
|
|
314
|
+
if (stream.getAudioTracks) {
|
|
315
|
+
audioTracks = stream.getAudioTracks();
|
|
316
|
+
}
|
|
317
|
+
if (stream.getVideoTracks) {
|
|
318
|
+
videoTracks = stream.getVideoTracks();
|
|
319
|
+
}
|
|
173
320
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
321
|
+
if (audioTracks && audioTracks.length > 0) {
|
|
322
|
+
[audioTrack] = audioTracks;
|
|
323
|
+
}
|
|
177
324
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
// TODO: chris, you can modify this however you want
|
|
182
|
-
MeetingUtil.leaveMeeting = (meeting, options: any = {}) => {
|
|
183
|
-
if (meeting.meetingState === FULL_STATE.INACTIVE) {
|
|
184
|
-
// TODO: clean up if the meeting is already inactive
|
|
185
|
-
return Promise.reject(new MeetingNotActiveError());
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
189
|
-
return Promise.reject(new UserNotJoinedError());
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const defaultOptions = {
|
|
193
|
-
locusUrl: meeting.locusUrl,
|
|
194
|
-
selfId: meeting.selfId,
|
|
195
|
-
correlationId: meeting.correlationId,
|
|
196
|
-
resourceId: meeting.resourceId,
|
|
197
|
-
deviceUrl: meeting.deviceUrl,
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
const leaveOptions = {...defaultOptions, ...options};
|
|
201
|
-
|
|
202
|
-
return meeting.meetingRequest
|
|
203
|
-
.leaveMeeting(leaveOptions)
|
|
204
|
-
.then((response) => {
|
|
205
|
-
if (response && response.body && response.body.locus) {
|
|
206
|
-
// && !options.moveMeeting) {
|
|
207
|
-
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
208
|
-
}
|
|
325
|
+
if (videoTracks && videoTracks.length > 0) {
|
|
326
|
+
[videoTrack] = videoTracks;
|
|
327
|
+
}
|
|
209
328
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
.then(() => {
|
|
213
|
-
if (options.moveMeeting) {
|
|
214
|
-
return Promise.resolve();
|
|
215
|
-
}
|
|
329
|
+
return {audioTrack, videoTrack};
|
|
330
|
+
},
|
|
216
331
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
LoggerProxy.logger.error(
|
|
224
|
-
`Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ${meeting.id}, error: ${err}`
|
|
225
|
-
);
|
|
332
|
+
getModeratorFromLocusInfo: (locusInfo) =>
|
|
333
|
+
locusInfo &&
|
|
334
|
+
locusInfo.parsedLocus &&
|
|
335
|
+
locusInfo.parsedLocus.info &&
|
|
336
|
+
locusInfo.parsedLocus.info &&
|
|
337
|
+
locusInfo.parsedLocus.info.moderator,
|
|
226
338
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
deviceUrl: meeting.deviceUrl,
|
|
234
|
-
reason,
|
|
235
|
-
});
|
|
339
|
+
getPolicyFromLocusInfo: (locusInfo) =>
|
|
340
|
+
locusInfo &&
|
|
341
|
+
locusInfo.parsedLocus &&
|
|
342
|
+
locusInfo.parsedLocus.info &&
|
|
343
|
+
locusInfo.parsedLocus.info &&
|
|
344
|
+
locusInfo.parsedLocus.info.policy,
|
|
236
345
|
|
|
237
|
-
|
|
346
|
+
getUserDisplayHintsFromLocusInfo: (locusInfo) =>
|
|
347
|
+
locusInfo?.parsedLocus?.info?.userDisplayHints || [],
|
|
238
348
|
|
|
239
|
-
|
|
349
|
+
canInviteNewParticipants: (displayHints) => displayHints.includes(DISPLAY_HINTS.ADD_GUEST),
|
|
240
350
|
|
|
241
|
-
|
|
351
|
+
canAdmitParticipant: (displayHints) =>
|
|
352
|
+
displayHints.includes(DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN),
|
|
242
353
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
354
|
+
canUserLock: (displayHints) =>
|
|
355
|
+
displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_LOCK) &&
|
|
356
|
+
displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_UNLOCKED),
|
|
246
357
|
|
|
247
|
-
|
|
248
|
-
|
|
358
|
+
canUserUnlock: (displayHints) =>
|
|
359
|
+
displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) &&
|
|
360
|
+
displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_LOCKED),
|
|
249
361
|
|
|
250
|
-
|
|
251
|
-
return Promise.reject(new CaptchaError());
|
|
252
|
-
}
|
|
253
|
-
if (meeting.passwordStatus === PASSWORD_STATUS.REQUIRED) {
|
|
254
|
-
return Promise.reject(new PasswordError());
|
|
255
|
-
}
|
|
362
|
+
canUserRaiseHand: (displayHints) => displayHints.includes(DISPLAY_HINTS.RAISE_HAND),
|
|
256
363
|
|
|
257
|
-
|
|
258
|
-
Metrics.postEvent({
|
|
259
|
-
event: eventType.PIN_COLLECTED,
|
|
260
|
-
meeting,
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// normal join meeting, scenario A, D
|
|
265
|
-
return MeetingUtil.joinMeeting(meeting, options)
|
|
266
|
-
.then((response) => {
|
|
267
|
-
meeting.setLocus(response);
|
|
268
|
-
|
|
269
|
-
return Promise.resolve(response);
|
|
270
|
-
})
|
|
271
|
-
.catch((err) => {
|
|
272
|
-
// joining a claimed PMR that is not my own, scenario B
|
|
273
|
-
if (MeetingUtil.isPinOrGuest(err)) {
|
|
274
|
-
Metrics.postEvent({
|
|
275
|
-
event: eventType.PIN_PROMPT,
|
|
276
|
-
meeting,
|
|
277
|
-
});
|
|
364
|
+
canUserLowerAllHands: (displayHints) => displayHints.includes(DISPLAY_HINTS.LOWER_ALL_HANDS),
|
|
278
365
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
return Promise.reject(new IntentToJoinError('Error Joining Meeting', err));
|
|
282
|
-
}
|
|
283
|
-
LoggerProxy.logger.error('Meeting:util#joinMeetingOptions --> Error joining the call, ', err);
|
|
366
|
+
canUserLowerSomeoneElsesHand: (displayHints) =>
|
|
367
|
+
displayHints.includes(DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND),
|
|
284
368
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
369
|
+
bothLeaveAndEndMeetingAvailable: (displayHints) =>
|
|
370
|
+
displayHints.includes(DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) ||
|
|
371
|
+
displayHints.includes(DISPLAY_HINTS.LEAVE_END_MEETING),
|
|
288
372
|
|
|
289
|
-
|
|
290
|
-
|
|
373
|
+
canManageBreakout: (displayHints) => displayHints.includes(DISPLAY_HINTS.BREAKOUT_MANAGEMENT),
|
|
374
|
+
canBroadcastMessageToBreakout: (displayHints, policies = {}) =>
|
|
375
|
+
displayHints.includes(DISPLAY_HINTS.BROADCAST_MESSAGE_TO_BREAKOUT) &&
|
|
376
|
+
!!policies[SELF_POLICY.SUPPORT_BROADCAST_MESSAGE],
|
|
291
377
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
378
|
+
isSuppressBreakoutSupport: (displayHints) =>
|
|
379
|
+
displayHints.includes(DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT),
|
|
295
380
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
381
|
+
canAdmitLobbyToBreakout: (displayHints) =>
|
|
382
|
+
!displayHints.includes(DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT),
|
|
299
383
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
384
|
+
isBreakoutPreassignmentsEnabled: (displayHints) =>
|
|
385
|
+
!displayHints.includes(DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS),
|
|
303
386
|
|
|
304
|
-
|
|
305
|
-
};
|
|
387
|
+
canUserAskForHelp: (displayHints) => !displayHints.includes(DISPLAY_HINTS.DISABLE_ASK_FOR_HELP),
|
|
306
388
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
let videoTracks = null;
|
|
312
|
-
|
|
313
|
-
if (!stream) {
|
|
314
|
-
return {audioTrack: null, videoTrack: null};
|
|
315
|
-
}
|
|
316
|
-
if (stream.getAudioTracks) {
|
|
317
|
-
audioTracks = stream.getAudioTracks();
|
|
318
|
-
}
|
|
319
|
-
if (stream.getVideoTracks) {
|
|
320
|
-
videoTracks = stream.getVideoTracks();
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
if (audioTracks && audioTracks.length > 0) {
|
|
324
|
-
[audioTrack] = audioTracks;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
if (videoTracks && videoTracks.length > 0) {
|
|
328
|
-
[videoTrack] = videoTracks;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
return {audioTrack, videoTrack};
|
|
332
|
-
};
|
|
389
|
+
lockMeeting: (actions, request, locusUrl) => {
|
|
390
|
+
if (actions && actions.canLock) {
|
|
391
|
+
return request.lockMeeting({locusUrl, lock: true});
|
|
392
|
+
}
|
|
333
393
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
locusInfo.parsedLocus &&
|
|
337
|
-
locusInfo.parsedLocus.info &&
|
|
338
|
-
locusInfo.parsedLocus.info &&
|
|
339
|
-
locusInfo.parsedLocus.info.moderator;
|
|
394
|
+
return Promise.reject(new PermissionError('Lock not allowed, due to joined property.'));
|
|
395
|
+
},
|
|
340
396
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
locusInfo.parsedLocus.info &&
|
|
346
|
-
locusInfo.parsedLocus.info.policy;
|
|
397
|
+
unlockMeeting: (actions, request, locusUrl) => {
|
|
398
|
+
if (actions && actions.canUnlock) {
|
|
399
|
+
return request.lockMeeting({locusUrl, lock: false});
|
|
400
|
+
}
|
|
347
401
|
|
|
348
|
-
|
|
349
|
-
|
|
402
|
+
return Promise.reject(new PermissionError('Unlock not allowed, due to joined property.'));
|
|
403
|
+
},
|
|
350
404
|
|
|
351
|
-
|
|
352
|
-
|
|
405
|
+
handleAudioLogging: (audioTrack?: LocalMicrophoneTrack) => {
|
|
406
|
+
const LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';
|
|
353
407
|
|
|
354
|
-
|
|
355
|
-
|
|
408
|
+
if (audioTrack) {
|
|
409
|
+
const settings = audioTrack.underlyingTrack.getSettings();
|
|
410
|
+
const {deviceId} = settings;
|
|
356
411
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
412
|
+
LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);
|
|
413
|
+
LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));
|
|
414
|
+
}
|
|
415
|
+
},
|
|
360
416
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_LOCKED);
|
|
417
|
+
handleVideoLogging: (videoTrack?: LocalCameraTrack) => {
|
|
418
|
+
const LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';
|
|
364
419
|
|
|
365
|
-
|
|
420
|
+
if (videoTrack) {
|
|
421
|
+
const settings = videoTrack.underlyingTrack.getSettings();
|
|
422
|
+
const {deviceId} = settings;
|
|
366
423
|
|
|
367
|
-
|
|
368
|
-
|
|
424
|
+
LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);
|
|
425
|
+
LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));
|
|
426
|
+
}
|
|
427
|
+
},
|
|
369
428
|
|
|
370
|
-
|
|
371
|
-
|
|
429
|
+
handleDeviceLogging: (devices = []) => {
|
|
430
|
+
const LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';
|
|
372
431
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
432
|
+
devices.forEach((device) => {
|
|
433
|
+
LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${device.deviceId}`);
|
|
434
|
+
LoggerProxy.logger.log(LOG_HEADER, 'settings', JSON.stringify(device));
|
|
435
|
+
});
|
|
436
|
+
},
|
|
376
437
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
438
|
+
endMeetingForAll: (meeting) => {
|
|
439
|
+
if (meeting.meetingState === FULL_STATE.INACTIVE) {
|
|
440
|
+
return Promise.reject(new MeetingNotActiveError());
|
|
441
|
+
}
|
|
381
442
|
|
|
382
|
-
|
|
383
|
-
|
|
443
|
+
const endOptions = {
|
|
444
|
+
locusUrl: meeting.locusUrl,
|
|
445
|
+
};
|
|
384
446
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
447
|
+
return meeting.meetingRequest
|
|
448
|
+
.endMeetingForAll(endOptions)
|
|
449
|
+
.then(() => MeetingUtil.cleanUp(meeting))
|
|
450
|
+
.catch((err) => {
|
|
451
|
+
LoggerProxy.logger.error(
|
|
452
|
+
`Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ${meeting.id}, error: ${err}`
|
|
453
|
+
);
|
|
389
454
|
|
|
390
|
-
|
|
391
|
-
};
|
|
455
|
+
return Promise.reject(err);
|
|
456
|
+
});
|
|
457
|
+
},
|
|
392
458
|
|
|
393
|
-
|
|
394
|
-
const LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';
|
|
459
|
+
canEnableClosedCaption: (displayHints) => displayHints.includes(DISPLAY_HINTS.CAPTION_START),
|
|
395
460
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
const {deviceId} = settings;
|
|
461
|
+
isSaveTranscriptsEnabled: (displayHints) =>
|
|
462
|
+
displayHints.includes(DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED),
|
|
399
463
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
};
|
|
464
|
+
canStartTranscribing: (displayHints) =>
|
|
465
|
+
displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START),
|
|
404
466
|
|
|
405
|
-
|
|
406
|
-
|
|
467
|
+
canStopTranscribing: (displayHints) =>
|
|
468
|
+
displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP),
|
|
407
469
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
const {deviceId} = settings;
|
|
470
|
+
isClosedCaptionActive: (displayHints) =>
|
|
471
|
+
displayHints.includes(DISPLAY_HINTS.CAPTION_STATUS_ACTIVE),
|
|
411
472
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
};
|
|
473
|
+
isWebexAssistantActive: (displayHints) =>
|
|
474
|
+
displayHints.includes(DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE),
|
|
416
475
|
|
|
417
|
-
|
|
418
|
-
const LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';
|
|
476
|
+
canViewCaptionPanel: (displayHints) => displayHints.includes(DISPLAY_HINTS.ENABLE_CAPTION_PANEL),
|
|
419
477
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
LoggerProxy.logger.log(LOG_HEADER, 'settings', JSON.stringify(device));
|
|
423
|
-
});
|
|
424
|
-
};
|
|
478
|
+
isRealTimeTranslationEnabled: (displayHints) =>
|
|
479
|
+
displayHints.includes(DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION),
|
|
425
480
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
return Promise.reject(new MeetingNotActiveError());
|
|
429
|
-
}
|
|
481
|
+
canSelectSpokenLanguages: (displayHints) =>
|
|
482
|
+
displayHints.includes(DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR),
|
|
430
483
|
|
|
431
|
-
|
|
432
|
-
locusUrl: meeting.locusUrl,
|
|
433
|
-
};
|
|
484
|
+
waitingForOthersToJoin: (displayHints) => displayHints.includes(DISPLAY_HINTS.WAITING_FOR_OTHERS),
|
|
434
485
|
|
|
435
|
-
|
|
436
|
-
.
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
486
|
+
canSendReactions: (originalValue, displayHints) => {
|
|
487
|
+
if (displayHints.includes(DISPLAY_HINTS.REACTIONS_ACTIVE)) {
|
|
488
|
+
return true;
|
|
489
|
+
}
|
|
490
|
+
if (displayHints.includes(DISPLAY_HINTS.REACTIONS_INACTIVE)) {
|
|
491
|
+
return false;
|
|
492
|
+
}
|
|
441
493
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
.
|
|
446
|
-
LoggerProxy.logger.error(
|
|
447
|
-
`Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ${meeting.id}, error: ${err}`
|
|
448
|
-
);
|
|
494
|
+
return originalValue;
|
|
495
|
+
},
|
|
496
|
+
canUserRenameSelfAndObserved: (displayHints) =>
|
|
497
|
+
displayHints.includes(DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED),
|
|
449
498
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
499
|
+
canUserRenameOthers: (displayHints) => displayHints.includes(DISPLAY_HINTS.CAN_RENAME_OTHERS),
|
|
500
|
+
|
|
501
|
+
canShareWhiteBoard: (displayHints) => displayHints.includes(DISPLAY_HINTS.SHARE_WHITEBOARD),
|
|
453
502
|
|
|
454
|
-
|
|
455
|
-
|
|
503
|
+
/**
|
|
504
|
+
* Adds the current locus sequence information to a request body
|
|
505
|
+
* @param {Object} meeting The meeting object
|
|
506
|
+
* @param {Object} requestBody The body of a request to locus
|
|
507
|
+
* @returns {void}
|
|
508
|
+
*/
|
|
509
|
+
addSequence: (meeting, requestBody) => {
|
|
510
|
+
const sequence = meeting?.locusInfo?.sequence;
|
|
456
511
|
|
|
457
|
-
|
|
458
|
-
|
|
512
|
+
if (!sequence) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
requestBody.sequence = sequence;
|
|
517
|
+
},
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Updates the locus info for the meeting with the delta locus
|
|
521
|
+
* returned from requests that include the sequence information
|
|
522
|
+
* Returns the original response object
|
|
523
|
+
* @param {Object} meeting The meeting object
|
|
524
|
+
* @param {Object} response The response of the http request
|
|
525
|
+
* @returns {Object}
|
|
526
|
+
*/
|
|
527
|
+
updateLocusWithDelta: (meeting, response) => {
|
|
528
|
+
if (!meeting) {
|
|
529
|
+
return response;
|
|
530
|
+
}
|
|
459
531
|
|
|
460
|
-
|
|
461
|
-
displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);
|
|
532
|
+
const locus = response?.body?.locus;
|
|
462
533
|
|
|
463
|
-
|
|
464
|
-
|
|
534
|
+
if (locus) {
|
|
535
|
+
meeting.locusInfo.handleLocusDelta(locus, meeting);
|
|
536
|
+
}
|
|
465
537
|
|
|
466
|
-
|
|
467
|
-
|
|
538
|
+
return response;
|
|
539
|
+
},
|
|
468
540
|
|
|
469
|
-
|
|
470
|
-
|
|
541
|
+
generateLocusDeltaRequest: (originalMeeting) => {
|
|
542
|
+
const meetingRef = new WeakRef(originalMeeting);
|
|
471
543
|
|
|
472
|
-
|
|
473
|
-
|
|
544
|
+
const locusDeltaRequest = (originalOptions) => {
|
|
545
|
+
const meeting = meetingRef.deref();
|
|
474
546
|
|
|
475
|
-
|
|
476
|
-
|
|
547
|
+
if (!meeting) {
|
|
548
|
+
return Promise.resolve();
|
|
549
|
+
}
|
|
477
550
|
|
|
478
|
-
|
|
479
|
-
displayHints.includes(DISPLAY_HINTS.WAITING_FOR_OTHERS);
|
|
551
|
+
const options = cloneDeep(originalOptions);
|
|
480
552
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
if (displayHints.includes(DISPLAY_HINTS.DISABLE_REACTIONS)) {
|
|
486
|
-
return false;
|
|
487
|
-
}
|
|
553
|
+
if (!options.body) {
|
|
554
|
+
options.body = {};
|
|
555
|
+
}
|
|
488
556
|
|
|
489
|
-
|
|
490
|
-
};
|
|
557
|
+
MeetingUtil.addSequence(meeting, options.body);
|
|
491
558
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
if (displayHints.includes(DISPLAY_HINTS.REACTIONS_INACTIVE)) {
|
|
497
|
-
return false;
|
|
498
|
-
}
|
|
559
|
+
return meeting
|
|
560
|
+
.request(options)
|
|
561
|
+
.then((response) => MeetingUtil.updateLocusWithDelta(meeting, response));
|
|
562
|
+
};
|
|
499
563
|
|
|
500
|
-
|
|
564
|
+
return locusDeltaRequest;
|
|
565
|
+
},
|
|
566
|
+
|
|
567
|
+
selfSupportsFeature: (feature: SELF_POLICY, userPolicies: Record<SELF_POLICY, boolean>) => {
|
|
568
|
+
if (!userPolicies) {
|
|
569
|
+
return true;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
return userPolicies[feature];
|
|
573
|
+
},
|
|
574
|
+
|
|
575
|
+
parseInterpretationInfo: (meeting, meetingInfo) => {
|
|
576
|
+
if (!meeting || !meetingInfo) {
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
const siInfo = meetingInfo.simultaneousInterpretation;
|
|
580
|
+
meeting.simultaneousInterpretation.updateMeetingSIEnabled(
|
|
581
|
+
!!meetingInfo.turnOnSimultaneousInterpretation,
|
|
582
|
+
!!siInfo?.currentSIInterpreter
|
|
583
|
+
);
|
|
584
|
+
const hostSIEnabled = !!(
|
|
585
|
+
meetingInfo.turnOnSimultaneousInterpretation &&
|
|
586
|
+
meetingInfo?.meetingSiteSetting?.enableHostInterpreterControlSI
|
|
587
|
+
);
|
|
588
|
+
meeting.simultaneousInterpretation.updateHostSIEnabled(hostSIEnabled);
|
|
589
|
+
|
|
590
|
+
function renameKey(obj, oldKey, newKey) {
|
|
591
|
+
if (oldKey in obj) {
|
|
592
|
+
obj[newKey] = obj[oldKey];
|
|
593
|
+
delete obj[oldKey];
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (siInfo) {
|
|
597
|
+
const lanuagesInfo = cloneDeep(siInfo.siLanguages);
|
|
598
|
+
for (const language of lanuagesInfo) {
|
|
599
|
+
renameKey(language, 'languageCode', 'languageName');
|
|
600
|
+
renameKey(language, 'languageGroupId', 'languageCode');
|
|
601
|
+
}
|
|
602
|
+
if (!meeting.simultaneousInterpretation?.siLanguages?.length) {
|
|
603
|
+
meeting.simultaneousInterpretation.updateInterpretation({siLanguages: lanuagesInfo});
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
Trigger.trigger(
|
|
607
|
+
meeting,
|
|
608
|
+
{
|
|
609
|
+
file: 'meeting/util',
|
|
610
|
+
function: 'parseInterpretationInfo',
|
|
611
|
+
},
|
|
612
|
+
EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE
|
|
613
|
+
);
|
|
614
|
+
},
|
|
501
615
|
};
|
|
502
616
|
|
|
503
617
|
export default MeetingUtil;
|