@webex/plugin-meetings 3.0.0-beta.4 → 3.0.0-beta.400
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -8
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +41 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +11 -15
- package/dist/config.js.map +1 -1
- package/dist/constants.js +347 -74
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +125 -18
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.js +93 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +380 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +101 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +564 -246
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +10 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +82 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +314 -163
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +107 -231
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +137 -222
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +316 -501
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +97 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +5311 -3871
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +260 -183
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +421 -347
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +672 -585
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +172 -0
- package/dist/meeting/voicea-meeting.js.map +1 -0
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +87 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +352 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +99 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +147 -234
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +43 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +895 -600
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +184 -157
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +134 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +158 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +194 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +324 -259
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +19 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +263 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +82 -45
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +657 -448
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +255 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +297 -460
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +20 -26
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +413 -483
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +362 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +102 -86
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +131 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +437 -116
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +179 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +557 -583
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +326 -130
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1088 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +272 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +241 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +167 -0
- package/dist/types/meeting/index.d.ts +1824 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +293 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +118 -0
- package/dist/types/meeting/voicea-meeting.d.ts +16 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +389 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +120 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +301 -0
- package/dist/types/multistream/sendSlotManager.d.ts +70 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +105 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +8 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +136 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/internal-README.md +7 -6
- package/package.json +30 -21
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +26 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +19 -21
- package/src/constants.ts +296 -27
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +45 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +349 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +561 -119
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +97 -17
- package/src/locus-info/{parser.js → parser.ts} +303 -104
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +460 -0
- package/src/media/properties.ts +283 -0
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +249 -0
- package/src/meeting/in-meeting-actions.ts +199 -3
- package/src/meeting/index.ts +8494 -0
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +465 -0
- package/src/meeting/request.ts +912 -0
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +799 -0
- package/src/meeting/voicea-meeting.ts +122 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +210 -0
- package/src/meeting-info/meeting-info-v2.ts +423 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +70 -58
- package/src/meeting-info/{utilv2.js → utilv2.ts} +99 -82
- package/src/meetings/collection.ts +76 -0
- package/src/meetings/index.ts +1539 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +133 -38
- package/src/member/{index.js → index.ts} +159 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +397 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +351 -146
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +353 -0
- package/src/metrics/{constants.js → constants.ts} +17 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +341 -64
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +82 -3
- package/src/multistream/remoteMediaManager.ts +401 -81
- package/src/multistream/sendSlotManager.ts +199 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +371 -0
- package/src/reachability/request.ts +50 -35
- package/src/reachability/util.ts +24 -0
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/index.ts +643 -0
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +332 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/index.ts +288 -0
- package/src/roap/request.ts +153 -0
- package/src/roap/turnDiscovery.ts +374 -70
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +166 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1275 -0
- package/src/statsAnalyzer/mqaUtil.ts +440 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +791 -531
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +238 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1793 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +625 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1458 -21
- package/test/unit/spec/locus-info/infoUtils.js +71 -40
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
- package/test/unit/spec/locus-info/parser.js +119 -44
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +291 -12
- package/test/unit/spec/media/index.ts +194 -111
- package/test/unit/spec/media/properties.ts +11 -11
- package/test/unit/spec/meeting/in-meeting-actions.ts +96 -3
- package/test/unit/spec/meeting/index.js +8616 -1921
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +568 -207
- package/test/unit/spec/meeting/request.js +602 -82
- package/test/unit/spec/meeting/utils.js +867 -179
- package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +631 -78
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +27 -1
- package/test/unit/spec/meetings/index.js +1826 -374
- package/test/unit/spec/meetings/utils.js +243 -14
- package/test/unit/spec/member/index.js +61 -7
- package/test/unit/spec/member/util.js +526 -26
- package/test/unit/spec/members/index.js +536 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +217 -4
- package/test/unit/spec/metrics/index.js +13 -68
- package/test/unit/spec/multistream/mediaRequestManager.ts +1032 -110
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +350 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +937 -65
- package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +606 -26
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +222 -34
- package/test/unit/spec/recording-controller/index.js +306 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +238 -82
- package/test/unit/spec/roap/request.ts +255 -0
- package/test/unit/spec/roap/turnDiscovery.ts +707 -110
- package/test/unit/spec/rtcMetrics/index.ts +122 -0
- package/test/unit/spec/stats-analyzer/index.js +1331 -62
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +65 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/media/properties.js +0 -289
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/request.js +0 -684
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/collection.js +0 -40
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/reachability/index.js +0 -464
- package/src/reconnection-manager/index.js +0 -519
- package/src/roap/index.js +0 -220
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
|
@@ -5,10 +5,12 @@ import {assert} from '@webex/test-helper-chai';
|
|
|
5
5
|
import {skipInNode} from '@webex/test-helper-mocha';
|
|
6
6
|
import sinon from 'sinon';
|
|
7
7
|
|
|
8
|
-
import BrowserDetection from '@webex/plugin-meetings/
|
|
8
|
+
import BrowserDetection from '@webex/plugin-meetings/dist/common/browser-detection';
|
|
9
|
+
import {createCameraStream, createDisplayStream, createMicrophoneStream, LocalTrackEvents, LocalStreamEventNames} from '@webex/plugin-meetings';
|
|
9
10
|
|
|
10
|
-
import DEFAULT_RESOLUTIONS from '../../../src/config';
|
|
11
11
|
import testUtils from '../../utils/testUtils';
|
|
12
|
+
import integrationTestUtils from '../../utils/integrationTestUtils';
|
|
13
|
+
import {EVENT_TRIGGERS} from '../../../dist/constants';
|
|
12
14
|
|
|
13
15
|
require('dotenv').config();
|
|
14
16
|
|
|
@@ -18,31 +20,73 @@ const {isBrowser} = BrowserDetection();
|
|
|
18
20
|
|
|
19
21
|
let userSet, alice, bob, chris, enumerateSpy, channelUrlA, channelUrlB;
|
|
20
22
|
|
|
23
|
+
const localStreams = {
|
|
24
|
+
alice: {
|
|
25
|
+
microphone: undefined,
|
|
26
|
+
camera: undefined,
|
|
27
|
+
screenShare: {
|
|
28
|
+
video: undefined,
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
bob: {
|
|
32
|
+
microphone: undefined,
|
|
33
|
+
camera: undefined,
|
|
34
|
+
screenShare: {
|
|
35
|
+
video: undefined,
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
chris: {
|
|
39
|
+
microphone: undefined,
|
|
40
|
+
camera: undefined,
|
|
41
|
+
screenShare: {
|
|
42
|
+
video: undefined,
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Updated expectedPublished from a boolean value to an object containing the stream and status properties
|
|
48
|
+
const waitForPublished = (meeting, expectedPublished, description) => {
|
|
49
|
+
return testUtils.waitForEvents([{
|
|
50
|
+
scope: meeting,
|
|
51
|
+
event: EVENT_TRIGGERS.MEETING_STREAM_PUBLISH_STATE_CHANGED,
|
|
52
|
+
match: (event) => {
|
|
53
|
+
console.log(`${description} is now ${event.isPublished ? 'published': 'not published'}`);
|
|
54
|
+
return (event.isPublished === expectedPublished.status && event.stream.id === expectedPublished.stream.id) ;
|
|
55
|
+
}
|
|
56
|
+
}]);
|
|
57
|
+
};
|
|
58
|
+
|
|
21
59
|
skipInNode(describe)('plugin-meetings', () => {
|
|
22
60
|
describe('journey', () => {
|
|
23
|
-
before(() =>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
61
|
+
before(() =>
|
|
62
|
+
webexTestUsers
|
|
63
|
+
.generateTestUsers({
|
|
64
|
+
count: 3,
|
|
65
|
+
whistler: process.env.WHISTLER || process.env.JENKINS,
|
|
66
|
+
})
|
|
67
|
+
.then((users) => {
|
|
68
|
+
userSet = users;
|
|
69
|
+
alice = userSet[0];
|
|
70
|
+
bob = userSet[1];
|
|
71
|
+
chris = userSet[2];
|
|
72
|
+
alice.name = 'alice';
|
|
73
|
+
bob.name = 'bob';
|
|
74
|
+
chris.name = 'chris';
|
|
75
|
+
alice.webex.meetings.name = 'alice';
|
|
76
|
+
bob.webex.meetings.name = 'bob';
|
|
77
|
+
chris.webex.meetings.name = 'chris';
|
|
78
|
+
channelUrlA =
|
|
79
|
+
'https://board-a.wbx2.com/board/api/v1/channels/49cfb550-5517-11eb-a2af-1b9e4bc3da13';
|
|
80
|
+
channelUrlB =
|
|
81
|
+
'https://board-a.wbx2.com/board/api/v1/channels/977a7330-54f4-11eb-b1ef-91f5eefc7bf3';
|
|
82
|
+
})
|
|
83
|
+
.then(() =>
|
|
84
|
+
Promise.all([testUtils.syncAndEndMeeting(alice), testUtils.syncAndEndMeeting(bob)])
|
|
85
|
+
)
|
|
86
|
+
.catch((error) => {
|
|
87
|
+
throw error;
|
|
88
|
+
})
|
|
89
|
+
);
|
|
46
90
|
|
|
47
91
|
before(() => {
|
|
48
92
|
enumerateSpy = sinon.spy(navigator.mediaDevices, 'enumerateDevices');
|
|
@@ -68,40 +112,51 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
68
112
|
bob.meeting = null;
|
|
69
113
|
});
|
|
70
114
|
|
|
71
|
-
it('Alice Ends a outgoing meeting', () =>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
115
|
+
it('Alice Ends a outgoing meeting', () =>
|
|
116
|
+
Promise.all([
|
|
117
|
+
testUtils.delayedPromise(alice.webex.meetings.create(bob.emailAddress)),
|
|
118
|
+
testUtils.waitForEvents([
|
|
119
|
+
{scope: alice.webex.meetings, event: 'meeting:added', user: alice},
|
|
120
|
+
]),
|
|
121
|
+
])
|
|
122
|
+
.then(() =>
|
|
123
|
+
Promise.all([
|
|
124
|
+
testUtils.delayedPromise(alice.meeting.join()),
|
|
125
|
+
testUtils.waitForEvents([
|
|
126
|
+
{scope: bob.webex.meetings, event: 'meeting:added', user: bob},
|
|
127
|
+
]),
|
|
128
|
+
])
|
|
129
|
+
)
|
|
130
|
+
.then(() => {
|
|
131
|
+
// bob and alice have meeting object
|
|
132
|
+
bob.meeting.acknowledge('INCOMING');
|
|
133
|
+
assert.equal(bob.meeting.sipUri, alice.emailAddress);
|
|
134
|
+
assert.equal(alice.meeting.sipUri, bob.emailAddress);
|
|
135
|
+
assert.equal(bob.meeting.state, 'IDLE');
|
|
136
|
+
assert.equal(alice.meeting.state, 'JOINED');
|
|
137
|
+
})
|
|
138
|
+
.then(function aliceLeavesMeetingAndBobGetsMeetingRemoved() {
|
|
139
|
+
return Promise.all([
|
|
140
|
+
testUtils.delayedPromise(alice.meeting.leave()),
|
|
141
|
+
testUtils.waitForEvents([
|
|
142
|
+
{scope: bob.webex.meetings, event: 'meeting:removed', user: bob},
|
|
143
|
+
]),
|
|
144
|
+
]);
|
|
145
|
+
})
|
|
146
|
+
.then(() => testUtils.waitForStateChange(alice.meeting, 'LEFT'))
|
|
147
|
+
.then(() =>
|
|
148
|
+
Promise.all([
|
|
149
|
+
testUtils.waitForCallEnded(alice, bob.emailAddress),
|
|
150
|
+
testUtils.waitForCallEnded(bob, alice.emailAddress),
|
|
151
|
+
])
|
|
152
|
+
)
|
|
153
|
+
.then(() => {
|
|
154
|
+
assert.equal(alice.webex.meetings.getMeetingByType('sipUri', bob.emailAddress), null);
|
|
155
|
+
assert.equal(bob.webex.meetings.getMeetingByType('sipUri', alice.emailAddress), null);
|
|
156
|
+
})
|
|
157
|
+
.catch((err) => {
|
|
158
|
+
throw err;
|
|
159
|
+
}));
|
|
105
160
|
});
|
|
106
161
|
|
|
107
162
|
// The event was coming but incomplete
|
|
@@ -109,95 +164,122 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
109
164
|
|
|
110
165
|
// Alice calls bob and bob rejects it
|
|
111
166
|
xdescribe('reject Incoming Call', () => {
|
|
112
|
-
it('alice dials bob and bob receives meeting added', () =>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
it('alice dials bob and bob receives meeting added', () =>
|
|
168
|
+
Promise.all([
|
|
169
|
+
testUtils.delayedPromise(alice.webex.meetings.create(bob.emailAddress)),
|
|
170
|
+
testUtils.waitForEvents([
|
|
171
|
+
{scope: alice.webex.meetings, event: 'meeting:added', user: alice},
|
|
172
|
+
]),
|
|
173
|
+
])
|
|
174
|
+
.then(() =>
|
|
175
|
+
Promise.all([
|
|
176
|
+
testUtils.delayedPromise(alice.meeting.join()),
|
|
177
|
+
testUtils.waitForEvents([
|
|
178
|
+
{scope: bob.webex.meetings, event: 'meeting:added', user: bob},
|
|
179
|
+
]),
|
|
180
|
+
])
|
|
181
|
+
)
|
|
182
|
+
.then(function alicebobJoined() {
|
|
183
|
+
assert.exists(bob.meeting);
|
|
184
|
+
assert.exists(alice.meeting);
|
|
185
|
+
assert.equal(bob.meeting.sipUri, alice.emailAddress);
|
|
186
|
+
assert.equal(alice.meeting.sipUri, bob.emailAddress);
|
|
187
|
+
assert.exists(bob.meeting.partner);
|
|
188
|
+
assert.exists(alice.meeting.partner);
|
|
189
|
+
})
|
|
190
|
+
.then(function bobState() {
|
|
191
|
+
testUtils.waitForStateChange(bob.meeting, 'IDLE');
|
|
192
|
+
})
|
|
193
|
+
.then(function aliceState() {
|
|
194
|
+
testUtils.waitForStateChange(alice.meeting, 'JOINED');
|
|
195
|
+
})
|
|
196
|
+
.then(function bobDeclinedCall() {
|
|
197
|
+
return bob.meeting
|
|
198
|
+
.acknowledge('INCOMING')
|
|
199
|
+
.then(() => bob.meeting.decline('BUSY'))
|
|
200
|
+
.then(() => testUtils.waitForStateChange(bob.meeting, 'DECLINED'))
|
|
201
|
+
.catch((e) => {
|
|
202
|
+
console.error('Bob decline call not successful', e);
|
|
203
|
+
throw e;
|
|
204
|
+
});
|
|
205
|
+
})
|
|
206
|
+
.then(function aliceLeaveMeeting() {
|
|
207
|
+
assert.equal(alice.meeting.state, 'JOINED');
|
|
208
|
+
|
|
209
|
+
return alice.meeting
|
|
210
|
+
.leave()
|
|
211
|
+
.then(() => testUtils.waitForStateChange(alice.meeting, 'LEFT'))
|
|
212
|
+
.then(() => testUtils.waitForStateChange(bob.meeting, 'DECLINED'))
|
|
213
|
+
.catch((e) => {
|
|
214
|
+
console.error('alice was not able to leave the meeting', e);
|
|
215
|
+
throw e;
|
|
216
|
+
});
|
|
217
|
+
})
|
|
218
|
+
.then(function WaitForMeetingEnd() {
|
|
219
|
+
return Promise.all([
|
|
220
|
+
testUtils.waitForCallEnded(alice, bob.emailAddress),
|
|
221
|
+
testUtils.waitForCallEnded(bob, alice.emailAddress),
|
|
222
|
+
])
|
|
223
|
+
.then(() => {
|
|
224
|
+
assert.equal(
|
|
225
|
+
alice.webex.meetings.getMeetingByType('sipUri', bob.emailAddress),
|
|
226
|
+
null
|
|
227
|
+
);
|
|
228
|
+
assert.equal(
|
|
229
|
+
bob.webex.meetings.getMeetingByType('sipUri', alice.emailAddress),
|
|
230
|
+
null
|
|
231
|
+
);
|
|
232
|
+
})
|
|
233
|
+
.catch((e) => {
|
|
234
|
+
console.error('Alice bob meeting is deleted', e);
|
|
235
|
+
throw e;
|
|
236
|
+
});
|
|
237
|
+
}));
|
|
168
238
|
});
|
|
169
239
|
|
|
170
240
|
// Enabled when config.enableUnifiedMeetings = true
|
|
171
241
|
xdescribe('Conversation URL', () => {
|
|
172
|
-
describe('Successful 1:1 meeting',
|
|
242
|
+
describe('Successful 1:1 meeting', () => {
|
|
173
243
|
it('Fetch meeting information with a conversation URL for a 1:1 space', async () => {
|
|
174
244
|
assert.equal(Object.keys(bob.webex.meetings.getAllMeetings()), 0);
|
|
175
245
|
assert.equal(Object.keys(chris.webex.meetings.getAllMeetings()), 0);
|
|
176
246
|
|
|
177
|
-
const conversation = await chris.webex.internal.conversation.create({
|
|
247
|
+
const conversation = await chris.webex.internal.conversation.create({
|
|
248
|
+
participants: [bob],
|
|
249
|
+
});
|
|
178
250
|
|
|
179
|
-
await chris.webex.internal.conversation.post(conversation, {
|
|
251
|
+
await chris.webex.internal.conversation.post(conversation, {
|
|
252
|
+
displayName: 'hello world how are you ',
|
|
253
|
+
});
|
|
180
254
|
|
|
181
255
|
await Promise.all([
|
|
182
|
-
testUtils.delayedPromise(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
256
|
+
testUtils.delayedPromise(
|
|
257
|
+
chris.webex.meetings.create(conversation.url, 'CONVERSATION_URL')
|
|
258
|
+
),
|
|
259
|
+
testUtils.waitForEvents([
|
|
260
|
+
{scope: chris.webex.meetings, event: 'meeting:added', user: chris},
|
|
261
|
+
]),
|
|
262
|
+
]).then(function chrisJoinsMeeting() {
|
|
263
|
+
return Promise.all([
|
|
264
|
+
testUtils.delayedPromise(chris.meeting.join()),
|
|
265
|
+
testUtils
|
|
266
|
+
.waitForEvents([
|
|
267
|
+
{scope: bob.webex.meetings, event: 'meeting:added', user: bob},
|
|
268
|
+
{scope: chris.meeting, event: 'meeting:stateChange', user: chris},
|
|
269
|
+
])
|
|
270
|
+
.then((response) => {
|
|
271
|
+
assert.equal(response[0].result.payload.currentState, 'ACTIVE');
|
|
272
|
+
}),
|
|
273
|
+
]);
|
|
274
|
+
});
|
|
195
275
|
});
|
|
196
276
|
|
|
197
277
|
it('Fetch meeting information with invalid conversation URL and throws error', () => {
|
|
198
|
-
chris.webex.meetings.meetingInfo
|
|
199
|
-
|
|
200
|
-
|
|
278
|
+
chris.webex.meetings.meetingInfo
|
|
279
|
+
.fetchMeetingInfo('http://some-invalid.com', 'CONVERSATION_URL')
|
|
280
|
+
.then((response) => {
|
|
281
|
+
assert(response.result === '404');
|
|
282
|
+
});
|
|
201
283
|
});
|
|
202
284
|
});
|
|
203
285
|
});
|
|
@@ -207,7 +289,11 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
207
289
|
// Workaround since getDisplayMedia requires a user gesture to be activated, and this is a integration tests
|
|
208
290
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1580944
|
|
209
291
|
if (isBrowser('firefox') || isBrowser('safari')) {
|
|
210
|
-
sinon.replace(
|
|
292
|
+
sinon.replace(
|
|
293
|
+
navigator.mediaDevices,
|
|
294
|
+
'getDisplayMedia',
|
|
295
|
+
navigator.mediaDevices.getUserMedia
|
|
296
|
+
);
|
|
211
297
|
}
|
|
212
298
|
|
|
213
299
|
this.timeout(80000);
|
|
@@ -217,76 +303,110 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
217
303
|
assert.equal(Object.keys(bob.webex.meetings.getAllMeetings()), 0);
|
|
218
304
|
assert.equal(Object.keys(alice.webex.meetings.getAllMeetings()), 0);
|
|
219
305
|
|
|
220
|
-
return alice.webex.internal.conversation
|
|
221
|
-
.
|
|
306
|
+
return alice.webex.internal.conversation
|
|
307
|
+
.create({participants: [bob]})
|
|
308
|
+
.then((conversation) =>
|
|
309
|
+
alice.webex.internal.conversation.post(conversation, {
|
|
310
|
+
displayName: 'hello world how are you ',
|
|
311
|
+
})
|
|
312
|
+
);
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
it('alice creates local microphone and camera tracks', async () => {
|
|
316
|
+
localStreams.alice.microphone = await createMicrophoneStream();
|
|
317
|
+
localStreams.alice.camera = await createCameraStream();
|
|
222
318
|
});
|
|
223
319
|
|
|
224
|
-
it('alice dials bob and adds media', () =>
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
])
|
|
228
|
-
.then(function aliceJoinsMeeting() {
|
|
229
|
-
return Promise.all([
|
|
230
|
-
testUtils.delayedPromise(alice.meeting.join()),
|
|
231
|
-
testUtils.waitForEvents([{scope: bob.webex.meetings, event: 'meeting:added', user: bob},
|
|
232
|
-
{scope: alice.meeting, event: 'meeting:stateChange', user: alice}])
|
|
233
|
-
.then((response) => {
|
|
234
|
-
assert.equal(response[0].result.payload.currentState, 'ACTIVE');
|
|
235
|
-
})
|
|
236
|
-
]);
|
|
237
|
-
})
|
|
238
|
-
.then(() => {
|
|
239
|
-
assert.equal(bob.meeting.partner.state, 'JOINED');
|
|
240
|
-
// Wait for openH264 to finsish downloading and peerConnection to be stable
|
|
241
|
-
testUtils.waitUntil(4000);
|
|
242
|
-
})
|
|
243
|
-
.then(() => Promise.all([
|
|
244
|
-
testUtils.addMedia(alice),
|
|
320
|
+
it('alice dials bob and adds media', () =>
|
|
321
|
+
Promise.all([
|
|
322
|
+
testUtils.delayedPromise(alice.webex.meetings.create(bob.emailAddress)),
|
|
245
323
|
testUtils.waitForEvents([
|
|
246
|
-
{scope: alice.
|
|
247
|
-
])
|
|
248
|
-
])
|
|
249
|
-
|
|
324
|
+
{scope: alice.webex.meetings, event: 'meeting:added', user: alice},
|
|
325
|
+
]),
|
|
326
|
+
])
|
|
327
|
+
.then(function aliceJoinsMeeting() {
|
|
328
|
+
return Promise.all([
|
|
329
|
+
testUtils.delayedPromise(alice.meeting.join()),
|
|
330
|
+
testUtils
|
|
331
|
+
.waitForEvents([
|
|
332
|
+
{scope: bob.webex.meetings, event: 'meeting:added', user: bob},
|
|
333
|
+
{scope: alice.meeting, event: 'meeting:stateChange', user: alice},
|
|
334
|
+
])
|
|
335
|
+
.then((response) => {
|
|
336
|
+
assert.equal(response[0].result.payload.currentState, 'ACTIVE');
|
|
337
|
+
}),
|
|
338
|
+
]);
|
|
339
|
+
})
|
|
340
|
+
.then(() => {
|
|
341
|
+
assert.equal(bob.meeting.partner.state, 'JOINED');
|
|
342
|
+
// Wait for openH264 to finsish downloading and peerConnection to be stable
|
|
343
|
+
testUtils.waitUntil(4000);
|
|
344
|
+
})
|
|
345
|
+
.then(() =>
|
|
346
|
+
Promise.all([
|
|
347
|
+
integrationTestUtils.addMedia(alice, {microphone: localStreams.alice.microphone, camera: localStreams.alice.camera}),
|
|
348
|
+
testUtils.waitForEvents([
|
|
349
|
+
{scope: alice.meeting, event: 'meeting:media:local:start', user: alice},
|
|
350
|
+
]),
|
|
351
|
+
])
|
|
352
|
+
)
|
|
353
|
+
.then(() => assert(enumerateSpy.called)));
|
|
250
354
|
|
|
251
355
|
it('bob joins the meeting', () => {
|
|
252
|
-
const checkBobIsInMeeting = (event) =>
|
|
356
|
+
const checkBobIsInMeeting = (event) =>
|
|
357
|
+
!!event.delta.updated.find(
|
|
358
|
+
(member) => bob.meeting.members.selfId === member.id && member.status === 'IN_MEETING'
|
|
359
|
+
);
|
|
253
360
|
|
|
254
361
|
return Promise.all([
|
|
255
362
|
bob.meeting.acknowledge('INCOMING').then(() => bob.meeting.join()),
|
|
256
|
-
testUtils.waitForEvents([
|
|
257
|
-
|
|
258
|
-
|
|
363
|
+
testUtils.waitForEvents([
|
|
364
|
+
{
|
|
365
|
+
scope: alice.meeting.members,
|
|
366
|
+
event: 'members:update',
|
|
367
|
+
user: alice,
|
|
368
|
+
match: checkBobIsInMeeting,
|
|
369
|
+
},
|
|
370
|
+
]),
|
|
259
371
|
]);
|
|
260
372
|
});
|
|
261
373
|
|
|
262
|
-
it('bob
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
374
|
+
it('bob creates local microphone and camera tracks', async () => {
|
|
375
|
+
localStreams.bob.microphone = await createMicrophoneStream();
|
|
376
|
+
localStreams.bob.camera = await createCameraStream();
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
it('bob adds media to the meeting', () =>
|
|
380
|
+
Promise.all([
|
|
381
|
+
integrationTestUtils.addMedia(bob, {microphone: localStreams.bob.microphone, camera: localStreams.bob.camera}),
|
|
382
|
+
testUtils
|
|
383
|
+
.waitForEvents([
|
|
384
|
+
{scope: bob.meeting, event: 'meeting:media:local:start', user: bob},
|
|
385
|
+
{scope: alice.meeting, event: 'meeting:media:remote:start', user: alice},
|
|
386
|
+
])
|
|
387
|
+
.catch((e) => {
|
|
388
|
+
console.error('Error on remote and local start event', e);
|
|
389
|
+
throw e;
|
|
390
|
+
}),
|
|
391
|
+
])
|
|
392
|
+
.then(() => {
|
|
393
|
+
assert.equal(bob.meeting.sipUri, alice.id);
|
|
394
|
+
assert.equal(alice.meeting.sipUri, bob.id);
|
|
395
|
+
assert.exists(alice.meeting.members.locusUrl);
|
|
396
|
+
assert.equal(alice.meeting.type, 'CALL');
|
|
397
|
+
assert.equal(bob.meeting.type, 'CALL');
|
|
398
|
+
assert(enumerateSpy.called);
|
|
399
|
+
})
|
|
400
|
+
.then(function bobState() {
|
|
401
|
+
testUtils.waitForStateChange(bob.meeting, 'JOINED');
|
|
402
|
+
})
|
|
403
|
+
.then(function aliceState() {
|
|
404
|
+
testUtils.waitForStateChange(alice.meeting, 'JOINED');
|
|
405
|
+
})
|
|
406
|
+
.catch((e) => {
|
|
407
|
+
console.error('Error bob joins the meeting ', e);
|
|
408
|
+
throw e;
|
|
409
|
+
}));
|
|
290
410
|
|
|
291
411
|
it('check for meeting properties', () => {
|
|
292
412
|
assert.exists(alice.meeting.userId, 'userId not present');
|
|
@@ -300,413 +420,521 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
300
420
|
assert.exists(alice.meeting.members.selfId, 'selfId not present');
|
|
301
421
|
});
|
|
302
422
|
|
|
303
|
-
it('alice Audio Mute ', () => {
|
|
304
|
-
const checkEvent = (event) =>
|
|
423
|
+
it('alice Audio Mute ', async () => {
|
|
424
|
+
const checkEvent = (event) =>
|
|
425
|
+
!!event.delta.updated.find(
|
|
426
|
+
(member) => alice.meeting.members.selfId === member.id && member.isAudioMuted === true
|
|
427
|
+
);
|
|
305
428
|
|
|
429
|
+
await testUtils.waitUntil(2000);
|
|
306
430
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
431
|
+
const membersUpdate = testUtils.waitForEvents([
|
|
432
|
+
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
433
|
+
]);
|
|
434
|
+
|
|
435
|
+
localStreams.alice.microphone.setUserMuted(true);
|
|
436
|
+
|
|
437
|
+
await membersUpdate;
|
|
438
|
+
|
|
439
|
+
assert.equal(localStreams.alice.microphone.userMuted, true);
|
|
315
440
|
});
|
|
316
441
|
|
|
317
|
-
it('alice Audio unMute ', () => {
|
|
318
|
-
const checkEvent = (event) =>
|
|
442
|
+
it('alice Audio unMute ', async () => {
|
|
443
|
+
const checkEvent = (event) =>
|
|
444
|
+
!!event.delta.updated.find(
|
|
445
|
+
(member) => alice.meeting.members.selfId === member.id && member.isAudioMuted === false
|
|
446
|
+
);
|
|
319
447
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
448
|
+
await testUtils.waitUntil(2000);
|
|
449
|
+
|
|
450
|
+
const membersUpdate = testUtils.waitForEvents([
|
|
451
|
+
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
452
|
+
]);
|
|
453
|
+
|
|
454
|
+
localStreams.alice.microphone.setUserMuted(false);
|
|
455
|
+
|
|
456
|
+
await membersUpdate;
|
|
457
|
+
|
|
458
|
+
assert.equal(localStreams.alice.microphone.userMuted, false);
|
|
328
459
|
});
|
|
329
460
|
|
|
330
|
-
it('alice
|
|
331
|
-
const checkEvent = (event) =>
|
|
461
|
+
it('alice video mute', async () => {
|
|
462
|
+
const checkEvent = (event) =>
|
|
463
|
+
!!event.delta.updated.find(
|
|
464
|
+
(member) => alice.meeting.members.selfId === member.id && member.isVideoMuted === true
|
|
465
|
+
);
|
|
332
466
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
467
|
+
await testUtils.waitUntil(2000);
|
|
468
|
+
|
|
469
|
+
const membersUpdate = testUtils.waitForEvents([
|
|
470
|
+
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
471
|
+
]);
|
|
472
|
+
|
|
473
|
+
localStreams.alice.camera.setUserMuted(true);
|
|
474
|
+
|
|
475
|
+
await membersUpdate;
|
|
476
|
+
|
|
477
|
+
assert.equal(localStreams.alice.camera.userMuted, true);
|
|
341
478
|
});
|
|
342
479
|
|
|
343
|
-
it('alice video
|
|
344
|
-
const checkEvent = (event) =>
|
|
480
|
+
it('alice video unmute', async () => {
|
|
481
|
+
const checkEvent = (event) =>
|
|
482
|
+
!!event.delta.updated.find(
|
|
483
|
+
(member) => alice.meeting.members.selfId === member.id && member.isVideoMuted === false
|
|
484
|
+
);
|
|
345
485
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
486
|
+
await testUtils.waitUntil(2000);
|
|
487
|
+
|
|
488
|
+
const membersUpdate = testUtils.waitForEvents([
|
|
489
|
+
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
490
|
+
]);
|
|
491
|
+
|
|
492
|
+
localStreams.alice.camera.setUserMuted(false);
|
|
493
|
+
|
|
494
|
+
await membersUpdate;
|
|
495
|
+
|
|
496
|
+
assert.equal(localStreams.alice.camera.userMuted, false);
|
|
354
497
|
});
|
|
355
498
|
|
|
356
|
-
it('alice update Audio', () => {
|
|
357
|
-
const
|
|
499
|
+
it('alice update Audio', async () => {
|
|
500
|
+
const newMicrophoneStream = await createMicrophoneStream();
|
|
501
|
+
const newStreamPublished = waitForPublished(alice.meeting, {stream: newMicrophoneStream, status: true}, "Alice AUDIO: new microphone stream");
|
|
358
502
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
stream: response[0]
|
|
365
|
-
})
|
|
503
|
+
await testUtils.delayedPromise(
|
|
504
|
+
alice.meeting
|
|
505
|
+
.publishStreams({
|
|
506
|
+
microphone: newMicrophoneStream,
|
|
507
|
+
})
|
|
366
508
|
.then(() => {
|
|
367
|
-
console.log('AUDIO ', alice.meeting.mediaProperties.
|
|
368
|
-
assert.equal(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
.then((response) => {
|
|
373
|
-
console.log('MEDIA:READY event ', response[0].result);
|
|
374
|
-
assert.equal(response[0].result.type === 'local', true);
|
|
509
|
+
console.log('Alice AUDIO: new stream on meeting object:', alice.meeting.mediaProperties.audioStream);
|
|
510
|
+
assert.equal(
|
|
511
|
+
alice.meeting.mediaProperties.audioStream.id,
|
|
512
|
+
newMicrophoneStream.id
|
|
513
|
+
);
|
|
375
514
|
})
|
|
376
|
-
|
|
515
|
+
);
|
|
516
|
+
|
|
517
|
+
await newStreamPublished;
|
|
518
|
+
|
|
519
|
+
localStreams.alice.microphone = newMicrophoneStream;
|
|
377
520
|
});
|
|
378
521
|
|
|
379
|
-
it('alice update video', () => {
|
|
380
|
-
const
|
|
522
|
+
it('alice update video', async () => {
|
|
523
|
+
const newCameraStream = await createCameraStream();
|
|
524
|
+
const newStreamPublished = waitForPublished(alice.meeting, {stream: newCameraStream, status: true}, "Alice VIDEO: new camera stream");
|
|
381
525
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
stream: response[0]
|
|
388
|
-
})
|
|
526
|
+
await testUtils.delayedPromise(
|
|
527
|
+
alice.meeting
|
|
528
|
+
.publishStreams({
|
|
529
|
+
camera: newCameraStream,
|
|
530
|
+
})
|
|
389
531
|
.then(() => {
|
|
390
|
-
|
|
391
|
-
assert.equal(
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
console.log('MEDIA:READY event ', response[0].result);
|
|
396
|
-
assert.equal(response[0].result.type === 'local', true);
|
|
532
|
+
console.log('Alice VIDEO: new stream on meeting:', alice.meeting.mediaProperties.videoStream);
|
|
533
|
+
assert.equal(
|
|
534
|
+
alice.meeting.mediaProperties.videoStream.id,
|
|
535
|
+
newCameraStream.id
|
|
536
|
+
);
|
|
397
537
|
})
|
|
398
|
-
|
|
399
|
-
});
|
|
538
|
+
);
|
|
400
539
|
|
|
401
|
-
|
|
402
|
-
testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, true)),
|
|
403
|
-
testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:self:mutedByOthers'}])
|
|
404
|
-
.then((response) => {
|
|
405
|
-
console.log('meeting:self:mutedByOthers event ', response[0].result);
|
|
406
|
-
assert.equal(response[0].result.payload.unmuteAllowed, true);
|
|
407
|
-
})
|
|
408
|
-
]));
|
|
540
|
+
await newStreamPublished;
|
|
409
541
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:self:unmutedByOthers'}])
|
|
413
|
-
.then((response) => {
|
|
414
|
-
console.log('meeting:self:unmutedByOthers event ', response[0].result);
|
|
415
|
-
})
|
|
416
|
-
]));
|
|
542
|
+
localStreams.alice.camera = newCameraStream;
|
|
543
|
+
});
|
|
417
544
|
|
|
418
|
-
it('
|
|
419
|
-
|
|
545
|
+
it('alice mutes bob', () =>
|
|
546
|
+
Promise.all([
|
|
547
|
+
testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, true)),
|
|
548
|
+
testUtils
|
|
549
|
+
.waitForEvents([{scope: bob.meeting, event: 'meeting:self:mutedByOthers'}])
|
|
550
|
+
.then((response) => {
|
|
551
|
+
console.log('meeting:self:mutedByOthers event ', response[0].result);
|
|
552
|
+
assert.equal(response[0].result.payload.unmuteAllowed, true);
|
|
553
|
+
}),
|
|
554
|
+
]));
|
|
555
|
+
|
|
556
|
+
it('alice unmutes bob', () =>
|
|
557
|
+
Promise.all([
|
|
558
|
+
testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, false)),
|
|
559
|
+
testUtils
|
|
560
|
+
.waitForEvents([{scope: bob.meeting, event: 'meeting:self:unmutedByOthers'}])
|
|
561
|
+
.then((response) => {
|
|
562
|
+
console.log('meeting:self:unmutedByOthers event ', response[0].result);
|
|
563
|
+
}),
|
|
564
|
+
]));
|
|
565
|
+
|
|
566
|
+
it('bob audio mute, so alice cannot unmute bob', async () => {
|
|
567
|
+
const checkEvent = (event) =>
|
|
568
|
+
!!event.delta.updated.find(
|
|
569
|
+
(member) => bob.meeting.members.selfId === member.id && member.isAudioMuted === true
|
|
570
|
+
);
|
|
571
|
+
|
|
572
|
+
const membersUpdate = testUtils.waitForEvents([
|
|
573
|
+
{scope: bob.meeting.members, event: 'members:update', match: checkEvent},
|
|
574
|
+
]);
|
|
420
575
|
|
|
421
576
|
// first bob mutes himself
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
// now alice tries to unmmut bob
|
|
431
|
-
.then(() => testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, false)))
|
|
577
|
+
localStreams.bob.microphone.setUserMuted(true);
|
|
578
|
+
|
|
579
|
+
await membersUpdate;
|
|
580
|
+
|
|
581
|
+
assert.equal(localStreams.bob.microphone.userMuted, true);
|
|
582
|
+
|
|
583
|
+
// now alice tries to unmmute bob
|
|
584
|
+
await testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, false))
|
|
432
585
|
// expect the waitForEvents to timeout
|
|
433
|
-
.then(() =>
|
|
586
|
+
.then(() =>
|
|
587
|
+
testUtils.waitForEvents(
|
|
588
|
+
[{scope: bob.meeting, event: 'meeting:self:unmutedByOthers'}],
|
|
589
|
+
2000
|
|
590
|
+
)
|
|
591
|
+
)
|
|
434
592
|
.then(() => {
|
|
435
593
|
assert.fail('bob received unexpected meeting:self:unmutedByOthers event');
|
|
436
594
|
})
|
|
437
595
|
.catch(() => {
|
|
438
|
-
assert.equal(bob.
|
|
439
|
-
assert.equal(bob.meeting.isAudioMuted(), true);
|
|
440
|
-
done();
|
|
596
|
+
assert.equal(localStreams.bob.microphone.userMuted, true);
|
|
441
597
|
});
|
|
442
598
|
});
|
|
443
599
|
|
|
444
|
-
it('bob audio unmute ', () => {
|
|
445
|
-
const checkEvent = (event) =>
|
|
600
|
+
it('bob audio unmute ', async () => {
|
|
601
|
+
const checkEvent = (event) =>
|
|
602
|
+
!!event.delta.updated.find(
|
|
603
|
+
(member) => bob.meeting.members.selfId === member.id && member.isAudioMuted === false
|
|
604
|
+
);
|
|
446
605
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
606
|
+
const membersUpdate = testUtils.waitForEvents([
|
|
607
|
+
{scope: alice.meeting.members, event: 'members:update', match: checkEvent},
|
|
608
|
+
]);
|
|
609
|
+
|
|
610
|
+
localStreams.bob.microphone.setUserMuted(false);
|
|
611
|
+
|
|
612
|
+
await membersUpdate;
|
|
613
|
+
|
|
614
|
+
assert.equal(localStreams.bob.microphone.userMuted, false);
|
|
455
615
|
});
|
|
456
616
|
|
|
457
|
-
it('alice shares the screen with highFrameRate', () =>
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
])
|
|
462
|
-
testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingRemote'}])
|
|
617
|
+
it('alice shares the screen with highFrameRate', async () => {
|
|
618
|
+
localStreams.alice.screenShare.video = await createDisplayStream();
|
|
619
|
+
|
|
620
|
+
const startedSharingLocal = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingLocal'}]);
|
|
621
|
+
const startedSharingRemote = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingRemote'}])
|
|
463
622
|
.then((response) => {
|
|
464
623
|
assert.equal(response[0].result.memberId, alice.meeting.selfId);
|
|
465
|
-
})
|
|
466
|
-
testUtils.waitForEvents([{scope: bob.meeting.members, event: 'members:update'}])
|
|
467
|
-
.then((response) => {
|
|
468
|
-
console.log('SCREEN SHARE RESPONSE ', JSON.stringify(response, testUtils.getCircularReplacer()));
|
|
469
|
-
}),
|
|
470
|
-
testUtils.waitForEvents([{scope: alice.meeting, event: 'media:ready'}])
|
|
624
|
+
});
|
|
625
|
+
const bobReceivesMembersUpdate = testUtils.waitForEvents([{scope: bob.meeting.members, event: 'members:update'}])
|
|
471
626
|
.then((response) => {
|
|
472
|
-
console.log(
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
assert.equal(alice.meeting.mediaProperties.shareTrack.getConstraints().height, 720);
|
|
480
|
-
}
|
|
481
|
-
assert.equal(alice.meeting.isSharing, true);
|
|
482
|
-
assert.equal(alice.meeting.shareStatus, 'local_share_active');
|
|
483
|
-
assert.equal(bob.meeting.shareStatus, 'remote_share_active');
|
|
484
|
-
console.log('SCREEN SHARE PARTICIPANTS ', JSON.stringify(alice.meeting.locusInfo.participants));
|
|
485
|
-
|
|
486
|
-
return testUtils.waitUntil(10000);
|
|
487
|
-
}));
|
|
627
|
+
console.log(
|
|
628
|
+
'SCREEN SHARE RESPONSE ',
|
|
629
|
+
JSON.stringify(response, testUtils.getCircularReplacer())
|
|
630
|
+
);
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
const screenShareVideoPublished = waitForPublished(alice.meeting, {stream: localStreams.alice.screenShare.video, status: true}, "alice's screen share video stream");
|
|
488
634
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
635
|
+
await testUtils.delayedPromise(alice.meeting.publishStreams({screenShare: {video: localStreams.alice.screenShare.video}}));
|
|
636
|
+
|
|
637
|
+
await screenShareVideoPublished;
|
|
638
|
+
await startedSharingLocal;
|
|
639
|
+
await startedSharingRemote;
|
|
640
|
+
await bobReceivesMembersUpdate;
|
|
641
|
+
|
|
642
|
+
assert.equal(alice.meeting.screenShareFloorState, 'floor_request_granted');
|
|
643
|
+
assert.equal(alice.meeting.shareStatus, 'local_share_active');
|
|
644
|
+
assert.equal(bob.meeting.shareStatus, 'remote_share_active');
|
|
645
|
+
console.log(
|
|
646
|
+
'SCREEN SHARE PARTICIPANTS ',
|
|
647
|
+
JSON.stringify(alice.meeting.locusInfo.participants)
|
|
648
|
+
);
|
|
649
|
+
|
|
650
|
+
await testUtils.waitUntil(10000);
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
it('bob steals the screen share from alice', async () => {
|
|
654
|
+
localStreams.bob.screenShare.video = await createDisplayStream();
|
|
655
|
+
|
|
656
|
+
const stoppedSharingLocal = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingLocal'}]);
|
|
657
|
+
const startedSharingLocal = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingLocal'}]);
|
|
658
|
+
const startedSharingRemote = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingRemote'}])
|
|
494
659
|
.then((response) => {
|
|
495
660
|
assert.equal(response[0].result.memberId, bob.meeting.selfId);
|
|
496
|
-
})
|
|
497
|
-
testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
|
|
498
|
-
.then((response) => {
|
|
499
|
-
console.log('SCREEN SHARE RESPONSE ', JSON.stringify(response, testUtils.getCircularReplacer()));
|
|
500
|
-
}),
|
|
501
|
-
testUtils.waitForEvents([{scope: bob.meeting, event: 'media:ready'}])
|
|
661
|
+
});
|
|
662
|
+
const aliceReceivesMembersUpdate = testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
|
|
502
663
|
.then((response) => {
|
|
503
|
-
console.log(
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
// TODO: Re-eanable Safari when screensharing issues have been resolved
|
|
511
|
-
if (!isBrowser('safari')) {
|
|
512
|
-
assert.equal(bob.meeting.mediaProperties.shareTrack.getConstraints().height, heightResolution);
|
|
513
|
-
}
|
|
514
|
-
assert.equal(bob.meeting.isSharing, true);
|
|
515
|
-
assert.equal(bob.meeting.shareStatus, 'local_share_active');
|
|
516
|
-
assert.equal(alice.meeting.shareStatus, 'remote_share_active');
|
|
517
|
-
|
|
518
|
-
return testUtils.waitUntil(10000);
|
|
519
|
-
}));
|
|
664
|
+
console.log(
|
|
665
|
+
'SCREEN SHARE RESPONSE ',
|
|
666
|
+
JSON.stringify(response, testUtils.getCircularReplacer())
|
|
667
|
+
);
|
|
668
|
+
});
|
|
669
|
+
const aliceScreenShareVideoUnpublished = waitForPublished(alice.meeting, {stream: localStreams.alice.screenShare.video, status: false}, "alice's screen share video stream");
|
|
670
|
+
const bobScreenShareVideoPublished = waitForPublished(bob.meeting, {stream: localStreams.bob.screenShare.video, status: true}, "bob's screen share video stream");
|
|
520
671
|
|
|
521
|
-
|
|
522
|
-
// Wait for peerConnection to stabalize
|
|
523
|
-
testUtils.waitUntil(20000),
|
|
524
|
-
testUtils.delayedPromise(bob.meeting.updateShare({
|
|
525
|
-
sendShare: false,
|
|
526
|
-
receiveShare: true
|
|
527
|
-
})),
|
|
528
|
-
testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:stoppedSharingLocal'}]),
|
|
529
|
-
testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingRemote'}])
|
|
530
|
-
])
|
|
531
|
-
.then(() => {
|
|
532
|
-
assert.equal(bob.meeting.isSharing, false);
|
|
533
|
-
assert.equal(bob.meeting.shareStatus, 'no_share');
|
|
534
|
-
assert.equal(alice.meeting.shareStatus, 'no_share');
|
|
535
|
-
}));
|
|
672
|
+
await testUtils.delayedPromise(bob.meeting.publishStreams({screenShare: {video: localStreams.bob.screenShare.video}}));
|
|
536
673
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
.then((response) => {
|
|
544
|
-
const {memberId, resourceUrl} = response[0].result;
|
|
674
|
+
await bobScreenShareVideoPublished;
|
|
675
|
+
await aliceScreenShareVideoUnpublished;
|
|
676
|
+
await stoppedSharingLocal;
|
|
677
|
+
await startedSharingLocal;
|
|
678
|
+
await startedSharingRemote;
|
|
679
|
+
await aliceReceivesMembersUpdate;
|
|
545
680
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
681
|
+
localStreams.alice.screenShare.video.stop();
|
|
682
|
+
localStreams.alice.screenShare.video = undefined;
|
|
683
|
+
|
|
684
|
+
assert.equal(bob.meeting.screenShareFloorState, 'floor_request_granted');
|
|
685
|
+
assert.equal(bob.meeting.shareStatus, 'local_share_active');
|
|
686
|
+
assert.equal(alice.meeting.shareStatus, 'remote_share_active');
|
|
687
|
+
|
|
688
|
+
await testUtils.waitUntil(10000);
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
it('bob stops sharing', async () => {
|
|
692
|
+
const screenShareVideoUnpublished = waitForPublished(bob.meeting, {stream: localStreams.bob.screenShare.video, status: false}, "bob's screen share video stream");
|
|
693
|
+
const stoppedSharingLocal = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:stoppedSharingLocal'}]);
|
|
694
|
+
const stoppedSharingRemote = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingRemote'}]);
|
|
695
|
+
|
|
696
|
+
await testUtils.delayedPromise(bob.meeting.unpublishStreams([localStreams.bob.screenShare.video]));
|
|
697
|
+
|
|
698
|
+
await screenShareVideoUnpublished;
|
|
699
|
+
await stoppedSharingLocal;
|
|
700
|
+
await stoppedSharingRemote;
|
|
701
|
+
|
|
702
|
+
localStreams.bob.screenShare.video.stop();
|
|
703
|
+
localStreams.bob.screenShare.video = undefined;
|
|
704
|
+
|
|
705
|
+
assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
|
|
706
|
+
assert.equal(bob.meeting.shareStatus, 'no_share');
|
|
707
|
+
assert.equal(alice.meeting.shareStatus, 'no_share');
|
|
708
|
+
|
|
709
|
+
await testUtils.waitUntil(10000);
|
|
710
|
+
});
|
|
711
|
+
|
|
712
|
+
it('alice shares whiteboard A', () =>
|
|
713
|
+
Promise.all([
|
|
714
|
+
testUtils.delayedPromise(alice.meeting.startWhiteboardShare(channelUrlA)),
|
|
715
|
+
testUtils.waitForEvents([
|
|
716
|
+
{scope: alice.meeting, event: 'meeting:startedSharingWhiteboard'},
|
|
717
|
+
]),
|
|
718
|
+
testUtils
|
|
719
|
+
.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingWhiteboard'}])
|
|
720
|
+
.then((response) => {
|
|
721
|
+
const {memberId, resourceUrl} = response[0].result;
|
|
722
|
+
|
|
723
|
+
assert.equal(memberId, alice.meeting.selfId);
|
|
724
|
+
assert.equal(resourceUrl, channelUrlA);
|
|
725
|
+
}),
|
|
726
|
+
testUtils
|
|
727
|
+
.waitForEvents([{scope: bob.meeting.members, event: 'members:update'}])
|
|
728
|
+
.then((response) => {
|
|
729
|
+
console.log(
|
|
730
|
+
'WHITEBOARD SHARE RESPONSE ',
|
|
731
|
+
JSON.stringify(response, testUtils.getCircularReplacer())
|
|
732
|
+
);
|
|
733
|
+
}),
|
|
734
|
+
]).then(() => {
|
|
735
|
+
assert.equal(alice.meeting.screenShareFloorState, 'floor_released');
|
|
556
736
|
assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
|
|
557
737
|
assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
|
|
558
738
|
}));
|
|
559
739
|
|
|
560
|
-
it('bob steals share from alice with whiteboard B', () =>
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
740
|
+
it('bob steals share from alice with whiteboard B', () =>
|
|
741
|
+
Promise.all([
|
|
742
|
+
testUtils.delayedPromise(bob.meeting.startWhiteboardShare(channelUrlB)),
|
|
743
|
+
testUtils.waitForEvents([
|
|
744
|
+
{scope: bob.meeting, event: 'meeting:startedSharingWhiteboard'},
|
|
745
|
+
]),
|
|
746
|
+
testUtils
|
|
747
|
+
.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingWhiteboard'}])
|
|
748
|
+
.then((response) => {
|
|
749
|
+
const {memberId, resourceUrl} = response[0].result;
|
|
750
|
+
|
|
751
|
+
assert.equal(memberId, bob.meeting.selfId);
|
|
752
|
+
assert.equal(resourceUrl, channelUrlB);
|
|
753
|
+
}),
|
|
754
|
+
testUtils
|
|
755
|
+
.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
|
|
756
|
+
.then((response) => {
|
|
757
|
+
console.log(
|
|
758
|
+
'WHITEBOARD SHARE RESPONSE ',
|
|
759
|
+
JSON.stringify(response, testUtils.getCircularReplacer())
|
|
760
|
+
);
|
|
761
|
+
}),
|
|
762
|
+
]).then(() => {
|
|
763
|
+
assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
|
|
579
764
|
assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
|
|
580
765
|
assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
|
|
581
766
|
}));
|
|
582
767
|
|
|
583
|
-
it('bob stops sharing ', () =>
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
768
|
+
it('bob stops sharing again', () =>
|
|
769
|
+
Promise.all([
|
|
770
|
+
// Wait for peerConnection to stabalize
|
|
771
|
+
testUtils.waitUntil(20000),
|
|
772
|
+
testUtils.delayedPromise(bob.meeting.stopWhiteboardShare(channelUrlB)),
|
|
773
|
+
testUtils.waitForEvents([
|
|
774
|
+
{scope: bob.meeting, event: 'meeting:stoppedSharingWhiteboard'},
|
|
775
|
+
]),
|
|
776
|
+
testUtils.waitForEvents([
|
|
777
|
+
{scope: alice.meeting, event: 'meeting:stoppedSharingWhiteboard'},
|
|
778
|
+
]),
|
|
779
|
+
]).then(() => {
|
|
780
|
+
assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
|
|
592
781
|
assert.equal(bob.meeting.shareStatus, 'no_share');
|
|
593
782
|
assert.equal(alice.meeting.shareStatus, 'no_share');
|
|
594
783
|
}));
|
|
595
784
|
|
|
596
|
-
it('alice shares whiteboard B', () =>
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
785
|
+
it('alice shares whiteboard B', () =>
|
|
786
|
+
Promise.all([
|
|
787
|
+
testUtils.delayedPromise(alice.meeting.startWhiteboardShare(channelUrlB)),
|
|
788
|
+
testUtils.waitForEvents([
|
|
789
|
+
{scope: alice.meeting, event: 'meeting:startedSharingWhiteboard'},
|
|
790
|
+
]),
|
|
791
|
+
testUtils
|
|
792
|
+
.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingWhiteboard'}])
|
|
793
|
+
.then((response) => {
|
|
794
|
+
const {memberId, resourceUrl} = response[0].result;
|
|
795
|
+
|
|
796
|
+
assert.equal(memberId, alice.meeting.selfId);
|
|
797
|
+
assert.equal(resourceUrl, channelUrlB);
|
|
798
|
+
}),
|
|
799
|
+
testUtils
|
|
800
|
+
.waitForEvents([{scope: bob.meeting.members, event: 'members:update'}])
|
|
801
|
+
.then((response) => {
|
|
802
|
+
console.log(
|
|
803
|
+
'WHITEBOARD SHARE RESPONSE ',
|
|
804
|
+
JSON.stringify(response, testUtils.getCircularReplacer())
|
|
805
|
+
);
|
|
806
|
+
}),
|
|
807
|
+
]).then(() => {
|
|
808
|
+
assert.equal(alice.meeting.screenShareFloorState, 'floor_released');
|
|
615
809
|
assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
|
|
616
810
|
assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
|
|
617
811
|
}));
|
|
618
812
|
|
|
619
|
-
it('bob steals the share from alice with desktop share', () =>
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
testUtils.waitForEvents([{scope:
|
|
623
|
-
testUtils.waitForEvents([{scope:
|
|
813
|
+
it('bob steals the share from alice with desktop share', async () => {
|
|
814
|
+
localStreams.bob.screenShare.video = await createDisplayStream();
|
|
815
|
+
|
|
816
|
+
const stoppedSharingWhiteboard = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingWhiteboard'}]);
|
|
817
|
+
const startedSharingLocal = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingLocal'}]);
|
|
818
|
+
const startedSharingRemote = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingRemote'}])
|
|
624
819
|
.then((response) => {
|
|
625
820
|
assert.equal(response[0].result.memberId, bob.meeting.selfId);
|
|
626
|
-
})
|
|
627
|
-
testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
|
|
628
|
-
.then((response) => {
|
|
629
|
-
console.log('SCREEN SHARE RESPONSE ', JSON.stringify(response, testUtils.getCircularReplacer()));
|
|
630
|
-
}),
|
|
631
|
-
testUtils.waitForEvents([{scope: bob.meeting, event: 'media:ready'}])
|
|
821
|
+
});
|
|
822
|
+
const aliceReceivesMembersUpdate = testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
|
|
632
823
|
.then((response) => {
|
|
633
|
-
console.log(
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
// TODO: Re-eanable Safari when screensharing issues have been resolved
|
|
641
|
-
if (!isBrowser('safari')) {
|
|
642
|
-
assert.equal(bob.meeting.mediaProperties.shareTrack.getConstraints().height, heightResolution);
|
|
643
|
-
}
|
|
644
|
-
assert.equal(bob.meeting.isSharing, true);
|
|
645
|
-
assert.equal(bob.meeting.shareStatus, 'local_share_active');
|
|
646
|
-
assert.equal(alice.meeting.shareStatus, 'remote_share_active');
|
|
647
|
-
|
|
648
|
-
return testUtils.waitUntil(10000);
|
|
649
|
-
}));
|
|
824
|
+
console.log(
|
|
825
|
+
'SCREEN SHARE RESPONSE ',
|
|
826
|
+
JSON.stringify(response, testUtils.getCircularReplacer())
|
|
827
|
+
);
|
|
828
|
+
});
|
|
829
|
+
const bobScreenShareVideoPublished = waitForPublished(bob.meeting, {stream: localStreams.bob.screenShare.video, status: true}, "bob's screen share video stream");
|
|
650
830
|
|
|
651
|
-
|
|
652
|
-
testUtils.delayedPromise(bob.meeting.startWhiteboardShare(channelUrlB)),
|
|
653
|
-
testUtils.waitForEvents([
|
|
654
|
-
{scope: bob.meeting, event: 'meeting:startedSharingWhiteboard'}
|
|
655
|
-
]),
|
|
656
|
-
testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingWhiteboard'}])
|
|
657
|
-
.then((response) => {
|
|
658
|
-
const {memberId, resourceUrl} = response[0].result;
|
|
831
|
+
await testUtils.delayedPromise(bob.meeting.publishStreams({screenShare: {video: localStreams.bob.screenShare.video}}));
|
|
659
832
|
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
.
|
|
669
|
-
|
|
833
|
+
await bobScreenShareVideoPublished;
|
|
834
|
+
await stoppedSharingWhiteboard;
|
|
835
|
+
await startedSharingLocal;
|
|
836
|
+
await startedSharingRemote;
|
|
837
|
+
await aliceReceivesMembersUpdate;
|
|
838
|
+
|
|
839
|
+
assert.equal(bob.meeting.screenShareFloorState, 'floor_request_granted');
|
|
840
|
+
assert.equal(bob.meeting.shareStatus, 'local_share_active');
|
|
841
|
+
assert.equal(alice.meeting.shareStatus, 'remote_share_active');
|
|
842
|
+
|
|
843
|
+
await testUtils.waitUntil(10000);
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
it('bob shares whiteboard B', () =>
|
|
847
|
+
Promise.all([
|
|
848
|
+
testUtils.delayedPromise(bob.meeting.startWhiteboardShare(channelUrlB)),
|
|
849
|
+
testUtils.waitForEvents([
|
|
850
|
+
{scope: bob.meeting, event: 'meeting:startedSharingWhiteboard'},
|
|
851
|
+
]),
|
|
852
|
+
testUtils
|
|
853
|
+
.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingWhiteboard'}])
|
|
854
|
+
.then((response) => {
|
|
855
|
+
const {memberId, resourceUrl} = response[0].result;
|
|
856
|
+
|
|
857
|
+
assert.equal(memberId, bob.meeting.selfId);
|
|
858
|
+
assert.equal(resourceUrl, channelUrlB);
|
|
859
|
+
}),
|
|
860
|
+
testUtils
|
|
861
|
+
.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
|
|
862
|
+
.then((response) => {
|
|
863
|
+
console.log(
|
|
864
|
+
'WHITEBOARD SHARE RESPONSE ',
|
|
865
|
+
JSON.stringify(response, testUtils.getCircularReplacer())
|
|
866
|
+
);
|
|
867
|
+
}),
|
|
868
|
+
]).then(() => {
|
|
869
|
+
assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
|
|
670
870
|
assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
|
|
671
871
|
assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
|
|
672
872
|
}));
|
|
673
873
|
|
|
674
|
-
it('alice adds chris as guest to 1:1 meeting', () =>
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
874
|
+
it('alice adds chris as guest to 1:1 meeting', () =>
|
|
875
|
+
Promise.all([
|
|
876
|
+
testUtils.delayedPromise(alice.meeting.invite({emailAddress: chris.emailAddress})),
|
|
877
|
+
testUtils.waitForEvents([
|
|
878
|
+
{scope: chris.webex.meetings, event: 'meeting:added', user: chris},
|
|
879
|
+
]),
|
|
880
|
+
testUtils
|
|
881
|
+
.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
|
|
882
|
+
.then((response) => {
|
|
883
|
+
const chrisParticipant = response[0].result.delta.added.find(
|
|
884
|
+
(member) => member.participant.identity === chris.id
|
|
885
|
+
);
|
|
886
|
+
|
|
887
|
+
assert.equal(chrisParticipant.status, 'NOT_IN_MEETING');
|
|
888
|
+
}),
|
|
889
|
+
])
|
|
890
|
+
.catch((e) => {
|
|
891
|
+
console.error('Error adding chris as guest ', e);
|
|
892
|
+
throw e;
|
|
682
893
|
})
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
894
|
+
.then(function memberUpdated() {
|
|
895
|
+
assert.exists(chris.meeting);
|
|
896
|
+
|
|
897
|
+
return Promise.all([
|
|
898
|
+
testUtils.delayedPromise(chris.meeting.join()),
|
|
899
|
+
testUtils.waitForEvents([
|
|
900
|
+
{
|
|
901
|
+
scope: alice.meeting.members,
|
|
902
|
+
event: 'members:update',
|
|
903
|
+
match: testUtils.checkParticipantUpdatedStatus(chris, 'IN_MEETING'),
|
|
904
|
+
},
|
|
905
|
+
]),
|
|
906
|
+
])
|
|
907
|
+
.then(() => {
|
|
908
|
+
assert.equal(
|
|
909
|
+
alice.meeting.members.membersCollection.get(chris.meeting.members.selfId)
|
|
910
|
+
.participant.state,
|
|
911
|
+
'JOINED'
|
|
912
|
+
);
|
|
913
|
+
})
|
|
914
|
+
.then(() => testUtils.waitForStateChange(chris.meeting, 'JOINED'))
|
|
915
|
+
.then(async () => {
|
|
916
|
+
localStreams.chris.microphone = await createMicrophoneStream();
|
|
917
|
+
localStreams.chris.camera = await createCameraStream();
|
|
918
|
+
})
|
|
919
|
+
.then(() => integrationTestUtils.addMedia(chris, {microphone: localStreams.chris.microphone, camera: localStreams.chris.camera}))
|
|
920
|
+
.then(() => assert(enumerateSpy.called));
|
|
921
|
+
})
|
|
922
|
+
.then(() =>
|
|
923
|
+
Promise.all([
|
|
924
|
+
testUtils.delayedPromise(chris.meeting.leave()),
|
|
925
|
+
testUtils.waitForEvents([
|
|
926
|
+
{
|
|
927
|
+
scope: alice.meeting.members,
|
|
928
|
+
event: 'members:update',
|
|
929
|
+
match: testUtils.checkParticipantUpdatedStatus(chris, 'NOT_IN_MEETING'),
|
|
930
|
+
},
|
|
931
|
+
]),
|
|
932
|
+
])
|
|
933
|
+
)
|
|
934
|
+
.catch((e) => {
|
|
935
|
+
console.error('Error chris joining the meeting ', e);
|
|
936
|
+
throw e;
|
|
937
|
+
}));
|
|
710
938
|
|
|
711
939
|
it('leave on the meeting object', () => {
|
|
712
940
|
const checkInactive = (result) => result.reason === 'CALL_INACTIVE';
|
|
@@ -716,10 +944,13 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
716
944
|
testUtils.waitForEvents([
|
|
717
945
|
{scope: alice.meeting.members, event: 'members:update', user: alice},
|
|
718
946
|
{
|
|
719
|
-
scope: bob.webex.meetings,
|
|
947
|
+
scope: bob.webex.meetings,
|
|
948
|
+
event: 'meeting:removed',
|
|
949
|
+
user: bob,
|
|
950
|
+
match: checkInactive,
|
|
720
951
|
},
|
|
721
|
-
{scope: alice.webex.meetings, event: 'meeting:removed', user: alice}
|
|
722
|
-
])
|
|
952
|
+
{scope: alice.webex.meetings, event: 'meeting:removed', user: alice},
|
|
953
|
+
]),
|
|
723
954
|
])
|
|
724
955
|
.then(() => {
|
|
725
956
|
assert.equal(bob.meeting, null);
|
|
@@ -732,6 +963,35 @@ skipInNode(describe)('plugin-meetings', () => {
|
|
|
732
963
|
assert.equal(bob.webex.meetings.getMeetingByType('sipUri', alice.emailAddress), null);
|
|
733
964
|
});
|
|
734
965
|
});
|
|
966
|
+
|
|
967
|
+
it('stop all local streams', () => {
|
|
968
|
+
if (localStreams.alice.microphone) {
|
|
969
|
+
localStreams.alice.microphone.stop();
|
|
970
|
+
localStreams.alice.microphone = undefined;
|
|
971
|
+
}
|
|
972
|
+
if (localStreams.alice.camera) {
|
|
973
|
+
localStreams.alice.camera.stop();
|
|
974
|
+
localStreams.alice.camera = undefined;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
if (localStreams.bob.microphone) {
|
|
978
|
+
localStreams.bob.microphone.stop();
|
|
979
|
+
localStreams.bob.microphone = undefined;
|
|
980
|
+
}
|
|
981
|
+
if (localStreams.bob.camera) {
|
|
982
|
+
localStreams.bob.camera.stop();
|
|
983
|
+
localStreams.bob.camera = undefined;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
if (localStreams.chris.microphone) {
|
|
987
|
+
localStreams.chris.microphone.stop();
|
|
988
|
+
localStreams.chris.microphone = undefined;
|
|
989
|
+
}
|
|
990
|
+
if (localStreams.chris.camera) {
|
|
991
|
+
localStreams.chris.camera.stop();
|
|
992
|
+
localStreams.chris.camera = undefined;
|
|
993
|
+
}
|
|
994
|
+
});
|
|
735
995
|
});
|
|
736
996
|
});
|
|
737
997
|
});
|