@webex/plugin-meetings 3.0.0-beta.4 → 3.0.0-beta.400
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -8
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +41 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +11 -15
- package/dist/config.js.map +1 -1
- package/dist/constants.js +347 -74
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +125 -18
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.js +93 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +380 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +101 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +564 -246
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +10 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +82 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +314 -163
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +107 -231
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +137 -222
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +316 -501
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +97 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +5311 -3871
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +260 -183
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +421 -347
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +672 -585
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +172 -0
- package/dist/meeting/voicea-meeting.js.map +1 -0
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +87 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +352 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +99 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +147 -234
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +43 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +895 -600
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +184 -157
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +134 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +158 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +194 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +324 -259
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +19 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +263 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +82 -45
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +657 -448
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +255 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +297 -460
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +20 -26
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +413 -483
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +362 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +102 -86
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +131 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +437 -116
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +179 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +557 -583
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +326 -130
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1088 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +272 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +241 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +167 -0
- package/dist/types/meeting/index.d.ts +1824 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +293 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +118 -0
- package/dist/types/meeting/voicea-meeting.d.ts +16 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +389 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +120 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +301 -0
- package/dist/types/multistream/sendSlotManager.d.ts +70 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +105 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +8 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +136 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/internal-README.md +7 -6
- package/package.json +30 -21
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +26 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +19 -21
- package/src/constants.ts +296 -27
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +45 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +349 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +561 -119
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +97 -17
- package/src/locus-info/{parser.js → parser.ts} +303 -104
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +460 -0
- package/src/media/properties.ts +283 -0
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +249 -0
- package/src/meeting/in-meeting-actions.ts +199 -3
- package/src/meeting/index.ts +8494 -0
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +465 -0
- package/src/meeting/request.ts +912 -0
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +799 -0
- package/src/meeting/voicea-meeting.ts +122 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +210 -0
- package/src/meeting-info/meeting-info-v2.ts +423 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +70 -58
- package/src/meeting-info/{utilv2.js → utilv2.ts} +99 -82
- package/src/meetings/collection.ts +76 -0
- package/src/meetings/index.ts +1539 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +133 -38
- package/src/member/{index.js → index.ts} +159 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +397 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +351 -146
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +353 -0
- package/src/metrics/{constants.js → constants.ts} +17 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +341 -64
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +82 -3
- package/src/multistream/remoteMediaManager.ts +401 -81
- package/src/multistream/sendSlotManager.ts +199 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +371 -0
- package/src/reachability/request.ts +50 -35
- package/src/reachability/util.ts +24 -0
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/index.ts +643 -0
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +332 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/index.ts +288 -0
- package/src/roap/request.ts +153 -0
- package/src/roap/turnDiscovery.ts +374 -70
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +166 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1275 -0
- package/src/statsAnalyzer/mqaUtil.ts +440 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +791 -531
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +238 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1793 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +625 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1458 -21
- package/test/unit/spec/locus-info/infoUtils.js +71 -40
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
- package/test/unit/spec/locus-info/parser.js +119 -44
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +291 -12
- package/test/unit/spec/media/index.ts +194 -111
- package/test/unit/spec/media/properties.ts +11 -11
- package/test/unit/spec/meeting/in-meeting-actions.ts +96 -3
- package/test/unit/spec/meeting/index.js +8616 -1921
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +568 -207
- package/test/unit/spec/meeting/request.js +602 -82
- package/test/unit/spec/meeting/utils.js +867 -179
- package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +631 -78
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +27 -1
- package/test/unit/spec/meetings/index.js +1826 -374
- package/test/unit/spec/meetings/utils.js +243 -14
- package/test/unit/spec/member/index.js +61 -7
- package/test/unit/spec/member/util.js +526 -26
- package/test/unit/spec/members/index.js +536 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +217 -4
- package/test/unit/spec/metrics/index.js +13 -68
- package/test/unit/spec/multistream/mediaRequestManager.ts +1032 -110
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +350 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +937 -65
- package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +606 -26
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +222 -34
- package/test/unit/spec/recording-controller/index.js +306 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +238 -82
- package/test/unit/spec/roap/request.ts +255 -0
- package/test/unit/spec/roap/turnDiscovery.ts +707 -110
- package/test/unit/spec/rtcMetrics/index.ts +122 -0
- package/test/unit/spec/stats-analyzer/index.js +1331 -62
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +65 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/media/properties.js +0 -289
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/request.js +0 -684
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/collection.js +0 -40
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/reachability/index.js +0 -464
- package/src/reconnection-manager/index.js +0 -519
- package/src/roap/index.js +0 -220
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
|
@@ -1,95 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
-
|
|
5
4
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
6
|
-
|
|
7
5
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
8
|
-
|
|
9
6
|
_Object$defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
|
-
|
|
13
9
|
exports.RemoteMediaManager = exports.Event = exports.DefaultConfiguration = void 0;
|
|
14
|
-
|
|
15
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
|
-
|
|
17
11
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
18
|
-
|
|
19
12
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
20
|
-
|
|
21
13
|
var _entries = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/entries"));
|
|
22
|
-
|
|
23
14
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
24
|
-
|
|
25
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
26
|
-
|
|
27
16
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
28
|
-
|
|
29
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
30
|
-
|
|
31
18
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
32
|
-
|
|
33
19
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
34
|
-
|
|
35
20
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
36
|
-
|
|
37
21
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
38
|
-
|
|
39
22
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
40
|
-
|
|
41
23
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
42
|
-
|
|
43
24
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
44
|
-
|
|
45
25
|
var _remove2 = _interopRequireDefault(require("lodash/remove"));
|
|
46
|
-
|
|
26
|
+
var _forEach2 = _interopRequireDefault(require("lodash/forEach"));
|
|
47
27
|
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
48
|
-
|
|
49
28
|
var _internalMediaCore = require("@webex/internal-media-core");
|
|
50
|
-
|
|
51
29
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
52
|
-
|
|
53
30
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
54
|
-
|
|
55
31
|
var _remoteMedia = require("./remoteMedia");
|
|
56
|
-
|
|
57
32
|
var _remoteMediaGroup = require("./remoteMediaGroup");
|
|
58
|
-
|
|
33
|
+
var _constants = require("../constants");
|
|
59
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); }; }
|
|
60
|
-
|
|
61
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; } }
|
|
62
|
-
|
|
63
36
|
/* Predefined layouts: */
|
|
37
|
+
|
|
64
38
|
// An "all equal" grid, with size up to 3 x 3 = 9:
|
|
65
39
|
var AllEqualLayout = {
|
|
66
|
-
screenShareVideo: {
|
|
67
|
-
size: null
|
|
68
|
-
},
|
|
69
40
|
activeSpeakerVideoPaneGroups: [{
|
|
70
41
|
id: 'main',
|
|
71
42
|
numPanes: 9,
|
|
72
43
|
size: 'best',
|
|
73
44
|
priority: 255
|
|
74
45
|
}]
|
|
75
|
-
};
|
|
46
|
+
};
|
|
76
47
|
|
|
48
|
+
// A layout with just a single remote active speaker video pane:
|
|
77
49
|
var SingleLayout = {
|
|
78
|
-
screenShareVideo: {
|
|
79
|
-
size: null
|
|
80
|
-
},
|
|
81
50
|
activeSpeakerVideoPaneGroups: [{
|
|
82
51
|
id: 'main',
|
|
83
52
|
numPanes: 1,
|
|
84
53
|
size: 'best',
|
|
85
54
|
priority: 255
|
|
86
55
|
}]
|
|
87
|
-
};
|
|
56
|
+
};
|
|
88
57
|
|
|
58
|
+
// A layout with 1 big pane for the highest priority active speaker and 5 small panes for other active speakers:
|
|
89
59
|
var OnePlusFiveLayout = {
|
|
90
|
-
screenShareVideo: {
|
|
91
|
-
size: null
|
|
92
|
-
},
|
|
93
60
|
activeSpeakerVideoPaneGroups: [{
|
|
94
61
|
id: 'mainBigOne',
|
|
95
62
|
numPanes: 1,
|
|
@@ -101,12 +68,11 @@ var OnePlusFiveLayout = {
|
|
|
101
68
|
size: 'very small',
|
|
102
69
|
priority: 254
|
|
103
70
|
}]
|
|
104
|
-
};
|
|
71
|
+
};
|
|
105
72
|
|
|
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
|
|
106
75
|
var TwoMainPlusSixSmallLayout = {
|
|
107
|
-
screenShareVideo: {
|
|
108
|
-
size: null
|
|
109
|
-
},
|
|
110
76
|
activeSpeakerVideoPaneGroups: [{
|
|
111
77
|
id: 'mainGroupWith2BigPanes',
|
|
112
78
|
numPanes: 2,
|
|
@@ -118,8 +84,9 @@ var TwoMainPlusSixSmallLayout = {
|
|
|
118
84
|
size: 'small',
|
|
119
85
|
priority: 254
|
|
120
86
|
}]
|
|
121
|
-
};
|
|
87
|
+
};
|
|
122
88
|
|
|
89
|
+
// A strip of 8 small video panes (thumbnails) displayed at the top of a remote screenshare:
|
|
123
90
|
var RemoteScreenShareWithSmallThumbnailsLayout = {
|
|
124
91
|
screenShareVideo: {
|
|
125
92
|
size: 'best'
|
|
@@ -130,12 +97,10 @@ var RemoteScreenShareWithSmallThumbnailsLayout = {
|
|
|
130
97
|
size: 'thumbnail',
|
|
131
98
|
priority: 255
|
|
132
99
|
}]
|
|
133
|
-
};
|
|
100
|
+
};
|
|
134
101
|
|
|
102
|
+
// 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:
|
|
135
103
|
var Stage2x2With6ThumbnailsLayout = {
|
|
136
|
-
screenShareVideo: {
|
|
137
|
-
size: null
|
|
138
|
-
},
|
|
139
104
|
activeSpeakerVideoPaneGroups: [{
|
|
140
105
|
id: 'thumbnails',
|
|
141
106
|
numPanes: 6,
|
|
@@ -160,16 +125,17 @@ var Stage2x2With6ThumbnailsLayout = {
|
|
|
160
125
|
csi: undefined
|
|
161
126
|
}]
|
|
162
127
|
};
|
|
128
|
+
|
|
163
129
|
/**
|
|
164
130
|
* Default configuration:
|
|
165
131
|
* - uses 3 audio streams
|
|
166
132
|
* - prefers active speakers with live video (e.g. are not audio only or video muted) over active speakers without live video
|
|
167
133
|
* - has a few layouts defined, including 1 that contains remote screen share (ScreenShareView)
|
|
168
134
|
*/
|
|
169
|
-
|
|
170
135
|
var DefaultConfiguration = {
|
|
171
136
|
audio: {
|
|
172
|
-
numOfActiveSpeakerStreams: 3
|
|
137
|
+
numOfActiveSpeakerStreams: 3,
|
|
138
|
+
numOfScreenShareStreams: 1
|
|
173
139
|
},
|
|
174
140
|
video: {
|
|
175
141
|
preferLiveVideo: true,
|
|
@@ -181,22 +147,17 @@ var DefaultConfiguration = {
|
|
|
181
147
|
Stage: Stage2x2With6ThumbnailsLayout,
|
|
182
148
|
ScreenShareView: RemoteScreenShareWithSmallThumbnailsLayout
|
|
183
149
|
}
|
|
184
|
-
},
|
|
185
|
-
screenShare: {
|
|
186
|
-
audio: true,
|
|
187
|
-
video: true
|
|
188
150
|
}
|
|
189
151
|
};
|
|
190
152
|
exports.DefaultConfiguration = DefaultConfiguration;
|
|
191
153
|
var Event;
|
|
192
154
|
exports.Event = Event;
|
|
193
|
-
|
|
194
155
|
(function (Event) {
|
|
195
156
|
Event["AudioCreated"] = "AudioCreated";
|
|
196
|
-
Event["
|
|
157
|
+
Event["InterpretationAudioCreated"] = "InterpretationAudioCreated";
|
|
158
|
+
Event["ScreenShareAudioCreated"] = "ScreenShareAudioCreated";
|
|
197
159
|
Event["VideoLayoutChanged"] = "VideoLayoutChanged";
|
|
198
160
|
})(Event || (exports.Event = Event = {}));
|
|
199
|
-
|
|
200
161
|
/**
|
|
201
162
|
* A helper class that manages all remote audio/video streams in order to achieve a predefined set of layouts.
|
|
202
163
|
* It also creates a fixed number of audio streams and these don't change during the meeting.
|
|
@@ -207,9 +168,7 @@ exports.Event = Event;
|
|
|
207
168
|
*/
|
|
208
169
|
var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
209
170
|
(0, _inherits2.default)(RemoteMediaManager, _EventsScope);
|
|
210
|
-
|
|
211
171
|
var _super = _createSuper(RemoteMediaManager);
|
|
212
|
-
|
|
213
172
|
/**
|
|
214
173
|
* Constructor
|
|
215
174
|
*
|
|
@@ -219,7 +178,6 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
219
178
|
*/
|
|
220
179
|
function RemoteMediaManager(receiveSlotManager, mediaRequestManagers) {
|
|
221
180
|
var _this;
|
|
222
|
-
|
|
223
181
|
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DefaultConfiguration;
|
|
224
182
|
(0, _classCallCheck2.default)(this, RemoteMediaManager);
|
|
225
183
|
_this = _super.call(this);
|
|
@@ -237,19 +195,29 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
237
195
|
_this.receiveSlotManager = receiveSlotManager;
|
|
238
196
|
_this.mediaRequestManagers = mediaRequestManagers;
|
|
239
197
|
_this.media = {
|
|
240
|
-
audio:
|
|
198
|
+
audio: {
|
|
199
|
+
main: undefined,
|
|
200
|
+
si: undefined
|
|
201
|
+
},
|
|
241
202
|
video: {
|
|
242
203
|
activeSpeakerGroups: {},
|
|
243
204
|
memberPanes: {}
|
|
205
|
+
},
|
|
206
|
+
screenShare: {
|
|
207
|
+
audio: undefined,
|
|
208
|
+
video: undefined
|
|
244
209
|
}
|
|
245
210
|
};
|
|
246
|
-
|
|
247
211
|
_this.checkConfigValidity();
|
|
248
|
-
|
|
249
212
|
_this.slots = {
|
|
250
|
-
audio:
|
|
251
|
-
|
|
252
|
-
|
|
213
|
+
audio: {
|
|
214
|
+
main: [],
|
|
215
|
+
si: undefined
|
|
216
|
+
},
|
|
217
|
+
screenShare: {
|
|
218
|
+
audio: [],
|
|
219
|
+
video: undefined
|
|
220
|
+
},
|
|
253
221
|
video: {
|
|
254
222
|
unused: [],
|
|
255
223
|
activeSpeaker: [],
|
|
@@ -260,27 +228,23 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
260
228
|
activeSpeaker: {},
|
|
261
229
|
receiverSelected: {}
|
|
262
230
|
};
|
|
263
|
-
|
|
264
231
|
_loggerProxy.default.logger.log("RemoteMediaManager#constructor --> RemoteMediaManager created with config: ".concat((0, _stringify.default)(_this.config)));
|
|
265
|
-
|
|
266
232
|
return _this;
|
|
267
233
|
}
|
|
234
|
+
|
|
268
235
|
/**
|
|
269
236
|
* Checks if configuration is valid, throws an error if it's not
|
|
270
237
|
*/
|
|
271
|
-
|
|
272
|
-
|
|
273
238
|
(0, _createClass2.default)(RemoteMediaManager, [{
|
|
274
239
|
key: "checkConfigValidity",
|
|
275
240
|
value: function checkConfigValidity() {
|
|
276
241
|
if (!(this.config.video.initialLayoutId in this.config.video.layouts)) {
|
|
277
242
|
throw new Error("invalid config: initialLayoutId \"".concat(this.config.video.initialLayoutId, "\" doesn't match any of the layouts"));
|
|
278
|
-
}
|
|
279
|
-
|
|
243
|
+
}
|
|
280
244
|
|
|
245
|
+
// check if each layout is valid
|
|
281
246
|
(0, _values.default)(this.config.video.layouts).forEach(function (layout) {
|
|
282
247
|
var _layout$activeSpeaker, _layout$memberVideoPa;
|
|
283
|
-
|
|
284
248
|
var groupIds = {};
|
|
285
249
|
var paneIds = {};
|
|
286
250
|
var groupPriorites = {};
|
|
@@ -288,186 +252,175 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
288
252
|
if (groupIds[group.id]) {
|
|
289
253
|
throw new Error("invalid config: duplicate active speaker video pane group id: ".concat(group.id));
|
|
290
254
|
}
|
|
291
|
-
|
|
292
255
|
groupIds[group.id] = true;
|
|
293
|
-
|
|
294
256
|
if (groupPriorites[group.priority]) {
|
|
295
257
|
throw new Error("invalid config: multiple active speaker video pane groups have same priority: ".concat(group.priority));
|
|
296
258
|
}
|
|
297
|
-
|
|
298
259
|
groupPriorites[group.priority] = true;
|
|
299
260
|
});
|
|
300
261
|
(_layout$memberVideoPa = layout.memberVideoPanes) === null || _layout$memberVideoPa === void 0 ? void 0 : _layout$memberVideoPa.forEach(function (pane) {
|
|
301
262
|
if (paneIds[pane.id]) {
|
|
302
263
|
throw new Error("invalid config: duplicate member video pane id: ".concat(pane.id));
|
|
303
264
|
}
|
|
304
|
-
|
|
305
265
|
paneIds[pane.id] = true;
|
|
306
266
|
});
|
|
307
267
|
});
|
|
308
268
|
}
|
|
269
|
+
|
|
309
270
|
/**
|
|
310
271
|
* Starts the RemoteMediaManager.
|
|
311
272
|
*
|
|
312
273
|
* @returns {Promise}
|
|
313
274
|
*/
|
|
314
|
-
|
|
315
275
|
}, {
|
|
316
276
|
key: "start",
|
|
317
277
|
value: function () {
|
|
318
278
|
var _start = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
319
279
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
320
|
-
while (1) {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
case "end":
|
|
345
|
-
return _context.stop();
|
|
346
|
-
}
|
|
280
|
+
while (1) switch (_context.prev = _context.next) {
|
|
281
|
+
case 0:
|
|
282
|
+
if (!this.started) {
|
|
283
|
+
_context.next = 2;
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
throw new Error('start() failure: already started');
|
|
287
|
+
case 2:
|
|
288
|
+
this.started = true;
|
|
289
|
+
_context.next = 5;
|
|
290
|
+
return this.createAudioMedia();
|
|
291
|
+
case 5:
|
|
292
|
+
_context.next = 7;
|
|
293
|
+
return this.createScreenShareReceiveSlots();
|
|
294
|
+
case 7:
|
|
295
|
+
this.createScreenShareAudioMedia();
|
|
296
|
+
_context.next = 10;
|
|
297
|
+
return this.preallocateVideoReceiveSlots();
|
|
298
|
+
case 10:
|
|
299
|
+
_context.next = 12;
|
|
300
|
+
return this.setLayout(this.config.video.initialLayoutId);
|
|
301
|
+
case 12:
|
|
302
|
+
case "end":
|
|
303
|
+
return _context.stop();
|
|
347
304
|
}
|
|
348
305
|
}, _callee, this);
|
|
349
306
|
}));
|
|
350
|
-
|
|
351
307
|
function start() {
|
|
352
308
|
return _start.apply(this, arguments);
|
|
353
309
|
}
|
|
354
|
-
|
|
355
310
|
return start;
|
|
356
311
|
}()
|
|
357
312
|
/**
|
|
358
313
|
* Releases all the used resources (like allocated receive slots). This function needs
|
|
359
314
|
* to be called when we leave the meeting, etc.
|
|
360
315
|
*/
|
|
361
|
-
|
|
362
316
|
}, {
|
|
363
317
|
key: "stop",
|
|
364
318
|
value: function stop() {
|
|
365
319
|
var _this2 = this,
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
320
|
+
_this$slots$video$unu,
|
|
321
|
+
_this$slots$video$unu2;
|
|
369
322
|
// invalidate all remoteMedia objects
|
|
370
323
|
this.invalidateCurrentRemoteMedia({
|
|
371
324
|
audio: true,
|
|
372
325
|
video: true,
|
|
326
|
+
screenShareAudio: true,
|
|
327
|
+
screenShareVideo: true,
|
|
373
328
|
commit: true
|
|
374
|
-
});
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
// release all audio receive slots
|
|
332
|
+
this.slots.audio.main.forEach(function (slot) {
|
|
333
|
+
return _this2.receiveSlotManager.releaseSlot(slot);
|
|
334
|
+
});
|
|
335
|
+
this.slots.audio.main.length = 0;
|
|
336
|
+
if (this.slots.audio.si) {
|
|
337
|
+
this.receiveSlotManager.releaseSlot(this.slots.audio.si);
|
|
338
|
+
}
|
|
375
339
|
|
|
376
|
-
|
|
340
|
+
// release screen share slots
|
|
341
|
+
this.slots.screenShare.audio.forEach(function (slot) {
|
|
377
342
|
return _this2.receiveSlotManager.releaseSlot(slot);
|
|
378
343
|
});
|
|
379
|
-
this.slots.audio.length = 0;
|
|
344
|
+
this.slots.screenShare.audio.length = 0;
|
|
345
|
+
if (this.slots.screenShare.video) {
|
|
346
|
+
this.receiveSlotManager.releaseSlot(this.slots.screenShare.video);
|
|
347
|
+
this.slots.screenShare.video = undefined;
|
|
348
|
+
}
|
|
380
349
|
|
|
350
|
+
// release video slots
|
|
381
351
|
this.receiveSlotAllocations = {
|
|
382
352
|
activeSpeaker: {},
|
|
383
353
|
receiverSelected: {}
|
|
384
354
|
};
|
|
385
|
-
|
|
386
355
|
(_this$slots$video$unu = this.slots.video.unused).push.apply(_this$slots$video$unu, (0, _toConsumableArray2.default)(this.slots.video.activeSpeaker));
|
|
387
|
-
|
|
388
356
|
this.slots.video.activeSpeaker.length = 0;
|
|
389
|
-
|
|
390
357
|
(_this$slots$video$unu2 = this.slots.video.unused).push.apply(_this$slots$video$unu2, (0, _toConsumableArray2.default)(this.slots.video.receiverSelected));
|
|
391
|
-
|
|
392
358
|
this.slots.video.receiverSelected.length = 0;
|
|
393
359
|
this.releaseUnusedVideoSlots();
|
|
394
360
|
this.currentLayout = undefined;
|
|
395
361
|
this.currentLayoutId = undefined;
|
|
396
362
|
this.started = false;
|
|
397
363
|
}
|
|
364
|
+
|
|
398
365
|
/**
|
|
399
366
|
* Returns the total number of main video panes required for a given layout
|
|
400
367
|
*
|
|
401
368
|
* @param {VideoLayout} layout
|
|
402
369
|
* @returns {number}
|
|
403
370
|
*/
|
|
404
|
-
|
|
405
371
|
}, {
|
|
406
372
|
key: "getRequiredNumVideoSlotsForLayout",
|
|
407
373
|
value: function getRequiredNumVideoSlotsForLayout(layout) {
|
|
408
374
|
var _layout$activeSpeaker2, _layout$memberVideoPa2;
|
|
409
|
-
|
|
410
375
|
if (!layout) {
|
|
411
376
|
return 0;
|
|
412
377
|
}
|
|
413
|
-
|
|
414
378
|
var activeSpeakerCount = ((_layout$activeSpeaker2 = layout.activeSpeakerVideoPaneGroups) === null || _layout$activeSpeaker2 === void 0 ? void 0 : _layout$activeSpeaker2.reduce(function (sum, paneGroup) {
|
|
415
379
|
return sum + paneGroup.numPanes;
|
|
416
380
|
}, 0)) || 0;
|
|
417
381
|
var receiverSelectedCount = ((_layout$memberVideoPa2 = layout.memberVideoPanes) === null || _layout$memberVideoPa2 === void 0 ? void 0 : _layout$memberVideoPa2.length) || 0;
|
|
418
382
|
return activeSpeakerCount + receiverSelectedCount;
|
|
419
383
|
}
|
|
384
|
+
|
|
420
385
|
/**
|
|
421
386
|
* Allocates the maximum number of panes that any of the configured layouts will require.
|
|
422
387
|
* We do this at the beginning, because it's more efficient (much faster) then allocating receive slots
|
|
423
388
|
* later, after the SDP exchange was done.
|
|
424
389
|
*/
|
|
425
|
-
|
|
426
390
|
}, {
|
|
427
391
|
key: "preallocateVideoReceiveSlots",
|
|
428
392
|
value: function () {
|
|
429
393
|
var _preallocateVideoReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
430
394
|
var _this3 = this;
|
|
431
|
-
|
|
432
395
|
var maxNumVideoPanesRequired;
|
|
433
396
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
434
|
-
while (1) {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
if (!(this.slots.video.unused.length < maxNumVideoPanesRequired)) {
|
|
443
|
-
_context2.next = 9;
|
|
444
|
-
break;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
_context2.t0 = this.slots.video.unused;
|
|
448
|
-
_context2.next = 5;
|
|
449
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaConnection.MediaType.VideoMain);
|
|
450
|
-
|
|
451
|
-
case 5:
|
|
452
|
-
_context2.t1 = _context2.sent;
|
|
453
|
-
|
|
454
|
-
_context2.t0.push.call(_context2.t0, _context2.t1);
|
|
455
|
-
|
|
456
|
-
_context2.next = 1;
|
|
397
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
398
|
+
case 0:
|
|
399
|
+
maxNumVideoPanesRequired = (0, _values.default)(this.config.video.layouts).reduce(function (maxValue, layout) {
|
|
400
|
+
return Math.max(maxValue, _this3.getRequiredNumVideoSlotsForLayout(layout));
|
|
401
|
+
}, 0);
|
|
402
|
+
case 1:
|
|
403
|
+
if (!(this.slots.video.unused.length < maxNumVideoPanesRequired)) {
|
|
404
|
+
_context2.next = 9;
|
|
457
405
|
break;
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
406
|
+
}
|
|
407
|
+
_context2.t0 = this.slots.video.unused;
|
|
408
|
+
_context2.next = 5;
|
|
409
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
410
|
+
case 5:
|
|
411
|
+
_context2.t1 = _context2.sent;
|
|
412
|
+
_context2.t0.push.call(_context2.t0, _context2.t1);
|
|
413
|
+
_context2.next = 1;
|
|
414
|
+
break;
|
|
415
|
+
case 9:
|
|
416
|
+
case "end":
|
|
417
|
+
return _context2.stop();
|
|
463
418
|
}
|
|
464
419
|
}, _callee2, this);
|
|
465
420
|
}));
|
|
466
|
-
|
|
467
421
|
function preallocateVideoReceiveSlots() {
|
|
468
422
|
return _preallocateVideoReceiveSlots.apply(this, arguments);
|
|
469
423
|
}
|
|
470
|
-
|
|
471
424
|
return preallocateVideoReceiveSlots;
|
|
472
425
|
}()
|
|
473
426
|
/**
|
|
@@ -476,52 +429,43 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
476
429
|
* @param {LayoutId} layoutId new layout id
|
|
477
430
|
* @returns {Promise}
|
|
478
431
|
*/
|
|
479
|
-
|
|
480
432
|
}, {
|
|
481
433
|
key: "setLayout",
|
|
482
434
|
value: function () {
|
|
483
435
|
var _setLayout = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(layoutId) {
|
|
484
436
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
485
|
-
while (1) {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
this.emitVideoLayoutChangedEvent();
|
|
512
|
-
|
|
513
|
-
case 10:
|
|
514
|
-
case "end":
|
|
515
|
-
return _context3.stop();
|
|
516
|
-
}
|
|
437
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
438
|
+
case 0:
|
|
439
|
+
if (layoutId in this.config.video.layouts) {
|
|
440
|
+
_context3.next = 2;
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
throw new Error("invalid layoutId: \"".concat(layoutId, "\" doesn't match any of the configured layouts"));
|
|
444
|
+
case 2:
|
|
445
|
+
if (this.started) {
|
|
446
|
+
_context3.next = 4;
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
throw new Error('setLayout() called before start()');
|
|
450
|
+
case 4:
|
|
451
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#setLayout --> new layout selected: ".concat(layoutId));
|
|
452
|
+
this.currentLayoutId = layoutId;
|
|
453
|
+
this.currentLayout = (0, _cloneDeep2.default)(this.config.video.layouts[this.currentLayoutId]);
|
|
454
|
+
_context3.next = 9;
|
|
455
|
+
return this.updateVideoReceiveSlots();
|
|
456
|
+
case 9:
|
|
457
|
+
this.updateVideoRemoteMediaObjects();
|
|
458
|
+
this.updateScreenShareVideoRemoteMediaObject();
|
|
459
|
+
this.emitVideoLayoutChangedEvent();
|
|
460
|
+
case 12:
|
|
461
|
+
case "end":
|
|
462
|
+
return _context3.stop();
|
|
517
463
|
}
|
|
518
464
|
}, _callee3, this);
|
|
519
465
|
}));
|
|
520
|
-
|
|
521
466
|
function setLayout(_x) {
|
|
522
467
|
return _setLayout.apply(this, arguments);
|
|
523
468
|
}
|
|
524
|
-
|
|
525
469
|
return setLayout;
|
|
526
470
|
}()
|
|
527
471
|
/**
|
|
@@ -529,344 +473,635 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
529
473
|
*
|
|
530
474
|
* @returns {LayoutId}
|
|
531
475
|
*/
|
|
532
|
-
|
|
533
476
|
}, {
|
|
534
477
|
key: "getLayoutId",
|
|
535
478
|
value: function getLayoutId() {
|
|
536
479
|
return this.currentLayoutId;
|
|
537
480
|
}
|
|
481
|
+
|
|
538
482
|
/**
|
|
539
|
-
*
|
|
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
|
|
540
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
|
+
}
|
|
541
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
|
+
*/
|
|
542
524
|
}, {
|
|
543
|
-
key: "
|
|
525
|
+
key: "setReceiveNamedMediaGroup",
|
|
544
526
|
value: function () {
|
|
545
|
-
var
|
|
546
|
-
var
|
|
527
|
+
var _setReceiveNamedMediaGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(mediaType, languageId) {
|
|
528
|
+
var _this$config$namedMed;
|
|
529
|
+
var value;
|
|
547
530
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
548
|
-
while (1) {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
case 1:
|
|
554
|
-
if (!(i < this.config.audio.numOfActiveSpeakerStreams)) {
|
|
555
|
-
_context4.next = 9;
|
|
556
|
-
break;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
_context4.next = 4;
|
|
560
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaConnection.MediaType.AudioMain);
|
|
561
|
-
|
|
562
|
-
case 4:
|
|
563
|
-
slot = _context4.sent;
|
|
564
|
-
this.slots.audio.push(slot);
|
|
565
|
-
|
|
566
|
-
case 6:
|
|
567
|
-
i += 1;
|
|
568
|
-
_context4.next = 1;
|
|
531
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
532
|
+
case 0:
|
|
533
|
+
if (!(mediaType !== _internalMediaCore.MediaType.AudioMain)) {
|
|
534
|
+
_context4.next = 2;
|
|
569
535
|
break;
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
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();
|
|
583
564
|
}
|
|
584
565
|
}, _callee4, this);
|
|
585
566
|
}));
|
|
586
|
-
|
|
567
|
+
function setReceiveNamedMediaGroup(_x2, _x3) {
|
|
568
|
+
return _setReceiveNamedMediaGroup.apply(this, arguments);
|
|
569
|
+
}
|
|
570
|
+
return setReceiveNamedMediaGroup;
|
|
571
|
+
}()
|
|
572
|
+
/**
|
|
573
|
+
* Creates the audio slots
|
|
574
|
+
*/
|
|
575
|
+
}, {
|
|
576
|
+
key: "createAudioMedia",
|
|
577
|
+
value: function () {
|
|
578
|
+
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
579
|
+
var i, slot;
|
|
580
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
581
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
582
|
+
case 0:
|
|
583
|
+
_context5.next = 2;
|
|
584
|
+
return this.createInterpretationAudioMedia(false);
|
|
585
|
+
case 2:
|
|
586
|
+
i = 0;
|
|
587
|
+
case 3:
|
|
588
|
+
if (!(i < this.config.audio.numOfActiveSpeakerStreams)) {
|
|
589
|
+
_context5.next = 11;
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
_context5.next = 6;
|
|
593
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
594
|
+
case 6:
|
|
595
|
+
slot = _context5.sent;
|
|
596
|
+
this.slots.audio.main.push(slot);
|
|
597
|
+
case 8:
|
|
598
|
+
i += 1;
|
|
599
|
+
_context5.next = 3;
|
|
600
|
+
break;
|
|
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);
|
|
604
|
+
this.emit({
|
|
605
|
+
file: 'multistream/remoteMediaManager',
|
|
606
|
+
function: 'createAudioMedia'
|
|
607
|
+
}, Event.AudioCreated, this.media.audio.main);
|
|
608
|
+
case 13:
|
|
609
|
+
case "end":
|
|
610
|
+
return _context5.stop();
|
|
611
|
+
}
|
|
612
|
+
}, _callee5, this);
|
|
613
|
+
}));
|
|
587
614
|
function createAudioMedia() {
|
|
588
615
|
return _createAudioMedia.apply(this, arguments);
|
|
589
616
|
}
|
|
590
|
-
|
|
591
617
|
return createAudioMedia;
|
|
592
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
|
+
}()
|
|
657
|
+
/**
|
|
658
|
+
* Creates receive slots required for receiving screen share audio and video
|
|
659
|
+
*/
|
|
660
|
+
}, {
|
|
661
|
+
key: "createScreenShareReceiveSlots",
|
|
662
|
+
value: function () {
|
|
663
|
+
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
664
|
+
var i, slot, isAnyLayoutContainingScreenShareVideo;
|
|
665
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
666
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
667
|
+
case 0:
|
|
668
|
+
i = 0;
|
|
669
|
+
case 1:
|
|
670
|
+
if (!(i < this.config.audio.numOfScreenShareStreams)) {
|
|
671
|
+
_context7.next = 9;
|
|
672
|
+
break;
|
|
673
|
+
}
|
|
674
|
+
_context7.next = 4;
|
|
675
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioSlides);
|
|
676
|
+
case 4:
|
|
677
|
+
slot = _context7.sent;
|
|
678
|
+
this.slots.screenShare.audio.push(slot);
|
|
679
|
+
case 6:
|
|
680
|
+
i += 1;
|
|
681
|
+
_context7.next = 1;
|
|
682
|
+
break;
|
|
683
|
+
case 9:
|
|
684
|
+
// video
|
|
685
|
+
isAnyLayoutContainingScreenShareVideo = (0, _values.default)(this.config.video.layouts).some(function (layout) {
|
|
686
|
+
return !!layout.screenShareVideo;
|
|
687
|
+
});
|
|
688
|
+
if (!isAnyLayoutContainingScreenShareVideo) {
|
|
689
|
+
_context7.next = 14;
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
_context7.next = 13;
|
|
693
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoSlides);
|
|
694
|
+
case 13:
|
|
695
|
+
this.slots.screenShare.video = _context7.sent;
|
|
696
|
+
case 14:
|
|
697
|
+
case "end":
|
|
698
|
+
return _context7.stop();
|
|
699
|
+
}
|
|
700
|
+
}, _callee7, this);
|
|
701
|
+
}));
|
|
702
|
+
function createScreenShareReceiveSlots() {
|
|
703
|
+
return _createScreenShareReceiveSlots.apply(this, arguments);
|
|
704
|
+
}
|
|
705
|
+
return createScreenShareReceiveSlots;
|
|
706
|
+
}()
|
|
707
|
+
/**
|
|
708
|
+
* Creates RemoteMedia objects for screen share
|
|
709
|
+
*/
|
|
710
|
+
}, {
|
|
711
|
+
key: "createScreenShareAudioMedia",
|
|
712
|
+
value: function createScreenShareAudioMedia() {
|
|
713
|
+
if (this.slots.screenShare.audio.length > 0) {
|
|
714
|
+
this.media.screenShare.audio = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.screenShareAudio, this.slots.screenShare.audio, 255, true);
|
|
715
|
+
this.emit({
|
|
716
|
+
file: 'multistream/remoteMediaManager',
|
|
717
|
+
function: 'createScreenShareAudioMedia'
|
|
718
|
+
}, Event.ScreenShareAudioCreated, this.media.screenShare.audio);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
|
|
593
722
|
/**
|
|
594
723
|
* Goes over all receiver-selected slots and keeps only the ones that are required by a given layout,
|
|
595
724
|
* the rest are all moved to the "unused" list
|
|
596
725
|
*/
|
|
597
|
-
|
|
598
726
|
}, {
|
|
599
727
|
key: "trimReceiverSelectedSlots",
|
|
600
728
|
value: function trimReceiverSelectedSlots() {
|
|
601
729
|
var _this$currentLayout, _this$currentLayout$m, _this$slots$video$unu3;
|
|
730
|
+
var requiredCsis = {};
|
|
602
731
|
|
|
603
|
-
|
|
604
|
-
|
|
732
|
+
// fill requiredCsis with all the CSIs that the given layout requires
|
|
605
733
|
(_this$currentLayout = this.currentLayout) === null || _this$currentLayout === void 0 ? void 0 : (_this$currentLayout$m = _this$currentLayout.memberVideoPanes) === null || _this$currentLayout$m === void 0 ? void 0 : _this$currentLayout$m.forEach(function (memberVideoPane) {
|
|
606
734
|
if (memberVideoPane.csi !== undefined) {
|
|
607
735
|
requiredCsis[memberVideoPane.csi] = true;
|
|
608
736
|
}
|
|
609
737
|
});
|
|
610
|
-
|
|
611
738
|
var isCsiNeededByCurrentLayout = function isCsiNeededByCurrentLayout(csi) {
|
|
612
739
|
if (csi === undefined) {
|
|
613
740
|
return false;
|
|
614
741
|
}
|
|
615
|
-
|
|
616
742
|
return !!requiredCsis[csi];
|
|
617
|
-
};
|
|
618
|
-
|
|
743
|
+
};
|
|
619
744
|
|
|
745
|
+
// keep receiverSelected slots that match our new requiredCsis, move the rest of receiverSelected slots to unused
|
|
620
746
|
var notNeededReceiverSelectedSlots = (0, _remove2.default)(this.slots.video.receiverSelected, function (slot) {
|
|
621
747
|
return isCsiNeededByCurrentLayout(slot.csi) === false;
|
|
622
748
|
});
|
|
623
|
-
|
|
624
749
|
(_this$slots$video$unu3 = this.slots.video.unused).push.apply(_this$slots$video$unu3, (0, _toConsumableArray2.default)(notNeededReceiverSelectedSlots));
|
|
625
750
|
}
|
|
751
|
+
|
|
626
752
|
/**
|
|
627
753
|
* Releases all the "unused" video slots.
|
|
628
754
|
*/
|
|
629
|
-
|
|
630
755
|
}, {
|
|
631
756
|
key: "releaseUnusedVideoSlots",
|
|
632
757
|
value: function releaseUnusedVideoSlots() {
|
|
633
758
|
var _this4 = this;
|
|
634
|
-
|
|
635
759
|
this.slots.video.unused.forEach(function (slot) {
|
|
636
760
|
return _this4.receiveSlotManager.releaseSlot(slot);
|
|
637
761
|
});
|
|
638
762
|
this.slots.video.unused.length = 0;
|
|
639
763
|
}
|
|
764
|
+
|
|
640
765
|
/**
|
|
641
|
-
* 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.
|
|
642
772
|
*/
|
|
643
|
-
|
|
644
773
|
}, {
|
|
645
|
-
key: "
|
|
646
|
-
value: function
|
|
774
|
+
key: "allocateSlotsToActiveSpeakerPaneGroups",
|
|
775
|
+
value: function allocateSlotsToActiveSpeakerPaneGroups() {
|
|
647
776
|
var _this$currentLayout2,
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
};
|
|
657
|
-
(_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) {
|
|
777
|
+
_this$currentLayout2$,
|
|
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) {
|
|
658
785
|
_this5.receiveSlotAllocations.activeSpeaker[group.id] = {
|
|
659
786
|
slots: []
|
|
660
787
|
};
|
|
661
|
-
|
|
662
788
|
for (var paneIndex = 0; paneIndex < group.numPanes; paneIndex += 1) {
|
|
663
|
-
// allocate a slot from the "unused" list
|
|
664
|
-
var freeSlot = _this5.slots.video.unused.
|
|
665
|
-
|
|
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();
|
|
666
791
|
if (freeSlot) {
|
|
667
792
|
_this5.slots.video.activeSpeaker.push(freeSlot);
|
|
668
|
-
|
|
669
793
|
_this5.receiveSlotAllocations.activeSpeaker[group.id].slots.push(freeSlot);
|
|
670
794
|
}
|
|
671
795
|
}
|
|
672
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;
|
|
673
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) {
|
|
674
810
|
// check if there is existing slot for this csi
|
|
675
|
-
var existingSlot =
|
|
811
|
+
var existingSlot = _this6.slots.video.receiverSelected.find(function (slot) {
|
|
676
812
|
return slot.csi === memberPane.csi;
|
|
677
813
|
});
|
|
678
|
-
|
|
679
|
-
var isExistingSlotAlreadyAllocated = (0, _values.default)(_this5.receiveSlotAllocations.receiverSelected).includes(existingSlot);
|
|
680
|
-
|
|
814
|
+
var isExistingSlotAlreadyAllocated = (0, _values.default)(_this6.receiveSlotAllocations.receiverSelected).includes(existingSlot);
|
|
681
815
|
if (memberPane.csi !== undefined && existingSlot && !isExistingSlotAlreadyAllocated) {
|
|
682
816
|
// found it, so use it
|
|
683
|
-
|
|
817
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = existingSlot;
|
|
684
818
|
} else {
|
|
685
819
|
// allocate a slot from the "unused" list
|
|
686
|
-
var freeSlot =
|
|
687
|
-
|
|
820
|
+
var freeSlot = _this6.slots.video.unused.pop();
|
|
688
821
|
if (freeSlot) {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
_this5.receiveSlotAllocations.receiverSelected[memberPane.id] = freeSlot;
|
|
822
|
+
_this6.slots.video.receiverSelected.push(freeSlot);
|
|
823
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = freeSlot;
|
|
692
824
|
}
|
|
693
825
|
}
|
|
694
826
|
});
|
|
695
827
|
}
|
|
828
|
+
|
|
696
829
|
/**
|
|
697
|
-
*
|
|
698
|
-
* and allocates them to the right video panes / pane groups
|
|
699
|
-
*
|
|
700
|
-
* @returns {Promise}
|
|
830
|
+
* Ensures that we have enough slots for the current layout.
|
|
701
831
|
*/
|
|
702
|
-
|
|
703
832
|
}, {
|
|
704
|
-
key: "
|
|
833
|
+
key: "refillRequiredSlotsIfNeeded",
|
|
705
834
|
value: function () {
|
|
706
|
-
var
|
|
707
|
-
var _this$slots$video$unu4;
|
|
708
|
-
|
|
835
|
+
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
709
836
|
var requiredNumSlots, totalNumSlots, numSlotsToCreate;
|
|
710
|
-
return _regenerator.default.wrap(function
|
|
711
|
-
while (1) {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
if (!(totalNumSlots < requiredNumSlots)) {
|
|
718
|
-
_context5.next = 13;
|
|
719
|
-
break;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
723
|
-
|
|
724
|
-
case 4:
|
|
725
|
-
if (!(numSlotsToCreate > 0)) {
|
|
726
|
-
_context5.next = 13;
|
|
727
|
-
break;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
_context5.t0 = this.slots.video.unused;
|
|
731
|
-
_context5.next = 8;
|
|
732
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaConnection.MediaType.VideoMain);
|
|
733
|
-
|
|
734
|
-
case 8:
|
|
735
|
-
_context5.t1 = _context5.sent;
|
|
736
|
-
|
|
737
|
-
_context5.t0.push.call(_context5.t0, _context5.t1);
|
|
738
|
-
|
|
739
|
-
numSlotsToCreate -= 1;
|
|
740
|
-
_context5.next = 4;
|
|
837
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
838
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
839
|
+
case 0:
|
|
840
|
+
requiredNumSlots = this.getRequiredNumVideoSlotsForLayout(this.currentLayout);
|
|
841
|
+
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
842
|
+
if (!(totalNumSlots < requiredNumSlots)) {
|
|
843
|
+
_context8.next = 13;
|
|
741
844
|
break;
|
|
845
|
+
}
|
|
846
|
+
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
847
|
+
case 4:
|
|
848
|
+
if (!(numSlotsToCreate > 0)) {
|
|
849
|
+
_context8.next = 13;
|
|
850
|
+
break;
|
|
851
|
+
}
|
|
852
|
+
_context8.t0 = this.slots.video.unused;
|
|
853
|
+
_context8.next = 8;
|
|
854
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
855
|
+
case 8:
|
|
856
|
+
_context8.t1 = _context8.sent;
|
|
857
|
+
_context8.t0.push.call(_context8.t0, _context8.t1);
|
|
858
|
+
numSlotsToCreate -= 1;
|
|
859
|
+
_context8.next = 4;
|
|
860
|
+
break;
|
|
861
|
+
case 13:
|
|
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
|
+
}
|
|
742
882
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
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
|
+
}
|
|
750
901
|
|
|
751
|
-
|
|
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
|
+
}
|
|
752
910
|
|
|
753
|
-
|
|
754
|
-
|
|
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
|
+
}
|
|
755
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
|
+
}
|
|
756
927
|
|
|
757
|
-
|
|
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
|
+
}
|
|
758
937
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
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:
|
|
951
|
+
// move all active speaker slots to "unused"
|
|
952
|
+
this.trimActiveSpeakerSlots();
|
|
953
|
+
|
|
954
|
+
// move all no longer needed receiver-selected slots to "unused"
|
|
955
|
+
this.trimReceiverSelectedSlots();
|
|
956
|
+
|
|
957
|
+
// ensure we have enough total slots for current layout
|
|
958
|
+
_context9.next = 4;
|
|
959
|
+
return this.refillRequiredSlotsIfNeeded();
|
|
960
|
+
case 4:
|
|
961
|
+
// allocate the slots to the right panes / pane groups
|
|
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();
|
|
972
|
+
|
|
973
|
+
// If this is the initial layout, there may be some "unused" slots left because of the preallocation
|
|
974
|
+
// done in this.preallocateVideoReceiveSlots(), so release them now
|
|
975
|
+
this.releaseUnusedVideoSlots();
|
|
976
|
+
case 9:
|
|
977
|
+
case "end":
|
|
978
|
+
return _context9.stop();
|
|
763
979
|
}
|
|
764
|
-
},
|
|
980
|
+
}, _callee9, this);
|
|
765
981
|
}));
|
|
766
|
-
|
|
767
982
|
function updateVideoReceiveSlots() {
|
|
768
983
|
return _updateVideoReceiveSlots.apply(this, arguments);
|
|
769
984
|
}
|
|
770
|
-
|
|
771
985
|
return updateVideoReceiveSlots;
|
|
772
986
|
}()
|
|
773
987
|
/**
|
|
774
988
|
* Creates new RemoteMedia and RemoteMediaGroup objects for the current layout
|
|
775
989
|
* and sends the media requests for all of them.
|
|
776
990
|
*/
|
|
777
|
-
|
|
778
991
|
}, {
|
|
779
992
|
key: "updateVideoRemoteMediaObjects",
|
|
780
993
|
value: function updateVideoRemoteMediaObjects() {
|
|
781
|
-
var
|
|
782
|
-
|
|
994
|
+
var _this7 = this;
|
|
783
995
|
// invalidate all the previous remote media objects and cancel their media requests
|
|
784
996
|
this.invalidateCurrentRemoteMedia({
|
|
785
997
|
audio: false,
|
|
786
998
|
video: true,
|
|
999
|
+
screenShareAudio: false,
|
|
1000
|
+
screenShareVideo: false,
|
|
787
1001
|
commit: false
|
|
788
|
-
});
|
|
1002
|
+
});
|
|
789
1003
|
|
|
1004
|
+
// create new remoteMediaGroup objects
|
|
790
1005
|
this.media.video.activeSpeakerGroups = {};
|
|
791
1006
|
this.media.video.memberPanes = {};
|
|
792
|
-
|
|
793
1007
|
var _loop = function _loop() {
|
|
794
|
-
var
|
|
795
|
-
|
|
1008
|
+
var _this7$currentLayout, _this7$currentLayout$;
|
|
796
1009
|
var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
var paneGroupInCurrentLayout = (_this6$currentLayout = _this6.currentLayout) === null || _this6$currentLayout === void 0 ? void 0 : (_this6$currentLayout$ = _this6$currentLayout.activeSpeakerVideoPaneGroups) === null || _this6$currentLayout$ === void 0 ? void 0 : _this6$currentLayout$.find(function (groupInLayout) {
|
|
1010
|
+
groupId = _Object$entries$_i[0],
|
|
1011
|
+
group = _Object$entries$_i[1];
|
|
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) {
|
|
801
1013
|
return groupInLayout.id === groupId;
|
|
802
1014
|
});
|
|
803
|
-
|
|
804
1015
|
if (paneGroupInCurrentLayout) {
|
|
805
|
-
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(
|
|
806
|
-
preferLiveVideo:
|
|
1016
|
+
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(_this7.mediaRequestManagers.video, group.slots, paneGroupInCurrentLayout.priority, false, {
|
|
1017
|
+
preferLiveVideo: _this7.config.video.preferLiveVideo,
|
|
807
1018
|
resolution: paneGroupInCurrentLayout.size
|
|
808
1019
|
});
|
|
809
|
-
|
|
1020
|
+
_this7.media.video.activeSpeakerGroups[groupId] = mediaGroup;
|
|
810
1021
|
} else {
|
|
811
1022
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
812
1023
|
_loggerProxy.default.logger.warn("a group id ".concat(groupId, " from this.receiveSlotAllocations.activeSpeaker cannot be found in the current layout configuration"));
|
|
813
1024
|
}
|
|
814
1025
|
};
|
|
815
|
-
|
|
816
1026
|
for (var _i = 0, _Object$entries = (0, _entries.default)(this.receiveSlotAllocations.activeSpeaker); _i < _Object$entries.length; _i++) {
|
|
817
1027
|
_loop();
|
|
818
|
-
}
|
|
819
|
-
|
|
1028
|
+
}
|
|
820
1029
|
|
|
1030
|
+
// create new remoteMedia objects
|
|
821
1031
|
var _loop2 = function _loop2() {
|
|
822
|
-
var
|
|
823
|
-
|
|
1032
|
+
var _this7$currentLayout2, _this7$currentLayout3;
|
|
824
1033
|
var _Object$entries3$_i = (0, _slicedToArray2.default)(_Object$entries3[_i2], 2),
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
var paneInCurrentLayout = (_this6$currentLayout2 = _this6.currentLayout) === null || _this6$currentLayout2 === void 0 ? void 0 : (_this6$currentLayout3 = _this6$currentLayout2.memberVideoPanes) === null || _this6$currentLayout3 === void 0 ? void 0 : _this6$currentLayout3.find(function (paneInLayout) {
|
|
1034
|
+
paneId = _Object$entries3$_i[0],
|
|
1035
|
+
slot = _Object$entries3$_i[1];
|
|
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) {
|
|
829
1037
|
return paneInLayout.id === paneId;
|
|
830
1038
|
});
|
|
831
|
-
|
|
832
1039
|
if (paneInCurrentLayout) {
|
|
833
|
-
var remoteMedia = new _remoteMedia.RemoteMedia(slot,
|
|
1040
|
+
var remoteMedia = new _remoteMedia.RemoteMedia(slot, _this7.mediaRequestManagers.video, {
|
|
834
1041
|
resolution: paneInCurrentLayout.size
|
|
835
1042
|
});
|
|
836
|
-
|
|
837
1043
|
if (paneInCurrentLayout.csi) {
|
|
838
1044
|
remoteMedia.sendMediaRequest(paneInCurrentLayout.csi, false);
|
|
839
1045
|
}
|
|
840
|
-
|
|
841
|
-
_this6.media.video.memberPanes[paneId] = remoteMedia;
|
|
1046
|
+
_this7.media.video.memberPanes[paneId] = remoteMedia;
|
|
842
1047
|
} else {
|
|
843
1048
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
844
1049
|
_loggerProxy.default.logger.warn("a pane id ".concat(paneId, " from this.receiveSlotAllocations.receiverSelected cannot be found in the current layout configuration"));
|
|
845
1050
|
}
|
|
846
1051
|
};
|
|
847
|
-
|
|
848
1052
|
for (var _i2 = 0, _Object$entries3 = (0, _entries.default)(this.receiveSlotAllocations.receiverSelected); _i2 < _Object$entries3.length; _i2++) {
|
|
849
1053
|
_loop2();
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
|
|
1054
|
+
}
|
|
853
1055
|
this.mediaRequestManagers.video.commit();
|
|
854
1056
|
}
|
|
1057
|
+
|
|
855
1058
|
/**
|
|
856
|
-
*
|
|
1059
|
+
* Checks if current layout requires a screen share.
|
|
1060
|
+
* If it does, it creates new RemoteMediaGroup object for screen share
|
|
1061
|
+
* and sends the media requests for it.
|
|
1062
|
+
* If it doesn't, it makes sure we clean up any RemoteMediaGroup objects
|
|
1063
|
+
* created earlier for screen share (for previous layout).
|
|
857
1064
|
*/
|
|
1065
|
+
}, {
|
|
1066
|
+
key: "updateScreenShareVideoRemoteMediaObject",
|
|
1067
|
+
value: function updateScreenShareVideoRemoteMediaObject() {
|
|
1068
|
+
var _this$currentLayout4;
|
|
1069
|
+
this.invalidateCurrentRemoteMedia({
|
|
1070
|
+
audio: false,
|
|
1071
|
+
video: false,
|
|
1072
|
+
screenShareAudio: false,
|
|
1073
|
+
screenShareVideo: true,
|
|
1074
|
+
commit: false
|
|
1075
|
+
});
|
|
1076
|
+
this.media.screenShare.video = undefined;
|
|
1077
|
+
if ((_this$currentLayout4 = this.currentLayout) !== null && _this$currentLayout4 !== void 0 && _this$currentLayout4.screenShareVideo) {
|
|
1078
|
+
// we create a group of 1, because for screen share we need to use the "active speaker" policy
|
|
1079
|
+
this.media.screenShare.video = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.screenShareVideo, [this.slots.screenShare.video], 255, false, {
|
|
1080
|
+
resolution: this.currentLayout.screenShareVideo.size
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
this.mediaRequestManagers.screenShareVideo.commit();
|
|
1084
|
+
}
|
|
858
1085
|
|
|
1086
|
+
/**
|
|
1087
|
+
* Invalidates all remote media objects belonging to currently selected layout
|
|
1088
|
+
*/
|
|
859
1089
|
}, {
|
|
860
1090
|
key: "invalidateCurrentRemoteMedia",
|
|
861
1091
|
value: function invalidateCurrentRemoteMedia(options) {
|
|
862
1092
|
var audio = options.audio,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
1093
|
+
video = options.video,
|
|
1094
|
+
screenShareAudio = options.screenShareAudio,
|
|
1095
|
+
screenShareVideo = options.screenShareVideo,
|
|
1096
|
+
commit = options.commit;
|
|
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
|
+
}
|
|
868
1104
|
}
|
|
869
|
-
|
|
870
1105
|
if (video) {
|
|
871
1106
|
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
872
1107
|
remoteMediaGroup.stop(false);
|
|
@@ -874,21 +1109,28 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
874
1109
|
(0, _values.default)(this.media.video.memberPanes).forEach(function (remoteMedia) {
|
|
875
1110
|
remoteMedia.stop(false);
|
|
876
1111
|
});
|
|
877
|
-
|
|
878
1112
|
if (commit) {
|
|
879
1113
|
this.mediaRequestManagers.video.commit();
|
|
880
1114
|
}
|
|
881
1115
|
}
|
|
1116
|
+
if (screenShareAudio && this.media.screenShare.audio) {
|
|
1117
|
+
this.media.screenShare.audio.stop(commit);
|
|
1118
|
+
}
|
|
1119
|
+
if (screenShareVideo && this.media.screenShare.video) {
|
|
1120
|
+
this.media.screenShare.video.stop(commit);
|
|
1121
|
+
}
|
|
882
1122
|
}
|
|
883
|
-
/** emits Event.VideoLayoutChanged */
|
|
884
1123
|
|
|
1124
|
+
/** emits Event.VideoLayoutChanged */
|
|
885
1125
|
}, {
|
|
886
1126
|
key: "emitVideoLayoutChangedEvent",
|
|
887
1127
|
value: function emitVideoLayoutChangedEvent() {
|
|
1128
|
+
var _this$media$screenSha;
|
|
888
1129
|
// todo: at this point the receive slots might still be showing a participant from previous layout, we should
|
|
889
|
-
// wait for our media requests to be
|
|
1130
|
+
// wait for our media requests to be fulfilled, but there is no API for that right now (we could wait for source updates
|
|
890
1131
|
// but in some cases they might never come, or would need to always make sure to use a new set of receiver slots)
|
|
891
1132
|
// for now it's fine to have it like this, we will re-evaluate if it needs improving after more testing
|
|
1133
|
+
|
|
892
1134
|
this.emit({
|
|
893
1135
|
file: 'multistream/remoteMediaManager',
|
|
894
1136
|
function: 'emitVideoLayoutChangedEvent'
|
|
@@ -896,30 +1138,29 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
896
1138
|
layoutId: this.currentLayoutId,
|
|
897
1139
|
activeSpeakerVideoPanes: this.media.video.activeSpeakerGroups,
|
|
898
1140
|
memberVideoPanes: this.media.video.memberPanes,
|
|
899
|
-
screenShareVideo:
|
|
900
|
-
|
|
1141
|
+
screenShareVideo: (_this$media$screenSha = this.media.screenShare.video) === null || _this$media$screenSha === void 0 ? void 0 : _this$media$screenSha.getRemoteMedia()[0]
|
|
901
1142
|
});
|
|
902
1143
|
}
|
|
1144
|
+
|
|
903
1145
|
/**
|
|
904
1146
|
* Sets a new CSI on a given remote media object
|
|
905
1147
|
*
|
|
906
1148
|
* @param {RemoteMedia} remoteMedia remote Media object to modify
|
|
907
1149
|
* @param {CSI} csi new CSI value, can be null if we want to stop receiving media
|
|
908
1150
|
*/
|
|
909
|
-
|
|
910
1151
|
}, {
|
|
911
1152
|
key: "setRemoteVideoCsi",
|
|
912
1153
|
value: function setRemoteVideoCsi(remoteMedia, csi) {
|
|
913
1154
|
if (!(0, _values.default)(this.media.video.memberPanes).includes(remoteMedia)) {
|
|
914
1155
|
throw new Error('remoteMedia not found');
|
|
915
1156
|
}
|
|
916
|
-
|
|
917
1157
|
if (csi) {
|
|
918
1158
|
remoteMedia.sendMediaRequest(csi, true);
|
|
919
1159
|
} else {
|
|
920
1160
|
remoteMedia.cancelMediaRequest(true);
|
|
921
1161
|
}
|
|
922
1162
|
}
|
|
1163
|
+
|
|
923
1164
|
/**
|
|
924
1165
|
* Adds a new member video pane to the currently selected layout.
|
|
925
1166
|
*
|
|
@@ -928,68 +1169,53 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
928
1169
|
* @param {MemberVideoPane} newPane
|
|
929
1170
|
* @returns {Promise<RemoteMedia>}
|
|
930
1171
|
*/
|
|
931
|
-
|
|
932
1172
|
}, {
|
|
933
1173
|
key: "addMemberVideoPane",
|
|
934
1174
|
value: function () {
|
|
935
|
-
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
936
|
-
var _this$
|
|
937
|
-
|
|
1175
|
+
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(newPane) {
|
|
1176
|
+
var _this$currentLayout5;
|
|
938
1177
|
var receiveSlot, remoteMedia;
|
|
939
|
-
return _regenerator.default.wrap(function
|
|
940
|
-
while (1) {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
if (newPane.csi) {
|
|
975
|
-
remoteMedia.sendMediaRequest(newPane.csi, true);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
this.media.video.memberPanes[newPane.id] = remoteMedia;
|
|
979
|
-
return _context6.abrupt("return", remoteMedia);
|
|
980
|
-
|
|
981
|
-
case 14:
|
|
982
|
-
case "end":
|
|
983
|
-
return _context6.stop();
|
|
984
|
-
}
|
|
1178
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
1179
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1180
|
+
case 0:
|
|
1181
|
+
if (this.currentLayout) {
|
|
1182
|
+
_context10.next = 2;
|
|
1183
|
+
break;
|
|
1184
|
+
}
|
|
1185
|
+
throw new Error('There is no current layout selected, call start() first');
|
|
1186
|
+
case 2:
|
|
1187
|
+
if (!((_this$currentLayout5 = this.currentLayout) !== null && _this$currentLayout5 !== void 0 && _this$currentLayout5.memberVideoPanes)) {
|
|
1188
|
+
this.currentLayout.memberVideoPanes = [];
|
|
1189
|
+
}
|
|
1190
|
+
if (!(newPane.id in this.currentLayout.memberVideoPanes)) {
|
|
1191
|
+
_context10.next = 5;
|
|
1192
|
+
break;
|
|
1193
|
+
}
|
|
1194
|
+
throw new Error("duplicate pane id ".concat(newPane.id, " - this pane already exists in current layout's memberVideoPanes"));
|
|
1195
|
+
case 5:
|
|
1196
|
+
this.currentLayout.memberVideoPanes.push(newPane);
|
|
1197
|
+
_context10.next = 8;
|
|
1198
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
1199
|
+
case 8:
|
|
1200
|
+
receiveSlot = _context10.sent;
|
|
1201
|
+
this.slots.video.receiverSelected.push(receiveSlot);
|
|
1202
|
+
remoteMedia = new _remoteMedia.RemoteMedia(receiveSlot, this.mediaRequestManagers.video, {
|
|
1203
|
+
resolution: newPane.size
|
|
1204
|
+
});
|
|
1205
|
+
if (newPane.csi) {
|
|
1206
|
+
remoteMedia.sendMediaRequest(newPane.csi, true);
|
|
1207
|
+
}
|
|
1208
|
+
this.media.video.memberPanes[newPane.id] = remoteMedia;
|
|
1209
|
+
return _context10.abrupt("return", remoteMedia);
|
|
1210
|
+
case 14:
|
|
1211
|
+
case "end":
|
|
1212
|
+
return _context10.stop();
|
|
985
1213
|
}
|
|
986
|
-
},
|
|
1214
|
+
}, _callee10, this);
|
|
987
1215
|
}));
|
|
988
|
-
|
|
989
|
-
function addMemberVideoPane(_x2) {
|
|
1216
|
+
function addMemberVideoPane(_x5) {
|
|
990
1217
|
return _addMemberVideoPane.apply(this, arguments);
|
|
991
1218
|
}
|
|
992
|
-
|
|
993
1219
|
return addMemberVideoPane;
|
|
994
1220
|
}()
|
|
995
1221
|
/**
|
|
@@ -1000,49 +1226,40 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1000
1226
|
* @param {PaneId} paneId pane id of the pane to remove
|
|
1001
1227
|
* @returns {Promise<void>}
|
|
1002
1228
|
*/
|
|
1003
|
-
|
|
1004
1229
|
}, {
|
|
1005
1230
|
key: "removeMemberVideoPane",
|
|
1006
1231
|
value: function removeMemberVideoPane(paneId) {
|
|
1007
1232
|
var _this$currentLayout$m2, _this$currentLayout$m3;
|
|
1008
|
-
|
|
1009
1233
|
if (!this.currentLayout) {
|
|
1010
1234
|
return _promise.default.reject(new Error('There is no current layout selected, call start() first'));
|
|
1011
1235
|
}
|
|
1012
|
-
|
|
1013
1236
|
if (!((_this$currentLayout$m2 = this.currentLayout.memberVideoPanes) !== null && _this$currentLayout$m2 !== void 0 && _this$currentLayout$m2.find(function (pane) {
|
|
1014
1237
|
return pane.id === paneId;
|
|
1015
1238
|
}))) {
|
|
1016
1239
|
// pane id doesn't exist, so nothing to do
|
|
1017
1240
|
_loggerProxy.default.logger.log("RemoteMediaManager#removeMemberVideoPane --> removeMemberVideoPane() called for a non-existent paneId: ".concat(paneId, " (pane not found in currentLayout.memberVideoPanes)"));
|
|
1018
|
-
|
|
1019
1241
|
return _promise.default.resolve();
|
|
1020
1242
|
}
|
|
1021
|
-
|
|
1022
1243
|
if (!this.media.video.memberPanes[paneId]) {
|
|
1023
1244
|
// pane id doesn't exist, so nothing to do
|
|
1024
1245
|
_loggerProxy.default.logger.log("RemoteMediaManager#removeMemberVideoPane --> removeMemberVideoPane() called for a non-existent paneId: ".concat(paneId, " (pane not found in this.media.video.memberPanes)"));
|
|
1025
|
-
|
|
1026
1246
|
return _promise.default.resolve();
|
|
1027
1247
|
}
|
|
1028
|
-
|
|
1029
1248
|
var remoteMedia = this.media.video.memberPanes[paneId];
|
|
1030
1249
|
var receiveSlot = remoteMedia.getUnderlyingReceiveSlot();
|
|
1031
|
-
|
|
1032
1250
|
if (receiveSlot) {
|
|
1033
1251
|
this.receiveSlotManager.releaseSlot(receiveSlot);
|
|
1034
1252
|
var index = this.slots.video.receiverSelected.indexOf(receiveSlot);
|
|
1035
|
-
|
|
1036
1253
|
if (index >= 0) {
|
|
1037
1254
|
this.slots.video.receiverSelected.splice(index, 1);
|
|
1038
1255
|
}
|
|
1039
1256
|
}
|
|
1040
|
-
|
|
1041
1257
|
remoteMedia.stop();
|
|
1042
1258
|
delete this.media.video.memberPanes[paneId];
|
|
1043
1259
|
(_this$currentLayout$m3 = this.currentLayout.memberVideoPanes) === null || _this$currentLayout$m3 === void 0 ? true : delete _this$currentLayout$m3[paneId];
|
|
1044
1260
|
return _promise.default.resolve();
|
|
1045
1261
|
}
|
|
1262
|
+
|
|
1046
1263
|
/**
|
|
1047
1264
|
* Pins an active speaker remote media object to the given CSI value. From that moment
|
|
1048
1265
|
* onwards the remote media will only play audio/video from that specific CSI until
|
|
@@ -1051,39 +1268,35 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1051
1268
|
* @param {RemoteMedia} remoteMedia remote media object reference
|
|
1052
1269
|
* @param {CSI} csi CSI value to pin to, if undefined, then current CSI value is used
|
|
1053
1270
|
*/
|
|
1054
|
-
|
|
1055
1271
|
}, {
|
|
1056
1272
|
key: "pinActiveSpeakerVideoPane",
|
|
1057
1273
|
value: function pinActiveSpeakerVideoPane(remoteMedia, csi) {
|
|
1058
1274
|
var remoteMediaGroup = (0, _values.default)(this.media.video.activeSpeakerGroups).find(function (group) {
|
|
1059
1275
|
return group.includes(remoteMedia, 'unpinned');
|
|
1060
1276
|
});
|
|
1061
|
-
|
|
1062
1277
|
if (!remoteMediaGroup) {
|
|
1063
1278
|
throw new Error('remoteMedia not found among the unpinned remote media from any active speaker group');
|
|
1064
1279
|
}
|
|
1065
|
-
|
|
1066
1280
|
remoteMediaGroup.pin(remoteMedia, csi);
|
|
1067
1281
|
}
|
|
1282
|
+
|
|
1068
1283
|
/**
|
|
1069
1284
|
* Unpins a remote media object from the fixed CSI value it was pinned to.
|
|
1070
1285
|
*
|
|
1071
1286
|
* @param {RemoteMedia} remoteMedia remote media object reference
|
|
1072
1287
|
*/
|
|
1073
|
-
|
|
1074
1288
|
}, {
|
|
1075
1289
|
key: "unpinActiveSpeakerVideoPane",
|
|
1076
1290
|
value: function unpinActiveSpeakerVideoPane(remoteMedia) {
|
|
1077
1291
|
var remoteMediaGroup = (0, _values.default)(this.media.video.activeSpeakerGroups).find(function (group) {
|
|
1078
1292
|
return group.includes(remoteMedia, 'pinned');
|
|
1079
1293
|
});
|
|
1080
|
-
|
|
1081
1294
|
if (!remoteMediaGroup) {
|
|
1082
1295
|
throw new Error('remoteMedia not found among the pinned remote media from any active speaker group');
|
|
1083
1296
|
}
|
|
1084
|
-
|
|
1085
1297
|
remoteMediaGroup.unpin(remoteMedia);
|
|
1086
1298
|
}
|
|
1299
|
+
|
|
1087
1300
|
/**
|
|
1088
1301
|
* Returns true if a given remote media object belongs to an active speaker group and has been pinned.
|
|
1089
1302
|
* Throws an error if the remote media object doesn't belong to any active speaker remote media group.
|
|
@@ -1091,23 +1304,19 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1091
1304
|
* @param {RemoteMedia} remoteMedia remote media object
|
|
1092
1305
|
* @returns {boolean}
|
|
1093
1306
|
*/
|
|
1094
|
-
|
|
1095
1307
|
}, {
|
|
1096
1308
|
key: "isPinned",
|
|
1097
1309
|
value: function isPinned(remoteMedia) {
|
|
1098
1310
|
var remoteMediaGroup = (0, _values.default)(this.media.video.activeSpeakerGroups).find(function (group) {
|
|
1099
1311
|
return group.includes(remoteMedia);
|
|
1100
1312
|
});
|
|
1101
|
-
|
|
1102
1313
|
if (!remoteMediaGroup) {
|
|
1103
1314
|
throw new Error('remoteMedia not found among any remote media (pinned or unpinned) from any active speaker group');
|
|
1104
1315
|
}
|
|
1105
|
-
|
|
1106
1316
|
return remoteMediaGroup.isPinned(remoteMedia);
|
|
1107
1317
|
}
|
|
1108
1318
|
}]);
|
|
1109
1319
|
return RemoteMediaManager;
|
|
1110
1320
|
}(_eventsScope.default);
|
|
1111
|
-
|
|
1112
1321
|
exports.RemoteMediaManager = RemoteMediaManager;
|
|
1113
1322
|
//# sourceMappingURL=remoteMediaManager.js.map
|