@webex/plugin-meetings 3.0.0-beta.17 → 3.0.0-beta.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -7
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +359 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/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 +194 -28
- 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 +107 -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 +350 -41
- 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 +41 -136
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +33 -94
- 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 +76 -2
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2757 -2439
- 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 +477 -466
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +48 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +172 -50
- 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 +377 -82
- 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/constants.js +3 -5
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +1 -468
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +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 +216 -162
- 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 +363 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +21 -29
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +135 -94
- 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 +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +32 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1007 -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 +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +149 -0
- package/dist/types/meeting/index.d.ts +1462 -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 +77 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +62 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +365 -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/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +208 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/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 +29 -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 +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/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 +183 -22
- 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 +39 -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 +374 -38
- 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 +78 -144
- package/src/media/properties.ts +55 -99
- package/src/mediaQualityMetrics/config.ts +379 -377
- package/src/meeting/in-meeting-actions.ts +151 -3
- package/src/meeting/index.ts +2181 -2052
- 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 +450 -439
- package/src/meeting-info/index.ts +54 -8
- package/src/meeting-info/meeting-info-v2.ts +150 -14
- package/src/meeting-info/utilv2.ts +13 -3
- package/src/meetings/collection.ts +20 -0
- package/src/meetings/index.ts +396 -89
- 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/constants.ts +2 -4
- package/src/metrics/index.ts +1 -490
- 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 +83 -49
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +333 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/index.ts +21 -30
- package/src/roap/request.ts +72 -61
- 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 +336 -259
- 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 +237 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +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 +792 -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 +130 -24
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +75 -3
- package/test/unit/spec/meeting/index.js +2834 -1442
- 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 +384 -170
- package/test/unit/spec/meeting-info/index.js +181 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +383 -5
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +14 -0
- package/test/unit/spec/meetings/index.js +847 -121
- 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 +1 -50
- 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 +95 -13
- package/test/unit/spec/recording-controller/index.js +307 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +28 -52
- package/test/unit/spec/roap/request.ts +225 -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/metrics/config.js +0 -299
- package/dist/metrics/config.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/metrics/config.ts +0 -495
- package/src/multistream/multistreamMedia.ts +0 -93
- package/test/unit/spec/meeting/effectsState.js +0 -281
|
@@ -23,6 +23,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
23
23
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
24
24
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
25
25
|
var _remove2 = _interopRequireDefault(require("lodash/remove"));
|
|
26
|
+
var _forEach2 = _interopRequireDefault(require("lodash/forEach"));
|
|
26
27
|
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
27
28
|
var _internalMediaCore = require("@webex/internal-media-core");
|
|
28
29
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
@@ -35,9 +36,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
35
36
|
|
|
36
37
|
// An "all equal" grid, with size up to 3 x 3 = 9:
|
|
37
38
|
var AllEqualLayout = {
|
|
38
|
-
screenShareVideo: {
|
|
39
|
-
size: null
|
|
40
|
-
},
|
|
41
39
|
activeSpeakerVideoPaneGroups: [{
|
|
42
40
|
id: 'main',
|
|
43
41
|
numPanes: 9,
|
|
@@ -48,9 +46,6 @@ var AllEqualLayout = {
|
|
|
48
46
|
|
|
49
47
|
// A layout with just a single remote active speaker video pane:
|
|
50
48
|
var SingleLayout = {
|
|
51
|
-
screenShareVideo: {
|
|
52
|
-
size: null
|
|
53
|
-
},
|
|
54
49
|
activeSpeakerVideoPaneGroups: [{
|
|
55
50
|
id: 'main',
|
|
56
51
|
numPanes: 1,
|
|
@@ -61,9 +56,6 @@ var SingleLayout = {
|
|
|
61
56
|
|
|
62
57
|
// A layout with 1 big pane for the highest priority active speaker and 5 small panes for other active speakers:
|
|
63
58
|
var OnePlusFiveLayout = {
|
|
64
|
-
screenShareVideo: {
|
|
65
|
-
size: null
|
|
66
|
-
},
|
|
67
59
|
activeSpeakerVideoPaneGroups: [{
|
|
68
60
|
id: 'mainBigOne',
|
|
69
61
|
numPanes: 1,
|
|
@@ -78,10 +70,8 @@ var OnePlusFiveLayout = {
|
|
|
78
70
|
};
|
|
79
71
|
|
|
80
72
|
// A layout with 2 big panes for 2 main active speakers and a strip of 6 small panes for other active speakers:
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
81
74
|
var TwoMainPlusSixSmallLayout = {
|
|
82
|
-
screenShareVideo: {
|
|
83
|
-
size: null
|
|
84
|
-
},
|
|
85
75
|
activeSpeakerVideoPaneGroups: [{
|
|
86
76
|
id: 'mainGroupWith2BigPanes',
|
|
87
77
|
numPanes: 2,
|
|
@@ -110,9 +100,6 @@ var RemoteScreenShareWithSmallThumbnailsLayout = {
|
|
|
110
100
|
|
|
111
101
|
// A staged layout with 4 pre-selected meeting participants in the main 2x2 grid and 6 small panes for other active speakers at the top:
|
|
112
102
|
var Stage2x2With6ThumbnailsLayout = {
|
|
113
|
-
screenShareVideo: {
|
|
114
|
-
size: null
|
|
115
|
-
},
|
|
116
103
|
activeSpeakerVideoPaneGroups: [{
|
|
117
104
|
id: 'thumbnails',
|
|
118
105
|
numPanes: 6,
|
|
@@ -146,7 +133,8 @@ var Stage2x2With6ThumbnailsLayout = {
|
|
|
146
133
|
*/
|
|
147
134
|
var DefaultConfiguration = {
|
|
148
135
|
audio: {
|
|
149
|
-
numOfActiveSpeakerStreams: 3
|
|
136
|
+
numOfActiveSpeakerStreams: 3,
|
|
137
|
+
numOfScreenShareStreams: 1
|
|
150
138
|
},
|
|
151
139
|
video: {
|
|
152
140
|
preferLiveVideo: true,
|
|
@@ -158,10 +146,6 @@ var DefaultConfiguration = {
|
|
|
158
146
|
Stage: Stage2x2With6ThumbnailsLayout,
|
|
159
147
|
ScreenShareView: RemoteScreenShareWithSmallThumbnailsLayout
|
|
160
148
|
}
|
|
161
|
-
},
|
|
162
|
-
screenShare: {
|
|
163
|
-
audio: true,
|
|
164
|
-
video: true
|
|
165
149
|
}
|
|
166
150
|
};
|
|
167
151
|
exports.DefaultConfiguration = DefaultConfiguration;
|
|
@@ -169,7 +153,7 @@ var Event;
|
|
|
169
153
|
exports.Event = Event;
|
|
170
154
|
(function (Event) {
|
|
171
155
|
Event["AudioCreated"] = "AudioCreated";
|
|
172
|
-
Event["ScreenShareAudioCreated"] = "
|
|
156
|
+
Event["ScreenShareAudioCreated"] = "ScreenShareAudioCreated";
|
|
173
157
|
Event["VideoLayoutChanged"] = "VideoLayoutChanged";
|
|
174
158
|
})(Event || (exports.Event = Event = {}));
|
|
175
159
|
/**
|
|
@@ -213,13 +197,19 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
213
197
|
video: {
|
|
214
198
|
activeSpeakerGroups: {},
|
|
215
199
|
memberPanes: {}
|
|
200
|
+
},
|
|
201
|
+
screenShare: {
|
|
202
|
+
audio: undefined,
|
|
203
|
+
video: undefined
|
|
216
204
|
}
|
|
217
205
|
};
|
|
218
206
|
_this.checkConfigValidity();
|
|
219
207
|
_this.slots = {
|
|
220
208
|
audio: [],
|
|
221
|
-
|
|
222
|
-
|
|
209
|
+
screenShare: {
|
|
210
|
+
audio: [],
|
|
211
|
+
video: undefined
|
|
212
|
+
},
|
|
223
213
|
video: {
|
|
224
214
|
unused: [],
|
|
225
215
|
activeSpeaker: [],
|
|
@@ -292,11 +282,15 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
292
282
|
return this.createAudioMedia();
|
|
293
283
|
case 5:
|
|
294
284
|
_context.next = 7;
|
|
295
|
-
return this.
|
|
285
|
+
return this.createScreenShareReceiveSlots();
|
|
296
286
|
case 7:
|
|
297
|
-
|
|
287
|
+
this.createScreenShareAudioMedia();
|
|
288
|
+
_context.next = 10;
|
|
289
|
+
return this.preallocateVideoReceiveSlots();
|
|
290
|
+
case 10:
|
|
291
|
+
_context.next = 12;
|
|
298
292
|
return this.setLayout(this.config.video.initialLayoutId);
|
|
299
|
-
case
|
|
293
|
+
case 12:
|
|
300
294
|
case "end":
|
|
301
295
|
return _context.stop();
|
|
302
296
|
}
|
|
@@ -321,6 +315,8 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
321
315
|
this.invalidateCurrentRemoteMedia({
|
|
322
316
|
audio: true,
|
|
323
317
|
video: true,
|
|
318
|
+
screenShareAudio: true,
|
|
319
|
+
screenShareVideo: true,
|
|
324
320
|
commit: true
|
|
325
321
|
});
|
|
326
322
|
|
|
@@ -330,8 +326,17 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
330
326
|
});
|
|
331
327
|
this.slots.audio.length = 0;
|
|
332
328
|
|
|
333
|
-
//
|
|
329
|
+
// release screen share slots
|
|
330
|
+
this.slots.screenShare.audio.forEach(function (slot) {
|
|
331
|
+
return _this2.receiveSlotManager.releaseSlot(slot);
|
|
332
|
+
});
|
|
333
|
+
this.slots.screenShare.audio.length = 0;
|
|
334
|
+
if (this.slots.screenShare.video) {
|
|
335
|
+
this.receiveSlotManager.releaseSlot(this.slots.screenShare.video);
|
|
336
|
+
this.slots.screenShare.video = undefined;
|
|
337
|
+
}
|
|
334
338
|
|
|
339
|
+
// release video slots
|
|
335
340
|
this.receiveSlotAllocations = {
|
|
336
341
|
activeSpeaker: {},
|
|
337
342
|
receiverSelected: {}
|
|
@@ -390,7 +395,7 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
390
395
|
}
|
|
391
396
|
_context2.t0 = this.slots.video.unused;
|
|
392
397
|
_context2.next = 5;
|
|
393
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.
|
|
398
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
394
399
|
case 5:
|
|
395
400
|
_context2.t1 = _context2.sent;
|
|
396
401
|
_context2.t0.push.call(_context2.t0, _context2.t1);
|
|
@@ -438,8 +443,9 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
438
443
|
return this.updateVideoReceiveSlots();
|
|
439
444
|
case 8:
|
|
440
445
|
this.updateVideoRemoteMediaObjects();
|
|
446
|
+
this.updateScreenShareVideoRemoteMediaObject();
|
|
441
447
|
this.emitVideoLayoutChangedEvent();
|
|
442
|
-
case
|
|
448
|
+
case 11:
|
|
443
449
|
case "end":
|
|
444
450
|
return _context3.stop();
|
|
445
451
|
}
|
|
@@ -461,6 +467,41 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
461
467
|
return this.currentLayoutId;
|
|
462
468
|
}
|
|
463
469
|
|
|
470
|
+
/**
|
|
471
|
+
* sets the preferLiveVideo
|
|
472
|
+
*/
|
|
473
|
+
}, {
|
|
474
|
+
key: "setPreferLiveVideo",
|
|
475
|
+
value: function setPreferLiveVideo(preferLiveVideo) {
|
|
476
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#setPreferLiveVideo --> setPreferLiveVideo is called to set preferLiveVideo to ".concat(preferLiveVideo));
|
|
477
|
+
this.config.video.preferLiveVideo = preferLiveVideo;
|
|
478
|
+
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (activeSpeakerGroup) {
|
|
479
|
+
activeSpeakerGroup.setPreferLiveVideo(preferLiveVideo, false);
|
|
480
|
+
});
|
|
481
|
+
this.mediaRequestManagers.video.commit();
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Sets CSIs for multiple RemoteMedia instances belonging to RemoteMediaGroup.
|
|
486
|
+
* For each entry in the remoteMediaCsis array:
|
|
487
|
+
* - if csi is specified, the RemoteMedia instance is pinned to that CSI
|
|
488
|
+
* - if csi is undefined, the RemoteMedia instance is unpinned
|
|
489
|
+
*/
|
|
490
|
+
}, {
|
|
491
|
+
key: "setActiveSpeakerCsis",
|
|
492
|
+
value: function setActiveSpeakerCsis(remoteMediaCsis) {
|
|
493
|
+
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
494
|
+
var groupRemoteMediaCsis = remoteMediaCsis.filter(function (_ref) {
|
|
495
|
+
var remoteMedia = _ref.remoteMedia;
|
|
496
|
+
return remoteMediaGroup.includes(remoteMedia);
|
|
497
|
+
});
|
|
498
|
+
if (groupRemoteMediaCsis.length > 0) {
|
|
499
|
+
remoteMediaGroup.setActiveSpeakerCsis(groupRemoteMediaCsis, false);
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
this.mediaRequestManagers.video.commit();
|
|
503
|
+
}
|
|
504
|
+
|
|
464
505
|
/**
|
|
465
506
|
* Creates the audio slots
|
|
466
507
|
*/
|
|
@@ -479,7 +520,7 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
479
520
|
break;
|
|
480
521
|
}
|
|
481
522
|
_context4.next = 4;
|
|
482
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.
|
|
523
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
483
524
|
case 4:
|
|
484
525
|
slot = _context4.sent;
|
|
485
526
|
this.slots.audio.push(slot);
|
|
@@ -505,6 +546,71 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
505
546
|
}
|
|
506
547
|
return createAudioMedia;
|
|
507
548
|
}()
|
|
549
|
+
/**
|
|
550
|
+
* Creates receive slots required for receiving screen share audio and video
|
|
551
|
+
*/
|
|
552
|
+
}, {
|
|
553
|
+
key: "createScreenShareReceiveSlots",
|
|
554
|
+
value: function () {
|
|
555
|
+
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
556
|
+
var i, slot, isAnyLayoutContainingScreenShareVideo;
|
|
557
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
558
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
559
|
+
case 0:
|
|
560
|
+
i = 0;
|
|
561
|
+
case 1:
|
|
562
|
+
if (!(i < this.config.audio.numOfScreenShareStreams)) {
|
|
563
|
+
_context5.next = 9;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
_context5.next = 4;
|
|
567
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioSlides);
|
|
568
|
+
case 4:
|
|
569
|
+
slot = _context5.sent;
|
|
570
|
+
this.slots.screenShare.audio.push(slot);
|
|
571
|
+
case 6:
|
|
572
|
+
i += 1;
|
|
573
|
+
_context5.next = 1;
|
|
574
|
+
break;
|
|
575
|
+
case 9:
|
|
576
|
+
// video
|
|
577
|
+
isAnyLayoutContainingScreenShareVideo = (0, _values.default)(this.config.video.layouts).some(function (layout) {
|
|
578
|
+
return !!layout.screenShareVideo;
|
|
579
|
+
});
|
|
580
|
+
if (!isAnyLayoutContainingScreenShareVideo) {
|
|
581
|
+
_context5.next = 14;
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
_context5.next = 13;
|
|
585
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoSlides);
|
|
586
|
+
case 13:
|
|
587
|
+
this.slots.screenShare.video = _context5.sent;
|
|
588
|
+
case 14:
|
|
589
|
+
case "end":
|
|
590
|
+
return _context5.stop();
|
|
591
|
+
}
|
|
592
|
+
}, _callee5, this);
|
|
593
|
+
}));
|
|
594
|
+
function createScreenShareReceiveSlots() {
|
|
595
|
+
return _createScreenShareReceiveSlots.apply(this, arguments);
|
|
596
|
+
}
|
|
597
|
+
return createScreenShareReceiveSlots;
|
|
598
|
+
}()
|
|
599
|
+
/**
|
|
600
|
+
* Creates RemoteMedia objects for screen share
|
|
601
|
+
*/
|
|
602
|
+
}, {
|
|
603
|
+
key: "createScreenShareAudioMedia",
|
|
604
|
+
value: function createScreenShareAudioMedia() {
|
|
605
|
+
if (this.slots.screenShare.audio.length > 0) {
|
|
606
|
+
this.media.screenShare.audio = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.screenShareAudio, this.slots.screenShare.audio, 255, true);
|
|
607
|
+
this.emit({
|
|
608
|
+
file: 'multistream/remoteMediaManager',
|
|
609
|
+
function: 'createScreenShareAudioMedia'
|
|
610
|
+
}, Event.ScreenShareAudioCreated, this.media.screenShare.audio);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
508
614
|
/**
|
|
509
615
|
* Goes over all receiver-selected slots and keeps only the ones that are required by a given layout,
|
|
510
616
|
* the rest are all moved to the "unused" list
|
|
@@ -549,109 +655,185 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
549
655
|
}
|
|
550
656
|
|
|
551
657
|
/**
|
|
552
|
-
* Allocates receive slots to all video panes
|
|
658
|
+
* Allocates receive slots to all active speaker video panes
|
|
659
|
+
* in the current selected layout.
|
|
660
|
+
*
|
|
661
|
+
* Allocation tries to keep the same order of the slots between the previous
|
|
662
|
+
* layout and the new one. Sorting helps making sure that highest priority slots
|
|
663
|
+
* go in the same order in the new layout.
|
|
553
664
|
*/
|
|
554
665
|
}, {
|
|
555
|
-
key: "
|
|
556
|
-
value: function
|
|
666
|
+
key: "allocateSlotsToActiveSpeakerPaneGroups",
|
|
667
|
+
value: function allocateSlotsToActiveSpeakerPaneGroups() {
|
|
557
668
|
var _this$currentLayout2,
|
|
558
669
|
_this$currentLayout2$,
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
566
|
-
(_this$currentLayout2 = this.currentLayout) === null || _this$currentLayout2 === void 0 ? void 0 : (_this$currentLayout2$ = _this$currentLayout2.activeSpeakerVideoPaneGroups) === null || _this$currentLayout2$ === void 0 ? void 0 : _this$currentLayout2$.forEach(function (group) {
|
|
670
|
+
_this$currentLayout2$2,
|
|
671
|
+
_this5 = this;
|
|
672
|
+
(_this$currentLayout2 = this.currentLayout) === null || _this$currentLayout2 === void 0 ? void 0 : (_this$currentLayout2$ = _this$currentLayout2.activeSpeakerVideoPaneGroups
|
|
673
|
+
// sorting in descending order based on group priority
|
|
674
|
+
) === null || _this$currentLayout2$ === void 0 ? void 0 : (_this$currentLayout2$2 = _this$currentLayout2$.sort(function (a, b) {
|
|
675
|
+
return a.priority < b.priority ? 1 : -1;
|
|
676
|
+
})) === null || _this$currentLayout2$2 === void 0 ? void 0 : _this$currentLayout2$2.forEach(function (group) {
|
|
567
677
|
_this5.receiveSlotAllocations.activeSpeaker[group.id] = {
|
|
568
678
|
slots: []
|
|
569
679
|
};
|
|
570
680
|
for (var paneIndex = 0; paneIndex < group.numPanes; paneIndex += 1) {
|
|
571
|
-
// allocate a slot from the "unused" list
|
|
572
|
-
var freeSlot = _this5.slots.video.unused.
|
|
681
|
+
// allocate a slot from the "unused" list, by grabbing in same order (shift) as previous layout
|
|
682
|
+
var freeSlot = _this5.slots.video.unused.shift();
|
|
573
683
|
if (freeSlot) {
|
|
574
684
|
_this5.slots.video.activeSpeaker.push(freeSlot);
|
|
575
685
|
_this5.receiveSlotAllocations.activeSpeaker[group.id].slots.push(freeSlot);
|
|
576
686
|
}
|
|
577
687
|
}
|
|
578
688
|
});
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Allocates receive slots to all receiver selected video panes
|
|
693
|
+
* in the current selected layout
|
|
694
|
+
*/
|
|
695
|
+
}, {
|
|
696
|
+
key: "allocateSlotsToReceiverSelectedVideoPaneGroups",
|
|
697
|
+
value: function allocateSlotsToReceiverSelectedVideoPaneGroups() {
|
|
698
|
+
var _this$currentLayout3,
|
|
699
|
+
_this$currentLayout3$,
|
|
700
|
+
_this6 = this;
|
|
579
701
|
(_this$currentLayout3 = this.currentLayout) === null || _this$currentLayout3 === void 0 ? void 0 : (_this$currentLayout3$ = _this$currentLayout3.memberVideoPanes) === null || _this$currentLayout3$ === void 0 ? void 0 : _this$currentLayout3$.forEach(function (memberPane) {
|
|
580
702
|
// check if there is existing slot for this csi
|
|
581
|
-
var existingSlot =
|
|
703
|
+
var existingSlot = _this6.slots.video.receiverSelected.find(function (slot) {
|
|
582
704
|
return slot.csi === memberPane.csi;
|
|
583
705
|
});
|
|
584
|
-
var isExistingSlotAlreadyAllocated = (0, _values.default)(
|
|
706
|
+
var isExistingSlotAlreadyAllocated = (0, _values.default)(_this6.receiveSlotAllocations.receiverSelected).includes(existingSlot);
|
|
585
707
|
if (memberPane.csi !== undefined && existingSlot && !isExistingSlotAlreadyAllocated) {
|
|
586
708
|
// found it, so use it
|
|
587
|
-
|
|
709
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = existingSlot;
|
|
588
710
|
} else {
|
|
589
711
|
// allocate a slot from the "unused" list
|
|
590
|
-
var freeSlot =
|
|
712
|
+
var freeSlot = _this6.slots.video.unused.pop();
|
|
591
713
|
if (freeSlot) {
|
|
592
|
-
|
|
593
|
-
|
|
714
|
+
_this6.slots.video.receiverSelected.push(freeSlot);
|
|
715
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = freeSlot;
|
|
594
716
|
}
|
|
595
717
|
}
|
|
596
718
|
});
|
|
597
719
|
}
|
|
598
720
|
|
|
599
721
|
/**
|
|
600
|
-
*
|
|
601
|
-
* and allocates them to the right video panes / pane groups
|
|
602
|
-
*
|
|
603
|
-
* @returns {Promise}
|
|
722
|
+
* Ensures that we have enough slots for the current layout.
|
|
604
723
|
*/
|
|
605
724
|
}, {
|
|
606
|
-
key: "
|
|
725
|
+
key: "refillRequiredSlotsIfNeeded",
|
|
607
726
|
value: function () {
|
|
608
|
-
var
|
|
609
|
-
var _this$slots$video$unu4;
|
|
727
|
+
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
610
728
|
var requiredNumSlots, totalNumSlots, numSlotsToCreate;
|
|
611
|
-
return _regenerator.default.wrap(function
|
|
612
|
-
while (1) switch (
|
|
729
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
730
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
613
731
|
case 0:
|
|
614
732
|
requiredNumSlots = this.getRequiredNumVideoSlotsForLayout(this.currentLayout);
|
|
615
|
-
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
733
|
+
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
616
734
|
if (!(totalNumSlots < requiredNumSlots)) {
|
|
617
|
-
|
|
735
|
+
_context6.next = 13;
|
|
618
736
|
break;
|
|
619
737
|
}
|
|
620
738
|
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
621
739
|
case 4:
|
|
622
740
|
if (!(numSlotsToCreate > 0)) {
|
|
623
|
-
|
|
741
|
+
_context6.next = 13;
|
|
624
742
|
break;
|
|
625
743
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.
|
|
744
|
+
_context6.t0 = this.slots.video.unused;
|
|
745
|
+
_context6.next = 8;
|
|
746
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
629
747
|
case 8:
|
|
630
|
-
|
|
631
|
-
|
|
748
|
+
_context6.t1 = _context6.sent;
|
|
749
|
+
_context6.t0.push.call(_context6.t0, _context6.t1);
|
|
632
750
|
numSlotsToCreate -= 1;
|
|
633
|
-
|
|
751
|
+
_context6.next = 4;
|
|
634
752
|
break;
|
|
635
753
|
case 13:
|
|
636
|
-
|
|
637
|
-
|
|
754
|
+
case "end":
|
|
755
|
+
return _context6.stop();
|
|
756
|
+
}
|
|
757
|
+
}, _callee6, this);
|
|
758
|
+
}));
|
|
759
|
+
function refillRequiredSlotsIfNeeded() {
|
|
760
|
+
return _refillRequiredSlotsIfNeeded.apply(this, arguments);
|
|
761
|
+
}
|
|
762
|
+
return refillRequiredSlotsIfNeeded;
|
|
763
|
+
}()
|
|
764
|
+
/**
|
|
765
|
+
* Move all active speaker slots to "unused"
|
|
766
|
+
*/
|
|
767
|
+
}, {
|
|
768
|
+
key: "trimActiveSpeakerSlots",
|
|
769
|
+
value: function trimActiveSpeakerSlots() {
|
|
770
|
+
var _this$slots$video$unu4;
|
|
771
|
+
(_this$slots$video$unu4 = this.slots.video.unused).push.apply(_this$slots$video$unu4, (0, _toConsumableArray2.default)(this.slots.video.activeSpeaker));
|
|
772
|
+
this.slots.video.activeSpeaker.length = 0;
|
|
773
|
+
}
|
|
638
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Logs the state of the receive slots
|
|
777
|
+
*/
|
|
778
|
+
}, {
|
|
779
|
+
key: "logReceieveSlots",
|
|
780
|
+
value: function logReceieveSlots() {
|
|
781
|
+
var logMessage = '';
|
|
782
|
+
(0, _forEach2.default)(this.receiveSlotAllocations.activeSpeaker, function (group, groupName) {
|
|
783
|
+
logMessage += "group: ".concat(groupName, "\n").concat(group.slots.map(function (slot) {
|
|
784
|
+
return slot.logString;
|
|
785
|
+
}).join(' '));
|
|
786
|
+
});
|
|
787
|
+
logMessage += '\nreceiverSelected:\n';
|
|
788
|
+
(0, _forEach2.default)(this.receiveSlotAllocations.receiverSelected, function (slot, key) {
|
|
789
|
+
logMessage += " ".concat(key, ": ").concat(slot.logString, "\n");
|
|
790
|
+
});
|
|
791
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#updateVideoReceiveSlots --> receive slots updated: unused=".concat(this.slots.video.unused.length, ", activeSpeaker=").concat(this.slots.video.activeSpeaker.length, ", receiverSelected=").concat(this.slots.video.receiverSelected.length, "\n").concat(logMessage));
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Makes sure we have the right number of receive slots created for the current layout
|
|
796
|
+
* and allocates them to the right video panes / pane groups
|
|
797
|
+
*
|
|
798
|
+
* @returns {Promise}
|
|
799
|
+
*/
|
|
800
|
+
}, {
|
|
801
|
+
key: "updateVideoReceiveSlots",
|
|
802
|
+
value: function () {
|
|
803
|
+
var _updateVideoReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
804
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
805
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
806
|
+
case 0:
|
|
639
807
|
// move all active speaker slots to "unused"
|
|
640
|
-
|
|
641
|
-
this.slots.video.activeSpeaker.length = 0;
|
|
808
|
+
this.trimActiveSpeakerSlots();
|
|
642
809
|
|
|
810
|
+
// move all no longer needed receiver-selected slots to "unused"
|
|
811
|
+
this.trimReceiverSelectedSlots();
|
|
812
|
+
|
|
813
|
+
// ensure we have enough total slots for current layout
|
|
814
|
+
_context7.next = 4;
|
|
815
|
+
return this.refillRequiredSlotsIfNeeded();
|
|
816
|
+
case 4:
|
|
643
817
|
// allocate the slots to the right panes / pane groups
|
|
644
|
-
|
|
645
|
-
|
|
818
|
+
// reset allocations
|
|
819
|
+
this.receiveSlotAllocations = {
|
|
820
|
+
activeSpeaker: {},
|
|
821
|
+
receiverSelected: {}
|
|
822
|
+
};
|
|
823
|
+
// allocate active speaker
|
|
824
|
+
this.allocateSlotsToActiveSpeakerPaneGroups();
|
|
825
|
+
// allocate receiver selected
|
|
826
|
+
this.allocateSlotsToReceiverSelectedVideoPaneGroups();
|
|
827
|
+
this.logReceieveSlots();
|
|
646
828
|
|
|
647
829
|
// If this is the initial layout, there may be some "unused" slots left because of the preallocation
|
|
648
830
|
// done in this.preallocateVideoReceiveSlots(), so release them now
|
|
649
831
|
this.releaseUnusedVideoSlots();
|
|
650
|
-
case
|
|
832
|
+
case 9:
|
|
651
833
|
case "end":
|
|
652
|
-
return
|
|
834
|
+
return _context7.stop();
|
|
653
835
|
}
|
|
654
|
-
},
|
|
836
|
+
}, _callee7, this);
|
|
655
837
|
}));
|
|
656
838
|
function updateVideoReceiveSlots() {
|
|
657
839
|
return _updateVideoReceiveSlots.apply(this, arguments);
|
|
@@ -665,11 +847,13 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
665
847
|
}, {
|
|
666
848
|
key: "updateVideoRemoteMediaObjects",
|
|
667
849
|
value: function updateVideoRemoteMediaObjects() {
|
|
668
|
-
var
|
|
850
|
+
var _this7 = this;
|
|
669
851
|
// invalidate all the previous remote media objects and cancel their media requests
|
|
670
852
|
this.invalidateCurrentRemoteMedia({
|
|
671
853
|
audio: false,
|
|
672
854
|
video: true,
|
|
855
|
+
screenShareAudio: false,
|
|
856
|
+
screenShareVideo: false,
|
|
673
857
|
commit: false
|
|
674
858
|
});
|
|
675
859
|
|
|
@@ -677,19 +861,19 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
677
861
|
this.media.video.activeSpeakerGroups = {};
|
|
678
862
|
this.media.video.memberPanes = {};
|
|
679
863
|
var _loop = function _loop() {
|
|
680
|
-
var
|
|
864
|
+
var _this7$currentLayout, _this7$currentLayout$;
|
|
681
865
|
var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
|
|
682
866
|
groupId = _Object$entries$_i[0],
|
|
683
867
|
group = _Object$entries$_i[1];
|
|
684
|
-
var paneGroupInCurrentLayout = (
|
|
868
|
+
var paneGroupInCurrentLayout = (_this7$currentLayout = _this7.currentLayout) === null || _this7$currentLayout === void 0 ? void 0 : (_this7$currentLayout$ = _this7$currentLayout.activeSpeakerVideoPaneGroups) === null || _this7$currentLayout$ === void 0 ? void 0 : _this7$currentLayout$.find(function (groupInLayout) {
|
|
685
869
|
return groupInLayout.id === groupId;
|
|
686
870
|
});
|
|
687
871
|
if (paneGroupInCurrentLayout) {
|
|
688
|
-
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(
|
|
689
|
-
preferLiveVideo:
|
|
872
|
+
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(_this7.mediaRequestManagers.video, group.slots, paneGroupInCurrentLayout.priority, false, {
|
|
873
|
+
preferLiveVideo: _this7.config.video.preferLiveVideo,
|
|
690
874
|
resolution: paneGroupInCurrentLayout.size
|
|
691
875
|
});
|
|
692
|
-
|
|
876
|
+
_this7.media.video.activeSpeakerGroups[groupId] = mediaGroup;
|
|
693
877
|
} else {
|
|
694
878
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
695
879
|
_loggerProxy.default.logger.warn("a group id ".concat(groupId, " from this.receiveSlotAllocations.activeSpeaker cannot be found in the current layout configuration"));
|
|
@@ -701,21 +885,21 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
701
885
|
|
|
702
886
|
// create new remoteMedia objects
|
|
703
887
|
var _loop2 = function _loop2() {
|
|
704
|
-
var
|
|
888
|
+
var _this7$currentLayout2, _this7$currentLayout3;
|
|
705
889
|
var _Object$entries3$_i = (0, _slicedToArray2.default)(_Object$entries3[_i2], 2),
|
|
706
890
|
paneId = _Object$entries3$_i[0],
|
|
707
891
|
slot = _Object$entries3$_i[1];
|
|
708
|
-
var paneInCurrentLayout = (
|
|
892
|
+
var paneInCurrentLayout = (_this7$currentLayout2 = _this7.currentLayout) === null || _this7$currentLayout2 === void 0 ? void 0 : (_this7$currentLayout3 = _this7$currentLayout2.memberVideoPanes) === null || _this7$currentLayout3 === void 0 ? void 0 : _this7$currentLayout3.find(function (paneInLayout) {
|
|
709
893
|
return paneInLayout.id === paneId;
|
|
710
894
|
});
|
|
711
895
|
if (paneInCurrentLayout) {
|
|
712
|
-
var remoteMedia = new _remoteMedia.RemoteMedia(slot,
|
|
896
|
+
var remoteMedia = new _remoteMedia.RemoteMedia(slot, _this7.mediaRequestManagers.video, {
|
|
713
897
|
resolution: paneInCurrentLayout.size
|
|
714
898
|
});
|
|
715
899
|
if (paneInCurrentLayout.csi) {
|
|
716
900
|
remoteMedia.sendMediaRequest(paneInCurrentLayout.csi, false);
|
|
717
901
|
}
|
|
718
|
-
|
|
902
|
+
_this7.media.video.memberPanes[paneId] = remoteMedia;
|
|
719
903
|
} else {
|
|
720
904
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
721
905
|
_loggerProxy.default.logger.warn("a pane id ".concat(paneId, " from this.receiveSlotAllocations.receiverSelected cannot be found in the current layout configuration"));
|
|
@@ -724,11 +908,37 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
724
908
|
for (var _i2 = 0, _Object$entries3 = (0, _entries.default)(this.receiveSlotAllocations.receiverSelected); _i2 < _Object$entries3.length; _i2++) {
|
|
725
909
|
_loop2();
|
|
726
910
|
}
|
|
727
|
-
// todo: screenshare (SPARK-377812)
|
|
728
|
-
|
|
729
911
|
this.mediaRequestManagers.video.commit();
|
|
730
912
|
}
|
|
731
913
|
|
|
914
|
+
/**
|
|
915
|
+
* Checks if current layout requires a screen share.
|
|
916
|
+
* If it does, it creates new RemoteMediaGroup object for screen share
|
|
917
|
+
* and sends the media requests for it.
|
|
918
|
+
* If it doesn't, it makes sure we clean up any RemoteMediaGroup objects
|
|
919
|
+
* created earlier for screen share (for previous layout).
|
|
920
|
+
*/
|
|
921
|
+
}, {
|
|
922
|
+
key: "updateScreenShareVideoRemoteMediaObject",
|
|
923
|
+
value: function updateScreenShareVideoRemoteMediaObject() {
|
|
924
|
+
var _this$currentLayout4;
|
|
925
|
+
this.invalidateCurrentRemoteMedia({
|
|
926
|
+
audio: false,
|
|
927
|
+
video: false,
|
|
928
|
+
screenShareAudio: false,
|
|
929
|
+
screenShareVideo: true,
|
|
930
|
+
commit: false
|
|
931
|
+
});
|
|
932
|
+
this.media.screenShare.video = undefined;
|
|
933
|
+
if ((_this$currentLayout4 = this.currentLayout) !== null && _this$currentLayout4 !== void 0 && _this$currentLayout4.screenShareVideo) {
|
|
934
|
+
// we create a group of 1, because for screen share we need to use the "active speaker" policy
|
|
935
|
+
this.media.screenShare.video = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.screenShareVideo, [this.slots.screenShare.video], 255, false, {
|
|
936
|
+
resolution: this.currentLayout.screenShareVideo.size
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
this.mediaRequestManagers.screenShareVideo.commit();
|
|
940
|
+
}
|
|
941
|
+
|
|
732
942
|
/**
|
|
733
943
|
* Invalidates all remote media objects belonging to currently selected layout
|
|
734
944
|
*/
|
|
@@ -737,6 +947,8 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
737
947
|
value: function invalidateCurrentRemoteMedia(options) {
|
|
738
948
|
var audio = options.audio,
|
|
739
949
|
video = options.video,
|
|
950
|
+
screenShareAudio = options.screenShareAudio,
|
|
951
|
+
screenShareVideo = options.screenShareVideo,
|
|
740
952
|
commit = options.commit;
|
|
741
953
|
if (audio && this.media.audio) {
|
|
742
954
|
this.media.audio.stop(commit);
|
|
@@ -752,14 +964,21 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
752
964
|
this.mediaRequestManagers.video.commit();
|
|
753
965
|
}
|
|
754
966
|
}
|
|
967
|
+
if (screenShareAudio && this.media.screenShare.audio) {
|
|
968
|
+
this.media.screenShare.audio.stop(commit);
|
|
969
|
+
}
|
|
970
|
+
if (screenShareVideo && this.media.screenShare.video) {
|
|
971
|
+
this.media.screenShare.video.stop(commit);
|
|
972
|
+
}
|
|
755
973
|
}
|
|
756
974
|
|
|
757
975
|
/** emits Event.VideoLayoutChanged */
|
|
758
976
|
}, {
|
|
759
977
|
key: "emitVideoLayoutChangedEvent",
|
|
760
978
|
value: function emitVideoLayoutChangedEvent() {
|
|
979
|
+
var _this$media$screenSha;
|
|
761
980
|
// todo: at this point the receive slots might still be showing a participant from previous layout, we should
|
|
762
|
-
// wait for our media requests to be
|
|
981
|
+
// wait for our media requests to be fulfilled, but there is no API for that right now (we could wait for source updates
|
|
763
982
|
// but in some cases they might never come, or would need to always make sure to use a new set of receiver slots)
|
|
764
983
|
// for now it's fine to have it like this, we will re-evaluate if it needs improving after more testing
|
|
765
984
|
|
|
@@ -770,7 +989,7 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
770
989
|
layoutId: this.currentLayoutId,
|
|
771
990
|
activeSpeakerVideoPanes: this.media.video.activeSpeakerGroups,
|
|
772
991
|
memberVideoPanes: this.media.video.memberPanes,
|
|
773
|
-
screenShareVideo:
|
|
992
|
+
screenShareVideo: (_this$media$screenSha = this.media.screenShare.video) === null || _this$media$screenSha === void 0 ? void 0 : _this$media$screenSha.getRemoteMedia()[0]
|
|
774
993
|
});
|
|
775
994
|
}
|
|
776
995
|
|
|
@@ -804,32 +1023,32 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
804
1023
|
}, {
|
|
805
1024
|
key: "addMemberVideoPane",
|
|
806
1025
|
value: function () {
|
|
807
|
-
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
808
|
-
var _this$
|
|
1026
|
+
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(newPane) {
|
|
1027
|
+
var _this$currentLayout5;
|
|
809
1028
|
var receiveSlot, remoteMedia;
|
|
810
|
-
return _regenerator.default.wrap(function
|
|
811
|
-
while (1) switch (
|
|
1029
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
1030
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
812
1031
|
case 0:
|
|
813
1032
|
if (this.currentLayout) {
|
|
814
|
-
|
|
1033
|
+
_context8.next = 2;
|
|
815
1034
|
break;
|
|
816
1035
|
}
|
|
817
1036
|
throw new Error('There is no current layout selected, call start() first');
|
|
818
1037
|
case 2:
|
|
819
|
-
if (!((_this$
|
|
1038
|
+
if (!((_this$currentLayout5 = this.currentLayout) !== null && _this$currentLayout5 !== void 0 && _this$currentLayout5.memberVideoPanes)) {
|
|
820
1039
|
this.currentLayout.memberVideoPanes = [];
|
|
821
1040
|
}
|
|
822
1041
|
if (!(newPane.id in this.currentLayout.memberVideoPanes)) {
|
|
823
|
-
|
|
1042
|
+
_context8.next = 5;
|
|
824
1043
|
break;
|
|
825
1044
|
}
|
|
826
1045
|
throw new Error("duplicate pane id ".concat(newPane.id, " - this pane already exists in current layout's memberVideoPanes"));
|
|
827
1046
|
case 5:
|
|
828
1047
|
this.currentLayout.memberVideoPanes.push(newPane);
|
|
829
|
-
|
|
830
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.
|
|
1048
|
+
_context8.next = 8;
|
|
1049
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
831
1050
|
case 8:
|
|
832
|
-
receiveSlot =
|
|
1051
|
+
receiveSlot = _context8.sent;
|
|
833
1052
|
this.slots.video.receiverSelected.push(receiveSlot);
|
|
834
1053
|
remoteMedia = new _remoteMedia.RemoteMedia(receiveSlot, this.mediaRequestManagers.video, {
|
|
835
1054
|
resolution: newPane.size
|
|
@@ -838,12 +1057,12 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
838
1057
|
remoteMedia.sendMediaRequest(newPane.csi, true);
|
|
839
1058
|
}
|
|
840
1059
|
this.media.video.memberPanes[newPane.id] = remoteMedia;
|
|
841
|
-
return
|
|
1060
|
+
return _context8.abrupt("return", remoteMedia);
|
|
842
1061
|
case 14:
|
|
843
1062
|
case "end":
|
|
844
|
-
return
|
|
1063
|
+
return _context8.stop();
|
|
845
1064
|
}
|
|
846
|
-
},
|
|
1065
|
+
}, _callee8, this);
|
|
847
1066
|
}));
|
|
848
1067
|
function addMemberVideoPane(_x2) {
|
|
849
1068
|
return _addMemberVideoPane.apply(this, arguments);
|