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