@webex/plugin-meetings 3.0.0-beta.39 → 3.0.0-beta.391
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -8
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +94 -15
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +671 -81
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/utils.js +45 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/webex-errors.js +48 -7
- 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/common/logs/request.js +5 -1
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +24 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +5 -10
- package/dist/config.js.map +1 -1
- package/dist/constants.js +242 -33
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +14 -2
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +109 -15
- package/dist/controls-options-manager/index.js.map +1 -1
- 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 +309 -18
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +110 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.js +93 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +380 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +91 -2
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +386 -62
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +7 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +71 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +249 -72
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +89 -14
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +65 -102
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +73 -124
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +135 -330
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +86 -2
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +4075 -2827
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +224 -136
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +177 -152
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +672 -417
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +73 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +192 -51
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/util.js +1 -1
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +36 -36
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +39 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +484 -119
- 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 +2 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +73 -7
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +58 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +132 -25
- 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 +102 -6
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +106 -38
- 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 +326 -232
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +18 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +1 -446
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +223 -32
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +10 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +39 -36
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +3 -1
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +76 -5
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +366 -104
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +255 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/reachability/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +263 -390
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +6 -4
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reconnection-manager/index.js +266 -202
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +21 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +9 -8
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +51 -28
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +48 -64
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +220 -70
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +179 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/index.js +357 -295
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +296 -156
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/utils.d.ts +14 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/webex-errors.d.ts +25 -1
- package/dist/types/common/logs/request.d.ts +2 -0
- package/dist/types/common/queue.d.ts +9 -7
- package/dist/types/config.d.ts +2 -7
- package/dist/types/constants.d.ts +203 -31
- package/dist/types/controls-options-manager/enums.d.ts +11 -1
- package/dist/types/controls-options-manager/index.d.ts +17 -1
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -7
- package/dist/types/index.d.ts +6 -5
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/index.d.ts +57 -4
- package/dist/types/locus-info/parser.d.ts +66 -6
- package/dist/types/media/index.d.ts +2 -0
- package/dist/types/media/properties.d.ts +34 -49
- package/dist/types/mediaQualityMetrics/config.d.ts +99 -223
- package/dist/types/meeting/in-meeting-actions.d.ts +86 -2
- package/dist/types/meeting/index.d.ts +567 -496
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +93 -25
- package/dist/types/meeting/request.d.ts +64 -43
- package/dist/types/meeting/util.d.ts +117 -1
- package/dist/types/meeting-info/index.d.ts +13 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +31 -1
- package/dist/types/meetings/collection.d.ts +17 -0
- package/dist/types/meetings/index.d.ts +113 -21
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/member/index.d.ts +14 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/members/collection.d.ts +5 -0
- package/dist/types/members/index.d.ts +35 -2
- package/dist/types/members/request.d.ts +73 -9
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +214 -1
- package/dist/types/metrics/constants.d.ts +17 -0
- package/dist/types/metrics/index.d.ts +4 -111
- package/dist/types/multistream/mediaRequestManager.d.ts +72 -3
- package/dist/types/multistream/receiveSlot.d.ts +7 -3
- package/dist/types/multistream/receiveSlotManager.d.ts +14 -4
- package/dist/types/multistream/remoteMedia.d.ts +3 -31
- package/dist/types/multistream/remoteMediaGroup.d.ts +2 -9
- package/dist/types/multistream/remoteMediaManager.d.ts +62 -2
- package/dist/types/multistream/sendSlotManager.d.ts +70 -0
- package/dist/types/reachability/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +60 -95
- package/dist/types/reachability/request.d.ts +3 -1
- package/dist/types/reachability/util.d.ts +8 -0
- package/dist/types/reconnection-manager/index.d.ts +19 -0
- package/dist/types/recording-controller/index.d.ts +15 -1
- package/dist/types/recording-controller/util.d.ts +5 -4
- package/dist/types/roap/index.d.ts +2 -1
- package/dist/types/roap/request.d.ts +9 -8
- package/dist/types/roap/turnDiscovery.d.ts +39 -5
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/index.d.ts +34 -12
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/package.json +22 -19
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +35 -11
- package/src/breakouts/breakout.ts +67 -9
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +558 -59
- package/src/breakouts/utils.ts +42 -0
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/webex-errors.ts +44 -2
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/common/logs/request.ts +5 -1
- package/src/common/queue.ts +22 -8
- package/src/config.ts +4 -9
- package/src/constants.ts +229 -21
- package/src/controls-options-manager/enums.ts +12 -0
- package/src/controls-options-manager/index.ts +116 -21
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +294 -14
- package/src/index.ts +44 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +349 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +108 -0
- package/src/locus-info/index.ts +417 -59
- package/src/locus-info/infoUtils.ts +10 -2
- package/src/locus-info/mediaSharesUtils.ts +80 -0
- package/src/locus-info/parser.ts +258 -47
- package/src/locus-info/selfUtils.ts +81 -5
- package/src/media/index.ts +100 -108
- package/src/media/properties.ts +88 -117
- package/src/mediaQualityMetrics/config.ts +103 -238
- package/src/meeting/in-meeting-actions.ts +171 -3
- package/src/meeting/index.ts +3411 -2435
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +223 -136
- package/src/meeting/request.ts +155 -120
- package/src/meeting/util.ts +685 -395
- package/src/meeting-info/index.ts +81 -8
- package/src/meeting-info/meeting-info-v2.ts +170 -14
- package/src/meeting-info/util.ts +1 -1
- package/src/meeting-info/utilv2.ts +23 -23
- package/src/meetings/collection.ts +33 -0
- package/src/meetings/index.ts +507 -127
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +2 -0
- package/src/meetings/util.ts +81 -12
- package/src/member/index.ts +58 -0
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +141 -25
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +134 -8
- package/src/members/request.ts +97 -17
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +333 -240
- package/src/metrics/constants.ts +17 -0
- package/src/metrics/index.ts +1 -469
- package/src/multistream/mediaRequestManager.ts +271 -56
- package/src/multistream/receiveSlot.ts +11 -4
- package/src/multistream/receiveSlotManager.ts +34 -24
- package/src/multistream/remoteMedia.ts +5 -3
- package/src/multistream/remoteMediaGroup.ts +78 -0
- package/src/multistream/remoteMediaManager.ts +248 -44
- package/src/multistream/sendSlotManager.ts +199 -0
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +229 -346
- package/src/reachability/request.ts +8 -4
- package/src/reachability/util.ts +24 -0
- package/src/reconnection-manager/index.ts +128 -97
- package/src/recording-controller/index.ts +20 -3
- package/src/recording-controller/util.ts +26 -9
- package/src/roap/index.ts +52 -23
- package/src/roap/request.ts +48 -67
- package/src/roap/turnDiscovery.ts +147 -49
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +166 -0
- package/src/statsAnalyzer/index.ts +457 -416
- package/src/statsAnalyzer/mqaUtil.ts +317 -170
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +60 -3
- package/test/integration/spec/journey.js +320 -261
- package/test/integration/spec/space-meeting.js +76 -3
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +118 -28
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1349 -114
- package/test/unit/spec/breakouts/utils.js +52 -1
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +163 -0
- package/test/unit/spec/controls-options-manager/util.js +576 -60
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +625 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +316 -43
- package/test/unit/spec/locus-info/index.js +1363 -37
- package/test/unit/spec/locus-info/infoUtils.js +37 -15
- package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
- package/test/unit/spec/locus-info/parser.js +116 -35
- package/test/unit/spec/locus-info/selfConstant.js +27 -4
- package/test/unit/spec/locus-info/selfUtils.js +208 -17
- package/test/unit/spec/media/index.ts +173 -81
- package/test/unit/spec/media/properties.ts +2 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +85 -3
- package/test/unit/spec/meeting/index.js +6821 -2172
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +402 -212
- package/test/unit/spec/meeting/request.js +473 -54
- package/test/unit/spec/meeting/utils.js +773 -67
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +526 -5
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +26 -0
- package/test/unit/spec/meetings/index.js +1415 -213
- package/test/unit/spec/meetings/utils.js +229 -2
- package/test/unit/spec/member/index.js +61 -6
- package/test/unit/spec/member/util.js +510 -34
- package/test/unit/spec/members/index.js +432 -1
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +210 -0
- package/test/unit/spec/metrics/index.js +1 -50
- package/test/unit/spec/multistream/mediaRequestManager.ts +781 -114
- package/test/unit/spec/multistream/receiveSlot.ts +9 -1
- package/test/unit/spec/multistream/receiveSlotManager.ts +32 -30
- package/test/unit/spec/multistream/remoteMedia.ts +2 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +345 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +525 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +551 -14
- package/test/unit/spec/reachability/request.js +3 -1
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +171 -11
- package/test/unit/spec/recording-controller/index.js +294 -218
- package/test/unit/spec/recording-controller/util.js +223 -96
- package/test/unit/spec/roap/index.ts +180 -83
- package/test/unit/spec/roap/request.ts +100 -62
- package/test/unit/spec/roap/turnDiscovery.ts +388 -96
- package/test/unit/spec/rtcMetrics/index.ts +122 -0
- package/test/unit/spec/stats-analyzer/index.js +1252 -12
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -57
- package/test/utils/webex-test-users.js +12 -4
- package/dist/metrics/config.js +0 -289
- package/dist/metrics/config.js.map +0 -1
- package/dist/types/metrics/config.d.ts +0 -169
- package/src/index.js +0 -18
- package/src/metrics/config.ts +0 -485
|
@@ -23,12 +23,14 @@ 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"));
|
|
29
30
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
30
31
|
var _remoteMedia = require("./remoteMedia");
|
|
31
32
|
var _remoteMediaGroup = require("./remoteMediaGroup");
|
|
33
|
+
var _constants = require("../constants");
|
|
32
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
33
35
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
34
36
|
/* Predefined layouts: */
|
|
@@ -69,6 +71,7 @@ var OnePlusFiveLayout = {
|
|
|
69
71
|
};
|
|
70
72
|
|
|
71
73
|
// A layout with 2 big panes for 2 main active speakers and a strip of 6 small panes for other active speakers:
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
72
75
|
var TwoMainPlusSixSmallLayout = {
|
|
73
76
|
activeSpeakerVideoPaneGroups: [{
|
|
74
77
|
id: 'mainGroupWith2BigPanes',
|
|
@@ -151,6 +154,7 @@ var Event;
|
|
|
151
154
|
exports.Event = Event;
|
|
152
155
|
(function (Event) {
|
|
153
156
|
Event["AudioCreated"] = "AudioCreated";
|
|
157
|
+
Event["InterpretationAudioCreated"] = "InterpretationAudioCreated";
|
|
154
158
|
Event["ScreenShareAudioCreated"] = "ScreenShareAudioCreated";
|
|
155
159
|
Event["VideoLayoutChanged"] = "VideoLayoutChanged";
|
|
156
160
|
})(Event || (exports.Event = Event = {}));
|
|
@@ -191,7 +195,10 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
191
195
|
_this.receiveSlotManager = receiveSlotManager;
|
|
192
196
|
_this.mediaRequestManagers = mediaRequestManagers;
|
|
193
197
|
_this.media = {
|
|
194
|
-
audio:
|
|
198
|
+
audio: {
|
|
199
|
+
main: undefined,
|
|
200
|
+
si: undefined
|
|
201
|
+
},
|
|
195
202
|
video: {
|
|
196
203
|
activeSpeakerGroups: {},
|
|
197
204
|
memberPanes: {}
|
|
@@ -203,7 +210,10 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
203
210
|
};
|
|
204
211
|
_this.checkConfigValidity();
|
|
205
212
|
_this.slots = {
|
|
206
|
-
audio:
|
|
213
|
+
audio: {
|
|
214
|
+
main: [],
|
|
215
|
+
si: undefined
|
|
216
|
+
},
|
|
207
217
|
screenShare: {
|
|
208
218
|
audio: [],
|
|
209
219
|
video: undefined
|
|
@@ -319,10 +329,13 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
319
329
|
});
|
|
320
330
|
|
|
321
331
|
// release all audio receive slots
|
|
322
|
-
this.slots.audio.forEach(function (slot) {
|
|
332
|
+
this.slots.audio.main.forEach(function (slot) {
|
|
323
333
|
return _this2.receiveSlotManager.releaseSlot(slot);
|
|
324
334
|
});
|
|
325
|
-
this.slots.audio.length = 0;
|
|
335
|
+
this.slots.audio.main.length = 0;
|
|
336
|
+
if (this.slots.audio.si) {
|
|
337
|
+
this.receiveSlotManager.releaseSlot(this.slots.audio.si);
|
|
338
|
+
}
|
|
326
339
|
|
|
327
340
|
// release screen share slots
|
|
328
341
|
this.slots.screenShare.audio.forEach(function (slot) {
|
|
@@ -435,15 +448,16 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
435
448
|
}
|
|
436
449
|
throw new Error('setLayout() called before start()');
|
|
437
450
|
case 4:
|
|
451
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#setLayout --> new layout selected: ".concat(layoutId));
|
|
438
452
|
this.currentLayoutId = layoutId;
|
|
439
453
|
this.currentLayout = (0, _cloneDeep2.default)(this.config.video.layouts[this.currentLayoutId]);
|
|
440
|
-
_context3.next =
|
|
454
|
+
_context3.next = 9;
|
|
441
455
|
return this.updateVideoReceiveSlots();
|
|
442
|
-
case
|
|
456
|
+
case 9:
|
|
443
457
|
this.updateVideoRemoteMediaObjects();
|
|
444
458
|
this.updateScreenShareVideoRemoteMediaObject();
|
|
445
459
|
this.emitVideoLayoutChangedEvent();
|
|
446
|
-
case
|
|
460
|
+
case 12:
|
|
447
461
|
case "end":
|
|
448
462
|
return _context3.stop();
|
|
449
463
|
}
|
|
@@ -465,75 +479,206 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
465
479
|
return this.currentLayoutId;
|
|
466
480
|
}
|
|
467
481
|
|
|
482
|
+
/**
|
|
483
|
+
* sets the preferLiveVideo
|
|
484
|
+
*/
|
|
485
|
+
}, {
|
|
486
|
+
key: "setPreferLiveVideo",
|
|
487
|
+
value: function setPreferLiveVideo(preferLiveVideo) {
|
|
488
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#setPreferLiveVideo --> setPreferLiveVideo is called to set preferLiveVideo to ".concat(preferLiveVideo));
|
|
489
|
+
this.config.video.preferLiveVideo = preferLiveVideo;
|
|
490
|
+
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (activeSpeakerGroup) {
|
|
491
|
+
activeSpeakerGroup.setPreferLiveVideo(preferLiveVideo, false);
|
|
492
|
+
});
|
|
493
|
+
this.mediaRequestManagers.video.commit();
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Sets CSIs for multiple RemoteMedia instances belonging to RemoteMediaGroup.
|
|
498
|
+
* For each entry in the remoteMediaCsis array:
|
|
499
|
+
* - if csi is specified, the RemoteMedia instance is pinned to that CSI
|
|
500
|
+
* - if csi is undefined, the RemoteMedia instance is unpinned
|
|
501
|
+
*/
|
|
502
|
+
}, {
|
|
503
|
+
key: "setActiveSpeakerCsis",
|
|
504
|
+
value: function setActiveSpeakerCsis(remoteMediaCsis) {
|
|
505
|
+
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
506
|
+
var groupRemoteMediaCsis = remoteMediaCsis.filter(function (_ref) {
|
|
507
|
+
var remoteMedia = _ref.remoteMedia;
|
|
508
|
+
return remoteMediaGroup.includes(remoteMedia);
|
|
509
|
+
});
|
|
510
|
+
if (groupRemoteMediaCsis.length > 0) {
|
|
511
|
+
remoteMediaGroup.setActiveSpeakerCsis(groupRemoteMediaCsis, false);
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
this.mediaRequestManagers.video.commit();
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Sets which named media group need receiving
|
|
519
|
+
* @param {MediaType} mediaType of the stream
|
|
520
|
+
* @param {number} languageCode of the stream. If the languageId is 0, the named media group request will be canceled,
|
|
521
|
+
* and only receive the main audio stream.
|
|
522
|
+
* @returns {void}
|
|
523
|
+
*/
|
|
524
|
+
}, {
|
|
525
|
+
key: "setReceiveNamedMediaGroup",
|
|
526
|
+
value: function () {
|
|
527
|
+
var _setReceiveNamedMediaGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(mediaType, languageId) {
|
|
528
|
+
var _this$config$namedMed;
|
|
529
|
+
var value;
|
|
530
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
531
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
532
|
+
case 0:
|
|
533
|
+
if (!(mediaType !== _internalMediaCore.MediaType.AudioMain)) {
|
|
534
|
+
_context4.next = 2;
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
throw new Error("cannot set receive named media group which media type is ".concat(mediaType));
|
|
538
|
+
case 2:
|
|
539
|
+
value = languageId;
|
|
540
|
+
if (!(value === ((_this$config$namedMed = this.config.namedMediaGroup) === null || _this$config$namedMed === void 0 ? void 0 : _this$config$namedMed.value))) {
|
|
541
|
+
_context4.next = 5;
|
|
542
|
+
break;
|
|
543
|
+
}
|
|
544
|
+
return _context4.abrupt("return");
|
|
545
|
+
case 5:
|
|
546
|
+
this.config.namedMediaGroup = {
|
|
547
|
+
type: _constants.NAMED_MEDIA_GROUP_TYPE_AUDIO,
|
|
548
|
+
value: value
|
|
549
|
+
};
|
|
550
|
+
if (this.media.audio.si) {
|
|
551
|
+
_context4.next = 11;
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
_context4.next = 9;
|
|
555
|
+
return this.createInterpretationAudioMedia(true);
|
|
556
|
+
case 9:
|
|
557
|
+
_context4.next = 12;
|
|
558
|
+
break;
|
|
559
|
+
case 11:
|
|
560
|
+
this.media.audio.si.setNamedMediaGroup(this.config.namedMediaGroup, true);
|
|
561
|
+
case 12:
|
|
562
|
+
case "end":
|
|
563
|
+
return _context4.stop();
|
|
564
|
+
}
|
|
565
|
+
}, _callee4, this);
|
|
566
|
+
}));
|
|
567
|
+
function setReceiveNamedMediaGroup(_x2, _x3) {
|
|
568
|
+
return _setReceiveNamedMediaGroup.apply(this, arguments);
|
|
569
|
+
}
|
|
570
|
+
return setReceiveNamedMediaGroup;
|
|
571
|
+
}()
|
|
468
572
|
/**
|
|
469
573
|
* Creates the audio slots
|
|
470
574
|
*/
|
|
471
575
|
}, {
|
|
472
576
|
key: "createAudioMedia",
|
|
473
577
|
value: function () {
|
|
474
|
-
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
578
|
+
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
475
579
|
var i, slot;
|
|
476
|
-
return _regenerator.default.wrap(function
|
|
477
|
-
while (1) switch (
|
|
580
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
581
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
478
582
|
case 0:
|
|
583
|
+
_context5.next = 2;
|
|
584
|
+
return this.createInterpretationAudioMedia(false);
|
|
585
|
+
case 2:
|
|
479
586
|
i = 0;
|
|
480
|
-
case
|
|
587
|
+
case 3:
|
|
481
588
|
if (!(i < this.config.audio.numOfActiveSpeakerStreams)) {
|
|
482
|
-
|
|
589
|
+
_context5.next = 11;
|
|
483
590
|
break;
|
|
484
591
|
}
|
|
485
|
-
|
|
592
|
+
_context5.next = 6;
|
|
486
593
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
487
|
-
case 4:
|
|
488
|
-
slot = _context4.sent;
|
|
489
|
-
this.slots.audio.push(slot);
|
|
490
594
|
case 6:
|
|
595
|
+
slot = _context5.sent;
|
|
596
|
+
this.slots.audio.main.push(slot);
|
|
597
|
+
case 8:
|
|
491
598
|
i += 1;
|
|
492
|
-
|
|
599
|
+
_context5.next = 3;
|
|
493
600
|
break;
|
|
494
|
-
case
|
|
495
|
-
// create a remote media group
|
|
496
|
-
this.media.audio = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.audio, this.slots.audio, 255, true);
|
|
601
|
+
case 11:
|
|
602
|
+
// create a remote media group for main audio
|
|
603
|
+
this.media.audio.main = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.audio, this.slots.audio.main, 255, true);
|
|
497
604
|
this.emit({
|
|
498
605
|
file: 'multistream/remoteMediaManager',
|
|
499
606
|
function: 'createAudioMedia'
|
|
500
|
-
}, Event.AudioCreated, this.media.audio);
|
|
501
|
-
case
|
|
607
|
+
}, Event.AudioCreated, this.media.audio.main);
|
|
608
|
+
case 13:
|
|
502
609
|
case "end":
|
|
503
|
-
return
|
|
610
|
+
return _context5.stop();
|
|
504
611
|
}
|
|
505
|
-
},
|
|
612
|
+
}, _callee5, this);
|
|
506
613
|
}));
|
|
507
614
|
function createAudioMedia() {
|
|
508
615
|
return _createAudioMedia.apply(this, arguments);
|
|
509
616
|
}
|
|
510
617
|
return createAudioMedia;
|
|
511
618
|
}()
|
|
619
|
+
/**
|
|
620
|
+
* Creates the audio slots for named media
|
|
621
|
+
*/
|
|
622
|
+
}, {
|
|
623
|
+
key: "createInterpretationAudioMedia",
|
|
624
|
+
value: function () {
|
|
625
|
+
var _createInterpretationAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(commitRequest) {
|
|
626
|
+
var _this$config$namedMed2, _this$config$namedMed3;
|
|
627
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
628
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
629
|
+
case 0:
|
|
630
|
+
if (!(((_this$config$namedMed2 = this.config.namedMediaGroup) === null || _this$config$namedMed2 === void 0 ? void 0 : _this$config$namedMed2.type) === _constants.NAMED_MEDIA_GROUP_TYPE_AUDIO && (_this$config$namedMed3 = this.config.namedMediaGroup) !== null && _this$config$namedMed3 !== void 0 && _this$config$namedMed3.value)) {
|
|
631
|
+
_context6.next = 6;
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
_context6.next = 3;
|
|
635
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
636
|
+
case 3:
|
|
637
|
+
this.slots.audio.si = _context6.sent;
|
|
638
|
+
// create a remote media group for si audio
|
|
639
|
+
this.media.audio.si = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.audio, [this.slots.audio.si], 255, commitRequest, {
|
|
640
|
+
namedMediaGroup: this.config.namedMediaGroup
|
|
641
|
+
});
|
|
642
|
+
this.emit({
|
|
643
|
+
file: 'multistream/remoteMediaManager',
|
|
644
|
+
function: 'createInterpretationAudioMedia'
|
|
645
|
+
}, Event.InterpretationAudioCreated, this.media.audio.si);
|
|
646
|
+
case 6:
|
|
647
|
+
case "end":
|
|
648
|
+
return _context6.stop();
|
|
649
|
+
}
|
|
650
|
+
}, _callee6, this);
|
|
651
|
+
}));
|
|
652
|
+
function createInterpretationAudioMedia(_x4) {
|
|
653
|
+
return _createInterpretationAudioMedia.apply(this, arguments);
|
|
654
|
+
}
|
|
655
|
+
return createInterpretationAudioMedia;
|
|
656
|
+
}()
|
|
512
657
|
/**
|
|
513
658
|
* Creates receive slots required for receiving screen share audio and video
|
|
514
659
|
*/
|
|
515
660
|
}, {
|
|
516
661
|
key: "createScreenShareReceiveSlots",
|
|
517
662
|
value: function () {
|
|
518
|
-
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
663
|
+
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
519
664
|
var i, slot, isAnyLayoutContainingScreenShareVideo;
|
|
520
|
-
return _regenerator.default.wrap(function
|
|
521
|
-
while (1) switch (
|
|
665
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
666
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
522
667
|
case 0:
|
|
523
668
|
i = 0;
|
|
524
669
|
case 1:
|
|
525
670
|
if (!(i < this.config.audio.numOfScreenShareStreams)) {
|
|
526
|
-
|
|
671
|
+
_context7.next = 9;
|
|
527
672
|
break;
|
|
528
673
|
}
|
|
529
|
-
|
|
674
|
+
_context7.next = 4;
|
|
530
675
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioSlides);
|
|
531
676
|
case 4:
|
|
532
|
-
slot =
|
|
677
|
+
slot = _context7.sent;
|
|
533
678
|
this.slots.screenShare.audio.push(slot);
|
|
534
679
|
case 6:
|
|
535
680
|
i += 1;
|
|
536
|
-
|
|
681
|
+
_context7.next = 1;
|
|
537
682
|
break;
|
|
538
683
|
case 9:
|
|
539
684
|
// video
|
|
@@ -541,18 +686,18 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
541
686
|
return !!layout.screenShareVideo;
|
|
542
687
|
});
|
|
543
688
|
if (!isAnyLayoutContainingScreenShareVideo) {
|
|
544
|
-
|
|
689
|
+
_context7.next = 14;
|
|
545
690
|
break;
|
|
546
691
|
}
|
|
547
|
-
|
|
692
|
+
_context7.next = 13;
|
|
548
693
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoSlides);
|
|
549
694
|
case 13:
|
|
550
|
-
this.slots.screenShare.video =
|
|
695
|
+
this.slots.screenShare.video = _context7.sent;
|
|
551
696
|
case 14:
|
|
552
697
|
case "end":
|
|
553
|
-
return
|
|
698
|
+
return _context7.stop();
|
|
554
699
|
}
|
|
555
|
-
},
|
|
700
|
+
}, _callee7, this);
|
|
556
701
|
}));
|
|
557
702
|
function createScreenShareReceiveSlots() {
|
|
558
703
|
return _createScreenShareReceiveSlots.apply(this, arguments);
|
|
@@ -618,109 +763,221 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
618
763
|
}
|
|
619
764
|
|
|
620
765
|
/**
|
|
621
|
-
* Allocates receive slots to all video panes
|
|
766
|
+
* Allocates receive slots to all active speaker video panes
|
|
767
|
+
* in the current selected layout.
|
|
768
|
+
*
|
|
769
|
+
* Allocation tries to keep the same order of the slots between the previous
|
|
770
|
+
* layout and the new one. Sorting helps making sure that highest priority slots
|
|
771
|
+
* go in the same order in the new layout.
|
|
622
772
|
*/
|
|
623
773
|
}, {
|
|
624
|
-
key: "
|
|
625
|
-
value: function
|
|
774
|
+
key: "allocateSlotsToActiveSpeakerPaneGroups",
|
|
775
|
+
value: function allocateSlotsToActiveSpeakerPaneGroups() {
|
|
626
776
|
var _this$currentLayout2,
|
|
627
777
|
_this$currentLayout2$,
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
}
|
|
635
|
-
(_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) {
|
|
778
|
+
_this$currentLayout2$2,
|
|
779
|
+
_this5 = this;
|
|
780
|
+
(_this$currentLayout2 = this.currentLayout) === null || _this$currentLayout2 === void 0 ? void 0 : (_this$currentLayout2$ = _this$currentLayout2.activeSpeakerVideoPaneGroups
|
|
781
|
+
// sorting in descending order based on group priority
|
|
782
|
+
) === null || _this$currentLayout2$ === void 0 ? void 0 : (_this$currentLayout2$2 = _this$currentLayout2$.sort(function (a, b) {
|
|
783
|
+
return a.priority < b.priority ? 1 : -1;
|
|
784
|
+
})) === null || _this$currentLayout2$2 === void 0 ? void 0 : _this$currentLayout2$2.forEach(function (group) {
|
|
636
785
|
_this5.receiveSlotAllocations.activeSpeaker[group.id] = {
|
|
637
786
|
slots: []
|
|
638
787
|
};
|
|
639
788
|
for (var paneIndex = 0; paneIndex < group.numPanes; paneIndex += 1) {
|
|
640
|
-
// allocate a slot from the "unused" list
|
|
641
|
-
var freeSlot = _this5.slots.video.unused.
|
|
789
|
+
// allocate a slot from the "unused" list, by grabbing in same order (shift) as previous layout
|
|
790
|
+
var freeSlot = _this5.slots.video.unused.shift();
|
|
642
791
|
if (freeSlot) {
|
|
643
792
|
_this5.slots.video.activeSpeaker.push(freeSlot);
|
|
644
793
|
_this5.receiveSlotAllocations.activeSpeaker[group.id].slots.push(freeSlot);
|
|
645
794
|
}
|
|
646
795
|
}
|
|
647
796
|
});
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Allocates receive slots to all receiver selected video panes
|
|
801
|
+
* in the current selected layout
|
|
802
|
+
*/
|
|
803
|
+
}, {
|
|
804
|
+
key: "allocateSlotsToReceiverSelectedVideoPaneGroups",
|
|
805
|
+
value: function allocateSlotsToReceiverSelectedVideoPaneGroups() {
|
|
806
|
+
var _this$currentLayout3,
|
|
807
|
+
_this$currentLayout3$,
|
|
808
|
+
_this6 = this;
|
|
648
809
|
(_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) {
|
|
649
810
|
// check if there is existing slot for this csi
|
|
650
|
-
var existingSlot =
|
|
811
|
+
var existingSlot = _this6.slots.video.receiverSelected.find(function (slot) {
|
|
651
812
|
return slot.csi === memberPane.csi;
|
|
652
813
|
});
|
|
653
|
-
var isExistingSlotAlreadyAllocated = (0, _values.default)(
|
|
814
|
+
var isExistingSlotAlreadyAllocated = (0, _values.default)(_this6.receiveSlotAllocations.receiverSelected).includes(existingSlot);
|
|
654
815
|
if (memberPane.csi !== undefined && existingSlot && !isExistingSlotAlreadyAllocated) {
|
|
655
816
|
// found it, so use it
|
|
656
|
-
|
|
817
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = existingSlot;
|
|
657
818
|
} else {
|
|
658
819
|
// allocate a slot from the "unused" list
|
|
659
|
-
var freeSlot =
|
|
820
|
+
var freeSlot = _this6.slots.video.unused.pop();
|
|
660
821
|
if (freeSlot) {
|
|
661
|
-
|
|
662
|
-
|
|
822
|
+
_this6.slots.video.receiverSelected.push(freeSlot);
|
|
823
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = freeSlot;
|
|
663
824
|
}
|
|
664
825
|
}
|
|
665
826
|
});
|
|
666
827
|
}
|
|
667
828
|
|
|
668
829
|
/**
|
|
669
|
-
*
|
|
670
|
-
* and allocates them to the right video panes / pane groups
|
|
671
|
-
*
|
|
672
|
-
* @returns {Promise}
|
|
830
|
+
* Ensures that we have enough slots for the current layout.
|
|
673
831
|
*/
|
|
674
832
|
}, {
|
|
675
|
-
key: "
|
|
833
|
+
key: "refillRequiredSlotsIfNeeded",
|
|
676
834
|
value: function () {
|
|
677
|
-
var
|
|
678
|
-
var _this$slots$video$unu4;
|
|
835
|
+
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
679
836
|
var requiredNumSlots, totalNumSlots, numSlotsToCreate;
|
|
680
|
-
return _regenerator.default.wrap(function
|
|
681
|
-
while (1) switch (
|
|
837
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
838
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
682
839
|
case 0:
|
|
683
840
|
requiredNumSlots = this.getRequiredNumVideoSlotsForLayout(this.currentLayout);
|
|
684
|
-
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
841
|
+
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
685
842
|
if (!(totalNumSlots < requiredNumSlots)) {
|
|
686
|
-
|
|
843
|
+
_context8.next = 13;
|
|
687
844
|
break;
|
|
688
845
|
}
|
|
689
846
|
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
690
847
|
case 4:
|
|
691
848
|
if (!(numSlotsToCreate > 0)) {
|
|
692
|
-
|
|
849
|
+
_context8.next = 13;
|
|
693
850
|
break;
|
|
694
851
|
}
|
|
695
|
-
|
|
696
|
-
|
|
852
|
+
_context8.t0 = this.slots.video.unused;
|
|
853
|
+
_context8.next = 8;
|
|
697
854
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
698
855
|
case 8:
|
|
699
|
-
|
|
700
|
-
|
|
856
|
+
_context8.t1 = _context8.sent;
|
|
857
|
+
_context8.t0.push.call(_context8.t0, _context8.t1);
|
|
701
858
|
numSlotsToCreate -= 1;
|
|
702
|
-
|
|
859
|
+
_context8.next = 4;
|
|
703
860
|
break;
|
|
704
861
|
case 13:
|
|
705
|
-
|
|
706
|
-
|
|
862
|
+
case "end":
|
|
863
|
+
return _context8.stop();
|
|
864
|
+
}
|
|
865
|
+
}, _callee8, this);
|
|
866
|
+
}));
|
|
867
|
+
function refillRequiredSlotsIfNeeded() {
|
|
868
|
+
return _refillRequiredSlotsIfNeeded.apply(this, arguments);
|
|
869
|
+
}
|
|
870
|
+
return refillRequiredSlotsIfNeeded;
|
|
871
|
+
}()
|
|
872
|
+
/**
|
|
873
|
+
* Move all active speaker slots to "unused"
|
|
874
|
+
*/
|
|
875
|
+
}, {
|
|
876
|
+
key: "trimActiveSpeakerSlots",
|
|
877
|
+
value: function trimActiveSpeakerSlots() {
|
|
878
|
+
var _this$slots$video$unu4;
|
|
879
|
+
(_this$slots$video$unu4 = this.slots.video.unused).push.apply(_this$slots$video$unu4, (0, _toConsumableArray2.default)(this.slots.video.activeSpeaker));
|
|
880
|
+
this.slots.video.activeSpeaker.length = 0;
|
|
881
|
+
}
|
|
707
882
|
|
|
883
|
+
/**
|
|
884
|
+
* Logs the state of the receive slots
|
|
885
|
+
*/
|
|
886
|
+
}, {
|
|
887
|
+
key: "logMainVideoReceiveSlots",
|
|
888
|
+
value: function logMainVideoReceiveSlots() {
|
|
889
|
+
var logMessage = '';
|
|
890
|
+
(0, _forEach2.default)(this.receiveSlotAllocations.activeSpeaker, function (group, groupName) {
|
|
891
|
+
logMessage += "\ngroup: ".concat(groupName, "\n").concat(group.slots.map(function (slot) {
|
|
892
|
+
return slot.logString;
|
|
893
|
+
}).join(', '));
|
|
894
|
+
});
|
|
895
|
+
logMessage += '\nreceiverSelected:\n';
|
|
896
|
+
(0, _forEach2.default)(this.receiveSlotAllocations.receiverSelected, function (slot, key) {
|
|
897
|
+
logMessage += " ".concat(key, ": ").concat(slot.logString, "\n");
|
|
898
|
+
});
|
|
899
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logMainVideoReceiveSlots --> MAIN VIDEO receive slots: unused=".concat(this.slots.video.unused.length, ", activeSpeaker=").concat(this.slots.video.activeSpeaker.length, ", receiverSelected=").concat(this.slots.video.receiverSelected.length).concat(logMessage));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/** logs main audio slots */
|
|
903
|
+
}, {
|
|
904
|
+
key: "logMainAudioReceiveSlots",
|
|
905
|
+
value: function logMainAudioReceiveSlots() {
|
|
906
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logMainAudioReceiveSlots --> MAIN AUDIO receive slots: ".concat(this.slots.audio.main.map(function (slot) {
|
|
907
|
+
return slot.logString;
|
|
908
|
+
}).join(', ')));
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/** logs slides video slots */
|
|
912
|
+
}, {
|
|
913
|
+
key: "logSlidesVideoReceiveSlots",
|
|
914
|
+
value: function logSlidesVideoReceiveSlots() {
|
|
915
|
+
var _this$slots$screenSha;
|
|
916
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logSlidesVideoReceiveSlots --> SLIDES VIDEO receive slot: ".concat((_this$slots$screenSha = this.slots.screenShare.video) === null || _this$slots$screenSha === void 0 ? void 0 : _this$slots$screenSha.logString));
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/** logs slides audio slots */
|
|
920
|
+
}, {
|
|
921
|
+
key: "logSlidesAudioReceiveSlots",
|
|
922
|
+
value: function logSlidesAudioReceiveSlots() {
|
|
923
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logSlidesAudioReceiveSlots --> SLIDES AUDIO receive slots: ".concat(this.slots.screenShare.audio.map(function (slot) {
|
|
924
|
+
return slot.logString;
|
|
925
|
+
}).join(', ')));
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/** Logs all current receive slots */
|
|
929
|
+
}, {
|
|
930
|
+
key: "logAllReceiveSlots",
|
|
931
|
+
value: function logAllReceiveSlots() {
|
|
932
|
+
this.logMainVideoReceiveSlots();
|
|
933
|
+
this.logMainAudioReceiveSlots();
|
|
934
|
+
this.logSlidesVideoReceiveSlots();
|
|
935
|
+
this.logSlidesAudioReceiveSlots();
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* Makes sure we have the right number of receive slots created for the current layout
|
|
940
|
+
* and allocates them to the right video panes / pane groups
|
|
941
|
+
*
|
|
942
|
+
* @returns {Promise}
|
|
943
|
+
*/
|
|
944
|
+
}, {
|
|
945
|
+
key: "updateVideoReceiveSlots",
|
|
946
|
+
value: function () {
|
|
947
|
+
var _updateVideoReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
948
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
949
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
950
|
+
case 0:
|
|
708
951
|
// move all active speaker slots to "unused"
|
|
709
|
-
|
|
710
|
-
|
|
952
|
+
this.trimActiveSpeakerSlots();
|
|
953
|
+
|
|
954
|
+
// move all no longer needed receiver-selected slots to "unused"
|
|
955
|
+
this.trimReceiverSelectedSlots();
|
|
711
956
|
|
|
957
|
+
// ensure we have enough total slots for current layout
|
|
958
|
+
_context9.next = 4;
|
|
959
|
+
return this.refillRequiredSlotsIfNeeded();
|
|
960
|
+
case 4:
|
|
712
961
|
// allocate the slots to the right panes / pane groups
|
|
713
|
-
|
|
714
|
-
|
|
962
|
+
// reset allocations
|
|
963
|
+
this.receiveSlotAllocations = {
|
|
964
|
+
activeSpeaker: {},
|
|
965
|
+
receiverSelected: {}
|
|
966
|
+
};
|
|
967
|
+
// allocate active speaker
|
|
968
|
+
this.allocateSlotsToActiveSpeakerPaneGroups();
|
|
969
|
+
// allocate receiver selected
|
|
970
|
+
this.allocateSlotsToReceiverSelectedVideoPaneGroups();
|
|
971
|
+
this.logMainVideoReceiveSlots();
|
|
715
972
|
|
|
716
973
|
// If this is the initial layout, there may be some "unused" slots left because of the preallocation
|
|
717
974
|
// done in this.preallocateVideoReceiveSlots(), so release them now
|
|
718
975
|
this.releaseUnusedVideoSlots();
|
|
719
|
-
case
|
|
976
|
+
case 9:
|
|
720
977
|
case "end":
|
|
721
|
-
return
|
|
978
|
+
return _context9.stop();
|
|
722
979
|
}
|
|
723
|
-
},
|
|
980
|
+
}, _callee9, this);
|
|
724
981
|
}));
|
|
725
982
|
function updateVideoReceiveSlots() {
|
|
726
983
|
return _updateVideoReceiveSlots.apply(this, arguments);
|
|
@@ -734,7 +991,7 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
734
991
|
}, {
|
|
735
992
|
key: "updateVideoRemoteMediaObjects",
|
|
736
993
|
value: function updateVideoRemoteMediaObjects() {
|
|
737
|
-
var
|
|
994
|
+
var _this7 = this;
|
|
738
995
|
// invalidate all the previous remote media objects and cancel their media requests
|
|
739
996
|
this.invalidateCurrentRemoteMedia({
|
|
740
997
|
audio: false,
|
|
@@ -748,19 +1005,19 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
748
1005
|
this.media.video.activeSpeakerGroups = {};
|
|
749
1006
|
this.media.video.memberPanes = {};
|
|
750
1007
|
var _loop = function _loop() {
|
|
751
|
-
var
|
|
1008
|
+
var _this7$currentLayout, _this7$currentLayout$;
|
|
752
1009
|
var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
|
|
753
1010
|
groupId = _Object$entries$_i[0],
|
|
754
1011
|
group = _Object$entries$_i[1];
|
|
755
|
-
var paneGroupInCurrentLayout = (
|
|
1012
|
+
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) {
|
|
756
1013
|
return groupInLayout.id === groupId;
|
|
757
1014
|
});
|
|
758
1015
|
if (paneGroupInCurrentLayout) {
|
|
759
|
-
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(
|
|
760
|
-
preferLiveVideo:
|
|
1016
|
+
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(_this7.mediaRequestManagers.video, group.slots, paneGroupInCurrentLayout.priority, false, {
|
|
1017
|
+
preferLiveVideo: _this7.config.video.preferLiveVideo,
|
|
761
1018
|
resolution: paneGroupInCurrentLayout.size
|
|
762
1019
|
});
|
|
763
|
-
|
|
1020
|
+
_this7.media.video.activeSpeakerGroups[groupId] = mediaGroup;
|
|
764
1021
|
} else {
|
|
765
1022
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
766
1023
|
_loggerProxy.default.logger.warn("a group id ".concat(groupId, " from this.receiveSlotAllocations.activeSpeaker cannot be found in the current layout configuration"));
|
|
@@ -772,21 +1029,21 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
772
1029
|
|
|
773
1030
|
// create new remoteMedia objects
|
|
774
1031
|
var _loop2 = function _loop2() {
|
|
775
|
-
var
|
|
1032
|
+
var _this7$currentLayout2, _this7$currentLayout3;
|
|
776
1033
|
var _Object$entries3$_i = (0, _slicedToArray2.default)(_Object$entries3[_i2], 2),
|
|
777
1034
|
paneId = _Object$entries3$_i[0],
|
|
778
1035
|
slot = _Object$entries3$_i[1];
|
|
779
|
-
var paneInCurrentLayout = (
|
|
1036
|
+
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) {
|
|
780
1037
|
return paneInLayout.id === paneId;
|
|
781
1038
|
});
|
|
782
1039
|
if (paneInCurrentLayout) {
|
|
783
|
-
var remoteMedia = new _remoteMedia.RemoteMedia(slot,
|
|
1040
|
+
var remoteMedia = new _remoteMedia.RemoteMedia(slot, _this7.mediaRequestManagers.video, {
|
|
784
1041
|
resolution: paneInCurrentLayout.size
|
|
785
1042
|
});
|
|
786
1043
|
if (paneInCurrentLayout.csi) {
|
|
787
1044
|
remoteMedia.sendMediaRequest(paneInCurrentLayout.csi, false);
|
|
788
1045
|
}
|
|
789
|
-
|
|
1046
|
+
_this7.media.video.memberPanes[paneId] = remoteMedia;
|
|
790
1047
|
} else {
|
|
791
1048
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
792
1049
|
_loggerProxy.default.logger.warn("a pane id ".concat(paneId, " from this.receiveSlotAllocations.receiverSelected cannot be found in the current layout configuration"));
|
|
@@ -837,8 +1094,13 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
837
1094
|
screenShareAudio = options.screenShareAudio,
|
|
838
1095
|
screenShareVideo = options.screenShareVideo,
|
|
839
1096
|
commit = options.commit;
|
|
840
|
-
if (audio
|
|
841
|
-
this.media.audio.
|
|
1097
|
+
if (audio) {
|
|
1098
|
+
if (this.media.audio.main) {
|
|
1099
|
+
this.media.audio.main.stop(commit);
|
|
1100
|
+
}
|
|
1101
|
+
if (this.media.audio.si) {
|
|
1102
|
+
this.media.audio.si.stop(commit);
|
|
1103
|
+
}
|
|
842
1104
|
}
|
|
843
1105
|
if (video) {
|
|
844
1106
|
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
@@ -910,14 +1172,14 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
910
1172
|
}, {
|
|
911
1173
|
key: "addMemberVideoPane",
|
|
912
1174
|
value: function () {
|
|
913
|
-
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1175
|
+
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(newPane) {
|
|
914
1176
|
var _this$currentLayout5;
|
|
915
1177
|
var receiveSlot, remoteMedia;
|
|
916
|
-
return _regenerator.default.wrap(function
|
|
917
|
-
while (1) switch (
|
|
1178
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
1179
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
918
1180
|
case 0:
|
|
919
1181
|
if (this.currentLayout) {
|
|
920
|
-
|
|
1182
|
+
_context10.next = 2;
|
|
921
1183
|
break;
|
|
922
1184
|
}
|
|
923
1185
|
throw new Error('There is no current layout selected, call start() first');
|
|
@@ -926,16 +1188,16 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
926
1188
|
this.currentLayout.memberVideoPanes = [];
|
|
927
1189
|
}
|
|
928
1190
|
if (!(newPane.id in this.currentLayout.memberVideoPanes)) {
|
|
929
|
-
|
|
1191
|
+
_context10.next = 5;
|
|
930
1192
|
break;
|
|
931
1193
|
}
|
|
932
1194
|
throw new Error("duplicate pane id ".concat(newPane.id, " - this pane already exists in current layout's memberVideoPanes"));
|
|
933
1195
|
case 5:
|
|
934
1196
|
this.currentLayout.memberVideoPanes.push(newPane);
|
|
935
|
-
|
|
1197
|
+
_context10.next = 8;
|
|
936
1198
|
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
937
1199
|
case 8:
|
|
938
|
-
receiveSlot =
|
|
1200
|
+
receiveSlot = _context10.sent;
|
|
939
1201
|
this.slots.video.receiverSelected.push(receiveSlot);
|
|
940
1202
|
remoteMedia = new _remoteMedia.RemoteMedia(receiveSlot, this.mediaRequestManagers.video, {
|
|
941
1203
|
resolution: newPane.size
|
|
@@ -944,14 +1206,14 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
944
1206
|
remoteMedia.sendMediaRequest(newPane.csi, true);
|
|
945
1207
|
}
|
|
946
1208
|
this.media.video.memberPanes[newPane.id] = remoteMedia;
|
|
947
|
-
return
|
|
1209
|
+
return _context10.abrupt("return", remoteMedia);
|
|
948
1210
|
case 14:
|
|
949
1211
|
case "end":
|
|
950
|
-
return
|
|
1212
|
+
return _context10.stop();
|
|
951
1213
|
}
|
|
952
|
-
},
|
|
1214
|
+
}, _callee10, this);
|
|
953
1215
|
}));
|
|
954
|
-
function addMemberVideoPane(
|
|
1216
|
+
function addMemberVideoPane(_x5) {
|
|
955
1217
|
return _addMemberVideoPane.apply(this, arguments);
|
|
956
1218
|
}
|
|
957
1219
|
return addMemberVideoPane;
|