@webex/plugin-meetings 3.0.0-beta.15 → 3.0.0-beta.151
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 +193 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +43 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +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/browser-detection.js +1 -21
- 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 +0 -21
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +0 -21
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +0 -21
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +0 -21
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +0 -28
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +0 -21
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +0 -21
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +0 -21
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +0 -21
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +9 -43
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -24
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +35 -61
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +7 -13
- package/dist/config.js.map +1 -1
- package/dist/constants.js +208 -64
- 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 +78 -17
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +100 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +387 -208
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +0 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +54 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +90 -126
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +93 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +70 -219
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +74 -198
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +1 -8
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +79 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2685 -3324
- 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 +243 -185
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +296 -342
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +0 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js +16 -26
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +446 -585
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +8 -31
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +261 -242
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -16
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +156 -232
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +24 -20
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +526 -372
- 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 +21 -40
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +172 -141
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +58 -57
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +15 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +101 -69
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +12 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +123 -162
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +120 -85
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +314 -260
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +50 -16
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +4 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +75 -147
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +170 -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 +73 -94
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +55 -74
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +66 -43
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +502 -442
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +24 -51
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +3 -38
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -33
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +190 -199
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +14 -23
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +2 -4
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +18 -24
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +356 -476
- 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 +32 -75
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +129 -136
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +143 -103
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +369 -462
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +144 -94
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +9 -44
- package/dist/transcription/index.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 +978 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +315 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +212 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +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 +1509 -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 +157 -0
- package/dist/types/member/types.d.ts +21 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/config.d.ts +195 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +169 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +104 -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 +163 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +37 -0
- package/src/breakouts/index.ts +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 +155 -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/locus-info/controlsUtils.ts +108 -0
- package/src/locus-info/index.ts +310 -21
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +2 -1
- package/src/locus-info/selfUtils.ts +71 -1
- 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 +1730 -1768
- 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 +421 -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 +375 -83
- package/src/meetings/meetings.types.ts +9 -0
- package/src/meetings/request.ts +3 -1
- package/src/meetings/util.ts +103 -4
- package/src/member/index.ts +40 -0
- package/src/member/types.ts +24 -0
- package/src/member/util.ts +81 -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 +210 -45
- 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 +332 -255
- package/test/integration/spec/space-meeting.js +78 -5
- package/test/integration/spec/transcription.js +1 -1
- package/test/unit/spec/annotation/index.ts +436 -0
- package/test/unit/spec/breakouts/breakout.ts +203 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +77 -0
- package/test/unit/spec/breakouts/index.ts +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/locus-info/controlsUtils.js +303 -30
- package/test/unit/spec/locus-info/index.js +615 -4
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/selfConstant.js +38 -0
- package/test/unit/spec/locus-info/selfUtils.js +200 -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 +2394 -1381
- 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 +268 -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 +842 -128
- package/test/unit/spec/meetings/utils.js +206 -2
- package/test/unit/spec/member/index.js +24 -0
- package/test/unit/spec/member/util.js +384 -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 +676 -105
- 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 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -334
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -117
- 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
|
@@ -1,150 +1,194 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
|
-
exports.default = void 0;
|
|
12
|
-
|
|
8
|
+
exports.createMuteState = exports.MuteState = void 0;
|
|
13
9
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
14
|
-
|
|
15
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
16
|
-
|
|
17
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
18
|
-
|
|
19
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
20
|
-
|
|
21
13
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
22
|
-
|
|
23
14
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
24
|
-
|
|
25
|
-
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
26
|
-
|
|
27
|
-
var _media = _interopRequireDefault(require("../media"));
|
|
28
|
-
|
|
29
15
|
var _util = _interopRequireDefault(require("./util"));
|
|
30
|
-
|
|
31
16
|
var _constants = require("../constants");
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
36
|
-
var createMuteState = function createMuteState(type, meeting, mediaDirection) {
|
|
37
|
-
if (type === _constants.AUDIO && !mediaDirection.sendAudio) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (type === _constants.VIDEO && !mediaDirection.sendVideo) {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
17
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
18
|
+
var createMuteState = function createMuteState(type, meeting, enabled) {
|
|
19
|
+
// todo: remove the meeting argument (SPARK-399695)
|
|
44
20
|
|
|
45
21
|
_loggerProxy.default.logger.info("Meeting:muteState#createMuteState --> ".concat(type, ": creating MuteState for meeting id ").concat(meeting === null || meeting === void 0 ? void 0 : meeting.id));
|
|
46
|
-
|
|
47
|
-
return
|
|
22
|
+
var muteState = new MuteState(type, meeting, enabled);
|
|
23
|
+
return muteState;
|
|
48
24
|
};
|
|
25
|
+
|
|
49
26
|
/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches
|
|
50
27
|
the last requested state by the client.
|
|
51
28
|
|
|
52
29
|
More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
30
|
|
|
31
|
+
This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called
|
|
32
|
+
*/
|
|
33
|
+
exports.createMuteState = createMuteState;
|
|
56
34
|
var MuteState = /*#__PURE__*/function () {
|
|
57
35
|
/**
|
|
58
36
|
* Constructor
|
|
59
37
|
*
|
|
60
38
|
* @param {String} type - audio or video
|
|
61
39
|
* @param {Object} meeting - the meeting object (used for reading current remote mute status)
|
|
40
|
+
* @param {boolean} enabled - whether the client audio/video is enabled at all
|
|
62
41
|
*/
|
|
63
|
-
function MuteState(type, meeting) {
|
|
42
|
+
function MuteState(type, meeting, enabled) {
|
|
43
|
+
var _meeting$remoteVideoM, _meeting$unmuteVideoA;
|
|
64
44
|
(0, _classCallCheck2.default)(this, MuteState);
|
|
65
|
-
(0, _defineProperty2.default)(this, "pendingPromiseReject", void 0);
|
|
66
|
-
(0, _defineProperty2.default)(this, "pendingPromiseResolve", void 0);
|
|
67
45
|
(0, _defineProperty2.default)(this, "state", void 0);
|
|
68
46
|
(0, _defineProperty2.default)(this, "type", void 0);
|
|
69
|
-
|
|
47
|
+
(0, _defineProperty2.default)(this, "ignoreMuteStateChange", void 0);
|
|
70
48
|
if (type !== _constants.AUDIO && type !== _constants.VIDEO) {
|
|
71
49
|
throw new _parameter.default('Mute state is designed for handling audio or video only');
|
|
72
50
|
}
|
|
73
|
-
|
|
74
51
|
this.type = type;
|
|
52
|
+
this.ignoreMuteStateChange = false;
|
|
75
53
|
this.state = {
|
|
76
54
|
client: {
|
|
77
|
-
|
|
55
|
+
enabled: enabled,
|
|
56
|
+
localMute: true
|
|
78
57
|
},
|
|
79
58
|
server: {
|
|
80
|
-
localMute:
|
|
81
|
-
//
|
|
82
|
-
remoteMute: type === _constants.AUDIO ? meeting.remoteMuted : false,
|
|
83
|
-
unmuteAllowed: type === _constants.AUDIO ? meeting.unmuteAllowed : true
|
|
59
|
+
localMute: true,
|
|
60
|
+
// because remoteVideoMuted and unmuteVideoAllowed are updated seperately, they might be undefined
|
|
61
|
+
remoteMute: type === _constants.AUDIO ? meeting.remoteMuted : (_meeting$remoteVideoM = meeting.remoteVideoMuted) !== null && _meeting$remoteVideoM !== void 0 ? _meeting$remoteVideoM : false,
|
|
62
|
+
unmuteAllowed: type === _constants.AUDIO ? meeting.unmuteAllowed : (_meeting$unmuteVideoA = meeting.unmuteVideoAllowed) !== null && _meeting$unmuteVideoA !== void 0 ? _meeting$unmuteVideoA : true
|
|
84
63
|
},
|
|
85
64
|
syncToServerInProgress: false
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
this.pendingPromiseResolve = null;
|
|
89
|
-
this.pendingPromiseReject = null;
|
|
65
|
+
};
|
|
90
66
|
}
|
|
67
|
+
|
|
91
68
|
/**
|
|
92
|
-
*
|
|
93
|
-
* at the point that this request becomese superseded by another client request.
|
|
94
|
-
*
|
|
95
|
-
* The client doesn't have to wait for the returned promise to resolve before calling handleClientRequest() again. If
|
|
96
|
-
* handleClientRequest() is called again before the previous one resolved, the MuteState class will make sure that eventually
|
|
97
|
-
* the server state will match the last requested state from the client.
|
|
69
|
+
* Starts the mute state machine. Needs to be called after a new MuteState instance is created.
|
|
98
70
|
*
|
|
99
|
-
* @
|
|
100
|
-
* @
|
|
101
|
-
* @param {Object} [meeting] the meeting object
|
|
102
|
-
* @param {Boolean} [mute] true for muting, false for unmuting request
|
|
103
|
-
* @returns {Promise}
|
|
71
|
+
* @param {Object} meeting - the meeting object
|
|
72
|
+
* @returns {void}
|
|
104
73
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
107
74
|
(0, _createClass2.default)(MuteState, [{
|
|
108
|
-
key: "
|
|
109
|
-
value: function
|
|
110
|
-
var
|
|
75
|
+
key: "init",
|
|
76
|
+
value: function init(meeting) {
|
|
77
|
+
var _meeting$mediaPropert, _meeting$mediaPropert2;
|
|
78
|
+
this.applyUnmuteAllowedToTrack(meeting);
|
|
79
|
+
|
|
80
|
+
// if we are remotely muted, we need to apply that to the local track now (mute on-entry)
|
|
81
|
+
if (this.state.server.remoteMute) {
|
|
82
|
+
this.muteLocalTrack(meeting, this.state.server.remoteMute, 'remotelyMuted');
|
|
83
|
+
}
|
|
84
|
+
var initialMute = this.type === _constants.AUDIO ? (_meeting$mediaPropert = meeting.mediaProperties.audioTrack) === null || _meeting$mediaPropert === void 0 ? void 0 : _meeting$mediaPropert.muted : (_meeting$mediaPropert2 = meeting.mediaProperties.videoTrack) === null || _meeting$mediaPropert2 === void 0 ? void 0 : _meeting$mediaPropert2.muted;
|
|
85
|
+
_loggerProxy.default.logger.info("Meeting:muteState#init --> ".concat(this.type, ": local track initial mute state: ").concat(initialMute));
|
|
86
|
+
if (initialMute !== undefined) {
|
|
87
|
+
this.state.client.localMute = initialMute;
|
|
88
|
+
} else {
|
|
89
|
+
// there is no track, so it's like we are locally muted
|
|
90
|
+
// (this is important especially for transcoded meetings, in which the SDP m-line direction always stays "sendrecv")
|
|
91
|
+
this.state.client.localMute = true;
|
|
92
|
+
}
|
|
93
|
+
this.applyClientStateToServer(meeting);
|
|
94
|
+
}
|
|
111
95
|
|
|
112
|
-
|
|
96
|
+
/**
|
|
97
|
+
* This method needs to be called whenever the local audio/video track has changed.
|
|
98
|
+
* It reapplies the remote mute state onto the new track and also reads the current
|
|
99
|
+
* local mute state from the track and updates the internal state machine and sends
|
|
100
|
+
* any required requests to the server.
|
|
101
|
+
*
|
|
102
|
+
* @param {Object} meeting - the meeting object
|
|
103
|
+
* @returns {void}
|
|
104
|
+
*/
|
|
105
|
+
}, {
|
|
106
|
+
key: "handleLocalTrackChange",
|
|
107
|
+
value: function handleLocalTrackChange(meeting) {
|
|
108
|
+
return this.init(meeting);
|
|
109
|
+
}
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Enables/disables audio/video
|
|
113
|
+
*
|
|
114
|
+
* @param {Object} meeting - the meeting object
|
|
115
|
+
* @param {boolean} enable
|
|
116
|
+
* @returns {void}
|
|
117
|
+
*/
|
|
118
|
+
}, {
|
|
119
|
+
key: "enable",
|
|
120
|
+
value: function enable(meeting, _enable) {
|
|
121
|
+
this.state.client.enabled = _enable;
|
|
122
|
+
this.applyClientStateToServer(meeting);
|
|
123
|
+
}
|
|
118
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Mutes/unmutes local track
|
|
127
|
+
*
|
|
128
|
+
* @param {Object} meeting - the meeting object
|
|
129
|
+
* @param {Boolean} mute - true to mute the track, false to unmute it
|
|
130
|
+
* @param {ServerMuteReason} reason - reason for muting/unmuting
|
|
131
|
+
* @returns {void}
|
|
132
|
+
*/
|
|
133
|
+
}, {
|
|
134
|
+
key: "muteLocalTrack",
|
|
135
|
+
value: function muteLocalTrack(meeting, mute, reason) {
|
|
136
|
+
this.ignoreMuteStateChange = true;
|
|
137
|
+
if (this.type === _constants.AUDIO) {
|
|
138
|
+
var _meeting$mediaPropert3;
|
|
139
|
+
(_meeting$mediaPropert3 = meeting.mediaProperties.audioTrack) === null || _meeting$mediaPropert3 === void 0 ? void 0 : _meeting$mediaPropert3.setServerMuted(mute, reason);
|
|
140
|
+
} else {
|
|
141
|
+
var _meeting$mediaPropert4;
|
|
142
|
+
(_meeting$mediaPropert4 = meeting.mediaProperties.videoTrack) === null || _meeting$mediaPropert4 === void 0 ? void 0 : _meeting$mediaPropert4.setServerMuted(mute, reason);
|
|
143
|
+
}
|
|
144
|
+
this.ignoreMuteStateChange = false;
|
|
145
|
+
}
|
|
119
146
|
|
|
147
|
+
/**
|
|
148
|
+
* This method should be called when the local track mute state is changed
|
|
149
|
+
* @public
|
|
150
|
+
* @memberof MuteState
|
|
151
|
+
* @param {Object} [meeting] the meeting object
|
|
152
|
+
* @param {Boolean} [mute] true for muting, false for unmuting request
|
|
153
|
+
* @returns {void}
|
|
154
|
+
*/
|
|
155
|
+
}, {
|
|
156
|
+
key: "handleLocalTrackMuteStateChange",
|
|
157
|
+
value: function handleLocalTrackMuteStateChange(meeting, mute) {
|
|
158
|
+
if (this.ignoreMuteStateChange) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
_loggerProxy.default.logger.info("Meeting:muteState#handleLocalTrackMuteStateChange --> ".concat(this.type, ": local track new mute state: ").concat(mute));
|
|
120
162
|
this.state.client.localMute = mute;
|
|
121
|
-
this.
|
|
122
|
-
return new _promise.default(function (resolve, reject) {
|
|
123
|
-
if (_this.pendingPromiseResolve) {
|
|
124
|
-
// resolve the last promise we returned to the client as the client has issued a new request that has superseded the previous one
|
|
125
|
-
_this.pendingPromiseResolve();
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
_this.pendingPromiseResolve = resolve;
|
|
129
|
-
_this.pendingPromiseReject = reject;
|
|
130
|
-
|
|
131
|
-
_this.applyClientStateToServer(meeting);
|
|
132
|
-
});
|
|
163
|
+
this.applyClientStateToServer(meeting);
|
|
133
164
|
}
|
|
165
|
+
|
|
134
166
|
/**
|
|
135
167
|
* Applies the current mute state to the local track (by enabling or disabling it accordingly)
|
|
136
168
|
*
|
|
137
169
|
* @public
|
|
138
170
|
* @param {Object} [meeting] the meeting object
|
|
171
|
+
* @param {ServerMuteReason} reason - reason why we're applying our client state to the local track
|
|
139
172
|
* @memberof MuteState
|
|
140
173
|
* @returns {void}
|
|
141
174
|
*/
|
|
142
|
-
|
|
143
175
|
}, {
|
|
144
176
|
key: "applyClientStateLocally",
|
|
145
|
-
value: function applyClientStateLocally(meeting) {
|
|
146
|
-
|
|
177
|
+
value: function applyClientStateLocally(meeting, reason) {
|
|
178
|
+
this.muteLocalTrack(meeting, this.state.client.localMute, reason);
|
|
147
179
|
}
|
|
180
|
+
|
|
181
|
+
/** Returns true if client is locally muted - it takes into account not just the client local mute state,
|
|
182
|
+
* but also whether audio/video is enabled at all
|
|
183
|
+
*
|
|
184
|
+
* @returns {boolean}
|
|
185
|
+
*/
|
|
186
|
+
}, {
|
|
187
|
+
key: "getClientLocalMuteState",
|
|
188
|
+
value: function getClientLocalMuteState() {
|
|
189
|
+
return this.state.client.enabled ? this.state.client.localMute : true;
|
|
190
|
+
}
|
|
191
|
+
|
|
148
192
|
/**
|
|
149
193
|
* Updates the server local and remote mute values so that they match the current client desired state.
|
|
150
194
|
*
|
|
@@ -153,62 +197,45 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
153
197
|
* @memberof MuteState
|
|
154
198
|
* @returns {void}
|
|
155
199
|
*/
|
|
156
|
-
|
|
157
200
|
}, {
|
|
158
201
|
key: "applyClientStateToServer",
|
|
159
202
|
value: function applyClientStateToServer(meeting) {
|
|
160
|
-
var
|
|
161
|
-
|
|
203
|
+
var _this = this;
|
|
162
204
|
if (this.state.syncToServerInProgress) {
|
|
163
205
|
_loggerProxy.default.logger.info("Meeting:muteState#applyClientStateToServer --> ".concat(this.type, ": request to server in progress, we need to wait for it to complete"));
|
|
164
|
-
|
|
165
206
|
return;
|
|
166
207
|
}
|
|
167
|
-
|
|
168
|
-
var localMuteRequiresSync =
|
|
169
|
-
var remoteMuteRequiresSync = !
|
|
170
|
-
|
|
171
|
-
_loggerProxy.default.logger.info("Meeting:muteState#applyClientStateToServer --> ".concat(this.type, ": localMuteRequiresSync: ").concat(localMuteRequiresSync, " (").concat(this.state.client.localMute, " ?= ").concat(this.state.server.localMute, ")"));
|
|
172
|
-
|
|
208
|
+
var localMuteState = this.getClientLocalMuteState();
|
|
209
|
+
var localMuteRequiresSync = localMuteState !== this.state.server.localMute;
|
|
210
|
+
var remoteMuteRequiresSync = !localMuteState && this.state.server.remoteMute;
|
|
211
|
+
_loggerProxy.default.logger.info("Meeting:muteState#applyClientStateToServer --> ".concat(this.type, ": localMuteRequiresSync: ").concat(localMuteRequiresSync, " (").concat(localMuteState, " ?= ").concat(this.state.server.localMute, ")"));
|
|
173
212
|
_loggerProxy.default.logger.info("Meeting:muteState#applyClientStateToServer --> ".concat(this.type, ": remoteMuteRequiresSync: ").concat(remoteMuteRequiresSync));
|
|
174
|
-
|
|
175
213
|
if (!localMuteRequiresSync && !remoteMuteRequiresSync) {
|
|
176
214
|
_loggerProxy.default.logger.info("Meeting:muteState#applyClientStateToServer --> ".concat(this.type, ": client state already matching server state, nothing to do"));
|
|
177
|
-
|
|
178
|
-
if (this.pendingPromiseResolve) {
|
|
179
|
-
this.pendingPromiseResolve();
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
this.pendingPromiseResolve = null;
|
|
183
|
-
this.pendingPromiseReject = null;
|
|
184
215
|
return;
|
|
185
216
|
}
|
|
217
|
+
this.state.syncToServerInProgress = true;
|
|
186
218
|
|
|
187
|
-
|
|
188
|
-
|
|
219
|
+
// first sync local mute with server
|
|
189
220
|
var localMuteSyncPromise = localMuteRequiresSync ? this.sendLocalMuteRequestToServer(meeting) : _promise.default.resolve();
|
|
190
221
|
localMuteSyncPromise.then(function () {
|
|
191
|
-
return (
|
|
192
|
-
|
|
222
|
+
return (
|
|
223
|
+
// then follow it up with remote mute sync
|
|
224
|
+
remoteMuteRequiresSync ? _this.sendRemoteMuteRequestToServer(meeting) : _promise.default.resolve()
|
|
193
225
|
);
|
|
194
226
|
}).then(function () {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
_loggerProxy.default.logger.info("Meeting:muteState#applyClientStateToServer --> ".concat(_this2.type, ": sync with server completed")); // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync
|
|
198
|
-
|
|
227
|
+
_this.state.syncToServerInProgress = false;
|
|
228
|
+
_loggerProxy.default.logger.info("Meeting:muteState#applyClientStateToServer --> ".concat(_this.type, ": sync with server completed"));
|
|
199
229
|
|
|
200
|
-
|
|
230
|
+
// need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync
|
|
231
|
+
_this.applyClientStateToServer(meeting);
|
|
201
232
|
}).catch(function (e) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
_this2.pendingPromiseReject(e);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
_this2.pendingPromiseResolve = null;
|
|
209
|
-
_this2.pendingPromiseReject = null;
|
|
233
|
+
_this.state.syncToServerInProgress = false;
|
|
234
|
+
_loggerProxy.default.logger.warn("Meeting:muteState#applyClientStateToServer --> ".concat(_this.type, ": error: ").concat(e));
|
|
235
|
+
_this.applyServerMuteToLocalTrack(meeting, 'clientRequestFailed');
|
|
210
236
|
});
|
|
211
237
|
}
|
|
238
|
+
|
|
212
239
|
/**
|
|
213
240
|
* Sets the local mute value in the server
|
|
214
241
|
*
|
|
@@ -217,31 +244,26 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
217
244
|
* @memberof MuteState
|
|
218
245
|
* @returns {Promise}
|
|
219
246
|
*/
|
|
220
|
-
|
|
221
247
|
}, {
|
|
222
248
|
key: "sendLocalMuteRequestToServer",
|
|
223
249
|
value: function sendLocalMuteRequestToServer(meeting) {
|
|
224
|
-
var
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
var audioMuted = this.type === _constants.AUDIO ? this.state.client.localMute : (_meeting$audio = meeting.audio) === null || _meeting$audio === void 0 ? void 0 : _meeting$audio.state.client.localMute;
|
|
229
|
-
var videoMuted = this.type === _constants.VIDEO ? this.state.client.localMute : (_meeting$video = meeting.video) === null || _meeting$video === void 0 ? void 0 : _meeting$video.state.client.localMute;
|
|
230
|
-
|
|
250
|
+
var _this2 = this;
|
|
251
|
+
var audioMuted = this.type === _constants.AUDIO ? this.getClientLocalMuteState() : undefined;
|
|
252
|
+
var videoMuted = this.type === _constants.VIDEO ? this.getClientLocalMuteState() : undefined;
|
|
231
253
|
_loggerProxy.default.logger.info("Meeting:muteState#sendLocalMuteRequestToServer --> ".concat(this.type, ": sending local mute (audio=").concat(audioMuted, ", video=").concat(videoMuted, ") to server"));
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
254
|
+
return _util.default.remoteUpdateAudioVideo(meeting, audioMuted, videoMuted).then(function (locus) {
|
|
255
|
+
_loggerProxy.default.logger.info("Meeting:muteState#sendLocalMuteRequestToServer --> ".concat(_this2.type, ": local mute (audio=").concat(audioMuted, ", video=").concat(videoMuted, ") applied to server"));
|
|
256
|
+
_this2.state.server.localMute = _this2.type === _constants.AUDIO ? audioMuted : videoMuted;
|
|
257
|
+
if (locus) {
|
|
258
|
+
meeting.locusInfo.onDeltaLocus(locus);
|
|
259
|
+
}
|
|
238
260
|
return locus;
|
|
239
261
|
}).catch(function (remoteUpdateError) {
|
|
240
|
-
_loggerProxy.default.logger.warn("Meeting:muteState#sendLocalMuteRequestToServer --> ".concat(
|
|
241
|
-
|
|
262
|
+
_loggerProxy.default.logger.warn("Meeting:muteState#sendLocalMuteRequestToServer --> ".concat(_this2.type, ": failed to apply local mute (audio=").concat(audioMuted, ", video=").concat(videoMuted, ") to server: ").concat(remoteUpdateError));
|
|
242
263
|
return _promise.default.reject(remoteUpdateError);
|
|
243
264
|
});
|
|
244
265
|
}
|
|
266
|
+
|
|
245
267
|
/**
|
|
246
268
|
* Sets the remote mute value in the server
|
|
247
269
|
*
|
|
@@ -250,50 +272,76 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
250
272
|
* @memberof MuteState
|
|
251
273
|
* @returns {Promise}
|
|
252
274
|
*/
|
|
253
|
-
|
|
254
275
|
}, {
|
|
255
276
|
key: "sendRemoteMuteRequestToServer",
|
|
256
277
|
value: function sendRemoteMuteRequestToServer(meeting) {
|
|
257
|
-
var
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}).catch(function (remoteUpdateError) {
|
|
269
|
-
_loggerProxy.default.logger.warn("Meeting:muteState#sendRemoteMuteRequestToServer --> ".concat(_this4.type, ": failed to apply remote mute ").concat(remoteMute, " to server: ").concat(remoteUpdateError));
|
|
278
|
+
var _this3 = this;
|
|
279
|
+
var remoteMute = this.getClientLocalMuteState();
|
|
280
|
+
_loggerProxy.default.logger.info("Meeting:muteState#sendRemoteMuteRequestToServer --> ".concat(this.type, ": sending remote mute:").concat(remoteMute, " to server"));
|
|
281
|
+
return meeting.members.muteMember(meeting.members.selfId, remoteMute, this.type === _constants.AUDIO).then(function () {
|
|
282
|
+
_loggerProxy.default.logger.info("Meeting:muteState#sendRemoteMuteRequestToServer --> ".concat(_this3.type, ": remote mute:").concat(remoteMute, " applied to server"));
|
|
283
|
+
_this3.state.server.remoteMute = remoteMute;
|
|
284
|
+
}).catch(function (remoteUpdateError) {
|
|
285
|
+
_loggerProxy.default.logger.warn("Meeting:muteState#sendRemoteMuteRequestToServer --> ".concat(_this3.type, ": failed to apply remote mute ").concat(remoteMute, " to server: ").concat(remoteUpdateError));
|
|
286
|
+
return _promise.default.reject(remoteUpdateError);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
270
289
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
290
|
+
/** Sets the mute state of the local track according to what server thinks is our state
|
|
291
|
+
* @param {Object} meeting - the meeting object
|
|
292
|
+
* @param {ServerMuteReason} serverMuteReason - reason why we're applying server mute to the local track
|
|
293
|
+
* @returns {void}
|
|
294
|
+
*/
|
|
295
|
+
}, {
|
|
296
|
+
key: "applyServerMuteToLocalTrack",
|
|
297
|
+
value: function applyServerMuteToLocalTrack(meeting, serverMuteReason) {
|
|
298
|
+
var muted = this.state.server.localMute || this.state.server.remoteMute;
|
|
274
299
|
|
|
300
|
+
// update the local track mute state, but not this.state.client.localMute
|
|
301
|
+
this.muteLocalTrack(meeting, muted, serverMuteReason);
|
|
302
|
+
}
|
|
275
303
|
|
|
276
|
-
|
|
277
|
-
|
|
304
|
+
/** Applies the current value for unmute allowed to the underlying track
|
|
305
|
+
*
|
|
306
|
+
* @param {Meeting} meeting
|
|
307
|
+
* @returns {void}
|
|
308
|
+
*/
|
|
309
|
+
}, {
|
|
310
|
+
key: "applyUnmuteAllowedToTrack",
|
|
311
|
+
value: function applyUnmuteAllowedToTrack(meeting) {
|
|
312
|
+
if (this.type === _constants.AUDIO) {
|
|
313
|
+
var _meeting$mediaPropert5;
|
|
314
|
+
(_meeting$mediaPropert5 = meeting.mediaProperties.audioTrack) === null || _meeting$mediaPropert5 === void 0 ? void 0 : _meeting$mediaPropert5.setUnmuteAllowed(this.state.server.unmuteAllowed);
|
|
315
|
+
} else {
|
|
316
|
+
var _meeting$mediaPropert6;
|
|
317
|
+
(_meeting$mediaPropert6 = meeting.mediaProperties.videoTrack) === null || _meeting$mediaPropert6 === void 0 ? void 0 : _meeting$mediaPropert6.setUnmuteAllowed(this.state.server.unmuteAllowed);
|
|
318
|
+
}
|
|
278
319
|
}
|
|
320
|
+
|
|
279
321
|
/**
|
|
280
322
|
* This method should be called whenever the server remote mute state is changed
|
|
281
323
|
*
|
|
282
324
|
* @public
|
|
283
325
|
* @memberof MuteState
|
|
326
|
+
* @param {Meeting} meeting
|
|
284
327
|
* @param {Boolean} [muted] true if user is remotely muted, false otherwise
|
|
285
328
|
* @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when "hard mute" feature is used)
|
|
286
329
|
* @returns {undefined}
|
|
287
330
|
*/
|
|
288
|
-
|
|
289
331
|
}, {
|
|
290
332
|
key: "handleServerRemoteMuteUpdate",
|
|
291
|
-
value: function handleServerRemoteMuteUpdate(muted, unmuteAllowed) {
|
|
333
|
+
value: function handleServerRemoteMuteUpdate(meeting, muted, unmuteAllowed) {
|
|
292
334
|
_loggerProxy.default.logger.info("Meeting:muteState#handleServerRemoteMuteUpdate --> ".concat(this.type, ": updating server remoteMute to (").concat(muted, ")"));
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
335
|
+
if (unmuteAllowed !== undefined) {
|
|
336
|
+
this.state.server.unmuteAllowed = unmuteAllowed;
|
|
337
|
+
this.applyUnmuteAllowedToTrack(meeting);
|
|
338
|
+
}
|
|
339
|
+
if (muted !== undefined) {
|
|
340
|
+
this.state.server.remoteMute = muted;
|
|
341
|
+
this.applyServerMuteToLocalTrack(meeting, 'remotelyMuted');
|
|
342
|
+
}
|
|
296
343
|
}
|
|
344
|
+
|
|
297
345
|
/**
|
|
298
346
|
* This method should be called whenever we receive from the server a requirement to locally unmute
|
|
299
347
|
*
|
|
@@ -302,66 +350,76 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
302
350
|
* @param {Object} [meeting] the meeting object
|
|
303
351
|
* @returns {undefined}
|
|
304
352
|
*/
|
|
305
|
-
|
|
306
353
|
}, {
|
|
307
354
|
key: "handleServerLocalUnmuteRequired",
|
|
308
355
|
value: function handleServerLocalUnmuteRequired(meeting) {
|
|
309
|
-
|
|
356
|
+
if (!this.state.client.enabled) {
|
|
357
|
+
_loggerProxy.default.logger.warn("Meeting:muteState#handleServerLocalUnmuteRequired --> ".concat(this.type, ": localAudioUnmuteRequired received while ").concat(this.type, " is disabled -> local unmute will not result in ").concat(this.type, " being sent"));
|
|
358
|
+
} else {
|
|
359
|
+
_loggerProxy.default.logger.info("Meeting:muteState#handleServerLocalUnmuteRequired --> ".concat(this.type, ": localAudioUnmuteRequired received -> doing local unmute"));
|
|
360
|
+
}
|
|
310
361
|
|
|
362
|
+
// todo: I'm seeing "you can now unmute yourself " popup when this happens - but same thing happens on web.w.c so we can ignore for now
|
|
311
363
|
this.state.server.remoteMute = false;
|
|
312
364
|
this.state.client.localMute = false;
|
|
313
|
-
|
|
314
|
-
if (this.pendingPromiseReject) {
|
|
315
|
-
this.pendingPromiseReject(new Error('Server requested local unmute - this overrides any client request in progress'));
|
|
316
|
-
this.pendingPromiseResolve = null;
|
|
317
|
-
this.pendingPromiseReject = null;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
this.applyClientStateLocally(meeting);
|
|
365
|
+
this.applyClientStateLocally(meeting, 'localUnmuteRequired');
|
|
321
366
|
this.applyClientStateToServer(meeting);
|
|
322
367
|
}
|
|
368
|
+
|
|
323
369
|
/**
|
|
324
|
-
* Returns true if the user is locally or remotely muted
|
|
370
|
+
* Returns true if the user is locally or remotely muted.
|
|
371
|
+
* It only checks the mute status, ignoring the fact whether audio/video is enabled.
|
|
325
372
|
*
|
|
326
373
|
* @public
|
|
327
374
|
* @memberof MuteState
|
|
328
375
|
* @returns {Boolean}
|
|
329
376
|
*/
|
|
330
|
-
|
|
331
377
|
}, {
|
|
332
378
|
key: "isMuted",
|
|
333
379
|
value: function isMuted() {
|
|
334
380
|
return this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute;
|
|
335
381
|
}
|
|
382
|
+
|
|
336
383
|
/**
|
|
337
|
-
* Returns true if the user is
|
|
384
|
+
* Returns true if the user is remotely muted
|
|
338
385
|
*
|
|
339
386
|
* @public
|
|
340
387
|
* @memberof MuteState
|
|
341
388
|
* @returns {Boolean}
|
|
342
389
|
*/
|
|
343
|
-
|
|
344
390
|
}, {
|
|
345
|
-
key: "
|
|
346
|
-
value: function
|
|
347
|
-
return this.state.
|
|
348
|
-
}
|
|
391
|
+
key: "isRemotelyMuted",
|
|
392
|
+
value: function isRemotelyMuted() {
|
|
393
|
+
return this.state.server.remoteMute;
|
|
394
|
+
}
|
|
349
395
|
|
|
396
|
+
/**
|
|
397
|
+
* Returns true if unmute is allowed
|
|
398
|
+
*
|
|
399
|
+
* @public
|
|
400
|
+
* @memberof MuteState
|
|
401
|
+
* @returns {Boolean}
|
|
402
|
+
*/
|
|
350
403
|
}, {
|
|
351
|
-
key: "
|
|
352
|
-
|
|
353
|
-
return this.
|
|
354
|
-
}
|
|
404
|
+
key: "isUnmuteAllowed",
|
|
405
|
+
value: function isUnmuteAllowed() {
|
|
406
|
+
return this.state.server.unmuteAllowed;
|
|
407
|
+
}
|
|
355
408
|
|
|
409
|
+
/**
|
|
410
|
+
* Returns true if the user is locally muted or audio/video is disabled
|
|
411
|
+
*
|
|
412
|
+
* @public
|
|
413
|
+
* @memberof MuteState
|
|
414
|
+
* @returns {Boolean}
|
|
415
|
+
*/
|
|
356
416
|
}, {
|
|
357
|
-
key: "
|
|
358
|
-
|
|
359
|
-
return this.
|
|
417
|
+
key: "isLocallyMuted",
|
|
418
|
+
value: function isLocallyMuted() {
|
|
419
|
+
return this.getClientLocalMuteState();
|
|
360
420
|
}
|
|
361
421
|
}]);
|
|
362
422
|
return MuteState;
|
|
363
423
|
}();
|
|
364
|
-
|
|
365
|
-
var _default = createMuteState;
|
|
366
|
-
exports.default = _default;
|
|
424
|
+
exports.MuteState = MuteState;
|
|
367
425
|
//# sourceMappingURL=muteState.js.map
|