@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
|
@@ -0,0 +1,912 @@
|
|
|
1
|
+
import uuid from 'uuid';
|
|
2
|
+
import {debounce} from 'lodash';
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import {StatelessWebexPlugin} from '@webex/webex-core';
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import {deviceType} from '@webex/common';
|
|
7
|
+
import {CallDiagnosticUtils} from '@webex/internal-plugin-metrics';
|
|
8
|
+
|
|
9
|
+
import LoggerProxy from '../common/logs/logger-proxy';
|
|
10
|
+
import {
|
|
11
|
+
ALERT,
|
|
12
|
+
ALTERNATE_REDIRECT_TRUE,
|
|
13
|
+
BREAKOUTS,
|
|
14
|
+
CALL,
|
|
15
|
+
CONTROLS,
|
|
16
|
+
DECLINE,
|
|
17
|
+
END,
|
|
18
|
+
FLOOR_ACTION,
|
|
19
|
+
HTTP_VERBS,
|
|
20
|
+
LEAVE,
|
|
21
|
+
LOCI,
|
|
22
|
+
PARTICIPANT,
|
|
23
|
+
PROVISIONAL_TYPE_DIAL_IN,
|
|
24
|
+
PROVISIONAL_TYPE_DIAL_OUT,
|
|
25
|
+
REACHABILITY,
|
|
26
|
+
SEND_DTMF_ENDPOINT,
|
|
27
|
+
_SLIDES_,
|
|
28
|
+
ANNOTATION,
|
|
29
|
+
IP_VERSION,
|
|
30
|
+
} from '../constants';
|
|
31
|
+
import {SendReactionOptions, ToggleReactionsOptions} from './request.type';
|
|
32
|
+
import MeetingUtil from './util';
|
|
33
|
+
import {AnnotationInfo} from '../annotation/annotation.types';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @class MeetingRequest
|
|
37
|
+
*/
|
|
38
|
+
export default class MeetingRequest extends StatelessWebexPlugin {
|
|
39
|
+
changeVideoLayoutDebounced: any;
|
|
40
|
+
meetingRef: WeakRef<any>;
|
|
41
|
+
locusDeltaRequest: (options: object) => Promise<any>;
|
|
42
|
+
buildLocusDeltaRequestOptions: (options: object) => Promise<any>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Constructor
|
|
46
|
+
* @param {Object} attrs
|
|
47
|
+
* @param {Object} options
|
|
48
|
+
*/
|
|
49
|
+
constructor(attrs: any, options: any) {
|
|
50
|
+
const {meeting, ...otherAttrs} = attrs;
|
|
51
|
+
|
|
52
|
+
super(otherAttrs, options);
|
|
53
|
+
|
|
54
|
+
this.locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
55
|
+
this.buildLocusDeltaRequestOptions = MeetingUtil.generateBuildLocusDeltaRequestOptions(meeting);
|
|
56
|
+
|
|
57
|
+
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {
|
|
58
|
+
leading: true,
|
|
59
|
+
trailing: true,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Returns joinCookie from boundedStorage if present.
|
|
65
|
+
* @returns {Object} joinCookie
|
|
66
|
+
*/
|
|
67
|
+
private getJoinCookie = async () => {
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
const joinCookieRaw = await this.webex.boundedStorage
|
|
70
|
+
.get(REACHABILITY.namespace, REACHABILITY.localStorageJoinCookie)
|
|
71
|
+
.catch(() => {});
|
|
72
|
+
|
|
73
|
+
if (joinCookieRaw) {
|
|
74
|
+
try {
|
|
75
|
+
const joinCookie = JSON.parse(joinCookieRaw);
|
|
76
|
+
if (joinCookie) {
|
|
77
|
+
return joinCookie;
|
|
78
|
+
}
|
|
79
|
+
} catch (e) {
|
|
80
|
+
LoggerProxy.logger.error(
|
|
81
|
+
`MeetingRequest#constructor --> Error in parsing join cookie data: ${e}`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return null;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Make a network request to join a meeting
|
|
91
|
+
* @param {Object} options
|
|
92
|
+
* @param {String} options.sipUri
|
|
93
|
+
* @param {String} options.deviceUrl
|
|
94
|
+
* @param {String} options.locusUrl
|
|
95
|
+
* @param {String} options.resourceId,
|
|
96
|
+
* @param {String} options.correlationId
|
|
97
|
+
* @param {boolean} options.ensureConversation
|
|
98
|
+
* @param {boolean} options.moderator
|
|
99
|
+
* @param {boolean} options.pin
|
|
100
|
+
* @param {boolean} options.moveToResource
|
|
101
|
+
* @param {Object} options.roapMessage
|
|
102
|
+
* @param {boolean} options.breakoutsSupported
|
|
103
|
+
* @param {String} options.locale,
|
|
104
|
+
* @param {Array} options.deviceCapabilities
|
|
105
|
+
* @param {boolean} options.liveAnnotationSupported
|
|
106
|
+
* @returns {Promise}
|
|
107
|
+
*/
|
|
108
|
+
async joinMeeting(options: {
|
|
109
|
+
sipUri: string;
|
|
110
|
+
deviceUrl: string;
|
|
111
|
+
locusUrl: string;
|
|
112
|
+
locusClusterUrl: string;
|
|
113
|
+
resourceId: string;
|
|
114
|
+
correlationId: string;
|
|
115
|
+
ensureConversation: boolean;
|
|
116
|
+
moderator: boolean;
|
|
117
|
+
pin: boolean;
|
|
118
|
+
moveToResource: boolean;
|
|
119
|
+
roapMessage: any;
|
|
120
|
+
asResourceOccupant: any;
|
|
121
|
+
inviteeAddress: any;
|
|
122
|
+
meetingNumber: any;
|
|
123
|
+
permissionToken: any;
|
|
124
|
+
preferTranscoding: any;
|
|
125
|
+
reachability: any;
|
|
126
|
+
breakoutsSupported: boolean;
|
|
127
|
+
locale?: string;
|
|
128
|
+
deviceCapabilities?: Array<string>;
|
|
129
|
+
liveAnnotationSupported: boolean;
|
|
130
|
+
ipVersion?: IP_VERSION;
|
|
131
|
+
}) {
|
|
132
|
+
const {
|
|
133
|
+
asResourceOccupant,
|
|
134
|
+
inviteeAddress,
|
|
135
|
+
meetingNumber,
|
|
136
|
+
permissionToken,
|
|
137
|
+
deviceUrl,
|
|
138
|
+
locusUrl,
|
|
139
|
+
locusClusterUrl,
|
|
140
|
+
resourceId,
|
|
141
|
+
correlationId,
|
|
142
|
+
ensureConversation,
|
|
143
|
+
moderator,
|
|
144
|
+
pin,
|
|
145
|
+
moveToResource,
|
|
146
|
+
roapMessage,
|
|
147
|
+
reachability,
|
|
148
|
+
preferTranscoding,
|
|
149
|
+
breakoutsSupported,
|
|
150
|
+
locale,
|
|
151
|
+
deviceCapabilities = [],
|
|
152
|
+
liveAnnotationSupported,
|
|
153
|
+
ipVersion,
|
|
154
|
+
} = options;
|
|
155
|
+
|
|
156
|
+
LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);
|
|
157
|
+
|
|
158
|
+
let url = '';
|
|
159
|
+
|
|
160
|
+
const joinCookie = await this.getJoinCookie();
|
|
161
|
+
|
|
162
|
+
const body: any = {
|
|
163
|
+
asResourceOccupant,
|
|
164
|
+
device: {
|
|
165
|
+
url: deviceUrl,
|
|
166
|
+
// @ts-ignore - config comes from registerPlugin
|
|
167
|
+
deviceType: this.config.meetings.deviceType,
|
|
168
|
+
},
|
|
169
|
+
usingResource: resourceId || null,
|
|
170
|
+
moveMediaToResource: (resourceId && moveToResource) || false,
|
|
171
|
+
correlationId,
|
|
172
|
+
respOnlySdp: true,
|
|
173
|
+
allowMultiDevice: true,
|
|
174
|
+
ensureConversation: ensureConversation || false,
|
|
175
|
+
supportsNativeLobby: 1,
|
|
176
|
+
clientMediaPreferences: {
|
|
177
|
+
preferTranscoding: preferTranscoding ?? true,
|
|
178
|
+
joinCookie,
|
|
179
|
+
ipver: ipVersion,
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
if (breakoutsSupported) {
|
|
184
|
+
deviceCapabilities.push(BREAKOUTS.BREAKOUTS_SUPPORTED);
|
|
185
|
+
}
|
|
186
|
+
if (liveAnnotationSupported) {
|
|
187
|
+
deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// append installationId to device config if it exists
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
if (this.webex.internal.device.config.installationId) {
|
|
193
|
+
// @ts-ignore
|
|
194
|
+
body.device.installationId = this.webex.internal.device.config.installationId;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (locale) {
|
|
198
|
+
body.locale = locale;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// add deviceCapabilities prop
|
|
202
|
+
if (deviceCapabilities.length) {
|
|
203
|
+
body.deviceCapabilities = deviceCapabilities;
|
|
204
|
+
}
|
|
205
|
+
// @ts-ignore
|
|
206
|
+
if (this.webex.meetings.geoHintInfo) {
|
|
207
|
+
// @ts-ignore
|
|
208
|
+
body.device.countryCode = this.webex.meetings.geoHintInfo.countryCode;
|
|
209
|
+
// @ts-ignore
|
|
210
|
+
body.device.regionCode = this.webex.meetings.geoHintInfo.regionCode;
|
|
211
|
+
body.device.localIp =
|
|
212
|
+
// @ts-ignore
|
|
213
|
+
CallDiagnosticUtils.anonymizeIPAddress(this.webex.meetings.geoHintInfo.clientAddress) ||
|
|
214
|
+
undefined;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (moderator !== undefined) {
|
|
218
|
+
body.moderator = moderator;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (permissionToken) {
|
|
222
|
+
body.permissionToken = permissionToken;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if (pin !== undefined) {
|
|
226
|
+
body.pin = pin;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (locusUrl) {
|
|
230
|
+
url = `${locusUrl}/${PARTICIPANT}`;
|
|
231
|
+
} else if (inviteeAddress || meetingNumber) {
|
|
232
|
+
try {
|
|
233
|
+
let clusterUrl;
|
|
234
|
+
|
|
235
|
+
if (locusClusterUrl) {
|
|
236
|
+
clusterUrl = `https://${locusClusterUrl}/locus/api/v1`;
|
|
237
|
+
} else {
|
|
238
|
+
// @ts-ignore
|
|
239
|
+
await this.webex.internal.services.waitForCatalog('postauth');
|
|
240
|
+
// @ts-ignore
|
|
241
|
+
clusterUrl = this.webex.internal.services.get('locus');
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
url = `${clusterUrl}/${LOCI}/${CALL}`;
|
|
245
|
+
body.invitee = {
|
|
246
|
+
address: inviteeAddress || `wbxmn:${meetingNumber}`,
|
|
247
|
+
};
|
|
248
|
+
} catch (e) {
|
|
249
|
+
LoggerProxy.logger.error(
|
|
250
|
+
`Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`
|
|
251
|
+
);
|
|
252
|
+
throw e;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// TODO: -- this will be resolved in SDK request
|
|
257
|
+
url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);
|
|
258
|
+
|
|
259
|
+
if (resourceId === inviteeAddress) {
|
|
260
|
+
body.callPreferences = {
|
|
261
|
+
requestedMedia: [_SLIDES_],
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (roapMessage || reachability) {
|
|
266
|
+
body.localMedias = [
|
|
267
|
+
{
|
|
268
|
+
localSdp: JSON.stringify({
|
|
269
|
+
roapMessage,
|
|
270
|
+
reachability,
|
|
271
|
+
}),
|
|
272
|
+
},
|
|
273
|
+
];
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/// @ts-ignore
|
|
277
|
+
return this.request({
|
|
278
|
+
method: HTTP_VERBS.POST,
|
|
279
|
+
uri: url,
|
|
280
|
+
body,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Send a request to refresh the captcha
|
|
286
|
+
* @param {Object} options
|
|
287
|
+
* @param {String} options.captchaRefreshUrl
|
|
288
|
+
* @param {String} options.captchaId
|
|
289
|
+
* @returns {Promise}
|
|
290
|
+
* @private
|
|
291
|
+
*/
|
|
292
|
+
private refreshCaptcha({
|
|
293
|
+
captchaRefreshUrl,
|
|
294
|
+
captchaId,
|
|
295
|
+
}: {
|
|
296
|
+
captchaRefreshUrl: string;
|
|
297
|
+
captchaId: string;
|
|
298
|
+
}) {
|
|
299
|
+
const body = {
|
|
300
|
+
captchaId,
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
// @ts-ignore
|
|
304
|
+
return this.request({
|
|
305
|
+
method: HTTP_VERBS.POST,
|
|
306
|
+
uri: captchaRefreshUrl,
|
|
307
|
+
body,
|
|
308
|
+
}).catch((err) => {
|
|
309
|
+
LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);
|
|
310
|
+
|
|
311
|
+
throw err;
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Make a network request to add a dial in device
|
|
317
|
+
* @param {Object} options
|
|
318
|
+
* @param {String} options.correlationId
|
|
319
|
+
* @param {String} options.locusUrl url for the meeting
|
|
320
|
+
* @param {String} options.dialInUrl identifier for the to-be provisioned device
|
|
321
|
+
* @param {String} options.clientUrl identifier for the web device
|
|
322
|
+
* @returns {Promise}
|
|
323
|
+
* @private
|
|
324
|
+
*/
|
|
325
|
+
private dialIn({
|
|
326
|
+
locusUrl,
|
|
327
|
+
dialInUrl,
|
|
328
|
+
clientUrl,
|
|
329
|
+
correlationId,
|
|
330
|
+
}: {
|
|
331
|
+
correlationId: string;
|
|
332
|
+
locusUrl: string;
|
|
333
|
+
dialInUrl: string;
|
|
334
|
+
clientUrl: string;
|
|
335
|
+
}) {
|
|
336
|
+
LoggerProxy.logger.info(
|
|
337
|
+
'Meeting:request#dialIn --> Provisioning a dial in device',
|
|
338
|
+
correlationId
|
|
339
|
+
);
|
|
340
|
+
const uri = `${locusUrl}/${PARTICIPANT}`;
|
|
341
|
+
|
|
342
|
+
const body = {
|
|
343
|
+
device: {
|
|
344
|
+
deviceType: deviceType.PROVISIONAL,
|
|
345
|
+
provisionalType: PROVISIONAL_TYPE_DIAL_IN,
|
|
346
|
+
url: dialInUrl,
|
|
347
|
+
clientUrl,
|
|
348
|
+
},
|
|
349
|
+
correlationId,
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
// @ts-ignore
|
|
353
|
+
return this.locusDeltaRequest({
|
|
354
|
+
method: HTTP_VERBS.POST,
|
|
355
|
+
uri,
|
|
356
|
+
body,
|
|
357
|
+
}).catch((err) => {
|
|
358
|
+
LoggerProxy.logger.error(
|
|
359
|
+
`Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
throw err;
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Make a network request to add a dial out device
|
|
368
|
+
* @param {Object} options
|
|
369
|
+
* @param {String} options.correlationId
|
|
370
|
+
* @param {String} options.locusUrl url for the meeting
|
|
371
|
+
* @param {String} options.dialOutUrl identifier for the to-be provisioned device
|
|
372
|
+
* @param {String} options.phoneNumber phone number to dial out to
|
|
373
|
+
* @param {String} options.clientUrl identifier for the web device
|
|
374
|
+
* @returns {Promise}
|
|
375
|
+
* @private
|
|
376
|
+
*/
|
|
377
|
+
private dialOut({
|
|
378
|
+
locusUrl,
|
|
379
|
+
dialOutUrl,
|
|
380
|
+
phoneNumber,
|
|
381
|
+
clientUrl,
|
|
382
|
+
correlationId,
|
|
383
|
+
}: {
|
|
384
|
+
correlationId: string;
|
|
385
|
+
locusUrl: string;
|
|
386
|
+
dialOutUrl: string;
|
|
387
|
+
phoneNumber: string;
|
|
388
|
+
clientUrl: string;
|
|
389
|
+
}) {
|
|
390
|
+
LoggerProxy.logger.info(
|
|
391
|
+
'Meeting:request#dialOut --> Provisioning a dial out device',
|
|
392
|
+
correlationId
|
|
393
|
+
);
|
|
394
|
+
const uri = `${locusUrl}/${PARTICIPANT}`;
|
|
395
|
+
|
|
396
|
+
const body = {
|
|
397
|
+
device: {
|
|
398
|
+
deviceType: deviceType.PROVISIONAL,
|
|
399
|
+
provisionalType: PROVISIONAL_TYPE_DIAL_OUT,
|
|
400
|
+
url: dialOutUrl,
|
|
401
|
+
dialoutAddress: phoneNumber,
|
|
402
|
+
clientUrl,
|
|
403
|
+
},
|
|
404
|
+
correlationId,
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
// @ts-ignore
|
|
408
|
+
return this.locusDeltaRequest({
|
|
409
|
+
method: HTTP_VERBS.POST,
|
|
410
|
+
uri,
|
|
411
|
+
body,
|
|
412
|
+
}).catch((err) => {
|
|
413
|
+
LoggerProxy.logger.error(
|
|
414
|
+
`Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
throw err;
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
|
|
423
|
+
* @param {Object} options
|
|
424
|
+
* @param {String} options.locusUrl sync url to get ht elatest locus delta
|
|
425
|
+
* @returns {Promise}
|
|
426
|
+
*/
|
|
427
|
+
getLocusDTO(options: {url: string}) {
|
|
428
|
+
const {url} = options;
|
|
429
|
+
|
|
430
|
+
if (url) {
|
|
431
|
+
// @ts-ignore
|
|
432
|
+
return this.request({
|
|
433
|
+
method: HTTP_VERBS.GET,
|
|
434
|
+
uri: url,
|
|
435
|
+
}).catch((err) => {
|
|
436
|
+
LoggerProxy.logger.error(
|
|
437
|
+
`Meeting:request#getLocusDTO --> Error getting latest locus, error ${err}`
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
throw err;
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
return Promise.reject();
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Make a network request to make a provisioned phone leave the meeting
|
|
449
|
+
* @param {Object} options
|
|
450
|
+
* @param {String} options.locusUrl
|
|
451
|
+
* @param {String} options.phoneUrl
|
|
452
|
+
* @param {String} options.correlationId
|
|
453
|
+
* @param {String} options.selfId
|
|
454
|
+
* @returns {Promise}
|
|
455
|
+
* @private
|
|
456
|
+
*/
|
|
457
|
+
private disconnectPhoneAudio({
|
|
458
|
+
locusUrl,
|
|
459
|
+
phoneUrl,
|
|
460
|
+
correlationId,
|
|
461
|
+
selfId,
|
|
462
|
+
}: {
|
|
463
|
+
locusUrl: string;
|
|
464
|
+
phoneUrl: string;
|
|
465
|
+
correlationId: string;
|
|
466
|
+
selfId: string;
|
|
467
|
+
}) {
|
|
468
|
+
LoggerProxy.logger.info(
|
|
469
|
+
`Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,
|
|
470
|
+
correlationId
|
|
471
|
+
);
|
|
472
|
+
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
473
|
+
|
|
474
|
+
const body = {
|
|
475
|
+
device: {
|
|
476
|
+
deviceType: deviceType.PROVISIONAL,
|
|
477
|
+
url: phoneUrl,
|
|
478
|
+
},
|
|
479
|
+
correlationId,
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
// @ts-ignore
|
|
483
|
+
return this.locusDeltaRequest({
|
|
484
|
+
method: HTTP_VERBS.PUT,
|
|
485
|
+
uri,
|
|
486
|
+
body,
|
|
487
|
+
}).catch((err) => {
|
|
488
|
+
LoggerProxy.logger.error(
|
|
489
|
+
`Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`
|
|
490
|
+
);
|
|
491
|
+
|
|
492
|
+
throw err;
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Prepares request options to to leave a meeting
|
|
498
|
+
* @param {Object} options
|
|
499
|
+
* @param {Url} options.locusUrl
|
|
500
|
+
* @param {String} options.selfId
|
|
501
|
+
* @param {Url} options.deviceUrl
|
|
502
|
+
* @param {String} options.resourceId,
|
|
503
|
+
* @param {String} options.correlationId
|
|
504
|
+
* @returns {Object} request options
|
|
505
|
+
*/
|
|
506
|
+
prepareLeaveMeetingRequestOptions({
|
|
507
|
+
locusUrl,
|
|
508
|
+
selfId,
|
|
509
|
+
deviceUrl: url,
|
|
510
|
+
resourceId,
|
|
511
|
+
correlationId,
|
|
512
|
+
}: {
|
|
513
|
+
locusUrl: string;
|
|
514
|
+
selfId: string;
|
|
515
|
+
deviceUrl: string;
|
|
516
|
+
resourceId: string;
|
|
517
|
+
correlationId: string;
|
|
518
|
+
}) {
|
|
519
|
+
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
520
|
+
const body = {
|
|
521
|
+
device: {
|
|
522
|
+
// @ts-ignore
|
|
523
|
+
deviceType: this.config.meetings.deviceType,
|
|
524
|
+
url,
|
|
525
|
+
},
|
|
526
|
+
usingResource: resourceId || null,
|
|
527
|
+
correlationId,
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
return {
|
|
531
|
+
method: HTTP_VERBS.PUT,
|
|
532
|
+
uri,
|
|
533
|
+
body,
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Make a network request to leave a meeting
|
|
539
|
+
* @param {Object} options
|
|
540
|
+
* @returns {Promise}
|
|
541
|
+
*/
|
|
542
|
+
leaveMeeting({
|
|
543
|
+
locusUrl,
|
|
544
|
+
selfId,
|
|
545
|
+
deviceUrl: url,
|
|
546
|
+
resourceId,
|
|
547
|
+
correlationId,
|
|
548
|
+
}: {
|
|
549
|
+
locusUrl: string;
|
|
550
|
+
selfId: string;
|
|
551
|
+
deviceUrl: string;
|
|
552
|
+
resourceId: string;
|
|
553
|
+
correlationId: string;
|
|
554
|
+
}) {
|
|
555
|
+
LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);
|
|
556
|
+
|
|
557
|
+
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
558
|
+
const body = {
|
|
559
|
+
device: {
|
|
560
|
+
// @ts-ignore
|
|
561
|
+
deviceType: this.config.meetings.deviceType,
|
|
562
|
+
url,
|
|
563
|
+
},
|
|
564
|
+
usingResource: resourceId || null,
|
|
565
|
+
correlationId,
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
return this.locusDeltaRequest({
|
|
569
|
+
method: HTTP_VERBS.PUT,
|
|
570
|
+
uri,
|
|
571
|
+
body,
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Builds request options to leave a meeting
|
|
577
|
+
* @param {Object} options
|
|
578
|
+
* @returns {Object} request options
|
|
579
|
+
*/
|
|
580
|
+
buildLeaveMeetingRequestOptions(options: any) {
|
|
581
|
+
return this.buildLocusDeltaRequestOptions(this.prepareLeaveMeetingRequestOptions(options));
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Make a network request to acknowledge a meeting
|
|
586
|
+
* @param {Object} options
|
|
587
|
+
* @param {String} options.locusUrl
|
|
588
|
+
* @param {String} options.deviceUrl
|
|
589
|
+
* @param {String} options.correlationId
|
|
590
|
+
* @returns {Promise}
|
|
591
|
+
*/
|
|
592
|
+
acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {
|
|
593
|
+
const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;
|
|
594
|
+
const body = {
|
|
595
|
+
device: {
|
|
596
|
+
// @ts-ignore
|
|
597
|
+
deviceType: this.config.meetings.deviceType,
|
|
598
|
+
url: options.deviceUrl,
|
|
599
|
+
},
|
|
600
|
+
correlationId: options.correlationId,
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
return this.locusDeltaRequest({
|
|
604
|
+
method: HTTP_VERBS.PUT,
|
|
605
|
+
uri,
|
|
606
|
+
body,
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Makes a network request to lock the meeting
|
|
612
|
+
* @param {Object} options
|
|
613
|
+
* @param {Boolean} options.lock Whether it is locked or not
|
|
614
|
+
* @returns {Promise}
|
|
615
|
+
*/
|
|
616
|
+
lockMeeting(options) {
|
|
617
|
+
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
618
|
+
const body = {
|
|
619
|
+
lock: {
|
|
620
|
+
locked: options.lock,
|
|
621
|
+
},
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
return this.locusDeltaRequest({
|
|
625
|
+
method: HTTP_VERBS.PATCH,
|
|
626
|
+
uri,
|
|
627
|
+
body,
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Make a network request to decline a meeting
|
|
633
|
+
* @param {Object} options
|
|
634
|
+
* @param {String} options.locusUrl
|
|
635
|
+
* @param {String} options.deviceUrl
|
|
636
|
+
* @param {String} options.reason
|
|
637
|
+
* @returns {Promise}
|
|
638
|
+
*/
|
|
639
|
+
declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {
|
|
640
|
+
const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;
|
|
641
|
+
const body = {
|
|
642
|
+
device: {
|
|
643
|
+
// @ts-ignore
|
|
644
|
+
deviceType: this.config.meetings.deviceType,
|
|
645
|
+
url: options.deviceUrl,
|
|
646
|
+
},
|
|
647
|
+
...(options.reason && {reason: options.reason}),
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
return this.locusDeltaRequest({
|
|
651
|
+
method: HTTP_VERBS.PUT,
|
|
652
|
+
uri,
|
|
653
|
+
body,
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* change the content floor grant
|
|
659
|
+
* @param {Object} options options for floor grant
|
|
660
|
+
* @param {String} options.disposition floor action (granted/released)
|
|
661
|
+
* @param {String} options.personUrl personUrl who is requesting floor
|
|
662
|
+
* @param {String} options.deviceUrl Url of a device
|
|
663
|
+
* @param {String} options.resourceId Populated if you are paired to a device
|
|
664
|
+
* @param {String} options.uri floor grant uri
|
|
665
|
+
* @param {String} options.shareInstanceId id for current share
|
|
666
|
+
* @returns {Promise}
|
|
667
|
+
*/
|
|
668
|
+
changeMeetingFloor(
|
|
669
|
+
options:
|
|
670
|
+
| {
|
|
671
|
+
disposition: string;
|
|
672
|
+
personUrl: string;
|
|
673
|
+
deviceUrl: string;
|
|
674
|
+
resourceId: string;
|
|
675
|
+
uri: string;
|
|
676
|
+
annotationInfo: AnnotationInfo;
|
|
677
|
+
shareInstanceId: string;
|
|
678
|
+
}
|
|
679
|
+
| any
|
|
680
|
+
) {
|
|
681
|
+
let floorReq: any = {disposition: options.disposition};
|
|
682
|
+
|
|
683
|
+
/* istanbul ignore else */
|
|
684
|
+
if (options.disposition === FLOOR_ACTION.GRANTED) {
|
|
685
|
+
floorReq = {
|
|
686
|
+
beneficiary: {
|
|
687
|
+
url: options.personUrl,
|
|
688
|
+
devices: [
|
|
689
|
+
{
|
|
690
|
+
// @ts-ignore
|
|
691
|
+
deviceType: this.config.meetings.deviceType,
|
|
692
|
+
url: options.deviceUrl,
|
|
693
|
+
},
|
|
694
|
+
],
|
|
695
|
+
},
|
|
696
|
+
disposition: options.disposition,
|
|
697
|
+
requester: {
|
|
698
|
+
url: options.personUrl,
|
|
699
|
+
},
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
const body: any = {
|
|
704
|
+
floor: floorReq,
|
|
705
|
+
resourceUrl: options.resourceUrl,
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
if (options?.shareInstanceId) {
|
|
709
|
+
body.floor.shareInstanceId = options.shareInstanceId;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
if (options?.resourceToken) {
|
|
713
|
+
body.resourceToken = options?.resourceToken;
|
|
714
|
+
}
|
|
715
|
+
if (options?.annotationInfo) {
|
|
716
|
+
body.annotation = options?.annotationInfo;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
// @ts-ignore
|
|
720
|
+
return this.request({
|
|
721
|
+
uri: options.uri,
|
|
722
|
+
method: HTTP_VERBS.PUT,
|
|
723
|
+
body,
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Sends a request to the DTMF endpoint to send tones
|
|
729
|
+
* @param {Object} options
|
|
730
|
+
* @param {String} options.locusUrl
|
|
731
|
+
* @param {String} options.deviceUrl
|
|
732
|
+
* @param {String} options.tones a string of one or more DTMF tones to send
|
|
733
|
+
* @returns {Promise}
|
|
734
|
+
*/
|
|
735
|
+
sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {
|
|
736
|
+
// @ts-ignore
|
|
737
|
+
return this.locusDeltaRequest({
|
|
738
|
+
method: HTTP_VERBS.POST,
|
|
739
|
+
uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,
|
|
740
|
+
body: {
|
|
741
|
+
deviceUrl,
|
|
742
|
+
dtmf: {
|
|
743
|
+
correlationId: uuid.v4(),
|
|
744
|
+
tones,
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Sends a request to the controls endpoint to set the video layout
|
|
752
|
+
* @param {Object} options
|
|
753
|
+
* @param {String} options.locusUrl
|
|
754
|
+
* @param {String} options.deviceUrl
|
|
755
|
+
* @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}
|
|
756
|
+
* @param {Object} options.main preferred dimensions for the remote main video stream
|
|
757
|
+
* @param {Number} options.main.width preferred width of main video stream
|
|
758
|
+
* @param {Number} options.main.height preferred height of main video stream
|
|
759
|
+
* @param {Object} options.content preferred dimensions for the remote content share stream
|
|
760
|
+
* @param {Number} options.content.width preferred width of content share stream
|
|
761
|
+
* @param {Number} options.content.height preferred height of content share stream
|
|
762
|
+
* @returns {Promise}
|
|
763
|
+
*/
|
|
764
|
+
changeVideoLayout({
|
|
765
|
+
locusUrl,
|
|
766
|
+
deviceUrl,
|
|
767
|
+
layoutType,
|
|
768
|
+
main,
|
|
769
|
+
content,
|
|
770
|
+
}: {
|
|
771
|
+
locusUrl: string;
|
|
772
|
+
deviceUrl: string;
|
|
773
|
+
layoutType: string;
|
|
774
|
+
main: {
|
|
775
|
+
width: number;
|
|
776
|
+
height: number;
|
|
777
|
+
};
|
|
778
|
+
content: {
|
|
779
|
+
width: number;
|
|
780
|
+
height: number;
|
|
781
|
+
};
|
|
782
|
+
}) {
|
|
783
|
+
// send main/content renderInfo only if both width and height are specified
|
|
784
|
+
if (main && (!main.width || !main.height)) {
|
|
785
|
+
return Promise.reject(
|
|
786
|
+
new Error(
|
|
787
|
+
`Both width and height must be specified. One of them is missing for main: ${JSON.stringify(
|
|
788
|
+
main
|
|
789
|
+
)}`
|
|
790
|
+
)
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
if (content && (!content.width || !content.height)) {
|
|
795
|
+
return Promise.reject(
|
|
796
|
+
new Error(
|
|
797
|
+
`Both width and height must be specified. One of them is missing for content: ${JSON.stringify(
|
|
798
|
+
content
|
|
799
|
+
)}`
|
|
800
|
+
)
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;
|
|
805
|
+
const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;
|
|
806
|
+
|
|
807
|
+
const layoutParams =
|
|
808
|
+
renderInfoMain || renderInfoContent
|
|
809
|
+
? {
|
|
810
|
+
renderInfo: {
|
|
811
|
+
main: renderInfoMain,
|
|
812
|
+
content: renderInfoContent,
|
|
813
|
+
},
|
|
814
|
+
}
|
|
815
|
+
: undefined;
|
|
816
|
+
|
|
817
|
+
// @ts-ignore
|
|
818
|
+
return this.locusDeltaRequest({
|
|
819
|
+
method: HTTP_VERBS.PUT,
|
|
820
|
+
uri: `${locusUrl}/${CONTROLS}`,
|
|
821
|
+
body: {
|
|
822
|
+
layout: {
|
|
823
|
+
deviceUrl,
|
|
824
|
+
type: layoutType,
|
|
825
|
+
layoutParams,
|
|
826
|
+
},
|
|
827
|
+
},
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* Make a network request to end meeting for all
|
|
833
|
+
* @param {Object} options
|
|
834
|
+
* @param {Url} options.locusUrl
|
|
835
|
+
* @returns {Promise}
|
|
836
|
+
*/
|
|
837
|
+
endMeetingForAll({locusUrl}: {locusUrl: string}) {
|
|
838
|
+
const uri = `${locusUrl}/${END}`;
|
|
839
|
+
|
|
840
|
+
// @ts-ignore
|
|
841
|
+
return this.locusDeltaRequest({
|
|
842
|
+
method: HTTP_VERBS.POST,
|
|
843
|
+
uri,
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Send a locus keepAlive (used in lobby)
|
|
849
|
+
* @param {Object} options
|
|
850
|
+
* @param {Url} options.keepAliveUrl
|
|
851
|
+
* @returns {Promise}
|
|
852
|
+
*/
|
|
853
|
+
keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {
|
|
854
|
+
// @ts-ignore
|
|
855
|
+
return this.request({
|
|
856
|
+
method: HTTP_VERBS.GET,
|
|
857
|
+
uri: keepAliveUrl,
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Make a network request to send a reaction.
|
|
863
|
+
* @param {Object} options
|
|
864
|
+
* @param {Url} options.reactionChannelUrl
|
|
865
|
+
* @param {Reaction} options.reaction
|
|
866
|
+
* @param {string} options.senderID
|
|
867
|
+
* @returns {Promise}
|
|
868
|
+
*/
|
|
869
|
+
sendReaction({reactionChannelUrl, reaction, participantId}: SendReactionOptions) {
|
|
870
|
+
const uri = reactionChannelUrl;
|
|
871
|
+
|
|
872
|
+
// @ts-ignore
|
|
873
|
+
return this.request({
|
|
874
|
+
method: HTTP_VERBS.POST,
|
|
875
|
+
uri,
|
|
876
|
+
body: {
|
|
877
|
+
sender: {participantId},
|
|
878
|
+
reaction,
|
|
879
|
+
},
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Make a network request to enable or disable reactions.
|
|
885
|
+
* @param {boolean} options.enable - determines if we need to enable or disable.
|
|
886
|
+
* @param {locusUrl} options.locusUrl
|
|
887
|
+
* @returns {Promise}
|
|
888
|
+
*/
|
|
889
|
+
toggleReactions({enable, locusUrl, requestingParticipantId}: ToggleReactionsOptions) {
|
|
890
|
+
const uri = `${locusUrl}/${CONTROLS}`;
|
|
891
|
+
|
|
892
|
+
// @ts-ignore
|
|
893
|
+
return this.locusDeltaRequest({
|
|
894
|
+
method: HTTP_VERBS.PUT,
|
|
895
|
+
uri,
|
|
896
|
+
body: {
|
|
897
|
+
reactions: {
|
|
898
|
+
enabled: enable,
|
|
899
|
+
},
|
|
900
|
+
requestingParticipantId,
|
|
901
|
+
},
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
getLocusStatusByUrl(locusUrl: string) {
|
|
906
|
+
// @ts-ignore
|
|
907
|
+
return this.request({
|
|
908
|
+
method: HTTP_VERBS.GET,
|
|
909
|
+
uri: locusUrl,
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
}
|