@webex/plugin-meetings 3.0.0-beta.4 → 3.0.0-beta.400
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 +58 -8
- 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 +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 +216 -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 +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -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 +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- 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 +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- 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 +41 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +11 -15
- package/dist/config.js.map +1 -1
- package/dist/constants.js +347 -74
- 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 +125 -18
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.js +93 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +380 -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 +101 -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 +564 -246
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +10 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +82 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +314 -163
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +107 -231
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +137 -222
- 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 +316 -501
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +97 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +5311 -3871
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +260 -183
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +421 -347
- 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 +672 -585
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +172 -0
- package/dist/meeting/voicea-meeting.js.map +1 -0
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +87 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +352 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +99 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +147 -234
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +43 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +895 -600
- 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 +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +184 -157
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +134 -85
- 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 +158 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +194 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- 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 +324 -259
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +19 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +263 -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 +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +82 -45
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +657 -448
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +255 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- 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/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +297 -460
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +20 -26
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +413 -483
- 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 +362 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +102 -86
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +131 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +437 -116
- 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 +179 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +557 -583
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +326 -130
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.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/no-meeting-info.d.ts +14 -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/reclaim-host-role-errors.d.ts +60 -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 +93 -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 +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1088 -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/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -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 +272 -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 +241 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +167 -0
- package/dist/types/meeting/index.d.ts +1824 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +293 -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 +118 -0
- package/dist/types/meeting/voicea-meeting.d.ts +16 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -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 +40 -0
- package/dist/types/meetings/index.d.ts +389 -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 +160 -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 +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +120 -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 +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +301 -0
- package/dist/types/multistream/sendSlotManager.d.ts +70 -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/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +105 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +8 -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 +136 -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 +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/internal-README.md +7 -6
- package/package.json +30 -21
- 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 +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +26 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +19 -21
- package/src/constants.ts +296 -27
- 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 +45 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +349 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +561 -119
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +97 -17
- package/src/locus-info/{parser.js → parser.ts} +303 -104
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +460 -0
- package/src/media/properties.ts +283 -0
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +249 -0
- package/src/meeting/in-meeting-actions.ts +199 -3
- package/src/meeting/index.ts +8494 -0
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +465 -0
- package/src/meeting/request.ts +912 -0
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +799 -0
- package/src/meeting/voicea-meeting.ts +122 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +210 -0
- package/src/meeting-info/meeting-info-v2.ts +423 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +70 -58
- package/src/meeting-info/{utilv2.js → utilv2.ts} +99 -82
- package/src/meetings/collection.ts +76 -0
- package/src/meetings/index.ts +1539 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +133 -38
- package/src/member/{index.js → index.ts} +159 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +397 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +351 -146
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +353 -0
- package/src/metrics/{constants.js → constants.ts} +17 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +341 -64
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +82 -3
- package/src/multistream/remoteMediaManager.ts +401 -81
- package/src/multistream/sendSlotManager.ts +199 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +371 -0
- package/src/reachability/request.ts +50 -35
- package/src/reachability/util.ts +24 -0
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/index.ts +643 -0
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +332 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/index.ts +288 -0
- package/src/roap/request.ts +153 -0
- package/src/roap/turnDiscovery.ts +374 -70
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +166 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1275 -0
- package/src/statsAnalyzer/mqaUtil.ts +440 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +791 -531
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +238 -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 +89 -0
- package/test/unit/spec/breakouts/index.ts +1793 -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/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 +93 -90
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +625 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1458 -21
- package/test/unit/spec/locus-info/infoUtils.js +71 -40
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
- package/test/unit/spec/locus-info/parser.js +119 -44
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +291 -12
- package/test/unit/spec/media/index.ts +194 -111
- package/test/unit/spec/media/properties.ts +11 -11
- package/test/unit/spec/meeting/in-meeting-actions.ts +96 -3
- package/test/unit/spec/meeting/index.js +8616 -1921
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +568 -207
- package/test/unit/spec/meeting/request.js +602 -82
- package/test/unit/spec/meeting/utils.js +867 -179
- package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +631 -78
- 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 +27 -1
- package/test/unit/spec/meetings/index.js +1826 -374
- package/test/unit/spec/meetings/utils.js +243 -14
- package/test/unit/spec/member/index.js +61 -7
- package/test/unit/spec/member/util.js +526 -26
- package/test/unit/spec/members/index.js +536 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +217 -4
- package/test/unit/spec/metrics/index.js +13 -68
- package/test/unit/spec/multistream/mediaRequestManager.ts +1032 -110
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +350 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +937 -65
- package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
- 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/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +606 -26
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +222 -34
- package/test/unit/spec/recording-controller/index.js +306 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +238 -82
- package/test/unit/spec/roap/request.ts +255 -0
- package/test/unit/spec/roap/turnDiscovery.ts +707 -110
- package/test/unit/spec/rtcMetrics/index.ts +122 -0
- package/test/unit/spec/stats-analyzer/index.js +1331 -62
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +65 -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 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/media/properties.js +0 -289
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/request.js +0 -684
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/collection.js +0 -40
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/reachability/index.js +0 -464
- package/src/reconnection-manager/index.js +0 -519
- package/src/roap/index.js +0 -220
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
package/dist/meeting/util.js
CHANGED
|
@@ -1,639 +1,726 @@
|
|
|
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
|
-
|
|
9
|
+
var _Array$from = require("@babel/runtime-corejs2/core-js/array/from");
|
|
10
|
+
var _Symbol = require("@babel/runtime-corejs2/core-js/symbol");
|
|
11
|
+
var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator");
|
|
12
|
+
var _Array$isArray = require("@babel/runtime-corejs2/core-js/array/is-array");
|
|
15
13
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
16
|
-
|
|
17
14
|
_Object$defineProperty(exports, "__esModule", {
|
|
18
15
|
value: true
|
|
19
16
|
});
|
|
20
|
-
|
|
21
17
|
exports.default = void 0;
|
|
22
|
-
|
|
23
18
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
24
|
-
|
|
25
19
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
26
|
-
|
|
27
20
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
28
|
-
|
|
29
21
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
30
|
-
|
|
31
|
-
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
32
|
-
|
|
22
|
+
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
33
23
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
34
|
-
|
|
35
|
-
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
36
|
-
|
|
37
|
-
var _config = require("../metrics/config");
|
|
38
|
-
|
|
39
|
-
var _media = _interopRequireDefault(require("../media"));
|
|
40
|
-
|
|
41
24
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
42
|
-
|
|
43
25
|
var _constants = require("../constants");
|
|
44
|
-
|
|
26
|
+
var _browserDetection = _interopRequireDefault(require("../common/browser-detection"));
|
|
45
27
|
var _intentToJoin = _interopRequireDefault(require("../common/errors/intent-to-join"));
|
|
46
|
-
|
|
47
28
|
var _joinMeeting = _interopRequireDefault(require("../common/errors/join-meeting"));
|
|
48
|
-
|
|
49
29
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
50
|
-
|
|
51
30
|
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
52
|
-
|
|
53
31
|
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
54
|
-
|
|
55
32
|
var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
|
|
56
|
-
|
|
33
|
+
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
34
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
35
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
57
37
|
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
38
|
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
|
-
|
|
39
|
+
var MeetingUtil = {
|
|
40
|
+
parseLocusJoin: function parseLocusJoin(response) {
|
|
41
|
+
var parsed = {};
|
|
42
|
+
|
|
43
|
+
// First todo: add check for existance
|
|
44
|
+
parsed.locus = response.body.locus;
|
|
45
|
+
parsed.mediaConnections = response.body.mediaConnections;
|
|
46
|
+
parsed.locusUrl = parsed.locus.url;
|
|
47
|
+
parsed.locusId = parsed.locus.url.split('/').pop();
|
|
48
|
+
parsed.selfId = parsed.locus.self.id;
|
|
49
|
+
|
|
50
|
+
// we need mediaId before making roap calls
|
|
51
|
+
parsed.mediaConnections.forEach(function (mediaConnection) {
|
|
52
|
+
if (mediaConnection.mediaId) {
|
|
53
|
+
parsed.mediaId = mediaConnection.mediaId;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return parsed;
|
|
57
|
+
},
|
|
58
|
+
remoteUpdateAudioVideo: function remoteUpdateAudioVideo(meeting, audioMuted, videoMuted) {
|
|
59
|
+
var webex = meeting.getWebexObject();
|
|
60
|
+
if (!meeting) {
|
|
61
|
+
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
62
|
+
}
|
|
63
|
+
if (!meeting.locusMediaRequest) {
|
|
64
|
+
return _promise.default.reject(new _parameter.default('You need a meeting with a media connection, call Meeting.addMedia() first.'));
|
|
75
65
|
}
|
|
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
66
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
preferTranscoding: !meeting.isMultistream
|
|
103
|
-
}).then(function (response) {
|
|
104
|
-
_metrics.default.postEvent({
|
|
105
|
-
event: _config.eventType.MEDIA_RESPONSE,
|
|
106
|
-
meeting: meeting
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
69
|
+
name: 'client.locus.media.request',
|
|
70
|
+
options: {
|
|
71
|
+
meetingId: meeting.id
|
|
72
|
+
}
|
|
107
73
|
});
|
|
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
|
|
74
|
+
return meeting.locusMediaRequest.send({
|
|
75
|
+
type: 'LocalMute',
|
|
76
|
+
selfUrl: meeting.selfUrl,
|
|
77
|
+
mediaId: meeting.mediaId,
|
|
78
|
+
sequence: meeting.locusInfo.sequence,
|
|
79
|
+
muteOptions: {
|
|
80
|
+
audioMuted: audioMuted,
|
|
81
|
+
videoMuted: videoMuted
|
|
163
82
|
}
|
|
83
|
+
}).then(function (response) {
|
|
84
|
+
var _response$body;
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
87
|
+
name: 'client.locus.media.response',
|
|
88
|
+
options: {
|
|
89
|
+
meetingId: meeting.id
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return response === null || response === void 0 ? void 0 : (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.locus;
|
|
164
93
|
});
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
MeetingUtil.disconnectPhoneAudio = function (meeting, phoneUrl) {
|
|
193
|
-
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
194
|
-
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
var options = {
|
|
198
|
-
locusUrl: meeting.locusUrl,
|
|
199
|
-
selfId: meeting.selfId,
|
|
200
|
-
correlationId: meeting.correlationId,
|
|
201
|
-
phoneUrl: phoneUrl
|
|
202
|
-
};
|
|
203
|
-
return meeting.meetingRequest.disconnectPhoneAudio(options).then(function (response) {
|
|
204
|
-
var _response$body;
|
|
205
|
-
|
|
206
|
-
if (response !== null && response !== void 0 && (_response$body = response.body) !== null && _response$body !== void 0 && _response$body.locus) {
|
|
207
|
-
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
94
|
+
},
|
|
95
|
+
hasOwner: function hasOwner(info) {
|
|
96
|
+
return info && info.owner;
|
|
97
|
+
},
|
|
98
|
+
isOwnerSelf: function isOwnerSelf(owner, selfId) {
|
|
99
|
+
return owner === selfId;
|
|
100
|
+
},
|
|
101
|
+
isPinOrGuest: function isPinOrGuest(err) {
|
|
102
|
+
var _err$body;
|
|
103
|
+
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);
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* Returns the current state of knowledge about whether we are on an ipv4-only or ipv6-only or mixed (ipv4 and ipv6) network.
|
|
107
|
+
* The return value matches the possible values of "ipver" parameter used by the backend APIs.
|
|
108
|
+
*
|
|
109
|
+
* @param {Object} webex webex instance
|
|
110
|
+
* @returns {IP_VERSION|undefined} ipver value to be passed to the backend APIs or undefined if we should not pass any value to the backend
|
|
111
|
+
*/
|
|
112
|
+
getIpVersion: function getIpVersion(webex) {
|
|
113
|
+
var _webex$internal$devic = webex.internal.device.ipNetworkDetector,
|
|
114
|
+
supportsIpV4 = _webex$internal$devic.supportsIpV4,
|
|
115
|
+
supportsIpV6 = _webex$internal$devic.supportsIpV6;
|
|
116
|
+
if ((0, _browserDetection.default)().isBrowser('firefox')) {
|
|
117
|
+
// our ipv6 solution relies on FQDN ICE candidates, but Firefox doesn't support them,
|
|
118
|
+
// see https://bugzilla.mozilla.org/show_bug.cgi?id=1713128
|
|
119
|
+
// so for Firefox we don't want the backend to activate the "ipv6 feature"
|
|
120
|
+
return undefined;
|
|
208
121
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
return _promise.default.reject(err);
|
|
213
|
-
});
|
|
214
|
-
}; // by default will leave on meeting's resourceId
|
|
215
|
-
// if you explicity want it not to leave on resource id, pass
|
|
216
|
-
// {resourceId: null}
|
|
217
|
-
// TODO: chris, you can modify this however you want
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
MeetingUtil.leaveMeeting = function (meeting) {
|
|
221
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
222
|
-
|
|
223
|
-
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
224
|
-
// TODO: clean up if the meeting is already inactive
|
|
225
|
-
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
229
|
-
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
var defaultOptions = {
|
|
233
|
-
locusUrl: meeting.locusUrl,
|
|
234
|
-
selfId: meeting.selfId,
|
|
235
|
-
correlationId: meeting.correlationId,
|
|
236
|
-
resourceId: meeting.resourceId,
|
|
237
|
-
deviceUrl: meeting.deviceUrl
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
var leaveOptions = _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
241
|
-
|
|
242
|
-
return meeting.meetingRequest.leaveMeeting(leaveOptions).then(function (response) {
|
|
243
|
-
if (response && response.body && response.body.locus) {
|
|
244
|
-
// && !options.moveMeeting) {
|
|
245
|
-
meeting.locusInfo.onFullLocus(response.body.locus);
|
|
122
|
+
if (supportsIpV4 && supportsIpV6) {
|
|
123
|
+
return _constants.IP_VERSION.ipv4_and_ipv6;
|
|
246
124
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}).then(function () {
|
|
250
|
-
if (options.moveMeeting) {
|
|
251
|
-
return _promise.default.resolve();
|
|
125
|
+
if (supportsIpV4) {
|
|
126
|
+
return _constants.IP_VERSION.only_ipv4;
|
|
252
127
|
}
|
|
128
|
+
if (supportsIpV6) {
|
|
129
|
+
return _constants.IP_VERSION.only_ipv6;
|
|
130
|
+
}
|
|
131
|
+
return _constants.IP_VERSION.unknown;
|
|
132
|
+
},
|
|
133
|
+
joinMeeting: function joinMeeting(meeting, options) {
|
|
134
|
+
var _meeting$meetingInfo;
|
|
135
|
+
if (!meeting) {
|
|
136
|
+
return _promise.default.reject(new _parameter.default('You need a meeting object.'));
|
|
137
|
+
}
|
|
138
|
+
var webex = meeting.getWebexObject();
|
|
253
139
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
return _promise.default.reject(err);
|
|
262
|
-
});
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
MeetingUtil.declineMeeting = function (meeting, reason) {
|
|
266
|
-
return meeting.meetingRequest.declineMeeting({
|
|
267
|
-
locusUrl: meeting.locusUrl,
|
|
268
|
-
deviceUrl: meeting.deviceUrl,
|
|
269
|
-
reason: reason
|
|
270
|
-
});
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
MeetingUtil.isUserInLeftState = function (locusInfo) {
|
|
274
|
-
var _locusInfo$parsedLocu, _locusInfo$parsedLocu2;
|
|
275
|
-
|
|
276
|
-
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_;
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
MeetingUtil.isUserInIdleState = function (locusInfo) {
|
|
280
|
-
var _locusInfo$parsedLocu3, _locusInfo$parsedLocu4;
|
|
281
|
-
|
|
282
|
-
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_;
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
MeetingUtil.isUserInJoinedState = function (locusInfo) {
|
|
286
|
-
var _locusInfo$parsedLocu5, _locusInfo$parsedLocu6;
|
|
287
|
-
|
|
288
|
-
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_;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
MeetingUtil.isMediaEstablished = function (currentMediaStatus) {
|
|
292
|
-
return currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
MeetingUtil.joinMeetingOptions = function (meeting) {
|
|
296
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
297
|
-
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
298
|
-
|
|
299
|
-
if (meeting.requiredCaptcha) {
|
|
300
|
-
return _promise.default.reject(new _captchaError.default());
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
if (meeting.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED) {
|
|
304
|
-
return _promise.default.reject(new _passwordError.default());
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
if (options.pin) {
|
|
308
|
-
_metrics.default.postEvent({
|
|
309
|
-
event: _config.eventType.PIN_COLLECTED,
|
|
310
|
-
meeting: meeting
|
|
140
|
+
// @ts-ignore
|
|
141
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
142
|
+
name: 'client.locus.join.request',
|
|
143
|
+
options: {
|
|
144
|
+
meetingId: meeting.id
|
|
145
|
+
}
|
|
311
146
|
});
|
|
312
|
-
} // normal join meeting, scenario A, D
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
return MeetingUtil.joinMeeting(meeting, options).then(function (response) {
|
|
316
|
-
meeting.setLocus(response);
|
|
317
|
-
return _promise.default.resolve(response);
|
|
318
|
-
}).catch(function (err) {
|
|
319
|
-
// joining a claimed PMR that is not my own, scenario B
|
|
320
|
-
if (MeetingUtil.isPinOrGuest(err)) {
|
|
321
|
-
_metrics.default.postEvent({
|
|
322
|
-
event: _config.eventType.PIN_PROMPT,
|
|
323
|
-
meeting: meeting
|
|
324
|
-
}); // request host pin or non host for unclaimed PMR, start of Scenario C
|
|
325
|
-
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
326
147
|
|
|
327
|
-
|
|
328
|
-
|
|
148
|
+
// eslint-disable-next-line no-warning-comments
|
|
149
|
+
// TODO: check if the meeting is in JOINING state
|
|
150
|
+
// if Joining state termintate the request as user might click multiple times
|
|
151
|
+
return meeting.meetingRequest.joinMeeting({
|
|
152
|
+
inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,
|
|
153
|
+
meetingNumber: meeting.meetingNumber,
|
|
154
|
+
deviceUrl: meeting.deviceUrl,
|
|
155
|
+
locusUrl: meeting.locusUrl,
|
|
156
|
+
locusClusterUrl: (_meeting$meetingInfo = meeting.meetingInfo) === null || _meeting$meetingInfo === void 0 ? void 0 : _meeting$meetingInfo.locusClusterUrl,
|
|
157
|
+
correlationId: meeting.correlationId,
|
|
158
|
+
reachability: options.reachability,
|
|
159
|
+
roapMessage: options.roapMessage,
|
|
160
|
+
permissionToken: meeting.permissionToken,
|
|
161
|
+
resourceId: options.resourceId || null,
|
|
162
|
+
moderator: options.moderator,
|
|
163
|
+
pin: options.pin,
|
|
164
|
+
moveToResource: options.moveToResource,
|
|
165
|
+
preferTranscoding: !meeting.isMultistream,
|
|
166
|
+
asResourceOccupant: options.asResourceOccupant,
|
|
167
|
+
breakoutsSupported: options.breakoutsSupported,
|
|
168
|
+
locale: options.locale,
|
|
169
|
+
deviceCapabilities: options.deviceCapabilities,
|
|
170
|
+
liveAnnotationSupported: options.liveAnnotationSupported,
|
|
171
|
+
ipVersion: MeetingUtil.getIpVersion(meeting.getWebexObject())
|
|
172
|
+
}).then(function (res) {
|
|
173
|
+
// @ts-ignore
|
|
174
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
175
|
+
name: 'client.locus.join.response',
|
|
176
|
+
payload: {
|
|
177
|
+
trigger: 'loci-update',
|
|
178
|
+
identifiers: {
|
|
179
|
+
trackingId: res.headers.trackingid
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
options: {
|
|
183
|
+
meetingId: meeting.id,
|
|
184
|
+
mediaConnections: res.body.mediaConnections
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
return MeetingUtil.parseLocusJoin(res);
|
|
188
|
+
});
|
|
189
|
+
},
|
|
190
|
+
cleanUp: function cleanUp(meeting) {
|
|
191
|
+
meeting.breakouts.cleanUp();
|
|
192
|
+
meeting.simultaneousInterpretation.cleanUp();
|
|
193
|
+
|
|
194
|
+
// make sure we send last metrics before we close the peerconnection
|
|
195
|
+
var stopStatsAnalyzer = meeting.statsAnalyzer ? meeting.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
196
|
+
return stopStatsAnalyzer.then(function () {
|
|
197
|
+
return meeting.closeRemoteStreams();
|
|
198
|
+
}).then(function () {
|
|
199
|
+
return meeting.closePeerConnections();
|
|
200
|
+
}).then(function () {
|
|
201
|
+
meeting.cleanupLocalStreams();
|
|
202
|
+
meeting.unsetRemoteStreams();
|
|
203
|
+
meeting.unsetPeerConnections();
|
|
204
|
+
meeting.reconnectionManager.cleanUp();
|
|
205
|
+
}).then(function () {
|
|
206
|
+
return meeting.stopKeepAlive();
|
|
207
|
+
}).then(function () {
|
|
208
|
+
var _meeting$config;
|
|
209
|
+
if ((_meeting$config = meeting.config) !== null && _meeting$config !== void 0 && _meeting$config.enableAutomaticLLM) {
|
|
210
|
+
meeting.updateLLMConnection();
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
},
|
|
214
|
+
disconnectPhoneAudio: function disconnectPhoneAudio(meeting, phoneUrl) {
|
|
215
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
216
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
329
217
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
MeetingUtil.validateOptions = function (options) {
|
|
338
|
-
var sendVideo = options.sendVideo,
|
|
339
|
-
sendAudio = options.sendAudio,
|
|
340
|
-
sendShare = options.sendShare,
|
|
341
|
-
localStream = options.localStream,
|
|
342
|
-
localShare = options.localShare;
|
|
343
|
-
|
|
344
|
-
if (sendVideo && !MeetingUtil.getTrack(localStream).videoTrack) {
|
|
345
|
-
return _promise.default.reject(new _parameter.default('please pass valid video streams'));
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
if (sendAudio && !MeetingUtil.getTrack(localStream).audioTrack) {
|
|
349
|
-
return _promise.default.reject(new _parameter.default('please pass valid audio streams'));
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
if (sendShare && !MeetingUtil.getTrack(localShare).videoTrack) {
|
|
353
|
-
return _promise.default.reject(new _parameter.default('please pass valid share streams'));
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
return _promise.default.resolve();
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
MeetingUtil.getTrack = function (stream) {
|
|
360
|
-
var audioTrack = null;
|
|
361
|
-
var videoTrack = null;
|
|
362
|
-
var audioTracks = null;
|
|
363
|
-
var videoTracks = null;
|
|
364
|
-
|
|
365
|
-
if (!stream) {
|
|
366
|
-
return {
|
|
367
|
-
audioTrack: null,
|
|
368
|
-
videoTrack: null
|
|
218
|
+
var options = {
|
|
219
|
+
locusUrl: meeting.locusUrl,
|
|
220
|
+
selfId: meeting.selfId,
|
|
221
|
+
correlationId: meeting.correlationId,
|
|
222
|
+
phoneUrl: phoneUrl
|
|
369
223
|
};
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
audioTracks = stream.getAudioTracks();
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
if (stream.getVideoTracks) {
|
|
377
|
-
videoTracks = stream.getVideoTracks();
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
if (audioTracks && audioTracks.length > 0) {
|
|
381
|
-
var _audioTracks = audioTracks;
|
|
382
|
-
|
|
383
|
-
var _audioTracks2 = (0, _slicedToArray2.default)(_audioTracks, 1);
|
|
384
|
-
|
|
385
|
-
audioTrack = _audioTracks2[0];
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
if (videoTracks && videoTracks.length > 0) {
|
|
389
|
-
var _videoTracks = videoTracks;
|
|
390
|
-
|
|
391
|
-
var _videoTracks2 = (0, _slicedToArray2.default)(_videoTracks, 1);
|
|
392
|
-
|
|
393
|
-
videoTrack = _videoTracks2[0];
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return {
|
|
397
|
-
audioTrack: audioTrack,
|
|
398
|
-
videoTrack: videoTrack
|
|
399
|
-
};
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
MeetingUtil.getModeratorFromLocusInfo = function (locusInfo) {
|
|
403
|
-
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.moderator;
|
|
404
|
-
};
|
|
405
|
-
|
|
406
|
-
MeetingUtil.getPolicyFromLocusInfo = function (locusInfo) {
|
|
407
|
-
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.policy;
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
MeetingUtil.getUserDisplayHintsFromLocusInfo = function (locusInfo) {
|
|
411
|
-
var _locusInfo$parsedLocu7, _locusInfo$parsedLocu8;
|
|
412
|
-
|
|
413
|
-
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) || [];
|
|
414
|
-
};
|
|
415
|
-
|
|
416
|
-
MeetingUtil.canInviteNewParticipants = function (displayHints) {
|
|
417
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.ADD_GUEST);
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
MeetingUtil.canAdmitParticipant = function (displayHints) {
|
|
421
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
MeetingUtil.canUserLock = function (displayHints) {
|
|
425
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_LOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
MeetingUtil.canUserUnlock = function (displayHints) {
|
|
429
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_LOCKED);
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
MeetingUtil.canUserRecord = function (displayHints) {
|
|
433
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_START);
|
|
434
|
-
};
|
|
435
|
-
|
|
436
|
-
MeetingUtil.canUserPause = function (displayHints) {
|
|
437
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_PAUSE);
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
MeetingUtil.canUserResume = function (displayHints) {
|
|
441
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_RESUME);
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
MeetingUtil.canUserStop = function (displayHints) {
|
|
445
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.RECORDING_CONTROL_STOP);
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
MeetingUtil.startRecording = function (request, locusUrl, locusInfo) {
|
|
449
|
-
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
450
|
-
|
|
451
|
-
if (MeetingUtil.canUserRecord(displayHints)) {
|
|
452
|
-
return request.recordMeeting({
|
|
453
|
-
locusUrl: locusUrl,
|
|
454
|
-
recording: true,
|
|
455
|
-
paused: false
|
|
224
|
+
return meeting.meetingRequest.disconnectPhoneAudio(options).catch(function (err) {
|
|
225
|
+
_loggerProxy.default.logger.error("Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ".concat(meeting.id, ", error: ").concat(err));
|
|
226
|
+
return _promise.default.reject(err);
|
|
456
227
|
});
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
locusUrl: locusUrl,
|
|
468
|
-
|
|
469
|
-
|
|
228
|
+
},
|
|
229
|
+
/**
|
|
230
|
+
* Returns options for leaving a meeting.
|
|
231
|
+
* @param {any} meeting
|
|
232
|
+
* @param {any} options
|
|
233
|
+
* @returns {any} leave options
|
|
234
|
+
*/
|
|
235
|
+
prepareLeaveMeetingOptions: function prepareLeaveMeetingOptions(meeting) {
|
|
236
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
237
|
+
var defaultOptions = {
|
|
238
|
+
locusUrl: meeting.locusUrl,
|
|
239
|
+
selfId: meeting.selfId,
|
|
240
|
+
correlationId: meeting.correlationId,
|
|
241
|
+
resourceId: meeting.resourceId,
|
|
242
|
+
deviceUrl: meeting.deviceUrl
|
|
243
|
+
};
|
|
244
|
+
return _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
245
|
+
},
|
|
246
|
+
// by default will leave on meeting's resourceId
|
|
247
|
+
// if you explicity want it not to leave on resource id, pass
|
|
248
|
+
// {resourceId: null}
|
|
249
|
+
// TODO: chris, you can modify this however you want
|
|
250
|
+
leaveMeeting: function leaveMeeting(meeting) {
|
|
251
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
252
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
253
|
+
// TODO: clean up if the meeting is already inactive
|
|
254
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
255
|
+
}
|
|
256
|
+
if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {
|
|
257
|
+
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
258
|
+
}
|
|
259
|
+
var leaveOptions = MeetingUtil.prepareLeaveMeetingOptions(meeting, options);
|
|
260
|
+
return meeting.meetingRequest.leaveMeeting(leaveOptions).then(function () {
|
|
261
|
+
if (options.moveMeeting) {
|
|
262
|
+
return _promise.default.resolve();
|
|
263
|
+
}
|
|
264
|
+
return MeetingUtil.cleanUp(meeting);
|
|
265
|
+
}).catch(function (err) {
|
|
266
|
+
// TODO: If the meeting state comes as LEFT or INACTIVE as response then
|
|
267
|
+
// 1) on leave clean up the meeting or simply do a sync on the meeting
|
|
268
|
+
// 2) If the error says meeting is inactive then destroy the meeting object
|
|
269
|
+
_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));
|
|
270
|
+
return _promise.default.reject(err);
|
|
470
271
|
});
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
var displayHints = MeetingUtil.getUserDisplayHintsFromLocusInfo(locusInfo);
|
|
478
|
-
|
|
479
|
-
if (MeetingUtil.canUserResume(displayHints)) {
|
|
480
|
-
return request.recordMeeting({
|
|
481
|
-
locusUrl: locusUrl,
|
|
482
|
-
recording: true,
|
|
483
|
-
paused: false
|
|
272
|
+
},
|
|
273
|
+
declineMeeting: function declineMeeting(meeting, reason) {
|
|
274
|
+
return meeting.meetingRequest.declineMeeting({
|
|
275
|
+
locusUrl: meeting.locusUrl,
|
|
276
|
+
deviceUrl: meeting.deviceUrl,
|
|
277
|
+
reason: reason
|
|
484
278
|
});
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
279
|
+
},
|
|
280
|
+
isUserInLeftState: function isUserInLeftState(locusInfo) {
|
|
281
|
+
var _locusInfo$parsedLocu, _locusInfo$parsedLocu2;
|
|
282
|
+
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_;
|
|
283
|
+
},
|
|
284
|
+
isUserInIdleState: function isUserInIdleState(locusInfo) {
|
|
285
|
+
var _locusInfo$parsedLocu3, _locusInfo$parsedLocu4;
|
|
286
|
+
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_;
|
|
287
|
+
},
|
|
288
|
+
isUserInJoinedState: function isUserInJoinedState(locusInfo) {
|
|
289
|
+
var _locusInfo$parsedLocu5, _locusInfo$parsedLocu6;
|
|
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
|
+
isMediaEstablished: function isMediaEstablished(currentMediaStatus) {
|
|
293
|
+
return currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
|
|
294
|
+
},
|
|
295
|
+
joinMeetingOptions: function joinMeetingOptions(meeting) {
|
|
296
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
297
|
+
var webex = meeting.getWebexObject();
|
|
298
|
+
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
299
|
+
if (meeting.requiredCaptcha) {
|
|
300
|
+
return _promise.default.reject(new _captchaError.default());
|
|
301
|
+
}
|
|
302
|
+
if (meeting.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED) {
|
|
303
|
+
return _promise.default.reject(new _passwordError.default());
|
|
304
|
+
}
|
|
305
|
+
if (options.pin) {
|
|
306
|
+
// @ts-ignore
|
|
307
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
308
|
+
name: 'client.pin.collected',
|
|
309
|
+
options: {
|
|
310
|
+
meetingId: meeting.id
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
492
314
|
|
|
493
|
-
|
|
494
|
-
return
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
315
|
+
// normal join meeting, scenario A, D
|
|
316
|
+
return MeetingUtil.joinMeeting(meeting, options).then(function (response) {
|
|
317
|
+
meeting.setLocus(response);
|
|
318
|
+
return _promise.default.resolve(response);
|
|
319
|
+
}).catch(function (err) {
|
|
320
|
+
// joining a claimed PMR that is not my own, scenario B
|
|
321
|
+
if (MeetingUtil.isPinOrGuest(err)) {
|
|
322
|
+
// @ts-ignore
|
|
323
|
+
webex.internal.newMetrics.submitClientEvent({
|
|
324
|
+
name: 'client.pin.prompt',
|
|
325
|
+
options: {
|
|
326
|
+
meetingId: meeting.id
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// request host pin or non host for unclaimed PMR, start of Scenario C
|
|
331
|
+
// see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature
|
|
332
|
+
return _promise.default.reject(new _intentToJoin.default('Error Joining Meeting', err));
|
|
333
|
+
}
|
|
334
|
+
_loggerProxy.default.logger.error('Meeting:util#joinMeetingOptions --> Error joining the call, ', err);
|
|
335
|
+
return _promise.default.reject(new _joinMeeting.default(options, 'Error Joining Meeting', err));
|
|
498
336
|
});
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
337
|
+
},
|
|
338
|
+
/**
|
|
339
|
+
* Returns request options for leaving a meeting.
|
|
340
|
+
* @param {any} meeting
|
|
341
|
+
* @param {any} options
|
|
342
|
+
* @returns {any} request options
|
|
343
|
+
*/
|
|
344
|
+
buildLeaveFetchRequestOptions: function buildLeaveFetchRequestOptions(meeting) {
|
|
345
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
346
|
+
var leaveOptions = MeetingUtil.prepareLeaveMeetingOptions(meeting, options);
|
|
347
|
+
return meeting.meetingRequest.buildLeaveMeetingRequestOptions(leaveOptions);
|
|
348
|
+
},
|
|
349
|
+
getTrack: function getTrack(stream) {
|
|
350
|
+
var audioTrack = null;
|
|
351
|
+
var videoTrack = null;
|
|
352
|
+
var audioTracks = null;
|
|
353
|
+
var videoTracks = null;
|
|
354
|
+
if (!stream) {
|
|
355
|
+
return {
|
|
356
|
+
audioTrack: null,
|
|
357
|
+
videoTrack: null
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
if (stream.getAudioTracks) {
|
|
361
|
+
audioTracks = stream.getAudioTracks();
|
|
362
|
+
}
|
|
363
|
+
if (stream.getVideoTracks) {
|
|
364
|
+
videoTracks = stream.getVideoTracks();
|
|
365
|
+
}
|
|
366
|
+
if (audioTracks && audioTracks.length > 0) {
|
|
367
|
+
var _audioTracks = audioTracks;
|
|
368
|
+
var _audioTracks2 = (0, _slicedToArray2.default)(_audioTracks, 1);
|
|
369
|
+
audioTrack = _audioTracks2[0];
|
|
370
|
+
}
|
|
371
|
+
if (videoTracks && videoTracks.length > 0) {
|
|
372
|
+
var _videoTracks = videoTracks;
|
|
373
|
+
var _videoTracks2 = (0, _slicedToArray2.default)(_videoTracks, 1);
|
|
374
|
+
videoTrack = _videoTracks2[0];
|
|
375
|
+
}
|
|
376
|
+
return {
|
|
377
|
+
audioTrack: audioTrack,
|
|
378
|
+
videoTrack: videoTrack
|
|
379
|
+
};
|
|
380
|
+
},
|
|
381
|
+
getModeratorFromLocusInfo: function getModeratorFromLocusInfo(locusInfo) {
|
|
382
|
+
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.moderator;
|
|
383
|
+
},
|
|
384
|
+
getPolicyFromLocusInfo: function getPolicyFromLocusInfo(locusInfo) {
|
|
385
|
+
return locusInfo && locusInfo.parsedLocus && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info && locusInfo.parsedLocus.info.policy;
|
|
386
|
+
},
|
|
387
|
+
getUserDisplayHintsFromLocusInfo: function getUserDisplayHintsFromLocusInfo(locusInfo) {
|
|
388
|
+
var _locusInfo$parsedLocu7, _locusInfo$parsedLocu8;
|
|
389
|
+
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) || [];
|
|
390
|
+
},
|
|
391
|
+
canInviteNewParticipants: function canInviteNewParticipants(displayHints) {
|
|
392
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ADD_GUEST);
|
|
393
|
+
},
|
|
394
|
+
canAdmitParticipant: function canAdmitParticipant(displayHints) {
|
|
395
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);
|
|
396
|
+
},
|
|
397
|
+
canUserLock: function canUserLock(displayHints) {
|
|
398
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_LOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);
|
|
399
|
+
},
|
|
400
|
+
canUserUnlock: function canUserUnlock(displayHints) {
|
|
401
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) && displayHints.includes(_constants.DISPLAY_HINTS.LOCK_STATUS_LOCKED);
|
|
402
|
+
},
|
|
403
|
+
canUserRaiseHand: function canUserRaiseHand(displayHints) {
|
|
404
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.RAISE_HAND);
|
|
405
|
+
},
|
|
406
|
+
canUserLowerAllHands: function canUserLowerAllHands(displayHints) {
|
|
407
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_ALL_HANDS);
|
|
408
|
+
},
|
|
409
|
+
canUserLowerSomeoneElsesHand: function canUserLowerSomeoneElsesHand(displayHints) {
|
|
410
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND);
|
|
411
|
+
},
|
|
412
|
+
bothLeaveAndEndMeetingAvailable: function bothLeaveAndEndMeetingAvailable(displayHints) {
|
|
413
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) || displayHints.includes(_constants.DISPLAY_HINTS.LEAVE_END_MEETING);
|
|
414
|
+
},
|
|
415
|
+
canManageBreakout: function canManageBreakout(displayHints) {
|
|
416
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.BREAKOUT_MANAGEMENT);
|
|
417
|
+
},
|
|
418
|
+
canBroadcastMessageToBreakout: function canBroadcastMessageToBreakout(displayHints) {
|
|
419
|
+
var policies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
420
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.BROADCAST_MESSAGE_TO_BREAKOUT) && !!policies[_constants.SELF_POLICY.SUPPORT_BROADCAST_MESSAGE];
|
|
421
|
+
},
|
|
422
|
+
isSuppressBreakoutSupport: function isSuppressBreakoutSupport(displayHints) {
|
|
423
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT);
|
|
424
|
+
},
|
|
425
|
+
canAdmitLobbyToBreakout: function canAdmitLobbyToBreakout(displayHints) {
|
|
426
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT);
|
|
427
|
+
},
|
|
428
|
+
isBreakoutPreassignmentsEnabled: function isBreakoutPreassignmentsEnabled(displayHints) {
|
|
429
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS);
|
|
430
|
+
},
|
|
431
|
+
canUserAskForHelp: function canUserAskForHelp(displayHints) {
|
|
432
|
+
return !displayHints.includes(_constants.DISPLAY_HINTS.DISABLE_ASK_FOR_HELP);
|
|
433
|
+
},
|
|
434
|
+
lockMeeting: function lockMeeting(actions, request, locusUrl) {
|
|
435
|
+
if (actions && actions.canLock) {
|
|
436
|
+
return request.lockMeeting({
|
|
437
|
+
locusUrl: locusUrl,
|
|
438
|
+
lock: true
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
return _promise.default.reject(new _permission.default('Lock not allowed, due to joined property.'));
|
|
442
|
+
},
|
|
443
|
+
unlockMeeting: function unlockMeeting(actions, request, locusUrl) {
|
|
444
|
+
if (actions && actions.canUnlock) {
|
|
445
|
+
return request.lockMeeting({
|
|
446
|
+
locusUrl: locusUrl,
|
|
447
|
+
lock: false
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
return _promise.default.reject(new _permission.default('Unlock not allowed, due to joined property.'));
|
|
451
|
+
},
|
|
452
|
+
handleAudioLogging: function handleAudioLogging(audioStream) {
|
|
453
|
+
var LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';
|
|
454
|
+
if (audioStream) {
|
|
455
|
+
var settings = audioStream.getSettings();
|
|
456
|
+
var deviceId = settings.deviceId;
|
|
457
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
458
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
handleVideoLogging: function handleVideoLogging(videoStream) {
|
|
462
|
+
var LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';
|
|
463
|
+
if (videoStream) {
|
|
464
|
+
var settings = videoStream.getSettings();
|
|
465
|
+
var deviceId = settings.deviceId;
|
|
466
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(deviceId));
|
|
467
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings =', (0, _stringify.default)(settings));
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
handleDeviceLogging: function handleDeviceLogging() {
|
|
471
|
+
var devices = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
472
|
+
var LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';
|
|
473
|
+
devices.forEach(function (device) {
|
|
474
|
+
_loggerProxy.default.logger.log(LOG_HEADER, "deviceId = ".concat(device.deviceId));
|
|
475
|
+
_loggerProxy.default.logger.log(LOG_HEADER, 'settings', (0, _stringify.default)(device));
|
|
525
476
|
});
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
477
|
+
},
|
|
478
|
+
endMeetingForAll: function endMeetingForAll(meeting) {
|
|
479
|
+
if (meeting.meetingState === _constants.FULL_STATE.INACTIVE) {
|
|
480
|
+
return _promise.default.reject(new _webexErrors.MeetingNotActiveError());
|
|
481
|
+
}
|
|
482
|
+
var endOptions = {
|
|
483
|
+
locusUrl: meeting.locusUrl
|
|
484
|
+
};
|
|
485
|
+
return meeting.meetingRequest.endMeetingForAll(endOptions).then(function () {
|
|
486
|
+
return MeetingUtil.cleanUp(meeting);
|
|
487
|
+
}).catch(function (err) {
|
|
488
|
+
_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));
|
|
489
|
+
return _promise.default.reject(err);
|
|
536
490
|
});
|
|
537
|
-
}
|
|
538
|
-
|
|
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
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
491
|
+
},
|
|
492
|
+
canEnableClosedCaption: function canEnableClosedCaption(displayHints) {
|
|
493
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_START);
|
|
494
|
+
},
|
|
495
|
+
isSaveTranscriptsEnabled: function isSaveTranscriptsEnabled(displayHints) {
|
|
496
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED);
|
|
497
|
+
},
|
|
498
|
+
canStartTranscribing: function canStartTranscribing(displayHints) {
|
|
499
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START);
|
|
500
|
+
},
|
|
501
|
+
canStopTranscribing: function canStopTranscribing(displayHints) {
|
|
502
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);
|
|
503
|
+
},
|
|
504
|
+
isClosedCaptionActive: function isClosedCaptionActive(displayHints) {
|
|
505
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_STATUS_ACTIVE);
|
|
506
|
+
},
|
|
507
|
+
isWebexAssistantActive: function isWebexAssistantActive(displayHints) {
|
|
508
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE);
|
|
509
|
+
},
|
|
510
|
+
canViewCaptionPanel: function canViewCaptionPanel(displayHints) {
|
|
511
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.ENABLE_CAPTION_PANEL);
|
|
512
|
+
},
|
|
513
|
+
isRealTimeTranslationEnabled: function isRealTimeTranslationEnabled(displayHints) {
|
|
514
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION);
|
|
515
|
+
},
|
|
516
|
+
canSelectSpokenLanguages: function canSelectSpokenLanguages(displayHints) {
|
|
517
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR);
|
|
518
|
+
},
|
|
519
|
+
waitingForOthersToJoin: function waitingForOthersToJoin(displayHints) {
|
|
520
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.WAITING_FOR_OTHERS);
|
|
521
|
+
},
|
|
522
|
+
canSendReactions: function canSendReactions(originalValue, displayHints) {
|
|
523
|
+
if (displayHints.includes(_constants.DISPLAY_HINTS.REACTIONS_ACTIVE)) {
|
|
524
|
+
return true;
|
|
525
|
+
}
|
|
526
|
+
if (displayHints.includes(_constants.DISPLAY_HINTS.REACTIONS_INACTIVE)) {
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
return originalValue;
|
|
530
|
+
},
|
|
531
|
+
canUserRenameSelfAndObserved: function canUserRenameSelfAndObserved(displayHints) {
|
|
532
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED);
|
|
533
|
+
},
|
|
534
|
+
canUserRenameOthers: function canUserRenameOthers(displayHints) {
|
|
535
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_OTHERS);
|
|
536
|
+
},
|
|
537
|
+
canShareWhiteBoard: function canShareWhiteBoard(displayHints) {
|
|
538
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.SHARE_WHITEBOARD);
|
|
539
|
+
},
|
|
540
|
+
/**
|
|
541
|
+
* Adds the current locus sequence information to a request body
|
|
542
|
+
* @param {Object} meeting The meeting object
|
|
543
|
+
* @param {Object} requestBody The body of a request to locus
|
|
544
|
+
* @returns {void}
|
|
545
|
+
*/
|
|
546
|
+
addSequence: function addSequence(meeting, requestBody) {
|
|
547
|
+
var _meeting$locusInfo;
|
|
548
|
+
var sequence = meeting === null || meeting === void 0 ? void 0 : (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.sequence;
|
|
549
|
+
if (!sequence) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
requestBody.sequence = sequence;
|
|
553
|
+
},
|
|
554
|
+
/**
|
|
555
|
+
* Updates the locus info for the meeting with the delta locus
|
|
556
|
+
* returned from requests that include the sequence information
|
|
557
|
+
* Returns the original response object
|
|
558
|
+
* @param {Object} meeting The meeting object
|
|
559
|
+
* @param {Object} response The response of the http request
|
|
560
|
+
* @returns {Object}
|
|
561
|
+
*/
|
|
562
|
+
updateLocusWithDelta: function updateLocusWithDelta(meeting, response) {
|
|
563
|
+
var _response$body2;
|
|
564
|
+
if (!meeting) {
|
|
565
|
+
return response;
|
|
566
|
+
}
|
|
567
|
+
var locus = response === null || response === void 0 ? void 0 : (_response$body2 = response.body) === null || _response$body2 === void 0 ? void 0 : _response$body2.locus;
|
|
568
|
+
if (locus) {
|
|
569
|
+
meeting.locusInfo.handleLocusDelta(locus, meeting);
|
|
570
|
+
}
|
|
571
|
+
return response;
|
|
572
|
+
},
|
|
573
|
+
generateBuildLocusDeltaRequestOptions: function generateBuildLocusDeltaRequestOptions(originalMeeting) {
|
|
574
|
+
var meetingRef = new WeakRef(originalMeeting);
|
|
575
|
+
var buildLocusDeltaRequestOptions = function buildLocusDeltaRequestOptions(originalOptions) {
|
|
576
|
+
var meeting = meetingRef.deref();
|
|
577
|
+
if (!meeting) {
|
|
578
|
+
return originalOptions;
|
|
579
|
+
}
|
|
580
|
+
var options = (0, _cloneDeep2.default)(originalOptions);
|
|
581
|
+
if (!options.body) {
|
|
582
|
+
options.body = {};
|
|
583
|
+
}
|
|
584
|
+
MeetingUtil.addSequence(meeting, options.body);
|
|
585
|
+
return options;
|
|
586
|
+
};
|
|
587
|
+
return buildLocusDeltaRequestOptions;
|
|
588
|
+
},
|
|
589
|
+
generateLocusDeltaRequest: function generateLocusDeltaRequest(originalMeeting) {
|
|
590
|
+
var meetingRef = new WeakRef(originalMeeting);
|
|
591
|
+
var buildLocusDeltaRequestOptions = MeetingUtil.generateBuildLocusDeltaRequestOptions(originalMeeting);
|
|
592
|
+
var locusDeltaRequest = function locusDeltaRequest(originalOptions) {
|
|
593
|
+
var meeting = meetingRef.deref();
|
|
594
|
+
if (!meeting) {
|
|
595
|
+
return _promise.default.resolve();
|
|
596
|
+
}
|
|
597
|
+
var options = buildLocusDeltaRequestOptions(originalOptions);
|
|
598
|
+
return meeting.request(options).then(function (response) {
|
|
599
|
+
return MeetingUtil.updateLocusWithDelta(meeting, response);
|
|
600
|
+
});
|
|
601
|
+
};
|
|
602
|
+
return locusDeltaRequest;
|
|
603
|
+
},
|
|
604
|
+
selfSupportsFeature: function selfSupportsFeature(feature, userPolicies) {
|
|
605
|
+
if (!userPolicies) {
|
|
606
|
+
return true;
|
|
607
|
+
}
|
|
608
|
+
return userPolicies[feature];
|
|
609
|
+
},
|
|
610
|
+
parseInterpretationInfo: function parseInterpretationInfo(meeting, meetingInfo) {
|
|
611
|
+
var _meetingInfo$meetingS;
|
|
612
|
+
if (!meeting || !meetingInfo) {
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
var siInfo = meetingInfo.simultaneousInterpretation;
|
|
616
|
+
meeting.simultaneousInterpretation.updateMeetingSIEnabled(!!meetingInfo.turnOnSimultaneousInterpretation, !!(siInfo !== null && siInfo !== void 0 && siInfo.currentSIInterpreter));
|
|
617
|
+
var hostSIEnabled = !!(meetingInfo.turnOnSimultaneousInterpretation && meetingInfo !== null && meetingInfo !== void 0 && (_meetingInfo$meetingS = meetingInfo.meetingSiteSetting) !== null && _meetingInfo$meetingS !== void 0 && _meetingInfo$meetingS.enableHostInterpreterControlSI);
|
|
618
|
+
meeting.simultaneousInterpretation.updateHostSIEnabled(hostSIEnabled);
|
|
619
|
+
function renameKey(obj, oldKey, newKey) {
|
|
620
|
+
if (oldKey in obj) {
|
|
621
|
+
obj[newKey] = obj[oldKey];
|
|
622
|
+
delete obj[oldKey];
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
if (siInfo) {
|
|
626
|
+
var _meeting$simultaneous, _meeting$simultaneous2;
|
|
627
|
+
var lanuagesInfo = (0, _cloneDeep2.default)(siInfo.siLanguages);
|
|
628
|
+
var _iterator = _createForOfIteratorHelper(lanuagesInfo),
|
|
629
|
+
_step;
|
|
630
|
+
try {
|
|
631
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
632
|
+
var language = _step.value;
|
|
633
|
+
renameKey(language, 'languageCode', 'languageName');
|
|
634
|
+
renameKey(language, 'languageGroupId', 'languageCode');
|
|
635
|
+
}
|
|
636
|
+
} catch (err) {
|
|
637
|
+
_iterator.e(err);
|
|
638
|
+
} finally {
|
|
639
|
+
_iterator.f();
|
|
640
|
+
}
|
|
641
|
+
if (!((_meeting$simultaneous = meeting.simultaneousInterpretation) !== null && _meeting$simultaneous !== void 0 && (_meeting$simultaneous2 = _meeting$simultaneous.siLanguages) !== null && _meeting$simultaneous2 !== void 0 && _meeting$simultaneous2.length)) {
|
|
642
|
+
meeting.simultaneousInterpretation.updateInterpretation({
|
|
643
|
+
siLanguages: lanuagesInfo
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
_triggerProxy.default.trigger(meeting, {
|
|
648
|
+
file: 'meeting/util',
|
|
649
|
+
function: 'parseInterpretationInfo'
|
|
650
|
+
}, _constants.EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE);
|
|
651
|
+
},
|
|
652
|
+
/**
|
|
653
|
+
* Returns a CA-recognized error payload for the specified raw error message/reason.
|
|
654
|
+
*
|
|
655
|
+
* New errors can be added to this function for handling in the future
|
|
656
|
+
*
|
|
657
|
+
* @param {String} reason the raw error message
|
|
658
|
+
* @returns {Array<object>} an array of payload objects
|
|
659
|
+
*/
|
|
660
|
+
getChangeMeetingFloorErrorPayload: function getChangeMeetingFloorErrorPayload(reason) {
|
|
661
|
+
var errorPayload = {
|
|
662
|
+
errorDescription: reason,
|
|
663
|
+
name: 'locus.response',
|
|
664
|
+
shownToUser: false
|
|
665
|
+
};
|
|
666
|
+
if (reason.includes(_constants.LOCAL_SHARE_ERRORS.UNDEFINED)) {
|
|
667
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
668
|
+
fatal: true,
|
|
669
|
+
category: 'signaling',
|
|
670
|
+
errorCode: 1100
|
|
671
|
+
})];
|
|
672
|
+
}
|
|
673
|
+
if (reason.includes(_constants.LOCAL_SHARE_ERRORS.DEVICE_NOT_JOINED)) {
|
|
674
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
675
|
+
fatal: true,
|
|
676
|
+
category: 'signaling',
|
|
677
|
+
errorCode: 4050
|
|
678
|
+
})];
|
|
679
|
+
}
|
|
680
|
+
if (reason.includes(_constants.LOCAL_SHARE_ERRORS.NO_MEDIA_FOR_DEVICE)) {
|
|
681
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
682
|
+
fatal: true,
|
|
683
|
+
category: 'media',
|
|
684
|
+
errorCode: 2048
|
|
685
|
+
})];
|
|
686
|
+
}
|
|
687
|
+
if (reason.includes(_constants.LOCAL_SHARE_ERRORS.NO_CONFLUENCE_ID)) {
|
|
688
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
689
|
+
fatal: true,
|
|
690
|
+
category: 'signaling',
|
|
691
|
+
errorCode: 4064
|
|
692
|
+
})];
|
|
693
|
+
}
|
|
694
|
+
if (reason.includes(_constants.LOCAL_SHARE_ERRORS.CONTENT_SHARING_DISABLED)) {
|
|
695
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
696
|
+
fatal: true,
|
|
697
|
+
category: 'expected',
|
|
698
|
+
errorCode: 4065
|
|
699
|
+
})];
|
|
700
|
+
}
|
|
701
|
+
if (reason.includes(_constants.LOCAL_SHARE_ERRORS.LOCUS_PARTICIPANT_DNE)) {
|
|
702
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
703
|
+
fatal: true,
|
|
704
|
+
category: 'signaling',
|
|
705
|
+
errorCode: 4066
|
|
706
|
+
})];
|
|
707
|
+
}
|
|
708
|
+
if (reason.includes(_constants.LOCAL_SHARE_ERRORS.CONTENT_REQUEST_WHILE_PENDING_WHITEBOARD)) {
|
|
709
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
710
|
+
fatal: true,
|
|
711
|
+
category: 'expected',
|
|
712
|
+
errorCode: 4067
|
|
713
|
+
})];
|
|
589
714
|
}
|
|
590
715
|
|
|
591
|
-
return
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
});
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
MeetingUtil.canEnableClosedCaption = function (displayHints) {
|
|
602
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_START);
|
|
603
|
-
};
|
|
604
|
-
|
|
605
|
-
MeetingUtil.canStartTranscribing = function (displayHints) {
|
|
606
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START);
|
|
607
|
-
};
|
|
608
|
-
|
|
609
|
-
MeetingUtil.canStopTranscribing = function (displayHints) {
|
|
610
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
MeetingUtil.isClosedCaptionActive = function (displayHints) {
|
|
614
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.CAPTION_STATUS_ACTIVE);
|
|
615
|
-
};
|
|
616
|
-
|
|
617
|
-
MeetingUtil.isWebexAssistantActive = function (displayHints) {
|
|
618
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE);
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
MeetingUtil.canViewCaptionPanel = function (displayHints) {
|
|
622
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.ENABLE_CAPTION_PANEL);
|
|
623
|
-
};
|
|
624
|
-
|
|
625
|
-
MeetingUtil.isRealTimeTranslationEnabled = function (displayHints) {
|
|
626
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION);
|
|
627
|
-
};
|
|
628
|
-
|
|
629
|
-
MeetingUtil.canSelectSpokenLanguages = function (displayHints) {
|
|
630
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR);
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
MeetingUtil.waitingForOthersToJoin = function (displayHints) {
|
|
634
|
-
return displayHints.includes(_constants.DISPLAY_HINTS.WAITING_FOR_OTHERS);
|
|
716
|
+
// return unknown error
|
|
717
|
+
return [_objectSpread(_objectSpread({}, errorPayload), {}, {
|
|
718
|
+
fatal: true,
|
|
719
|
+
category: 'signaling',
|
|
720
|
+
errorCode: 1100
|
|
721
|
+
})];
|
|
722
|
+
}
|
|
635
723
|
};
|
|
636
|
-
|
|
637
724
|
var _default = MeetingUtil;
|
|
638
725
|
exports.default = _default;
|
|
639
726
|
//# sourceMappingURL=util.js.map
|