@webex/plugin-meetings 3.0.0-beta.3 → 3.0.0-beta.300
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 +46 -8
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +41 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +9 -15
- package/dist/config.js.map +1 -1
- package/dist/constants.js +315 -68
- 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 +114 -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 +561 -246
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +10 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +68 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +314 -163
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +103 -231
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +137 -222
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +93 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +4624 -3740
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +249 -184
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +400 -346
- 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 +598 -586
- 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 +87 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +349 -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 +143 -234
- 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 +813 -596
- 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 +183 -156
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +135 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +158 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +194 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +324 -259
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +14 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +263 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +66 -43
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +536 -439
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +233 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +322 -200
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +20 -26
- package/dist/reachability/request.js.map +1 -1
- package/dist/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 +388 -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 +362 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +99 -94
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +131 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +151 -101
- 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 +117 -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 +416 -497
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +145 -88
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +71 -0
- package/dist/types/constants.d.ts +1066 -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 +273 -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 +163 -0
- package/dist/types/meeting/index.d.ts +1676 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +290 -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 +102 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +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 +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +65 -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 +285 -0
- package/dist/types/multistream/sendSlotManager.d.ts +61 -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 +194 -0
- package/dist/types/reachability/request.d.ts +39 -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 +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +78 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +92 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +47 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +201 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/internal-README.md +7 -6
- package/package.json +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/no-meeting-info.ts +24 -0
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +26 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +18 -19
- package/src/constants.ts +260 -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 +40 -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} +557 -119
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +81 -17
- package/src/locus-info/{parser.js → parser.ts} +303 -104
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +458 -0
- package/src/media/properties.ts +283 -0
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +384 -0
- package/src/meeting/in-meeting-actions.ts +191 -3
- package/src/meeting/index.ts +7882 -0
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +451 -0
- package/src/meeting/{request.js → request.ts} +421 -220
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +697 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +210 -0
- package/src/meeting-info/meeting-info-v2.ts +429 -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} +78 -71
- package/src/meetings/{collection.js → collection.ts} +26 -3
- package/src/meetings/index.ts +1470 -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} +132 -37
- package/src/member/{index.js → index.ts} +160 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +397 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +351 -146
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +353 -0
- package/src/metrics/{constants.js → constants.ts} +12 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +337 -63
- 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 +300 -66
- package/src/multistream/sendSlotManager.ts +170 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/index.ts +671 -0
- package/src/reachability/request.ts +50 -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} +258 -138
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +332 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/{index.js → index.ts} +127 -79
- package/src/roap/request.ts +153 -0
- package/src/roap/turnDiscovery.ts +109 -47
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1250 -0
- package/src/statsAnalyzer/mqaUtil.ts +292 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +790 -530
- 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 +1390 -17
- package/test/unit/spec/locus-info/infoUtils.js +71 -40
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +32 -0
- package/test/unit/spec/locus-info/parser.js +119 -44
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +296 -12
- package/test/unit/spec/media/index.ts +128 -77
- package/test/unit/spec/media/properties.ts +11 -11
- package/test/unit/spec/meeting/in-meeting-actions.ts +92 -3
- package/test/unit/spec/meeting/index.js +7433 -2752
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +420 -211
- package/test/unit/spec/meeting/request.js +545 -79
- package/test/unit/spec/meeting/utils.js +722 -174
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +624 -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 +1365 -377
- package/test/unit/spec/meetings/utils.js +216 -14
- package/test/unit/spec/member/index.js +61 -7
- package/test/unit/spec/member/util.js +526 -26
- package/test/unit/spec/members/index.js +536 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +217 -4
- package/test/unit/spec/metrics/index.js +12 -66
- package/test/unit/spec/multistream/mediaRequestManager.ts +1012 -109
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +738 -65
- package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +598 -26
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reconnection-manager/index.js +181 -12
- 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 +179 -64
- package/test/unit/spec/roap/request.ts +232 -0
- package/test/unit/spec/roap/turnDiscovery.ts +123 -58
- package/test/unit/spec/rtcMetrics/index.ts +73 -0
- package/test/unit/spec/stats-analyzer/index.js +199 -60
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +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/media/properties.js +0 -289
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/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/reachability/index.js +0 -464
- 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;
|
|
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
|
+
}
|
|
380
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,43 @@ 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
|
-
|
|
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
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#setLayout --> new layout selected: ".concat(layoutId));
|
|
441
|
+
this.currentLayoutId = layoutId;
|
|
442
|
+
this.currentLayout = (0, _cloneDeep2.default)(this.config.video.layouts[this.currentLayoutId]);
|
|
443
|
+
_context3.next = 9;
|
|
444
|
+
return this.updateVideoReceiveSlots();
|
|
445
|
+
case 9:
|
|
446
|
+
this.updateVideoRemoteMediaObjects();
|
|
447
|
+
this.updateScreenShareVideoRemoteMediaObject();
|
|
448
|
+
this.emitVideoLayoutChangedEvent();
|
|
449
|
+
case 12:
|
|
450
|
+
case "end":
|
|
451
|
+
return _context3.stop();
|
|
517
452
|
}
|
|
518
453
|
}, _callee3, this);
|
|
519
454
|
}));
|
|
520
|
-
|
|
521
455
|
function setLayout(_x) {
|
|
522
456
|
return _setLayout.apply(this, arguments);
|
|
523
457
|
}
|
|
524
|
-
|
|
525
458
|
return setLayout;
|
|
526
459
|
}()
|
|
527
460
|
/**
|
|
@@ -529,344 +462,534 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
529
462
|
*
|
|
530
463
|
* @returns {LayoutId}
|
|
531
464
|
*/
|
|
532
|
-
|
|
533
465
|
}, {
|
|
534
466
|
key: "getLayoutId",
|
|
535
467
|
value: function getLayoutId() {
|
|
536
468
|
return this.currentLayoutId;
|
|
537
469
|
}
|
|
470
|
+
|
|
538
471
|
/**
|
|
539
|
-
*
|
|
472
|
+
* sets the preferLiveVideo
|
|
540
473
|
*/
|
|
474
|
+
}, {
|
|
475
|
+
key: "setPreferLiveVideo",
|
|
476
|
+
value: function setPreferLiveVideo(preferLiveVideo) {
|
|
477
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#setPreferLiveVideo --> setPreferLiveVideo is called to set preferLiveVideo to ".concat(preferLiveVideo));
|
|
478
|
+
this.config.video.preferLiveVideo = preferLiveVideo;
|
|
479
|
+
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (activeSpeakerGroup) {
|
|
480
|
+
activeSpeakerGroup.setPreferLiveVideo(preferLiveVideo, false);
|
|
481
|
+
});
|
|
482
|
+
this.mediaRequestManagers.video.commit();
|
|
483
|
+
}
|
|
541
484
|
|
|
485
|
+
/**
|
|
486
|
+
* Sets CSIs for multiple RemoteMedia instances belonging to RemoteMediaGroup.
|
|
487
|
+
* For each entry in the remoteMediaCsis array:
|
|
488
|
+
* - if csi is specified, the RemoteMedia instance is pinned to that CSI
|
|
489
|
+
* - if csi is undefined, the RemoteMedia instance is unpinned
|
|
490
|
+
*/
|
|
491
|
+
}, {
|
|
492
|
+
key: "setActiveSpeakerCsis",
|
|
493
|
+
value: function setActiveSpeakerCsis(remoteMediaCsis) {
|
|
494
|
+
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
495
|
+
var groupRemoteMediaCsis = remoteMediaCsis.filter(function (_ref) {
|
|
496
|
+
var remoteMedia = _ref.remoteMedia;
|
|
497
|
+
return remoteMediaGroup.includes(remoteMedia);
|
|
498
|
+
});
|
|
499
|
+
if (groupRemoteMediaCsis.length > 0) {
|
|
500
|
+
remoteMediaGroup.setActiveSpeakerCsis(groupRemoteMediaCsis, false);
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
this.mediaRequestManagers.video.commit();
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Creates the audio slots
|
|
508
|
+
*/
|
|
542
509
|
}, {
|
|
543
510
|
key: "createAudioMedia",
|
|
544
511
|
value: function () {
|
|
545
512
|
var _createAudioMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
546
513
|
var i, slot;
|
|
547
514
|
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;
|
|
515
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
516
|
+
case 0:
|
|
517
|
+
i = 0;
|
|
518
|
+
case 1:
|
|
519
|
+
if (!(i < this.config.audio.numOfActiveSpeakerStreams)) {
|
|
520
|
+
_context4.next = 9;
|
|
569
521
|
break;
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
522
|
+
}
|
|
523
|
+
_context4.next = 4;
|
|
524
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioMain);
|
|
525
|
+
case 4:
|
|
526
|
+
slot = _context4.sent;
|
|
527
|
+
this.slots.audio.push(slot);
|
|
528
|
+
case 6:
|
|
529
|
+
i += 1;
|
|
530
|
+
_context4.next = 1;
|
|
531
|
+
break;
|
|
532
|
+
case 9:
|
|
533
|
+
// create a remote media group
|
|
534
|
+
this.media.audio = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.audio, this.slots.audio, 255, true);
|
|
535
|
+
this.emit({
|
|
536
|
+
file: 'multistream/remoteMediaManager',
|
|
537
|
+
function: 'createAudioMedia'
|
|
538
|
+
}, Event.AudioCreated, this.media.audio);
|
|
539
|
+
case 11:
|
|
540
|
+
case "end":
|
|
541
|
+
return _context4.stop();
|
|
583
542
|
}
|
|
584
543
|
}, _callee4, this);
|
|
585
544
|
}));
|
|
586
|
-
|
|
587
545
|
function createAudioMedia() {
|
|
588
546
|
return _createAudioMedia.apply(this, arguments);
|
|
589
547
|
}
|
|
590
|
-
|
|
591
548
|
return createAudioMedia;
|
|
592
549
|
}()
|
|
550
|
+
/**
|
|
551
|
+
* Creates receive slots required for receiving screen share audio and video
|
|
552
|
+
*/
|
|
553
|
+
}, {
|
|
554
|
+
key: "createScreenShareReceiveSlots",
|
|
555
|
+
value: function () {
|
|
556
|
+
var _createScreenShareReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
557
|
+
var i, slot, isAnyLayoutContainingScreenShareVideo;
|
|
558
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
559
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
560
|
+
case 0:
|
|
561
|
+
i = 0;
|
|
562
|
+
case 1:
|
|
563
|
+
if (!(i < this.config.audio.numOfScreenShareStreams)) {
|
|
564
|
+
_context5.next = 9;
|
|
565
|
+
break;
|
|
566
|
+
}
|
|
567
|
+
_context5.next = 4;
|
|
568
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.AudioSlides);
|
|
569
|
+
case 4:
|
|
570
|
+
slot = _context5.sent;
|
|
571
|
+
this.slots.screenShare.audio.push(slot);
|
|
572
|
+
case 6:
|
|
573
|
+
i += 1;
|
|
574
|
+
_context5.next = 1;
|
|
575
|
+
break;
|
|
576
|
+
case 9:
|
|
577
|
+
// video
|
|
578
|
+
isAnyLayoutContainingScreenShareVideo = (0, _values.default)(this.config.video.layouts).some(function (layout) {
|
|
579
|
+
return !!layout.screenShareVideo;
|
|
580
|
+
});
|
|
581
|
+
if (!isAnyLayoutContainingScreenShareVideo) {
|
|
582
|
+
_context5.next = 14;
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
_context5.next = 13;
|
|
586
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoSlides);
|
|
587
|
+
case 13:
|
|
588
|
+
this.slots.screenShare.video = _context5.sent;
|
|
589
|
+
case 14:
|
|
590
|
+
case "end":
|
|
591
|
+
return _context5.stop();
|
|
592
|
+
}
|
|
593
|
+
}, _callee5, this);
|
|
594
|
+
}));
|
|
595
|
+
function createScreenShareReceiveSlots() {
|
|
596
|
+
return _createScreenShareReceiveSlots.apply(this, arguments);
|
|
597
|
+
}
|
|
598
|
+
return createScreenShareReceiveSlots;
|
|
599
|
+
}()
|
|
600
|
+
/**
|
|
601
|
+
* Creates RemoteMedia objects for screen share
|
|
602
|
+
*/
|
|
603
|
+
}, {
|
|
604
|
+
key: "createScreenShareAudioMedia",
|
|
605
|
+
value: function createScreenShareAudioMedia() {
|
|
606
|
+
if (this.slots.screenShare.audio.length > 0) {
|
|
607
|
+
this.media.screenShare.audio = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.screenShareAudio, this.slots.screenShare.audio, 255, true);
|
|
608
|
+
this.emit({
|
|
609
|
+
file: 'multistream/remoteMediaManager',
|
|
610
|
+
function: 'createScreenShareAudioMedia'
|
|
611
|
+
}, Event.ScreenShareAudioCreated, this.media.screenShare.audio);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
593
615
|
/**
|
|
594
616
|
* Goes over all receiver-selected slots and keeps only the ones that are required by a given layout,
|
|
595
617
|
* the rest are all moved to the "unused" list
|
|
596
618
|
*/
|
|
597
|
-
|
|
598
619
|
}, {
|
|
599
620
|
key: "trimReceiverSelectedSlots",
|
|
600
621
|
value: function trimReceiverSelectedSlots() {
|
|
601
622
|
var _this$currentLayout, _this$currentLayout$m, _this$slots$video$unu3;
|
|
623
|
+
var requiredCsis = {};
|
|
602
624
|
|
|
603
|
-
|
|
604
|
-
|
|
625
|
+
// fill requiredCsis with all the CSIs that the given layout requires
|
|
605
626
|
(_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
627
|
if (memberVideoPane.csi !== undefined) {
|
|
607
628
|
requiredCsis[memberVideoPane.csi] = true;
|
|
608
629
|
}
|
|
609
630
|
});
|
|
610
|
-
|
|
611
631
|
var isCsiNeededByCurrentLayout = function isCsiNeededByCurrentLayout(csi) {
|
|
612
632
|
if (csi === undefined) {
|
|
613
633
|
return false;
|
|
614
634
|
}
|
|
615
|
-
|
|
616
635
|
return !!requiredCsis[csi];
|
|
617
|
-
};
|
|
618
|
-
|
|
636
|
+
};
|
|
619
637
|
|
|
638
|
+
// keep receiverSelected slots that match our new requiredCsis, move the rest of receiverSelected slots to unused
|
|
620
639
|
var notNeededReceiverSelectedSlots = (0, _remove2.default)(this.slots.video.receiverSelected, function (slot) {
|
|
621
640
|
return isCsiNeededByCurrentLayout(slot.csi) === false;
|
|
622
641
|
});
|
|
623
|
-
|
|
624
642
|
(_this$slots$video$unu3 = this.slots.video.unused).push.apply(_this$slots$video$unu3, (0, _toConsumableArray2.default)(notNeededReceiverSelectedSlots));
|
|
625
643
|
}
|
|
644
|
+
|
|
626
645
|
/**
|
|
627
646
|
* Releases all the "unused" video slots.
|
|
628
647
|
*/
|
|
629
|
-
|
|
630
648
|
}, {
|
|
631
649
|
key: "releaseUnusedVideoSlots",
|
|
632
650
|
value: function releaseUnusedVideoSlots() {
|
|
633
651
|
var _this4 = this;
|
|
634
|
-
|
|
635
652
|
this.slots.video.unused.forEach(function (slot) {
|
|
636
653
|
return _this4.receiveSlotManager.releaseSlot(slot);
|
|
637
654
|
});
|
|
638
655
|
this.slots.video.unused.length = 0;
|
|
639
656
|
}
|
|
657
|
+
|
|
640
658
|
/**
|
|
641
|
-
* Allocates receive slots to all video panes
|
|
659
|
+
* Allocates receive slots to all active speaker video panes
|
|
660
|
+
* in the current selected layout.
|
|
661
|
+
*
|
|
662
|
+
* Allocation tries to keep the same order of the slots between the previous
|
|
663
|
+
* layout and the new one. Sorting helps making sure that highest priority slots
|
|
664
|
+
* go in the same order in the new layout.
|
|
642
665
|
*/
|
|
643
|
-
|
|
644
666
|
}, {
|
|
645
|
-
key: "
|
|
646
|
-
value: function
|
|
667
|
+
key: "allocateSlotsToActiveSpeakerPaneGroups",
|
|
668
|
+
value: function allocateSlotsToActiveSpeakerPaneGroups() {
|
|
647
669
|
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) {
|
|
670
|
+
_this$currentLayout2$,
|
|
671
|
+
_this$currentLayout2$2,
|
|
672
|
+
_this5 = this;
|
|
673
|
+
(_this$currentLayout2 = this.currentLayout) === null || _this$currentLayout2 === void 0 ? void 0 : (_this$currentLayout2$ = _this$currentLayout2.activeSpeakerVideoPaneGroups
|
|
674
|
+
// sorting in descending order based on group priority
|
|
675
|
+
) === null || _this$currentLayout2$ === void 0 ? void 0 : (_this$currentLayout2$2 = _this$currentLayout2$.sort(function (a, b) {
|
|
676
|
+
return a.priority < b.priority ? 1 : -1;
|
|
677
|
+
})) === null || _this$currentLayout2$2 === void 0 ? void 0 : _this$currentLayout2$2.forEach(function (group) {
|
|
658
678
|
_this5.receiveSlotAllocations.activeSpeaker[group.id] = {
|
|
659
679
|
slots: []
|
|
660
680
|
};
|
|
661
|
-
|
|
662
681
|
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
|
-
|
|
682
|
+
// allocate a slot from the "unused" list, by grabbing in same order (shift) as previous layout
|
|
683
|
+
var freeSlot = _this5.slots.video.unused.shift();
|
|
666
684
|
if (freeSlot) {
|
|
667
685
|
_this5.slots.video.activeSpeaker.push(freeSlot);
|
|
668
|
-
|
|
669
686
|
_this5.receiveSlotAllocations.activeSpeaker[group.id].slots.push(freeSlot);
|
|
670
687
|
}
|
|
671
688
|
}
|
|
672
689
|
});
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Allocates receive slots to all receiver selected video panes
|
|
694
|
+
* in the current selected layout
|
|
695
|
+
*/
|
|
696
|
+
}, {
|
|
697
|
+
key: "allocateSlotsToReceiverSelectedVideoPaneGroups",
|
|
698
|
+
value: function allocateSlotsToReceiverSelectedVideoPaneGroups() {
|
|
699
|
+
var _this$currentLayout3,
|
|
700
|
+
_this$currentLayout3$,
|
|
701
|
+
_this6 = this;
|
|
673
702
|
(_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
703
|
// check if there is existing slot for this csi
|
|
675
|
-
var existingSlot =
|
|
704
|
+
var existingSlot = _this6.slots.video.receiverSelected.find(function (slot) {
|
|
676
705
|
return slot.csi === memberPane.csi;
|
|
677
706
|
});
|
|
678
|
-
|
|
679
|
-
var isExistingSlotAlreadyAllocated = (0, _values.default)(_this5.receiveSlotAllocations.receiverSelected).includes(existingSlot);
|
|
680
|
-
|
|
707
|
+
var isExistingSlotAlreadyAllocated = (0, _values.default)(_this6.receiveSlotAllocations.receiverSelected).includes(existingSlot);
|
|
681
708
|
if (memberPane.csi !== undefined && existingSlot && !isExistingSlotAlreadyAllocated) {
|
|
682
709
|
// found it, so use it
|
|
683
|
-
|
|
710
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = existingSlot;
|
|
684
711
|
} else {
|
|
685
712
|
// allocate a slot from the "unused" list
|
|
686
|
-
var freeSlot =
|
|
687
|
-
|
|
713
|
+
var freeSlot = _this6.slots.video.unused.pop();
|
|
688
714
|
if (freeSlot) {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
_this5.receiveSlotAllocations.receiverSelected[memberPane.id] = freeSlot;
|
|
715
|
+
_this6.slots.video.receiverSelected.push(freeSlot);
|
|
716
|
+
_this6.receiveSlotAllocations.receiverSelected[memberPane.id] = freeSlot;
|
|
692
717
|
}
|
|
693
718
|
}
|
|
694
719
|
});
|
|
695
720
|
}
|
|
721
|
+
|
|
696
722
|
/**
|
|
697
|
-
*
|
|
698
|
-
* and allocates them to the right video panes / pane groups
|
|
699
|
-
*
|
|
700
|
-
* @returns {Promise}
|
|
723
|
+
* Ensures that we have enough slots for the current layout.
|
|
701
724
|
*/
|
|
702
|
-
|
|
703
725
|
}, {
|
|
704
|
-
key: "
|
|
726
|
+
key: "refillRequiredSlotsIfNeeded",
|
|
705
727
|
value: function () {
|
|
706
|
-
var
|
|
707
|
-
var _this$slots$video$unu4;
|
|
708
|
-
|
|
728
|
+
var _refillRequiredSlotsIfNeeded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
709
729
|
var requiredNumSlots, totalNumSlots, numSlotsToCreate;
|
|
710
|
-
return _regenerator.default.wrap(function
|
|
711
|
-
while (1) {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
if (!(totalNumSlots < requiredNumSlots)) {
|
|
718
|
-
_context5.next = 13;
|
|
719
|
-
break;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
723
|
-
|
|
724
|
-
case 4:
|
|
725
|
-
if (!(numSlotsToCreate > 0)) {
|
|
726
|
-
_context5.next = 13;
|
|
727
|
-
break;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
_context5.t0 = this.slots.video.unused;
|
|
731
|
-
_context5.next = 8;
|
|
732
|
-
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaConnection.MediaType.VideoMain);
|
|
733
|
-
|
|
734
|
-
case 8:
|
|
735
|
-
_context5.t1 = _context5.sent;
|
|
736
|
-
|
|
737
|
-
_context5.t0.push.call(_context5.t0, _context5.t1);
|
|
738
|
-
|
|
739
|
-
numSlotsToCreate -= 1;
|
|
740
|
-
_context5.next = 4;
|
|
730
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
731
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
732
|
+
case 0:
|
|
733
|
+
requiredNumSlots = this.getRequiredNumVideoSlotsForLayout(this.currentLayout);
|
|
734
|
+
totalNumSlots = this.slots.video.unused.length + this.slots.video.activeSpeaker.length + this.slots.video.receiverSelected.length;
|
|
735
|
+
if (!(totalNumSlots < requiredNumSlots)) {
|
|
736
|
+
_context6.next = 13;
|
|
741
737
|
break;
|
|
738
|
+
}
|
|
739
|
+
numSlotsToCreate = requiredNumSlots - totalNumSlots;
|
|
740
|
+
case 4:
|
|
741
|
+
if (!(numSlotsToCreate > 0)) {
|
|
742
|
+
_context6.next = 13;
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
_context6.t0 = this.slots.video.unused;
|
|
746
|
+
_context6.next = 8;
|
|
747
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
748
|
+
case 8:
|
|
749
|
+
_context6.t1 = _context6.sent;
|
|
750
|
+
_context6.t0.push.call(_context6.t0, _context6.t1);
|
|
751
|
+
numSlotsToCreate -= 1;
|
|
752
|
+
_context6.next = 4;
|
|
753
|
+
break;
|
|
754
|
+
case 13:
|
|
755
|
+
case "end":
|
|
756
|
+
return _context6.stop();
|
|
757
|
+
}
|
|
758
|
+
}, _callee6, this);
|
|
759
|
+
}));
|
|
760
|
+
function refillRequiredSlotsIfNeeded() {
|
|
761
|
+
return _refillRequiredSlotsIfNeeded.apply(this, arguments);
|
|
762
|
+
}
|
|
763
|
+
return refillRequiredSlotsIfNeeded;
|
|
764
|
+
}()
|
|
765
|
+
/**
|
|
766
|
+
* Move all active speaker slots to "unused"
|
|
767
|
+
*/
|
|
768
|
+
}, {
|
|
769
|
+
key: "trimActiveSpeakerSlots",
|
|
770
|
+
value: function trimActiveSpeakerSlots() {
|
|
771
|
+
var _this$slots$video$unu4;
|
|
772
|
+
(_this$slots$video$unu4 = this.slots.video.unused).push.apply(_this$slots$video$unu4, (0, _toConsumableArray2.default)(this.slots.video.activeSpeaker));
|
|
773
|
+
this.slots.video.activeSpeaker.length = 0;
|
|
774
|
+
}
|
|
742
775
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
776
|
+
/**
|
|
777
|
+
* Logs the state of the receive slots
|
|
778
|
+
*/
|
|
779
|
+
}, {
|
|
780
|
+
key: "logMainVideoReceiveSlots",
|
|
781
|
+
value: function logMainVideoReceiveSlots() {
|
|
782
|
+
var logMessage = '';
|
|
783
|
+
(0, _forEach2.default)(this.receiveSlotAllocations.activeSpeaker, function (group, groupName) {
|
|
784
|
+
logMessage += "\ngroup: ".concat(groupName, "\n").concat(group.slots.map(function (slot) {
|
|
785
|
+
return slot.logString;
|
|
786
|
+
}).join(', '));
|
|
787
|
+
});
|
|
788
|
+
logMessage += '\nreceiverSelected:\n';
|
|
789
|
+
(0, _forEach2.default)(this.receiveSlotAllocations.receiverSelected, function (slot, key) {
|
|
790
|
+
logMessage += " ".concat(key, ": ").concat(slot.logString, "\n");
|
|
791
|
+
});
|
|
792
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logMainVideoReceiveSlots --> MAIN VIDEO receive slots: unused=".concat(this.slots.video.unused.length, ", activeSpeaker=").concat(this.slots.video.activeSpeaker.length, ", receiverSelected=").concat(this.slots.video.receiverSelected.length).concat(logMessage));
|
|
793
|
+
}
|
|
750
794
|
|
|
751
|
-
|
|
795
|
+
/** logs main audio slots */
|
|
796
|
+
}, {
|
|
797
|
+
key: "logMainAudioReceiveSlots",
|
|
798
|
+
value: function logMainAudioReceiveSlots() {
|
|
799
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logMainAudioReceiveSlots --> MAIN AUDIO receive slots: ".concat(this.slots.audio.map(function (slot) {
|
|
800
|
+
return slot.logString;
|
|
801
|
+
}).join(', ')));
|
|
802
|
+
}
|
|
752
803
|
|
|
753
|
-
|
|
754
|
-
|
|
804
|
+
/** logs slides video slots */
|
|
805
|
+
}, {
|
|
806
|
+
key: "logSlidesVideoReceiveSlots",
|
|
807
|
+
value: function logSlidesVideoReceiveSlots() {
|
|
808
|
+
var _this$slots$screenSha;
|
|
809
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logSlidesVideoReceiveSlots --> SLIDES VIDEO receive slot: ".concat((_this$slots$screenSha = this.slots.screenShare.video) === null || _this$slots$screenSha === void 0 ? void 0 : _this$slots$screenSha.logString));
|
|
810
|
+
}
|
|
755
811
|
|
|
812
|
+
/** logs slides audio slots */
|
|
813
|
+
}, {
|
|
814
|
+
key: "logSlidesAudioReceiveSlots",
|
|
815
|
+
value: function logSlidesAudioReceiveSlots() {
|
|
816
|
+
_loggerProxy.default.logger.log("RemoteMediaManager#logSlidesAudioReceiveSlots --> SLIDES AUDIO receive slots: ".concat(this.slots.screenShare.audio.map(function (slot) {
|
|
817
|
+
return slot.logString;
|
|
818
|
+
}).join(', ')));
|
|
819
|
+
}
|
|
756
820
|
|
|
757
|
-
|
|
821
|
+
/** Logs all current receive slots */
|
|
822
|
+
}, {
|
|
823
|
+
key: "logAllReceiveSlots",
|
|
824
|
+
value: function logAllReceiveSlots() {
|
|
825
|
+
this.logMainVideoReceiveSlots();
|
|
826
|
+
this.logMainAudioReceiveSlots();
|
|
827
|
+
this.logSlidesVideoReceiveSlots();
|
|
828
|
+
this.logSlidesAudioReceiveSlots();
|
|
829
|
+
}
|
|
758
830
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
831
|
+
/**
|
|
832
|
+
* Makes sure we have the right number of receive slots created for the current layout
|
|
833
|
+
* and allocates them to the right video panes / pane groups
|
|
834
|
+
*
|
|
835
|
+
* @returns {Promise}
|
|
836
|
+
*/
|
|
837
|
+
}, {
|
|
838
|
+
key: "updateVideoReceiveSlots",
|
|
839
|
+
value: function () {
|
|
840
|
+
var _updateVideoReceiveSlots = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
841
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
842
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
843
|
+
case 0:
|
|
844
|
+
// move all active speaker slots to "unused"
|
|
845
|
+
this.trimActiveSpeakerSlots();
|
|
846
|
+
|
|
847
|
+
// move all no longer needed receiver-selected slots to "unused"
|
|
848
|
+
this.trimReceiverSelectedSlots();
|
|
849
|
+
|
|
850
|
+
// ensure we have enough total slots for current layout
|
|
851
|
+
_context7.next = 4;
|
|
852
|
+
return this.refillRequiredSlotsIfNeeded();
|
|
853
|
+
case 4:
|
|
854
|
+
// allocate the slots to the right panes / pane groups
|
|
855
|
+
// reset allocations
|
|
856
|
+
this.receiveSlotAllocations = {
|
|
857
|
+
activeSpeaker: {},
|
|
858
|
+
receiverSelected: {}
|
|
859
|
+
};
|
|
860
|
+
// allocate active speaker
|
|
861
|
+
this.allocateSlotsToActiveSpeakerPaneGroups();
|
|
862
|
+
// allocate receiver selected
|
|
863
|
+
this.allocateSlotsToReceiverSelectedVideoPaneGroups();
|
|
864
|
+
this.logMainVideoReceiveSlots();
|
|
865
|
+
|
|
866
|
+
// If this is the initial layout, there may be some "unused" slots left because of the preallocation
|
|
867
|
+
// done in this.preallocateVideoReceiveSlots(), so release them now
|
|
868
|
+
this.releaseUnusedVideoSlots();
|
|
869
|
+
case 9:
|
|
870
|
+
case "end":
|
|
871
|
+
return _context7.stop();
|
|
763
872
|
}
|
|
764
|
-
},
|
|
873
|
+
}, _callee7, this);
|
|
765
874
|
}));
|
|
766
|
-
|
|
767
875
|
function updateVideoReceiveSlots() {
|
|
768
876
|
return _updateVideoReceiveSlots.apply(this, arguments);
|
|
769
877
|
}
|
|
770
|
-
|
|
771
878
|
return updateVideoReceiveSlots;
|
|
772
879
|
}()
|
|
773
880
|
/**
|
|
774
881
|
* Creates new RemoteMedia and RemoteMediaGroup objects for the current layout
|
|
775
882
|
* and sends the media requests for all of them.
|
|
776
883
|
*/
|
|
777
|
-
|
|
778
884
|
}, {
|
|
779
885
|
key: "updateVideoRemoteMediaObjects",
|
|
780
886
|
value: function updateVideoRemoteMediaObjects() {
|
|
781
|
-
var
|
|
782
|
-
|
|
887
|
+
var _this7 = this;
|
|
783
888
|
// invalidate all the previous remote media objects and cancel their media requests
|
|
784
889
|
this.invalidateCurrentRemoteMedia({
|
|
785
890
|
audio: false,
|
|
786
891
|
video: true,
|
|
892
|
+
screenShareAudio: false,
|
|
893
|
+
screenShareVideo: false,
|
|
787
894
|
commit: false
|
|
788
|
-
});
|
|
895
|
+
});
|
|
789
896
|
|
|
897
|
+
// create new remoteMediaGroup objects
|
|
790
898
|
this.media.video.activeSpeakerGroups = {};
|
|
791
899
|
this.media.video.memberPanes = {};
|
|
792
|
-
|
|
793
900
|
var _loop = function _loop() {
|
|
794
|
-
var
|
|
795
|
-
|
|
901
|
+
var _this7$currentLayout, _this7$currentLayout$;
|
|
796
902
|
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) {
|
|
903
|
+
groupId = _Object$entries$_i[0],
|
|
904
|
+
group = _Object$entries$_i[1];
|
|
905
|
+
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
906
|
return groupInLayout.id === groupId;
|
|
802
907
|
});
|
|
803
|
-
|
|
804
908
|
if (paneGroupInCurrentLayout) {
|
|
805
|
-
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(
|
|
806
|
-
preferLiveVideo:
|
|
909
|
+
var mediaGroup = new _remoteMediaGroup.RemoteMediaGroup(_this7.mediaRequestManagers.video, group.slots, paneGroupInCurrentLayout.priority, false, {
|
|
910
|
+
preferLiveVideo: _this7.config.video.preferLiveVideo,
|
|
807
911
|
resolution: paneGroupInCurrentLayout.size
|
|
808
912
|
});
|
|
809
|
-
|
|
913
|
+
_this7.media.video.activeSpeakerGroups[groupId] = mediaGroup;
|
|
810
914
|
} else {
|
|
811
915
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
812
916
|
_loggerProxy.default.logger.warn("a group id ".concat(groupId, " from this.receiveSlotAllocations.activeSpeaker cannot be found in the current layout configuration"));
|
|
813
917
|
}
|
|
814
918
|
};
|
|
815
|
-
|
|
816
919
|
for (var _i = 0, _Object$entries = (0, _entries.default)(this.receiveSlotAllocations.activeSpeaker); _i < _Object$entries.length; _i++) {
|
|
817
920
|
_loop();
|
|
818
|
-
}
|
|
819
|
-
|
|
921
|
+
}
|
|
820
922
|
|
|
923
|
+
// create new remoteMedia objects
|
|
821
924
|
var _loop2 = function _loop2() {
|
|
822
|
-
var
|
|
823
|
-
|
|
925
|
+
var _this7$currentLayout2, _this7$currentLayout3;
|
|
824
926
|
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) {
|
|
927
|
+
paneId = _Object$entries3$_i[0],
|
|
928
|
+
slot = _Object$entries3$_i[1];
|
|
929
|
+
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
930
|
return paneInLayout.id === paneId;
|
|
830
931
|
});
|
|
831
|
-
|
|
832
932
|
if (paneInCurrentLayout) {
|
|
833
|
-
var remoteMedia = new _remoteMedia.RemoteMedia(slot,
|
|
933
|
+
var remoteMedia = new _remoteMedia.RemoteMedia(slot, _this7.mediaRequestManagers.video, {
|
|
834
934
|
resolution: paneInCurrentLayout.size
|
|
835
935
|
});
|
|
836
|
-
|
|
837
936
|
if (paneInCurrentLayout.csi) {
|
|
838
937
|
remoteMedia.sendMediaRequest(paneInCurrentLayout.csi, false);
|
|
839
938
|
}
|
|
840
|
-
|
|
841
|
-
_this6.media.video.memberPanes[paneId] = remoteMedia;
|
|
939
|
+
_this7.media.video.memberPanes[paneId] = remoteMedia;
|
|
842
940
|
} else {
|
|
843
941
|
// this should never happen, because this.receiveSlotAllocations are created based on current layout configuration
|
|
844
942
|
_loggerProxy.default.logger.warn("a pane id ".concat(paneId, " from this.receiveSlotAllocations.receiverSelected cannot be found in the current layout configuration"));
|
|
845
943
|
}
|
|
846
944
|
};
|
|
847
|
-
|
|
848
945
|
for (var _i2 = 0, _Object$entries3 = (0, _entries.default)(this.receiveSlotAllocations.receiverSelected); _i2 < _Object$entries3.length; _i2++) {
|
|
849
946
|
_loop2();
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
|
|
947
|
+
}
|
|
853
948
|
this.mediaRequestManagers.video.commit();
|
|
854
949
|
}
|
|
950
|
+
|
|
855
951
|
/**
|
|
856
|
-
*
|
|
952
|
+
* Checks if current layout requires a screen share.
|
|
953
|
+
* If it does, it creates new RemoteMediaGroup object for screen share
|
|
954
|
+
* and sends the media requests for it.
|
|
955
|
+
* If it doesn't, it makes sure we clean up any RemoteMediaGroup objects
|
|
956
|
+
* created earlier for screen share (for previous layout).
|
|
857
957
|
*/
|
|
958
|
+
}, {
|
|
959
|
+
key: "updateScreenShareVideoRemoteMediaObject",
|
|
960
|
+
value: function updateScreenShareVideoRemoteMediaObject() {
|
|
961
|
+
var _this$currentLayout4;
|
|
962
|
+
this.invalidateCurrentRemoteMedia({
|
|
963
|
+
audio: false,
|
|
964
|
+
video: false,
|
|
965
|
+
screenShareAudio: false,
|
|
966
|
+
screenShareVideo: true,
|
|
967
|
+
commit: false
|
|
968
|
+
});
|
|
969
|
+
this.media.screenShare.video = undefined;
|
|
970
|
+
if ((_this$currentLayout4 = this.currentLayout) !== null && _this$currentLayout4 !== void 0 && _this$currentLayout4.screenShareVideo) {
|
|
971
|
+
// we create a group of 1, because for screen share we need to use the "active speaker" policy
|
|
972
|
+
this.media.screenShare.video = new _remoteMediaGroup.RemoteMediaGroup(this.mediaRequestManagers.screenShareVideo, [this.slots.screenShare.video], 255, false, {
|
|
973
|
+
resolution: this.currentLayout.screenShareVideo.size
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
this.mediaRequestManagers.screenShareVideo.commit();
|
|
977
|
+
}
|
|
858
978
|
|
|
979
|
+
/**
|
|
980
|
+
* Invalidates all remote media objects belonging to currently selected layout
|
|
981
|
+
*/
|
|
859
982
|
}, {
|
|
860
983
|
key: "invalidateCurrentRemoteMedia",
|
|
861
984
|
value: function invalidateCurrentRemoteMedia(options) {
|
|
862
985
|
var audio = options.audio,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
986
|
+
video = options.video,
|
|
987
|
+
screenShareAudio = options.screenShareAudio,
|
|
988
|
+
screenShareVideo = options.screenShareVideo,
|
|
989
|
+
commit = options.commit;
|
|
866
990
|
if (audio && this.media.audio) {
|
|
867
991
|
this.media.audio.stop(commit);
|
|
868
992
|
}
|
|
869
|
-
|
|
870
993
|
if (video) {
|
|
871
994
|
(0, _values.default)(this.media.video.activeSpeakerGroups).forEach(function (remoteMediaGroup) {
|
|
872
995
|
remoteMediaGroup.stop(false);
|
|
@@ -874,21 +997,28 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
874
997
|
(0, _values.default)(this.media.video.memberPanes).forEach(function (remoteMedia) {
|
|
875
998
|
remoteMedia.stop(false);
|
|
876
999
|
});
|
|
877
|
-
|
|
878
1000
|
if (commit) {
|
|
879
1001
|
this.mediaRequestManagers.video.commit();
|
|
880
1002
|
}
|
|
881
1003
|
}
|
|
1004
|
+
if (screenShareAudio && this.media.screenShare.audio) {
|
|
1005
|
+
this.media.screenShare.audio.stop(commit);
|
|
1006
|
+
}
|
|
1007
|
+
if (screenShareVideo && this.media.screenShare.video) {
|
|
1008
|
+
this.media.screenShare.video.stop(commit);
|
|
1009
|
+
}
|
|
882
1010
|
}
|
|
883
|
-
/** emits Event.VideoLayoutChanged */
|
|
884
1011
|
|
|
1012
|
+
/** emits Event.VideoLayoutChanged */
|
|
885
1013
|
}, {
|
|
886
1014
|
key: "emitVideoLayoutChangedEvent",
|
|
887
1015
|
value: function emitVideoLayoutChangedEvent() {
|
|
1016
|
+
var _this$media$screenSha;
|
|
888
1017
|
// 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
|
|
1018
|
+
// wait for our media requests to be fulfilled, but there is no API for that right now (we could wait for source updates
|
|
890
1019
|
// but in some cases they might never come, or would need to always make sure to use a new set of receiver slots)
|
|
891
1020
|
// for now it's fine to have it like this, we will re-evaluate if it needs improving after more testing
|
|
1021
|
+
|
|
892
1022
|
this.emit({
|
|
893
1023
|
file: 'multistream/remoteMediaManager',
|
|
894
1024
|
function: 'emitVideoLayoutChangedEvent'
|
|
@@ -896,30 +1026,29 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
896
1026
|
layoutId: this.currentLayoutId,
|
|
897
1027
|
activeSpeakerVideoPanes: this.media.video.activeSpeakerGroups,
|
|
898
1028
|
memberVideoPanes: this.media.video.memberPanes,
|
|
899
|
-
screenShareVideo:
|
|
900
|
-
|
|
1029
|
+
screenShareVideo: (_this$media$screenSha = this.media.screenShare.video) === null || _this$media$screenSha === void 0 ? void 0 : _this$media$screenSha.getRemoteMedia()[0]
|
|
901
1030
|
});
|
|
902
1031
|
}
|
|
1032
|
+
|
|
903
1033
|
/**
|
|
904
1034
|
* Sets a new CSI on a given remote media object
|
|
905
1035
|
*
|
|
906
1036
|
* @param {RemoteMedia} remoteMedia remote Media object to modify
|
|
907
1037
|
* @param {CSI} csi new CSI value, can be null if we want to stop receiving media
|
|
908
1038
|
*/
|
|
909
|
-
|
|
910
1039
|
}, {
|
|
911
1040
|
key: "setRemoteVideoCsi",
|
|
912
1041
|
value: function setRemoteVideoCsi(remoteMedia, csi) {
|
|
913
1042
|
if (!(0, _values.default)(this.media.video.memberPanes).includes(remoteMedia)) {
|
|
914
1043
|
throw new Error('remoteMedia not found');
|
|
915
1044
|
}
|
|
916
|
-
|
|
917
1045
|
if (csi) {
|
|
918
1046
|
remoteMedia.sendMediaRequest(csi, true);
|
|
919
1047
|
} else {
|
|
920
1048
|
remoteMedia.cancelMediaRequest(true);
|
|
921
1049
|
}
|
|
922
1050
|
}
|
|
1051
|
+
|
|
923
1052
|
/**
|
|
924
1053
|
* Adds a new member video pane to the currently selected layout.
|
|
925
1054
|
*
|
|
@@ -928,68 +1057,53 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
928
1057
|
* @param {MemberVideoPane} newPane
|
|
929
1058
|
* @returns {Promise<RemoteMedia>}
|
|
930
1059
|
*/
|
|
931
|
-
|
|
932
1060
|
}, {
|
|
933
1061
|
key: "addMemberVideoPane",
|
|
934
1062
|
value: function () {
|
|
935
|
-
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
936
|
-
var _this$
|
|
937
|
-
|
|
1063
|
+
var _addMemberVideoPane = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(newPane) {
|
|
1064
|
+
var _this$currentLayout5;
|
|
938
1065
|
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
|
-
}
|
|
1066
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
1067
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
1068
|
+
case 0:
|
|
1069
|
+
if (this.currentLayout) {
|
|
1070
|
+
_context8.next = 2;
|
|
1071
|
+
break;
|
|
1072
|
+
}
|
|
1073
|
+
throw new Error('There is no current layout selected, call start() first');
|
|
1074
|
+
case 2:
|
|
1075
|
+
if (!((_this$currentLayout5 = this.currentLayout) !== null && _this$currentLayout5 !== void 0 && _this$currentLayout5.memberVideoPanes)) {
|
|
1076
|
+
this.currentLayout.memberVideoPanes = [];
|
|
1077
|
+
}
|
|
1078
|
+
if (!(newPane.id in this.currentLayout.memberVideoPanes)) {
|
|
1079
|
+
_context8.next = 5;
|
|
1080
|
+
break;
|
|
1081
|
+
}
|
|
1082
|
+
throw new Error("duplicate pane id ".concat(newPane.id, " - this pane already exists in current layout's memberVideoPanes"));
|
|
1083
|
+
case 5:
|
|
1084
|
+
this.currentLayout.memberVideoPanes.push(newPane);
|
|
1085
|
+
_context8.next = 8;
|
|
1086
|
+
return this.receiveSlotManager.allocateSlot(_internalMediaCore.MediaType.VideoMain);
|
|
1087
|
+
case 8:
|
|
1088
|
+
receiveSlot = _context8.sent;
|
|
1089
|
+
this.slots.video.receiverSelected.push(receiveSlot);
|
|
1090
|
+
remoteMedia = new _remoteMedia.RemoteMedia(receiveSlot, this.mediaRequestManagers.video, {
|
|
1091
|
+
resolution: newPane.size
|
|
1092
|
+
});
|
|
1093
|
+
if (newPane.csi) {
|
|
1094
|
+
remoteMedia.sendMediaRequest(newPane.csi, true);
|
|
1095
|
+
}
|
|
1096
|
+
this.media.video.memberPanes[newPane.id] = remoteMedia;
|
|
1097
|
+
return _context8.abrupt("return", remoteMedia);
|
|
1098
|
+
case 14:
|
|
1099
|
+
case "end":
|
|
1100
|
+
return _context8.stop();
|
|
985
1101
|
}
|
|
986
|
-
},
|
|
1102
|
+
}, _callee8, this);
|
|
987
1103
|
}));
|
|
988
|
-
|
|
989
1104
|
function addMemberVideoPane(_x2) {
|
|
990
1105
|
return _addMemberVideoPane.apply(this, arguments);
|
|
991
1106
|
}
|
|
992
|
-
|
|
993
1107
|
return addMemberVideoPane;
|
|
994
1108
|
}()
|
|
995
1109
|
/**
|
|
@@ -1000,49 +1114,40 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1000
1114
|
* @param {PaneId} paneId pane id of the pane to remove
|
|
1001
1115
|
* @returns {Promise<void>}
|
|
1002
1116
|
*/
|
|
1003
|
-
|
|
1004
1117
|
}, {
|
|
1005
1118
|
key: "removeMemberVideoPane",
|
|
1006
1119
|
value: function removeMemberVideoPane(paneId) {
|
|
1007
1120
|
var _this$currentLayout$m2, _this$currentLayout$m3;
|
|
1008
|
-
|
|
1009
1121
|
if (!this.currentLayout) {
|
|
1010
1122
|
return _promise.default.reject(new Error('There is no current layout selected, call start() first'));
|
|
1011
1123
|
}
|
|
1012
|
-
|
|
1013
1124
|
if (!((_this$currentLayout$m2 = this.currentLayout.memberVideoPanes) !== null && _this$currentLayout$m2 !== void 0 && _this$currentLayout$m2.find(function (pane) {
|
|
1014
1125
|
return pane.id === paneId;
|
|
1015
1126
|
}))) {
|
|
1016
1127
|
// pane id doesn't exist, so nothing to do
|
|
1017
1128
|
_loggerProxy.default.logger.log("RemoteMediaManager#removeMemberVideoPane --> removeMemberVideoPane() called for a non-existent paneId: ".concat(paneId, " (pane not found in currentLayout.memberVideoPanes)"));
|
|
1018
|
-
|
|
1019
1129
|
return _promise.default.resolve();
|
|
1020
1130
|
}
|
|
1021
|
-
|
|
1022
1131
|
if (!this.media.video.memberPanes[paneId]) {
|
|
1023
1132
|
// pane id doesn't exist, so nothing to do
|
|
1024
1133
|
_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
1134
|
return _promise.default.resolve();
|
|
1027
1135
|
}
|
|
1028
|
-
|
|
1029
1136
|
var remoteMedia = this.media.video.memberPanes[paneId];
|
|
1030
1137
|
var receiveSlot = remoteMedia.getUnderlyingReceiveSlot();
|
|
1031
|
-
|
|
1032
1138
|
if (receiveSlot) {
|
|
1033
1139
|
this.receiveSlotManager.releaseSlot(receiveSlot);
|
|
1034
1140
|
var index = this.slots.video.receiverSelected.indexOf(receiveSlot);
|
|
1035
|
-
|
|
1036
1141
|
if (index >= 0) {
|
|
1037
1142
|
this.slots.video.receiverSelected.splice(index, 1);
|
|
1038
1143
|
}
|
|
1039
1144
|
}
|
|
1040
|
-
|
|
1041
1145
|
remoteMedia.stop();
|
|
1042
1146
|
delete this.media.video.memberPanes[paneId];
|
|
1043
1147
|
(_this$currentLayout$m3 = this.currentLayout.memberVideoPanes) === null || _this$currentLayout$m3 === void 0 ? true : delete _this$currentLayout$m3[paneId];
|
|
1044
1148
|
return _promise.default.resolve();
|
|
1045
1149
|
}
|
|
1150
|
+
|
|
1046
1151
|
/**
|
|
1047
1152
|
* Pins an active speaker remote media object to the given CSI value. From that moment
|
|
1048
1153
|
* onwards the remote media will only play audio/video from that specific CSI until
|
|
@@ -1051,39 +1156,35 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1051
1156
|
* @param {RemoteMedia} remoteMedia remote media object reference
|
|
1052
1157
|
* @param {CSI} csi CSI value to pin to, if undefined, then current CSI value is used
|
|
1053
1158
|
*/
|
|
1054
|
-
|
|
1055
1159
|
}, {
|
|
1056
1160
|
key: "pinActiveSpeakerVideoPane",
|
|
1057
1161
|
value: function pinActiveSpeakerVideoPane(remoteMedia, csi) {
|
|
1058
1162
|
var remoteMediaGroup = (0, _values.default)(this.media.video.activeSpeakerGroups).find(function (group) {
|
|
1059
1163
|
return group.includes(remoteMedia, 'unpinned');
|
|
1060
1164
|
});
|
|
1061
|
-
|
|
1062
1165
|
if (!remoteMediaGroup) {
|
|
1063
1166
|
throw new Error('remoteMedia not found among the unpinned remote media from any active speaker group');
|
|
1064
1167
|
}
|
|
1065
|
-
|
|
1066
1168
|
remoteMediaGroup.pin(remoteMedia, csi);
|
|
1067
1169
|
}
|
|
1170
|
+
|
|
1068
1171
|
/**
|
|
1069
1172
|
* Unpins a remote media object from the fixed CSI value it was pinned to.
|
|
1070
1173
|
*
|
|
1071
1174
|
* @param {RemoteMedia} remoteMedia remote media object reference
|
|
1072
1175
|
*/
|
|
1073
|
-
|
|
1074
1176
|
}, {
|
|
1075
1177
|
key: "unpinActiveSpeakerVideoPane",
|
|
1076
1178
|
value: function unpinActiveSpeakerVideoPane(remoteMedia) {
|
|
1077
1179
|
var remoteMediaGroup = (0, _values.default)(this.media.video.activeSpeakerGroups).find(function (group) {
|
|
1078
1180
|
return group.includes(remoteMedia, 'pinned');
|
|
1079
1181
|
});
|
|
1080
|
-
|
|
1081
1182
|
if (!remoteMediaGroup) {
|
|
1082
1183
|
throw new Error('remoteMedia not found among the pinned remote media from any active speaker group');
|
|
1083
1184
|
}
|
|
1084
|
-
|
|
1085
1185
|
remoteMediaGroup.unpin(remoteMedia);
|
|
1086
1186
|
}
|
|
1187
|
+
|
|
1087
1188
|
/**
|
|
1088
1189
|
* Returns true if a given remote media object belongs to an active speaker group and has been pinned.
|
|
1089
1190
|
* Throws an error if the remote media object doesn't belong to any active speaker remote media group.
|
|
@@ -1091,23 +1192,19 @@ var RemoteMediaManager = /*#__PURE__*/function (_EventsScope) {
|
|
|
1091
1192
|
* @param {RemoteMedia} remoteMedia remote media object
|
|
1092
1193
|
* @returns {boolean}
|
|
1093
1194
|
*/
|
|
1094
|
-
|
|
1095
1195
|
}, {
|
|
1096
1196
|
key: "isPinned",
|
|
1097
1197
|
value: function isPinned(remoteMedia) {
|
|
1098
1198
|
var remoteMediaGroup = (0, _values.default)(this.media.video.activeSpeakerGroups).find(function (group) {
|
|
1099
1199
|
return group.includes(remoteMedia);
|
|
1100
1200
|
});
|
|
1101
|
-
|
|
1102
1201
|
if (!remoteMediaGroup) {
|
|
1103
1202
|
throw new Error('remoteMedia not found among any remote media (pinned or unpinned) from any active speaker group');
|
|
1104
1203
|
}
|
|
1105
|
-
|
|
1106
1204
|
return remoteMediaGroup.isPinned(remoteMedia);
|
|
1107
1205
|
}
|
|
1108
1206
|
}]);
|
|
1109
1207
|
return RemoteMediaManager;
|
|
1110
1208
|
}(_eventsScope.default);
|
|
1111
|
-
|
|
1112
1209
|
exports.RemoteMediaManager = RemoteMediaManager;
|
|
1113
1210
|
//# sourceMappingURL=remoteMediaManager.js.map
|