@webex/plugin-meetings 3.0.0-bnr.4 → 3.0.0-stream-classes.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -8
- package/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 +70 -32
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +422 -217
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/utils.js +12 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/errors/webex-errors.js +3 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.d.ts +1 -1
- package/dist/common/queue.js +24 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -7
- package/dist/config.js.map +1 -1
- package/dist/constants.js +118 -24
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +2 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +19 -14
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +80 -11
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +62 -20
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +71 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +305 -57
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +7 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +43 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +219 -63
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +44 -22
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +57 -104
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +60 -121
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +61 -3
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2530 -2534
- 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 +125 -205
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +150 -150
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +568 -438
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +48 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +94 -38
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +4 -2
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.d.ts +0 -2
- package/dist/meetings/index.js +260 -85
- 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/util.js +42 -7
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.d.ts +2 -0
- package/dist/member/index.js +26 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.d.ts +11 -0
- package/dist/member/member.types.js +18 -0
- package/dist/member/member.types.js.map +1 -0
- package/dist/member/types.js +11 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +60 -23
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +4 -1
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +75 -45
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +308 -317
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +1 -3
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +1 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.js +1 -451
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +136 -40
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +4 -4
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +60 -3
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +36 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +233 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/reachability/index.js +18 -3
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +5 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +181 -153
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +21 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +9 -8
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +25 -32
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +42 -51
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +97 -38
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +117 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/index.js +0 -1
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +43 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +124 -0
- package/dist/types/breakouts/events.d.ts +2 -0
- package/dist/types/breakouts/utils.d.ts +7 -0
- package/dist/types/common/errors/webex-errors.d.ts +1 -1
- package/dist/types/config.d.ts +0 -6
- package/dist/types/constants.d.ts +51 -21
- package/dist/types/controls-options-manager/enums.d.ts +2 -0
- package/dist/types/controls-options-manager/index.d.ts +1 -1
- package/dist/types/controls-options-manager/types.d.ts +7 -1
- package/dist/types/index.d.ts +1 -1
- 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/index.d.ts +39 -1
- package/dist/types/media/index.d.ts +2 -0
- package/dist/types/media/properties.d.ts +16 -38
- package/dist/types/meeting/in-meeting-actions.d.ts +46 -2
- package/dist/types/meeting/index.d.ts +179 -379
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +39 -40
- package/dist/types/meeting/request.d.ts +25 -26
- package/dist/types/meeting/util.d.ts +74 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +14 -3
- package/dist/types/meetings/index.d.ts +49 -1
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/member/index.d.ts +2 -0
- package/dist/types/members/request.d.ts +56 -11
- package/dist/types/members/util.d.ts +209 -1
- package/dist/types/metrics/config.d.ts +26 -2
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/metrics/index.d.ts +17 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +27 -10
- package/dist/types/multistream/receiveSlot.d.ts +3 -3
- package/dist/types/multistream/remoteMedia.d.ts +2 -2
- package/dist/types/multistream/remoteMediaManager.d.ts +14 -0
- package/dist/types/roap/request.d.ts +6 -8
- package/dist/types/roap/turnDiscovery.d.ts +18 -1
- package/package.json +3 -2
- 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 +3 -2
- package/src/breakouts/breakout.ts +62 -27
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +244 -64
- package/src/breakouts/utils.ts +13 -0
- package/src/common/errors/webex-errors.ts +6 -2
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/common/queue.ts +22 -8
- package/src/config.ts +0 -6
- package/src/constants.ts +111 -19
- package/src/controls-options-manager/enums.ts +2 -0
- package/src/controls-options-manager/index.ts +13 -10
- package/src/controls-options-manager/types.ts +10 -0
- package/src/controls-options-manager/util.ts +82 -11
- package/src/index.ts +18 -11
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +81 -0
- package/src/locus-info/index.ts +318 -57
- package/src/locus-info/infoUtils.ts +10 -2
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +224 -39
- package/src/locus-info/selfUtils.ts +32 -20
- package/src/media/index.ts +94 -108
- package/src/media/properties.ts +69 -109
- package/src/meeting/in-meeting-actions.ts +120 -4
- package/src/meeting/index.ts +1967 -2120
- package/src/meeting/locusMediaRequest.ts +314 -0
- package/src/meeting/muteState.ts +119 -194
- package/src/meeting/request.ts +122 -115
- package/src/meeting/util.ts +549 -413
- package/src/meeting-info/index.ts +54 -8
- package/src/meeting-info/meeting-info-v2.ts +89 -24
- package/src/meeting-info/utilv2.ts +6 -2
- package/src/meetings/index.ts +247 -87
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/util.ts +47 -12
- package/src/member/index.ts +28 -1
- package/src/member/types.ts +14 -0
- package/src/member/util.ts +75 -26
- package/src/members/index.ts +7 -1
- package/src/members/request.ts +61 -21
- package/src/members/util.ts +316 -326
- package/src/metrics/constants.ts +1 -0
- package/src/metrics/index.ts +1 -474
- package/src/multistream/mediaRequestManager.ts +183 -67
- package/src/multistream/receiveSlot.ts +4 -4
- package/src/multistream/receiveSlotManager.ts +4 -4
- package/src/multistream/remoteMedia.ts +2 -2
- package/src/multistream/remoteMediaGroup.ts +59 -0
- package/src/multistream/remoteMediaManager.ts +33 -0
- package/src/multistream/sendSlotManager.ts +170 -0
- package/src/reachability/index.ts +15 -4
- package/src/reachability/request.ts +7 -3
- package/src/reconnection-manager/index.ts +36 -29
- package/src/recording-controller/index.ts +20 -3
- package/src/recording-controller/util.ts +26 -9
- package/src/roap/index.ts +25 -30
- package/src/roap/request.ts +44 -51
- package/src/roap/turnDiscovery.ts +51 -25
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/index.ts +0 -1
- package/test/integration/spec/converged-space-meetings.js +60 -3
- package/test/integration/spec/journey.js +336 -259
- package/test/integration/spec/space-meeting.js +76 -3
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +85 -26
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +636 -98
- package/test/unit/spec/breakouts/utils.js +19 -1
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +8 -1
- package/test/unit/spec/controls-options-manager/util.js +576 -397
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +195 -1
- package/test/unit/spec/locus-info/index.js +950 -45
- package/test/unit/spec/locus-info/infoUtils.js +37 -15
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +62 -22
- package/test/unit/spec/locus-info/selfConstant.js +19 -0
- package/test/unit/spec/locus-info/selfUtils.js +131 -26
- package/test/unit/spec/media/index.ts +82 -79
- package/test/unit/spec/meeting/in-meeting-actions.ts +60 -2
- package/test/unit/spec/meeting/index.js +3208 -1734
- package/test/unit/spec/meeting/locusMediaRequest.ts +443 -0
- package/test/unit/spec/meeting/muteState.js +328 -417
- package/test/unit/spec/meeting/request.js +393 -48
- package/test/unit/spec/meeting/utils.js +552 -76
- package/test/unit/spec/meeting-info/index.js +181 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +258 -20
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/index.js +631 -145
- package/test/unit/spec/meetings/utils.js +164 -9
- package/test/unit/spec/member/index.js +44 -14
- package/test/unit/spec/member/util.js +296 -155
- package/test/unit/spec/members/index.js +23 -3
- package/test/unit/spec/members/request.js +167 -35
- package/test/unit/spec/metrics/index.js +1 -50
- package/test/unit/spec/multistream/mediaRequestManager.ts +366 -8
- package/test/unit/spec/multistream/receiveSlot.ts +1 -1
- package/test/unit/spec/multistream/remoteMediaGroup.ts +266 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +123 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
- package/test/unit/spec/reachability/index.ts +66 -5
- package/test/unit/spec/reachability/request.js +3 -1
- package/test/unit/spec/reconnection-manager/index.js +55 -5
- package/test/unit/spec/recording-controller/index.js +294 -218
- package/test/unit/spec/recording-controller/util.js +223 -96
- package/test/unit/spec/roap/index.ts +21 -48
- package/test/unit/spec/roap/request.ts +74 -60
- package/test/unit/spec/roap/turnDiscovery.ts +30 -6
- package/test/unit/spec/rtcMetrics/index.ts +68 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -60
- package/src/metrics/config.ts +0 -487
|
@@ -7,7 +7,7 @@ describe('plugin-meetings', () => {
|
|
|
7
7
|
const info = {
|
|
8
8
|
displayHints: {
|
|
9
9
|
moderator: ['HINT_1', 'HINT_2'],
|
|
10
|
-
joined: ['HINT_3'],
|
|
10
|
+
joined: ['HINT_3', 'VOIP_IS_ENABLED'],
|
|
11
11
|
coHost: ['HINT_4'],
|
|
12
12
|
},
|
|
13
13
|
};
|
|
@@ -27,47 +27,66 @@ describe('plugin-meetings', () => {
|
|
|
27
27
|
describe('parse', () => {
|
|
28
28
|
it('only gives includes display hints when user has the correct role', () => {
|
|
29
29
|
assert.deepEqual(InfoUtils.parse(info, ['MODERATOR']), {
|
|
30
|
-
policy: {HINT_3: true},
|
|
30
|
+
policy: {HINT_3: true, VOIP_IS_ENABLED: true},
|
|
31
31
|
moderator: {HINT_1: true, HINT_2: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
32
32
|
coHost: {HINT_4: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
33
|
-
userDisplayHints: [
|
|
33
|
+
userDisplayHints: [
|
|
34
|
+
'HINT_3',
|
|
35
|
+
'VOIP_IS_ENABLED',
|
|
36
|
+
'HINT_1',
|
|
37
|
+
'HINT_2',
|
|
38
|
+
'LOWER_SOMEONE_ELSES_HAND',
|
|
39
|
+
],
|
|
34
40
|
});
|
|
35
41
|
|
|
36
42
|
assert.deepEqual(InfoUtils.parse(info, ['MODERATOR', 'COHOST']), {
|
|
37
|
-
policy: {HINT_3: true},
|
|
43
|
+
policy: {HINT_3: true, VOIP_IS_ENABLED: true},
|
|
38
44
|
moderator: {HINT_1: true, HINT_2: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
39
45
|
coHost: {HINT_4: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
40
|
-
userDisplayHints: [
|
|
46
|
+
userDisplayHints: [
|
|
47
|
+
'HINT_3',
|
|
48
|
+
'VOIP_IS_ENABLED',
|
|
49
|
+
'HINT_4',
|
|
50
|
+
'LOWER_SOMEONE_ELSES_HAND',
|
|
51
|
+
'HINT_1',
|
|
52
|
+
'HINT_2',
|
|
53
|
+
],
|
|
41
54
|
});
|
|
42
55
|
|
|
43
56
|
assert.deepEqual(InfoUtils.parse(info, ['COHOST']), {
|
|
44
|
-
policy: {HINT_3: true},
|
|
57
|
+
policy: {HINT_3: true, VOIP_IS_ENABLED: true},
|
|
45
58
|
moderator: {HINT_1: true, HINT_2: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
46
59
|
coHost: {HINT_4: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
47
|
-
userDisplayHints: ['HINT_3', 'HINT_4', 'LOWER_SOMEONE_ELSES_HAND'],
|
|
60
|
+
userDisplayHints: ['HINT_3', 'VOIP_IS_ENABLED', 'HINT_4', 'LOWER_SOMEONE_ELSES_HAND'],
|
|
48
61
|
});
|
|
49
62
|
|
|
50
63
|
assert.deepEqual(InfoUtils.parse(info, []), {
|
|
51
|
-
policy: {HINT_3: true},
|
|
64
|
+
policy: {HINT_3: true, VOIP_IS_ENABLED: true},
|
|
52
65
|
moderator: {HINT_1: true, HINT_2: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
53
66
|
coHost: {HINT_4: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
54
|
-
userDisplayHints: ['HINT_3'],
|
|
67
|
+
userDisplayHints: ['HINT_3', 'VOIP_IS_ENABLED'],
|
|
55
68
|
});
|
|
56
69
|
});
|
|
57
70
|
|
|
58
|
-
it('only
|
|
71
|
+
it('only includes interstitial display hints when user has not joined the meeting', () => {
|
|
59
72
|
assert.deepEqual(InfoUtils.parse(info, ['MODERATOR'], false), {
|
|
60
|
-
policy: {HINT_3: true},
|
|
73
|
+
policy: {HINT_3: true, VOIP_IS_ENABLED: true},
|
|
61
74
|
moderator: {HINT_1: true, HINT_2: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
62
75
|
coHost: {HINT_4: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
63
|
-
userDisplayHints: ['HINT_1', 'HINT_2', 'LOWER_SOMEONE_ELSES_HAND'],
|
|
76
|
+
userDisplayHints: ['VOIP_IS_ENABLED', 'HINT_1', 'HINT_2', 'LOWER_SOMEONE_ELSES_HAND'],
|
|
64
77
|
});
|
|
65
78
|
|
|
66
79
|
assert.deepEqual(InfoUtils.parse(info, ['MODERATOR'], true), {
|
|
67
|
-
policy: {HINT_3: true},
|
|
80
|
+
policy: {HINT_3: true, VOIP_IS_ENABLED: true},
|
|
68
81
|
moderator: {HINT_1: true, HINT_2: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
69
82
|
coHost: {HINT_4: true, LOWER_SOMEONE_ELSES_HAND: true},
|
|
70
|
-
userDisplayHints: [
|
|
83
|
+
userDisplayHints: [
|
|
84
|
+
'HINT_3',
|
|
85
|
+
'VOIP_IS_ENABLED',
|
|
86
|
+
'HINT_1',
|
|
87
|
+
'HINT_2',
|
|
88
|
+
'LOWER_SOMEONE_ELSES_HAND',
|
|
89
|
+
],
|
|
71
90
|
});
|
|
72
91
|
});
|
|
73
92
|
|
|
@@ -96,7 +115,10 @@ describe('plugin-meetings', () => {
|
|
|
96
115
|
HINT_2: true,
|
|
97
116
|
});
|
|
98
117
|
|
|
99
|
-
assert.deepEqual(InfoUtils.parseDisplayHintSection(info, 'joined'), {
|
|
118
|
+
assert.deepEqual(InfoUtils.parseDisplayHintSection(info, 'joined'), {
|
|
119
|
+
HINT_3: true,
|
|
120
|
+
VOIP_IS_ENABLED: true,
|
|
121
|
+
});
|
|
100
122
|
|
|
101
123
|
assert.deepEqual(InfoUtils.parseDisplayHintSection({}, 'joined'), {});
|
|
102
124
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import MediaSharesUtils from '@webex/plugin-meetings/src/locus-info/mediaSharesUtils';
|
|
2
|
+
import {assert} from "chai";
|
|
3
|
+
import Sinon from "sinon";
|
|
4
|
+
|
|
5
|
+
describe('getShareInstanceId', () => {
|
|
6
|
+
it('getShareInstanceId return correct shareInstanceId value', () => {
|
|
7
|
+
const stub = Sinon.stub(MediaSharesUtils, 'extractContent').returns({ floor:{shareInstanceId:'shareInstanceId'}});
|
|
8
|
+
const shareInstanceId = MediaSharesUtils.getShareInstanceId();
|
|
9
|
+
assert.equal(shareInstanceId,'shareInstanceId');
|
|
10
|
+
stub.restore();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe('getContentUrl', () => {
|
|
15
|
+
it('getContentUrl return correct url value', () => {
|
|
16
|
+
const stub = Sinon.stub(MediaSharesUtils, 'extractContent').returns({url:'url'});
|
|
17
|
+
const url = MediaSharesUtils.getContentUrl();
|
|
18
|
+
assert.equal(url,'url');
|
|
19
|
+
stub.restore();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
@@ -238,6 +238,68 @@ describe('locus-info/parser', () => {
|
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
240
|
|
|
241
|
+
describe('Full Locus handling', () => {
|
|
242
|
+
describe('isNewFullLocus', () => {
|
|
243
|
+
let parser;
|
|
244
|
+
|
|
245
|
+
beforeEach(() => {
|
|
246
|
+
parser = new LocusDeltaParser();
|
|
247
|
+
})
|
|
248
|
+
it('returns false if incoming Locus is not valid', () => {
|
|
249
|
+
const fakeInvalidIncomingLocus = {};
|
|
250
|
+
|
|
251
|
+
parser.workingCopy = { sequence: {rangeStart: 0, rangeEnd: 0, entries: [1]}};
|
|
252
|
+
|
|
253
|
+
assert.isFalse(parser.isNewFullLocus(fakeInvalidIncomingLocus));
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
const runCheck = (incomingSequence, currentSequence, expectedResult) => {
|
|
257
|
+
parser.workingCopy = { sequence: {rangeStart: 0, rangeEnd: 0, entries: [1, 2, currentSequence]}};
|
|
258
|
+
|
|
259
|
+
const fakeIncomingLocus = { sequence: {rangeStart: 0, rangeEnd: 0, entries: [1, 10, incomingSequence]}};
|
|
260
|
+
|
|
261
|
+
assert.strictEqual(parser.isNewFullLocus(fakeIncomingLocus), expectedResult);
|
|
262
|
+
}
|
|
263
|
+
it('returns true if there is no working copy', () => {
|
|
264
|
+
const fakeIncomingLocus = { sequence: {rangeStart: 0, rangeEnd: 0, entries: [10]}};
|
|
265
|
+
|
|
266
|
+
// sanity check that we initially have no working copy
|
|
267
|
+
assert.isNull(parser.workingCopy);
|
|
268
|
+
|
|
269
|
+
assert.isTrue(parser.isNewFullLocus(fakeIncomingLocus));
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('returns true if new sequence is higher than existing one', () => {
|
|
273
|
+
runCheck(101, 100, true);
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
it('returns false if new sequence is same than existing one', () => {
|
|
277
|
+
runCheck(100, 100, false);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
it('returns false if new sequence is older than existing one', () => {
|
|
281
|
+
runCheck(99, 100, false);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
it('returns true if incoming Locus has empty sequence', () => {
|
|
285
|
+
parser.workingCopy = { sequence: {rangeStart: 0, rangeEnd: 0, entries: [1, 2, 3]}};
|
|
286
|
+
|
|
287
|
+
const fakeIncomingLocus = { sequence: {rangeStart: 0, rangeEnd: 0, entries: []}};
|
|
288
|
+
|
|
289
|
+
assert.isTrue(parser.isNewFullLocus(fakeIncomingLocus));
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
it('returns true if working copy has empty sequence', () => {
|
|
293
|
+
parser.workingCopy = { sequence: {rangeStart: 0, rangeEnd: 0, entries: []}};
|
|
294
|
+
|
|
295
|
+
const fakeIncomingLocus = { sequence: {rangeStart: 0, rangeEnd: 0, entries: [1,2,3]}};
|
|
296
|
+
|
|
297
|
+
assert.isTrue(parser.isNewFullLocus(fakeIncomingLocus));
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
})
|
|
301
|
+
});
|
|
302
|
+
|
|
241
303
|
describe('Invalid Locus objects', () => {
|
|
242
304
|
let sandbox = null;
|
|
243
305
|
let parser;
|
|
@@ -272,27 +334,5 @@ describe('locus-info/parser', () => {
|
|
|
272
334
|
|
|
273
335
|
assert.isFalse(result);
|
|
274
336
|
});
|
|
275
|
-
|
|
276
|
-
it('sets parser status to IDLE if workingCopy is invalid', () => {
|
|
277
|
-
const {IDLE, WORKING} = LocusDeltaParser.status;
|
|
278
|
-
|
|
279
|
-
parser.workingCopy = null;
|
|
280
|
-
parser.status = WORKING;
|
|
281
|
-
|
|
282
|
-
parser.isValidLocus(loci);
|
|
283
|
-
|
|
284
|
-
assert.equal(parser.status, IDLE);
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
it('sets parser status to IDLE if new loci is invalid', () => {
|
|
288
|
-
const {IDLE, WORKING} = LocusDeltaParser.status;
|
|
289
|
-
|
|
290
|
-
parser.workingCopy = loci;
|
|
291
|
-
parser.status = WORKING;
|
|
292
|
-
|
|
293
|
-
parser.isValidLocus(null);
|
|
294
|
-
|
|
295
|
-
assert.equal(parser.status, IDLE);
|
|
296
|
-
});
|
|
297
337
|
});
|
|
298
338
|
});
|
|
@@ -66,6 +66,15 @@ export const self = {
|
|
|
66
66
|
},
|
|
67
67
|
],
|
|
68
68
|
mediaSessionsExternal: false,
|
|
69
|
+
replaces: [
|
|
70
|
+
{
|
|
71
|
+
breakoutMoveId: 'e5caeb2c-ffcc-4e06-a08a-1122e7710398',
|
|
72
|
+
lastActive: '2023-05-04T07:14:32.068Z',
|
|
73
|
+
locusUrl: 'https://locus-alpha-apdx.prod.meetapi.webex.com/locus/api/v1/loci/495061ca-7b3c-3b77-85ff-4e1bd58600d1',
|
|
74
|
+
replacedAt: '2023-05-04T07:16:04.905Z',
|
|
75
|
+
sessionId: 'be3147d4-c318-86d8-7611-8d24beaaca8d',
|
|
76
|
+
}
|
|
77
|
+
],
|
|
69
78
|
state: 'JOINED',
|
|
70
79
|
intent: {type: ''},
|
|
71
80
|
intents: [null],
|
|
@@ -138,6 +147,16 @@ export const self = {
|
|
|
138
147
|
readOnly: true,
|
|
139
148
|
},
|
|
140
149
|
},
|
|
150
|
+
interpretation: {
|
|
151
|
+
originalLanguage: 'en',
|
|
152
|
+
sourceLanguage: 'en',
|
|
153
|
+
targetLanguage: 'cn',
|
|
154
|
+
order: 0,
|
|
155
|
+
isActive: true,
|
|
156
|
+
meta: {
|
|
157
|
+
lastModified: '2023-07-11T01:57:31.040Z',
|
|
158
|
+
}
|
|
159
|
+
},
|
|
141
160
|
localRecord: {
|
|
142
161
|
recording: false,
|
|
143
162
|
},
|
|
@@ -251,6 +251,55 @@ describe('plugin-meetings', () => {
|
|
|
251
251
|
assert.equal(updates.canNotViewTheParticipantListChanged, false);
|
|
252
252
|
});
|
|
253
253
|
});
|
|
254
|
+
|
|
255
|
+
describe('localAudioUnmuteRequestedByServer', () => {
|
|
256
|
+
it('should return localAudioUnmuteRequestedByServer = false when requestedToUnmute = false', () => {
|
|
257
|
+
const clonedSelf = cloneDeep(self);
|
|
258
|
+
|
|
259
|
+
const {updates} = SelfUtils.getSelves(self, clonedSelf);
|
|
260
|
+
|
|
261
|
+
assert.equal(updates.localAudioUnmuteRequestedByServer, false);
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
it('should return localAudioUnmuteRequestedByServer = true when first request is made with requestedToUnmute = true', () => {
|
|
265
|
+
const clonedSelf = cloneDeep(self);
|
|
266
|
+
|
|
267
|
+
//request to unmute with timestamp
|
|
268
|
+
clonedSelf.controls.audio.requestedToUnmute = true;
|
|
269
|
+
clonedSelf.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z';
|
|
270
|
+
|
|
271
|
+
const {updates} = SelfUtils.getSelves(self, clonedSelf);
|
|
272
|
+
|
|
273
|
+
assert.equal(updates.localAudioUnmuteRequestedByServer, true);
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
it('should return localAudioUnmuteRequestedByServer = true when requestedToUnmute = true and new requests lastModifiedRequestedToUnmute timestamp is greater than old one', () => {
|
|
277
|
+
self.controls.audio.requestedToUnmute = true;
|
|
278
|
+
self.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z';
|
|
279
|
+
const clonedSelf = cloneDeep(self);
|
|
280
|
+
|
|
281
|
+
//request to unmute with timestamp
|
|
282
|
+
clonedSelf.controls.audio.requestedToUnmute = true;
|
|
283
|
+
clonedSelf.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T19:25:04.369Z';
|
|
284
|
+
|
|
285
|
+
const {updates} = SelfUtils.getSelves(self, clonedSelf);
|
|
286
|
+
|
|
287
|
+
assert.equal(updates.localAudioUnmuteRequestedByServer, true);
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
it('should return localAudioUnmuteRequestedByServer = false when requestedToUnmute but lastModifiedRequestedToUnmute timestamps are same', () => {
|
|
291
|
+
self.controls.audio.requestedToUnmute = true;
|
|
292
|
+
self.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z';
|
|
293
|
+
const clonedSelf = cloneDeep(self);
|
|
294
|
+
|
|
295
|
+
clonedSelf.controls.audio.requestedToUnmute = true;
|
|
296
|
+
clonedSelf.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z'
|
|
297
|
+
|
|
298
|
+
const {updates} = SelfUtils.getSelves(self, clonedSelf);
|
|
299
|
+
|
|
300
|
+
assert.equal(updates.localAudioUnmuteRequestedByServer, false);
|
|
301
|
+
});
|
|
302
|
+
});
|
|
254
303
|
});
|
|
255
304
|
|
|
256
305
|
describe('isSharingBlocked', () => {
|
|
@@ -316,40 +365,96 @@ describe('plugin-meetings', () => {
|
|
|
316
365
|
});
|
|
317
366
|
});
|
|
318
367
|
|
|
319
|
-
describe('
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
368
|
+
describe('getReplacedBreakoutMoveId', () => {
|
|
369
|
+
const deviceId = 'https://wdm-a.wbx2.com/wdm/api/v1/devices/20eabde3-4254-48da-9a24';
|
|
370
|
+
const breakoutMoveId = 'e5caeb2c-ffcc-4e06-a08a-1122e7710398';
|
|
371
|
+
const clonedSelf = cloneDeep(self);
|
|
372
|
+
|
|
373
|
+
it('get breakoutMoveId works', () => {
|
|
374
|
+
|
|
375
|
+
assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(self, deviceId), breakoutMoveId);
|
|
376
|
+
|
|
325
377
|
});
|
|
326
378
|
|
|
327
|
-
it('
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
379
|
+
it('replaces is empty', () => {
|
|
380
|
+
|
|
381
|
+
clonedSelf.devices[0].replaces = undefined;
|
|
382
|
+
assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(clonedSelf, deviceId), null);
|
|
383
|
+
|
|
332
384
|
});
|
|
333
385
|
|
|
334
|
-
it('
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
386
|
+
it('no self or self.devices is not array', () => {
|
|
387
|
+
|
|
388
|
+
assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(undefined, deviceId), null);
|
|
389
|
+
|
|
390
|
+
clonedSelf.devices = {
|
|
391
|
+
url: 'https://wdm-a.wbx2.com/wdm/api/v1/devices/20eabde3-4254-48da-9a24',
|
|
392
|
+
deviceType: 'WEB',
|
|
393
|
+
mediaSessionsExternal: false,
|
|
394
|
+
replaces: [
|
|
395
|
+
{
|
|
396
|
+
breakoutMoveId: 'e5caeb2c-ffcc-4e06-a08a-1122e7710398',
|
|
397
|
+
lastActive: '2023-05-04T07:14:32.068Z',
|
|
398
|
+
locusUrl: 'https://locus-alpha-apdx.prod.meetapi.webex.com/locus/api/v1/loci/495061ca-7b3c-3b77-85ff-4e1bd58600d1',
|
|
399
|
+
replacedAt: '2023-05-04T07:16:04.905Z',
|
|
400
|
+
sessionId: 'be3147d4-c318-86d8-7611-8d24beaaca8d',
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
state: 'JOINED',
|
|
404
|
+
};
|
|
405
|
+
assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(clonedSelf, deviceId), null);
|
|
339
406
|
});
|
|
407
|
+
});
|
|
340
408
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
);
|
|
409
|
+
describe('isRolesChanged', () => {
|
|
410
|
+
it('should return false if new self is null', () => {
|
|
411
|
+
const parsedSelf = SelfUtils.parse(self);
|
|
412
|
+
|
|
413
|
+
assert.deepEqual(SelfUtils.isRolesChanged(parsedSelf, null), false);
|
|
346
414
|
});
|
|
347
415
|
|
|
348
|
-
it('
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
416
|
+
it('should return true if self roles has changed', () => {
|
|
417
|
+
const parsedSelf = SelfUtils.parse(self);
|
|
418
|
+
const clonedSelf = cloneDeep(parsedSelf);
|
|
419
|
+
|
|
420
|
+
clonedSelf.roles = ['COHOST'];
|
|
421
|
+
|
|
422
|
+
assert.deepEqual(SelfUtils.isRolesChanged(parsedSelf, clonedSelf), true);
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
it('should return false if self roles has not changed', () => {
|
|
426
|
+
const parsedSelf = SelfUtils.parse(self);
|
|
427
|
+
const clonedSelf = cloneDeep(parsedSelf);
|
|
428
|
+
|
|
429
|
+
clonedSelf.roles = ['PRESENTER'];
|
|
430
|
+
|
|
431
|
+
assert.deepEqual(SelfUtils.isRolesChanged(parsedSelf, clonedSelf), false);
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
describe('interpretationChanged', () => {
|
|
436
|
+
it('should return false if new self is null', () => {
|
|
437
|
+
const parsedSelf = SelfUtils.parse(self);
|
|
438
|
+
|
|
439
|
+
assert.deepEqual(SelfUtils.interpretationChanged(parsedSelf, null), false);
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
it('should return true if interpretation info has changed', () => {
|
|
443
|
+
const parsedSelf = SelfUtils.parse(self);
|
|
444
|
+
const clonedSelf = cloneDeep(parsedSelf);
|
|
445
|
+
|
|
446
|
+
clonedSelf.interpretation.sourceLanguage = 'ja';
|
|
447
|
+
|
|
448
|
+
assert.deepEqual(SelfUtils.interpretationChanged(parsedSelf, clonedSelf), true);
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
it('should return false if interpretation info has not changed', () => {
|
|
452
|
+
const parsedSelf = SelfUtils.parse(self);
|
|
453
|
+
const clonedSelf = cloneDeep(parsedSelf);
|
|
454
|
+
|
|
455
|
+
clonedSelf.interpretation.sourceLanguage = 'en';
|
|
456
|
+
|
|
457
|
+
assert.deepEqual(SelfUtils.interpretationChanged(parsedSelf, clonedSelf), false);
|
|
353
458
|
});
|
|
354
459
|
});
|
|
355
460
|
});
|