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