@webex/plugin-meetings 3.0.0-beta.16 → 3.0.0-beta.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -1
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +359 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +212 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +43 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1046 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/errors/webex-errors.js +3 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/config.js +6 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +175 -26
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +300 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +214 -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 +92 -2
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +317 -24
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +43 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +2 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +97 -14
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +39 -134
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +19 -97
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -493
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +79 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2349 -2178
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +229 -124
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +191 -167
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +444 -443
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +157 -49
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +20 -5
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +22 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +365 -73
- 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 +16 -12
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +88 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +43 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +15 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +97 -3
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +10 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +94 -11
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +109 -39
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +316 -233
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +50 -14
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +3 -5
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +48 -29
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +265 -36
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +52 -19
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +53 -33
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +44 -18
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +60 -3
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +322 -103
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +4 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/reachability/index.js +117 -60
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -5
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +2 -2
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +18 -18
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +190 -145
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +21 -29
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +127 -92
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +135 -53
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -93
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +329 -314
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +103 -54
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +43 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +124 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +2 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +32 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +987 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +315 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +212 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +86 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +149 -0
- package/dist/types/meeting/index.d.ts +1524 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +270 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +75 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +57 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +364 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +158 -0
- package/dist/types/member/types.d.ts +21 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/config.d.ts +195 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +169 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +193 -0
- package/dist/types/recording-controller/util.d.ts +13 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +200 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/package.json +28 -21
- package/src/annotation/annotation.types.ts +52 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +343 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +180 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +37 -0
- package/src/breakouts/index.ts +921 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/errors/webex-errors.ts +6 -2
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/config.ts +5 -7
- package/src/constants.ts +165 -20
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +286 -0
- package/src/index.ts +34 -0
- package/src/interpretation/README.md +51 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +182 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +110 -0
- package/src/locus-info/index.ts +339 -21
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +2 -1
- package/src/locus-info/selfUtils.ts +86 -2
- package/src/media/index.ts +70 -142
- package/src/media/properties.ts +41 -104
- package/src/mediaQualityMetrics/config.ts +379 -377
- package/src/meeting/in-meeting-actions.ts +156 -0
- package/src/meeting/index.ts +1779 -1741
- package/src/meeting/locusMediaRequest.ts +309 -0
- package/src/meeting/muteState.ts +228 -132
- package/src/meeting/request.ts +100 -91
- package/src/meeting/request.type.ts +2 -0
- package/src/meeting/util.ts +422 -421
- package/src/meeting-info/meeting-info-v2.ts +134 -13
- package/src/meeting-info/utilv2.ts +13 -3
- package/src/meetings/collection.ts +20 -0
- package/src/meetings/index.ts +385 -83
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +3 -1
- package/src/meetings/util.ts +103 -4
- package/src/member/index.ts +42 -0
- package/src/member/types.ts +24 -0
- package/src/member/util.ts +95 -1
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +108 -6
- package/src/members/request.ts +98 -17
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +319 -240
- package/src/metrics/config.ts +49 -10
- package/src/metrics/constants.ts +2 -4
- package/src/metrics/index.ts +43 -27
- package/src/multistream/mediaRequestManager.ts +337 -63
- package/src/multistream/receiveSlot.ts +68 -26
- package/src/multistream/receiveSlotManager.ts +61 -38
- package/src/multistream/remoteMedia.ts +29 -3
- package/src/multistream/remoteMediaGroup.ts +61 -2
- package/src/multistream/remoteMediaManager.ts +260 -66
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/reachability/index.ts +75 -25
- package/src/reachability/request.ts +10 -5
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +28 -3
- package/src/reconnection-manager/index.ts +53 -32
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/index.ts +21 -30
- package/src/roap/request.ts +51 -52
- package/src/roap/turnDiscovery.ts +51 -27
- package/src/statsAnalyzer/global.ts +1 -94
- package/src/statsAnalyzer/index.ts +380 -390
- package/src/statsAnalyzer/mqaUtil.ts +106 -99
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +331 -254
- package/test/integration/spec/space-meeting.js +77 -4
- package/test/unit/spec/annotation/index.ts +436 -0
- package/test/unit/spec/breakouts/breakout.ts +233 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +77 -0
- package/test/unit/spec/breakouts/index.ts +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +518 -0
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +329 -0
- package/test/unit/spec/interpretation/siLanguage.ts +26 -0
- package/test/unit/spec/locus-info/controlsUtils.js +323 -30
- package/test/unit/spec/locus-info/index.js +680 -4
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/selfConstant.js +48 -0
- package/test/unit/spec/locus-info/selfUtils.js +275 -0
- package/test/unit/spec/media/index.ts +118 -22
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +76 -0
- package/test/unit/spec/meeting/index.js +2695 -1513
- package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
- package/test/unit/spec/meeting/muteState.js +370 -208
- package/test/unit/spec/meeting/request.js +354 -42
- package/test/unit/spec/meeting/utils.js +270 -156
- package/test/unit/spec/meeting-info/meetinginfov2.js +383 -5
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +14 -0
- package/test/unit/spec/meetings/index.js +866 -120
- package/test/unit/spec/meetings/utils.js +206 -2
- package/test/unit/spec/member/index.js +31 -0
- package/test/unit/spec/member/util.js +408 -32
- package/test/unit/spec/members/index.js +320 -1
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +184 -0
- package/test/unit/spec/metrics/index.js +98 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +1012 -109
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +32 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +672 -65
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/reachability/index.ts +176 -25
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +46 -13
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +21 -51
- package/test/unit/spec/roap/request.ts +187 -0
- package/test/unit/spec/roap/turnDiscovery.ts +73 -34
- package/test/unit/spec/stats-analyzer/index.js +94 -43
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -45
- package/test/utils/webex-config.js +4 -0
- package/test/utils/webex-test-users.js +7 -3
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -18
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -262
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -106
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/src/index.js +0 -15
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/meeting/effectsState.ts +0 -211
- package/src/multistream/multistreamMedia.ts +0 -93
- package/test/unit/spec/meeting/effectsState.js +0 -281
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import PermissionError from '../common/errors/permission';
|
|
2
|
+
import {CONTROLS, HTTP_VERBS} from '../constants';
|
|
3
|
+
import MeetingRequest from '../meeting/request';
|
|
4
|
+
import RecordingAction from './enums';
|
|
5
|
+
import Util from './util';
|
|
6
|
+
import LoggerProxy from '../common/logs/logger-proxy';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @description Recording manages the recording functionality of the meeting object, there should only be one instantation of recording per meeting
|
|
10
|
+
* @export
|
|
11
|
+
* @private
|
|
12
|
+
* @class Recording
|
|
13
|
+
*/
|
|
14
|
+
export default class RecordingController {
|
|
15
|
+
/**
|
|
16
|
+
* @instance
|
|
17
|
+
* @type {MeetingRequest}
|
|
18
|
+
* @private
|
|
19
|
+
* @memberof RecordingController
|
|
20
|
+
*/
|
|
21
|
+
private request: MeetingRequest;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @instance
|
|
25
|
+
* @type {Array}
|
|
26
|
+
* @private
|
|
27
|
+
* @memberof RecordingInfo
|
|
28
|
+
*/
|
|
29
|
+
private displayHints: Array<string> = [];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @instance
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @private
|
|
35
|
+
* @memberof RecordingInfo
|
|
36
|
+
*/
|
|
37
|
+
private serviceUrl: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @instance
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @private
|
|
43
|
+
* @memberof RecordingInfo
|
|
44
|
+
*/
|
|
45
|
+
private sessionId: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @instance
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @private
|
|
51
|
+
* @memberof RecordingInfo
|
|
52
|
+
*/
|
|
53
|
+
private locusUrl: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @instance
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @private
|
|
59
|
+
* @memberof RecordingInfo
|
|
60
|
+
*/
|
|
61
|
+
private locusId: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @param {MeetingRequest} request
|
|
65
|
+
* @param {Object} options
|
|
66
|
+
* @constructor
|
|
67
|
+
* @memberof RecordingController
|
|
68
|
+
*/
|
|
69
|
+
constructor(
|
|
70
|
+
request: MeetingRequest,
|
|
71
|
+
options?: {
|
|
72
|
+
serviceUrl?: string;
|
|
73
|
+
sessionId: string;
|
|
74
|
+
locusUrl: string;
|
|
75
|
+
displayHints?: Array<string>;
|
|
76
|
+
}
|
|
77
|
+
) {
|
|
78
|
+
this.initialize(request);
|
|
79
|
+
this.set(options);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @param {MeetingRequest} request
|
|
84
|
+
* @param {LocusInfo} info
|
|
85
|
+
* @returns {void}
|
|
86
|
+
* @private
|
|
87
|
+
* @memberof RecordingController
|
|
88
|
+
*/
|
|
89
|
+
private initialize(request: MeetingRequest) {
|
|
90
|
+
this.request = request;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @param {Object} options
|
|
95
|
+
* @returns {void}
|
|
96
|
+
* @public
|
|
97
|
+
* @memberof RecordingController
|
|
98
|
+
*/
|
|
99
|
+
public set(options?: {
|
|
100
|
+
serviceUrl?: string;
|
|
101
|
+
sessionId: string;
|
|
102
|
+
locusUrl: string;
|
|
103
|
+
displayHints?: Array<string>;
|
|
104
|
+
}) {
|
|
105
|
+
this.extract(options);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @param {string} url
|
|
110
|
+
* @returns {void}
|
|
111
|
+
* @public
|
|
112
|
+
* @memberof RecordingController
|
|
113
|
+
*/
|
|
114
|
+
public setLocusUrl(url: string) {
|
|
115
|
+
this.locusUrl = url;
|
|
116
|
+
this.locusId = Util.extractLocusId(this.locusUrl);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @param {Array} hints
|
|
121
|
+
* @returns {void}
|
|
122
|
+
* @public
|
|
123
|
+
* @memberof RecordingController
|
|
124
|
+
*/
|
|
125
|
+
public setDisplayHints(hints: Array<string>) {
|
|
126
|
+
this.displayHints = hints;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @param {string} id
|
|
131
|
+
* @returns {void}
|
|
132
|
+
* @public
|
|
133
|
+
* @memberof RecordingController
|
|
134
|
+
*/
|
|
135
|
+
public setSessionId(id: string) {
|
|
136
|
+
this.sessionId = id;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @param {string} url
|
|
141
|
+
* @returns {void}
|
|
142
|
+
* @public
|
|
143
|
+
* @memberof RecordingController
|
|
144
|
+
*/
|
|
145
|
+
public setServiceUrl(url: string) {
|
|
146
|
+
this.serviceUrl = url;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @returns {string}
|
|
151
|
+
* @public
|
|
152
|
+
* @memberof RecordingController
|
|
153
|
+
*/
|
|
154
|
+
public getLocusUrl() {
|
|
155
|
+
return this.locusUrl;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @returns {string}
|
|
160
|
+
* @public
|
|
161
|
+
* @memberof RecordingController
|
|
162
|
+
*/
|
|
163
|
+
public getLocusId() {
|
|
164
|
+
return this.locusId;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @returns {string}
|
|
169
|
+
* @public
|
|
170
|
+
* @memberof RecordingController
|
|
171
|
+
*/
|
|
172
|
+
public getSessionId() {
|
|
173
|
+
return this.sessionId;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @returns {string}
|
|
178
|
+
* @public
|
|
179
|
+
* @memberof RecordingController
|
|
180
|
+
*/
|
|
181
|
+
public getServiceUrl() {
|
|
182
|
+
return this.serviceUrl;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @returns {Array}
|
|
187
|
+
* @public
|
|
188
|
+
* @memberof RecordingController
|
|
189
|
+
*/
|
|
190
|
+
public getDisplayHints() {
|
|
191
|
+
return this.displayHints;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @param {Object} options
|
|
196
|
+
* @returns {void}
|
|
197
|
+
* @private
|
|
198
|
+
* @memberof RecordingController
|
|
199
|
+
*/
|
|
200
|
+
private extract(options?: {
|
|
201
|
+
serviceUrl?: string;
|
|
202
|
+
sessionId: string;
|
|
203
|
+
locusUrl: string;
|
|
204
|
+
displayHints?: Array<string>;
|
|
205
|
+
}) {
|
|
206
|
+
this.setServiceUrl(options?.serviceUrl);
|
|
207
|
+
this.setSessionId(options?.sessionId);
|
|
208
|
+
this.setDisplayHints(options?.displayHints);
|
|
209
|
+
this.setLocusUrl(options?.locusUrl);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @param {RecordingAction} action
|
|
214
|
+
* @private
|
|
215
|
+
* @memberof RecordingController
|
|
216
|
+
* @returns {Promise}
|
|
217
|
+
*/
|
|
218
|
+
private recordingService(action: RecordingAction): Promise<any> {
|
|
219
|
+
// @ts-ignore
|
|
220
|
+
return this.request.request({
|
|
221
|
+
body: {
|
|
222
|
+
meetingInfo: {
|
|
223
|
+
locusSessionId: this.sessionId,
|
|
224
|
+
},
|
|
225
|
+
recording: {
|
|
226
|
+
action: action.toLowerCase(),
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
uri: `${this.serviceUrl}/loci/${this.locusId}/recording`,
|
|
230
|
+
method: HTTP_VERBS.PUT,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @param {RecordingAction} action
|
|
236
|
+
* @private
|
|
237
|
+
* @memberof RecordingController
|
|
238
|
+
* @returns {Promise}
|
|
239
|
+
*/
|
|
240
|
+
private recordingControls(action: RecordingAction): Promise<any> {
|
|
241
|
+
const record = Util.deriveRecordingStates(action);
|
|
242
|
+
|
|
243
|
+
LoggerProxy.logger.log(`RecordingController:index#recordingControls --> ${record}`);
|
|
244
|
+
|
|
245
|
+
// @ts-ignore
|
|
246
|
+
return this.request.request({
|
|
247
|
+
uri: `${this.locusUrl}/${CONTROLS}`,
|
|
248
|
+
body: {
|
|
249
|
+
record,
|
|
250
|
+
},
|
|
251
|
+
method: HTTP_VERBS.PATCH,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @param {RecordingAction} action
|
|
257
|
+
* @private
|
|
258
|
+
* @memberof RecordingController
|
|
259
|
+
* @returns {Promise}
|
|
260
|
+
*/
|
|
261
|
+
private recordingFacade(action: RecordingAction): Promise<any> {
|
|
262
|
+
LoggerProxy.logger.log(
|
|
263
|
+
`RecordingController:index#recordingFacade --> recording action [${action}]`
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
// assumes action is proper cased (i.e., Example)
|
|
267
|
+
if (Util?.[`canUser${action}`](this.displayHints)) {
|
|
268
|
+
if (this.serviceUrl) {
|
|
269
|
+
return this.recordingService(action);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
return this.recordingControls(action);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return Promise.reject(
|
|
276
|
+
new PermissionError(`${action} recording not allowed, due to moderator property.`)
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @private
|
|
282
|
+
* @memberof RecordingController
|
|
283
|
+
* @returns {Promise}
|
|
284
|
+
*/
|
|
285
|
+
public startRecording(): Promise<any> {
|
|
286
|
+
return this.recordingFacade(RecordingAction.Start);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* @private
|
|
291
|
+
* @memberof RecordingController
|
|
292
|
+
* @returns {Promise}
|
|
293
|
+
*/
|
|
294
|
+
public stopRecording(): Promise<any> {
|
|
295
|
+
return this.recordingFacade(RecordingAction.Stop);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @private
|
|
300
|
+
* @memberof RecordingController
|
|
301
|
+
* @returns {Promise}
|
|
302
|
+
*/
|
|
303
|
+
public pauseRecording(): Promise<any> {
|
|
304
|
+
return this.recordingFacade(RecordingAction.Pause);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @private
|
|
309
|
+
* @memberof RecordingController
|
|
310
|
+
* @returns {Promise}
|
|
311
|
+
*/
|
|
312
|
+
public resumeRecording(): Promise<any> {
|
|
313
|
+
return this.recordingFacade(RecordingAction.Resume);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {DISPLAY_HINTS} from '../constants';
|
|
2
|
+
import RecordingAction from './enums';
|
|
3
|
+
|
|
4
|
+
const canUserStart = (displayHints: Array<string>): boolean =>
|
|
5
|
+
displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_START);
|
|
6
|
+
|
|
7
|
+
const canUserPause = (displayHints: Array<string>): boolean =>
|
|
8
|
+
displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_PAUSE);
|
|
9
|
+
|
|
10
|
+
const canUserResume = (displayHints: Array<string>): boolean =>
|
|
11
|
+
displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_RESUME);
|
|
12
|
+
|
|
13
|
+
const canUserStop = (displayHints: Array<string>): boolean =>
|
|
14
|
+
displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_STOP);
|
|
15
|
+
|
|
16
|
+
const extractLocusId = (url: string) => {
|
|
17
|
+
return url?.split('/').pop();
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const deriveRecordingStates = (action: RecordingAction): {recording: boolean; paused: boolean} => {
|
|
21
|
+
let recording;
|
|
22
|
+
let paused;
|
|
23
|
+
|
|
24
|
+
switch (action) {
|
|
25
|
+
case RecordingAction.Start:
|
|
26
|
+
recording = true;
|
|
27
|
+
paused = false;
|
|
28
|
+
break;
|
|
29
|
+
case RecordingAction.Stop:
|
|
30
|
+
recording = false;
|
|
31
|
+
paused = false;
|
|
32
|
+
break;
|
|
33
|
+
case RecordingAction.Resume:
|
|
34
|
+
recording = true;
|
|
35
|
+
paused = false;
|
|
36
|
+
break;
|
|
37
|
+
case RecordingAction.Pause:
|
|
38
|
+
recording = true;
|
|
39
|
+
paused = true;
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
throw new Error(`Recording state cannot be derived from invalid action: ${action}`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
recording,
|
|
47
|
+
paused,
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
canUserStart,
|
|
53
|
+
canUserPause,
|
|
54
|
+
canUserResume,
|
|
55
|
+
canUserStop,
|
|
56
|
+
deriveRecordingStates,
|
|
57
|
+
extractLocusId,
|
|
58
|
+
};
|
package/src/roap/index.ts
CHANGED
|
@@ -98,11 +98,8 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
98
98
|
roapMessage,
|
|
99
99
|
locusSelfUrl: meeting.selfUrl,
|
|
100
100
|
mediaId: options.mediaId,
|
|
101
|
-
correlationId: options.correlationId,
|
|
102
|
-
audioMuted: meeting.isAudioMuted(),
|
|
103
|
-
videoMuted: meeting.isVideoMuted(),
|
|
104
101
|
meetingId: meeting.id,
|
|
105
|
-
|
|
102
|
+
locusMediaRequest: meeting.locusMediaRequest,
|
|
106
103
|
})
|
|
107
104
|
.then(() => {
|
|
108
105
|
LoggerProxy.logger.log(`Roap:index#sendRoapOK --> ROAP OK sent with seq ${options.seq}`);
|
|
@@ -135,11 +132,8 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
135
132
|
roapMessage,
|
|
136
133
|
locusSelfUrl: meeting.selfUrl,
|
|
137
134
|
mediaId: options.mediaId,
|
|
138
|
-
correlationId: options.correlationId,
|
|
139
|
-
audioMuted: meeting.isAudioMuted(),
|
|
140
|
-
videoMuted: meeting.isVideoMuted(),
|
|
141
135
|
meetingId: meeting.id,
|
|
142
|
-
|
|
136
|
+
locusMediaRequest: meeting.locusMediaRequest,
|
|
143
137
|
});
|
|
144
138
|
}
|
|
145
139
|
|
|
@@ -167,11 +161,8 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
167
161
|
roapMessage,
|
|
168
162
|
locusSelfUrl: meeting.selfUrl,
|
|
169
163
|
mediaId: options.mediaId,
|
|
170
|
-
correlationId: options.correlationId,
|
|
171
|
-
audioMuted: meeting.isAudioMuted(),
|
|
172
|
-
videoMuted: meeting.isVideoMuted(),
|
|
173
164
|
meetingId: meeting.id,
|
|
174
|
-
|
|
165
|
+
locusMediaRequest: meeting.locusMediaRequest,
|
|
175
166
|
})
|
|
176
167
|
.then(() => {
|
|
177
168
|
LoggerProxy.logger.log(
|
|
@@ -199,26 +190,26 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
199
190
|
// When reconnecting, it's important that the first roap message being sent out has empty media id.
|
|
200
191
|
// Normally this is the roap offer, but when TURN discovery is enabled,
|
|
201
192
|
// then this is the TURN discovery request message
|
|
202
|
-
|
|
193
|
+
return this.turnDiscovery.isSkipped(meeting).then((isTurnDiscoverySkipped) => {
|
|
194
|
+
const sendEmptyMediaId = reconnect && isTurnDiscoverySkipped;
|
|
203
195
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
meeting.updateMediaConnections(mediaConnections);
|
|
218
|
-
}
|
|
196
|
+
return this.roapRequest
|
|
197
|
+
.sendRoap({
|
|
198
|
+
roapMessage,
|
|
199
|
+
locusSelfUrl: meeting.selfUrl,
|
|
200
|
+
mediaId: sendEmptyMediaId ? '' : meeting.mediaId,
|
|
201
|
+
meetingId: meeting.id,
|
|
202
|
+
preferTranscoding: !meeting.isMultistream,
|
|
203
|
+
locusMediaRequest: meeting.locusMediaRequest,
|
|
204
|
+
})
|
|
205
|
+
.then(({locus, mediaConnections}) => {
|
|
206
|
+
if (mediaConnections) {
|
|
207
|
+
meeting.updateMediaConnections(mediaConnections);
|
|
208
|
+
}
|
|
219
209
|
|
|
220
|
-
|
|
221
|
-
|
|
210
|
+
return locus;
|
|
211
|
+
});
|
|
212
|
+
});
|
|
222
213
|
}
|
|
223
214
|
|
|
224
215
|
/**
|
package/src/roap/request.ts
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
/* global window */
|
|
2
1
|
// @ts-ignore
|
|
3
2
|
import {StatelessWebexPlugin} from '@webex/webex-core';
|
|
4
3
|
|
|
5
4
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
6
|
-
import {
|
|
5
|
+
import {REACHABILITY} from '../constants';
|
|
7
6
|
import Metrics from '../metrics';
|
|
8
7
|
import {eventType} from '../metrics/config';
|
|
8
|
+
import {LocusMediaRequest} from '../meeting/locusMediaRequest';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @class RoapRequest
|
|
12
12
|
*/
|
|
13
13
|
export default class RoapRequest extends StatelessWebexPlugin {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @param {Object}
|
|
17
|
-
* @returns {
|
|
15
|
+
* Returns reachability data.
|
|
16
|
+
* @param {Object} localSdp
|
|
17
|
+
* @returns {Object}
|
|
18
18
|
*/
|
|
19
|
+
async attachReachabilityData(localSdp) {
|
|
20
|
+
let joinCookie;
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
const reachabilityData =
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
const reachabilityData = await this.webex.boundedStorage
|
|
24
|
+
.get(REACHABILITY.namespace, REACHABILITY.localStorageResult)
|
|
25
|
+
.catch(() => {});
|
|
22
26
|
|
|
23
27
|
if (reachabilityData) {
|
|
24
28
|
try {
|
|
@@ -35,7 +39,22 @@ export default class RoapRequest extends StatelessWebexPlugin {
|
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
const joinCookieRaw = await this.webex.boundedStorage
|
|
44
|
+
.get(REACHABILITY.namespace, REACHABILITY.localStorageJoinCookie)
|
|
45
|
+
.catch(() => {});
|
|
46
|
+
|
|
47
|
+
if (joinCookieRaw) {
|
|
48
|
+
try {
|
|
49
|
+
joinCookie = JSON.parse(joinCookieRaw);
|
|
50
|
+
} catch (e) {
|
|
51
|
+
LoggerProxy.logger.error(
|
|
52
|
+
`MeetingRequest#constructor --> Error in parsing join cookie data: ${e}`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return {localSdp, joinCookie};
|
|
39
58
|
}
|
|
40
59
|
|
|
41
60
|
/**
|
|
@@ -45,67 +64,47 @@ export default class RoapRequest extends StatelessWebexPlugin {
|
|
|
45
64
|
* @param {String} options.locusSelfUrl
|
|
46
65
|
* @param {String} options.mediaId
|
|
47
66
|
* @param {String} options.correlationId
|
|
48
|
-
* @param {Boolean} options.audioMuted
|
|
49
|
-
* @param {Boolean} options.videoMuted
|
|
50
67
|
* @param {String} options.meetingId
|
|
51
68
|
* @returns {Promise} returns the response/failure of the request
|
|
52
69
|
*/
|
|
53
|
-
sendRoap(options: {
|
|
70
|
+
async sendRoap(options: {
|
|
54
71
|
roapMessage: any;
|
|
55
72
|
locusSelfUrl: string;
|
|
56
73
|
mediaId: string;
|
|
57
|
-
correlationId: string;
|
|
58
|
-
audioMuted: boolean;
|
|
59
|
-
videoMuted: boolean;
|
|
60
74
|
meetingId: string;
|
|
61
|
-
|
|
75
|
+
locusMediaRequest?: LocusMediaRequest;
|
|
62
76
|
}) {
|
|
63
|
-
const {roapMessage, locusSelfUrl, mediaId,
|
|
77
|
+
const {roapMessage, locusSelfUrl, mediaId, meetingId, locusMediaRequest} = options;
|
|
64
78
|
|
|
65
79
|
if (!mediaId) {
|
|
66
|
-
LoggerProxy.logger.info('Roap:request#sendRoap -->
|
|
80
|
+
LoggerProxy.logger.info('Roap:request#sendRoap --> sending empty mediaID');
|
|
67
81
|
}
|
|
68
82
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
if (!locusMediaRequest) {
|
|
84
|
+
LoggerProxy.logger.warn(
|
|
85
|
+
'Roap:request#sendRoap --> locusMediaRequest unavailable, not sending roap'
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
return Promise.reject(new Error('sendRoap called when locusMediaRequest is undefined'));
|
|
89
|
+
}
|
|
90
|
+
const {localSdp: localSdpWithReachabilityData, joinCookie} = await this.attachReachabilityData({
|
|
91
|
+
roapMessage,
|
|
92
|
+
});
|
|
72
93
|
|
|
73
94
|
LoggerProxy.logger.info(
|
|
74
|
-
`Roap:request#sendRoap --> ${
|
|
95
|
+
`Roap:request#sendRoap --> ${locusSelfUrl} \n ${roapMessage.messageType} \n seq:${roapMessage.seq}`
|
|
75
96
|
);
|
|
76
97
|
|
|
77
98
|
Metrics.postEvent({event: eventType.MEDIA_REQUEST, meetingId});
|
|
78
99
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
// @ts-ignore
|
|
88
|
-
deviceType: this.config.meetings.deviceType,
|
|
89
|
-
},
|
|
90
|
-
correlationId,
|
|
91
|
-
localMedias: [
|
|
92
|
-
{
|
|
93
|
-
localSdp: JSON.stringify(
|
|
94
|
-
this.attachRechabilityData({
|
|
95
|
-
roapMessage,
|
|
96
|
-
// eslint-disable-next-line no-warning-comments
|
|
97
|
-
// TODO: check whats the need for video and audiomute
|
|
98
|
-
audioMuted: !!options.audioMuted,
|
|
99
|
-
videoMuted: !!options.videoMuted,
|
|
100
|
-
})
|
|
101
|
-
),
|
|
102
|
-
mediaId: options.mediaId,
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
clientMediaPreferences: {
|
|
106
|
-
preferTranscoding: options.preferTranscoding ?? true,
|
|
107
|
-
},
|
|
108
|
-
},
|
|
100
|
+
return locusMediaRequest
|
|
101
|
+
.send({
|
|
102
|
+
type: 'RoapMessage',
|
|
103
|
+
selfUrl: locusSelfUrl,
|
|
104
|
+
joinCookie,
|
|
105
|
+
mediaId,
|
|
106
|
+
roapMessage,
|
|
107
|
+
reachability: localSdpWithReachabilityData.reachability,
|
|
109
108
|
})
|
|
110
109
|
.then((res) => {
|
|
111
110
|
Metrics.postEvent({event: eventType.MEDIA_RESPONSE, meetingId});
|
|
@@ -116,7 +115,7 @@ export default class RoapRequest extends StatelessWebexPlugin {
|
|
|
116
115
|
res.body.mediaConnections.length > 0 &&
|
|
117
116
|
res.body.mediaConnections[0];
|
|
118
117
|
|
|
119
|
-
LoggerProxy.logger.
|
|
118
|
+
LoggerProxy.logger.debug(
|
|
120
119
|
`Roap:request#sendRoap --> response:${JSON.stringify(
|
|
121
120
|
mediaConnections,
|
|
122
121
|
null,
|