@webex/plugin-meetings 3.12.0-next.9 → 3.12.0-next.90
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/index.js +26 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +35 -9
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +13 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +880 -382
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +42 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +75 -15
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +10 -1
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +303 -88
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/index.js +3 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +1 -0
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1233 -793
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +5 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +35 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +231 -118
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +79 -5
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +30 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +5 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +62 -15
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/reachability/index.js +10 -13
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/types/config.d.ts +2 -2
- package/dist/types/constants.d.ts +12 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +2 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +146 -17
- package/dist/types/hashTree/utils.d.ts +18 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +50 -6
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +21 -1
- package/dist/types/media/properties.d.ts +1 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +94 -7
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +9 -0
- package/dist/types/meetings/index.d.ts +30 -18
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +9 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +4 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/reachability/index.d.ts +1 -1
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +305 -159
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/index.ts +31 -0
- package/src/config.ts +2 -2
- package/src/constants.ts +20 -3
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +16 -0
- package/src/hashTree/hashTreeParser.ts +580 -196
- package/src/hashTree/utils.ts +36 -0
- package/src/index.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/index.ts +27 -9
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +304 -100
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +25 -1
- package/src/media/index.ts +3 -0
- package/src/media/properties.ts +1 -0
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +494 -67
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +11 -0
- package/src/meeting/util.ts +47 -5
- package/src/meeting-info/meeting-info-v2.ts +4 -2
- package/src/meetings/index.ts +133 -78
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +97 -1
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +4 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +119 -28
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/reachability/index.ts +19 -15
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/webinar/index.ts +214 -36
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/index.ts +49 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1838 -180
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +499 -81
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/index.ts +31 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +1615 -42
- package/test/unit/spec/meeting/locusMediaRequest.ts +302 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +12 -0
- package/test/unit/spec/meeting/utils.js +157 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
- package/test/unit/spec/meetings/index.js +363 -36
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +189 -0
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +89 -0
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/reachability/index.ts +59 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/webinar/index.ts +329 -28
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import 'jsdom-global/register';
|
|
1
2
|
import {assert} from '@webex/test-helper-chai';
|
|
2
3
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
3
4
|
import { CapabilityState, WebCapabilities } from '@webex/web-capabilities';
|
|
@@ -63,6 +64,13 @@ describe('isAnyPublicClusterReachable', () => {
|
|
|
63
64
|
);
|
|
64
65
|
});
|
|
65
66
|
|
|
67
|
+
it('returns false when only xtls is reachable', async () => {
|
|
68
|
+
await checkIsClusterReachable(
|
|
69
|
+
{x: {udp: {result: 'unreachable'}, tcp: {result: 'unreachable'}, xtls: {result: 'reachable'}}},
|
|
70
|
+
false
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
66
74
|
it('returns false when both tcp and udp are unreachable', async () => {
|
|
67
75
|
await checkIsClusterReachable(
|
|
68
76
|
{x: {udp: {result: 'unreachable'}, tcp: {result: 'unreachable'}}},
|
|
@@ -70,6 +78,13 @@ describe('isAnyPublicClusterReachable', () => {
|
|
|
70
78
|
);
|
|
71
79
|
});
|
|
72
80
|
|
|
81
|
+
it('returns false when udp, tcp and xtls are all unreachable', async () => {
|
|
82
|
+
await checkIsClusterReachable(
|
|
83
|
+
{x: {udp: {result: 'unreachable'}, tcp: {result: 'unreachable'}, xtls: {result: 'unreachable'}}},
|
|
84
|
+
false
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
|
|
73
88
|
it('returns false when reachability result is empty', async () => {
|
|
74
89
|
await checkIsClusterReachable({x: {}}, false);
|
|
75
90
|
});
|
|
@@ -510,10 +525,7 @@ describe('gatherReachability', () => {
|
|
|
510
525
|
return mockInstance;
|
|
511
526
|
});
|
|
512
527
|
|
|
513
|
-
webex.config.meetings.
|
|
514
|
-
enableTcpReachability: false,
|
|
515
|
-
enableTlsReachability: false,
|
|
516
|
-
};
|
|
528
|
+
webex.config.meetings.enableReachabilityChecks = {tcp: false, tls: false};
|
|
517
529
|
});
|
|
518
530
|
|
|
519
531
|
afterEach(() => {
|
|
@@ -1229,10 +1241,7 @@ describe('gatherReachability', () => {
|
|
|
1229
1241
|
expectedMetrics,
|
|
1230
1242
|
}) =>
|
|
1231
1243
|
it(`works correctly for the case: ${title}`, async () => {
|
|
1232
|
-
webex.config.meetings.
|
|
1233
|
-
enableTcpReachability: true,
|
|
1234
|
-
enableTlsReachability: true,
|
|
1235
|
-
};
|
|
1244
|
+
webex.config.meetings.enableReachabilityChecks = true;
|
|
1236
1245
|
|
|
1237
1246
|
// the metrics related to ipver and trigger are not tested in these tests and are all the same, so setting them up here
|
|
1238
1247
|
const expectedMetricsFull = {
|
|
@@ -1367,10 +1376,7 @@ describe('gatherReachability', () => {
|
|
|
1367
1376
|
});
|
|
1368
1377
|
|
|
1369
1378
|
it(`starts ip network version detection and includes the results in the metrics`, async () => {
|
|
1370
|
-
webex.config.meetings.
|
|
1371
|
-
enableTcpReachability: true,
|
|
1372
|
-
enableTlsReachability: true,
|
|
1373
|
-
};
|
|
1379
|
+
webex.config.meetings.enableReachabilityChecks = true;
|
|
1374
1380
|
webex.internal.device.ipNetworkDetector = {
|
|
1375
1381
|
supportsIpV4: true,
|
|
1376
1382
|
supportsIpV6: true,
|
|
@@ -1447,10 +1453,7 @@ describe('gatherReachability', () => {
|
|
|
1447
1453
|
});
|
|
1448
1454
|
|
|
1449
1455
|
it('keeps updating reachability results after the 3s public cloud timeout expires', async () => {
|
|
1450
|
-
webex.config.meetings.
|
|
1451
|
-
enableTcpReachability: true,
|
|
1452
|
-
enableTlsReachability: true,
|
|
1453
|
-
};
|
|
1456
|
+
webex.config.meetings.enableReachabilityChecks = true;
|
|
1454
1457
|
|
|
1455
1458
|
const reachability = new Reachability(webex);
|
|
1456
1459
|
|
|
@@ -1546,10 +1549,7 @@ describe('gatherReachability', () => {
|
|
|
1546
1549
|
});
|
|
1547
1550
|
|
|
1548
1551
|
it('handles clientMediaIpsUpdated event by updating clientMediaIps in results', async () => {
|
|
1549
|
-
webex.config.meetings.
|
|
1550
|
-
enableTcpReachability: true,
|
|
1551
|
-
enableTlsReachability: true,
|
|
1552
|
-
};
|
|
1552
|
+
webex.config.meetings.enableReachabilityChecks = true;
|
|
1553
1553
|
|
|
1554
1554
|
const reachability = new Reachability(webex);
|
|
1555
1555
|
|
|
@@ -1634,10 +1634,7 @@ describe('gatherReachability', () => {
|
|
|
1634
1634
|
});
|
|
1635
1635
|
|
|
1636
1636
|
it('starts ClusterReachability on each media cluster', async () => {
|
|
1637
|
-
webex.config.meetings.
|
|
1638
|
-
enableTcpReachability: true,
|
|
1639
|
-
enableTlsReachability: true,
|
|
1640
|
-
};
|
|
1637
|
+
webex.config.meetings.enableReachabilityChecks = true;
|
|
1641
1638
|
|
|
1642
1639
|
const getClustersResult = {
|
|
1643
1640
|
clusters: {
|
|
@@ -1686,10 +1683,7 @@ describe('gatherReachability', () => {
|
|
|
1686
1683
|
});
|
|
1687
1684
|
|
|
1688
1685
|
it('does not do TCP reachability if it is disabled in config', async () => {
|
|
1689
|
-
webex.config.meetings.
|
|
1690
|
-
enableTcpReachability: false,
|
|
1691
|
-
enableTlsReachability: true,
|
|
1692
|
-
};
|
|
1686
|
+
webex.config.meetings.enableReachabilityChecks = {tcp: false, tls: true};
|
|
1693
1687
|
|
|
1694
1688
|
const getClustersResult = {
|
|
1695
1689
|
clusters: {
|
|
@@ -1720,10 +1714,7 @@ describe('gatherReachability', () => {
|
|
|
1720
1714
|
});
|
|
1721
1715
|
|
|
1722
1716
|
it('does not do TLS reachability if it is disabled in config', async () => {
|
|
1723
|
-
webex.config.meetings.
|
|
1724
|
-
enableTcpReachability: true,
|
|
1725
|
-
enableTlsReachability: false,
|
|
1726
|
-
};
|
|
1717
|
+
webex.config.meetings.enableReachabilityChecks = {tcp: true, tls: false};
|
|
1727
1718
|
|
|
1728
1719
|
const getClustersResult = {
|
|
1729
1720
|
clusters: {
|
|
@@ -1755,10 +1746,7 @@ describe('gatherReachability', () => {
|
|
|
1755
1746
|
});
|
|
1756
1747
|
|
|
1757
1748
|
it('does not do TCP or TLS reachability if it is disabled in config', async () => {
|
|
1758
|
-
webex.config.meetings.
|
|
1759
|
-
enableTcpReachability: false,
|
|
1760
|
-
enableTlsReachability: false,
|
|
1761
|
-
};
|
|
1749
|
+
webex.config.meetings.enableReachabilityChecks = {tcp: false, tls: false};
|
|
1762
1750
|
|
|
1763
1751
|
const getClustersResult = {
|
|
1764
1752
|
clusters: {
|
|
@@ -1789,12 +1777,40 @@ describe('gatherReachability', () => {
|
|
|
1789
1777
|
}, undefined);
|
|
1790
1778
|
});
|
|
1791
1779
|
|
|
1792
|
-
it('
|
|
1793
|
-
webex.config.meetings.
|
|
1794
|
-
|
|
1795
|
-
|
|
1780
|
+
it('does UDP, TCP and TLS reachability by default (enableReachabilityChecks=true)', async () => {
|
|
1781
|
+
webex.config.meetings.enableReachabilityChecks = true;
|
|
1782
|
+
|
|
1783
|
+
const getClustersResult = {
|
|
1784
|
+
clusters: {
|
|
1785
|
+
'cluster name': {
|
|
1786
|
+
udp: ['testUDP1', 'testUDP2'],
|
|
1787
|
+
tcp: ['testTCP1', 'testTCP2'],
|
|
1788
|
+
xtls: ['testXTLS1', 'testXTLS2'],
|
|
1789
|
+
isVideoMesh: false,
|
|
1790
|
+
},
|
|
1791
|
+
},
|
|
1792
|
+
joinCookie: {id: 'id'},
|
|
1796
1793
|
};
|
|
1797
1794
|
|
|
1795
|
+
const reachability = new Reachability(webex);
|
|
1796
|
+
|
|
1797
|
+
reachability.reachabilityRequest.getClusters = sinon.stub().returns(getClustersResult);
|
|
1798
|
+
|
|
1799
|
+
const promise = reachability.gatherReachability('test');
|
|
1800
|
+
await simulateTimeout();
|
|
1801
|
+
await promise;
|
|
1802
|
+
|
|
1803
|
+
assert.calledOnceWithExactly(clusterReachabilityCtorStub, 'cluster name', {
|
|
1804
|
+
isVideoMesh: false,
|
|
1805
|
+
udp: ['testUDP1', 'testUDP2'],
|
|
1806
|
+
tcp: ['testTCP1', 'testTCP2'],
|
|
1807
|
+
xtls: ['testXTLS1', 'testXTLS2'],
|
|
1808
|
+
}, undefined);
|
|
1809
|
+
});
|
|
1810
|
+
|
|
1811
|
+
it('retry of getClusters is succesfull', async () => {
|
|
1812
|
+
webex.config.meetings.enableReachabilityChecks = {tcp: true, tls: false};
|
|
1813
|
+
|
|
1798
1814
|
const getClustersResult = {
|
|
1799
1815
|
clusters: {
|
|
1800
1816
|
'cluster name': {
|
|
@@ -1866,10 +1882,7 @@ describe('gatherReachability', () => {
|
|
|
1866
1882
|
};
|
|
1867
1883
|
|
|
1868
1884
|
beforeEach(() => {
|
|
1869
|
-
webex.config.meetings.
|
|
1870
|
-
enableTcpReachability: true,
|
|
1871
|
-
enableTlsReachability: true,
|
|
1872
|
-
};
|
|
1885
|
+
webex.config.meetings.enableReachabilityChecks = true;
|
|
1873
1886
|
|
|
1874
1887
|
receivedEvents = {
|
|
1875
1888
|
done: 0,
|
|
@@ -2133,7 +2146,7 @@ describe('gatherReachability', () => {
|
|
|
2133
2146
|
receivedEvents[event] = receivedEvents[event] + 1 || 1;
|
|
2134
2147
|
});
|
|
2135
2148
|
};
|
|
2136
|
-
|
|
2149
|
+
|
|
2137
2150
|
it('works as expected', async () => {
|
|
2138
2151
|
setListener('reachability:stopped');
|
|
2139
2152
|
setListener('reachability:done');
|
|
@@ -2948,4 +2961,4 @@ describe('isSubnetReachable', () => {
|
|
|
2948
2961
|
it(`returns false if the subnet is unreachable`, () => {
|
|
2949
2962
|
assert(!reachability.isSubnetReachable('11'));
|
|
2950
2963
|
});
|
|
2951
|
-
});
|
|
2964
|
+
});
|
|
@@ -3,9 +3,40 @@ import {assert} from '@webex/test-helper-chai';
|
|
|
3
3
|
import {
|
|
4
4
|
convertStunUrlToTurn,
|
|
5
5
|
convertStunUrlToTurnTls,
|
|
6
|
+
isReachabilityEnabled,
|
|
7
|
+
resolveReachabilityProtocols,
|
|
6
8
|
} from '@webex/plugin-meetings/src/reachability/util';
|
|
7
9
|
|
|
8
10
|
describe('plugin-meetings/src/reachability/util', () => {
|
|
11
|
+
describe('#resolveReachabilityProtocols()', () => {
|
|
12
|
+
[
|
|
13
|
+
{title: 'undefined defaults to all enabled', config: undefined, expected: {udp: true, tcp: true, tls: true}},
|
|
14
|
+
{title: 'true enables all protocols', config: true, expected: {udp: true, tcp: true, tls: true}},
|
|
15
|
+
{title: 'false disables all protocols', config: false, expected: {udp: false, tcp: false, tls: false}},
|
|
16
|
+
{title: 'empty object keeps udp on and defaults tcp/tls to enabled', config: {}, expected: {udp: true, tcp: true, tls: true}},
|
|
17
|
+
{title: 'object can disable tcp', config: {tcp: false}, expected: {udp: true, tcp: false, tls: true}},
|
|
18
|
+
{title: 'object can disable tls', config: {tls: false}, expected: {udp: true, tcp: true, tls: false}},
|
|
19
|
+
{title: 'object can disable both tcp and tls but udp stays on', config: {tcp: false, tls: false}, expected: {udp: true, tcp: false, tls: false}},
|
|
20
|
+
].forEach(({title, config, expected}) => {
|
|
21
|
+
it(`resolves: ${title}`, () => {
|
|
22
|
+
assert.deepEqual(resolveReachabilityProtocols(config as any), expected);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
describe('#isReachabilityEnabled()', () => {
|
|
28
|
+
[
|
|
29
|
+
{title: 'undefined', config: undefined, expected: true},
|
|
30
|
+
{title: 'true', config: true, expected: true},
|
|
31
|
+
{title: 'false', config: false, expected: false},
|
|
32
|
+
{title: 'object disabling tcp and tls (udp still on)', config: {tcp: false, tls: false}, expected: true},
|
|
33
|
+
].forEach(({title, config, expected}) => {
|
|
34
|
+
it(`returns ${expected} for ${title}`, () => {
|
|
35
|
+
assert.equal(isReachabilityEnabled(config as any), expected);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
9
40
|
describe('#convertStunUrlToTurn()', () => {
|
|
10
41
|
[
|
|
11
42
|
{
|
|
@@ -35,6 +35,7 @@ describe('plugin-meetings', () => {
|
|
|
35
35
|
beforeEach(() => {
|
|
36
36
|
request = {
|
|
37
37
|
request: sinon.stub().returns(Promise.resolve()),
|
|
38
|
+
locusDeltaRequest: sinon.stub().returns(Promise.resolve()),
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
controller = new RecordingController(request);
|
|
@@ -69,13 +70,13 @@ describe('plugin-meetings', () => {
|
|
|
69
70
|
|
|
70
71
|
const result = controller.startRecording();
|
|
71
72
|
|
|
72
|
-
assert.calledWith(request.
|
|
73
|
+
assert.calledWith(request.locusDeltaRequest, {
|
|
73
74
|
uri: `${locusUrl}/controls`,
|
|
74
75
|
body: {record: {recording: true, paused: false}},
|
|
75
76
|
method: HTTP_VERBS.PATCH,
|
|
76
77
|
});
|
|
77
78
|
|
|
78
|
-
assert.deepEqual(result, request.
|
|
79
|
+
assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
|
|
79
80
|
});
|
|
80
81
|
});
|
|
81
82
|
|
|
@@ -103,13 +104,13 @@ describe('plugin-meetings', () => {
|
|
|
103
104
|
|
|
104
105
|
const result = controller.stopRecording();
|
|
105
106
|
|
|
106
|
-
assert.calledWith(request.
|
|
107
|
+
assert.calledWith(request.locusDeltaRequest, {
|
|
107
108
|
uri: `${locusUrl}/controls`,
|
|
108
109
|
body: {record: {recording: false, paused: false}},
|
|
109
110
|
method: HTTP_VERBS.PATCH,
|
|
110
111
|
});
|
|
111
112
|
|
|
112
|
-
assert.deepEqual(result, request.
|
|
113
|
+
assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
|
|
113
114
|
});
|
|
114
115
|
});
|
|
115
116
|
|
|
@@ -139,13 +140,13 @@ describe('plugin-meetings', () => {
|
|
|
139
140
|
|
|
140
141
|
const result = controller.pauseRecording();
|
|
141
142
|
|
|
142
|
-
assert.calledWith(request.
|
|
143
|
+
assert.calledWith(request.locusDeltaRequest, {
|
|
143
144
|
uri: `${locusUrl}/controls`,
|
|
144
145
|
body: {record: {recording: true, paused: true}},
|
|
145
146
|
method: HTTP_VERBS.PATCH,
|
|
146
147
|
});
|
|
147
148
|
|
|
148
|
-
assert.deepEqual(result, request.
|
|
149
|
+
assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
|
|
149
150
|
});
|
|
150
151
|
});
|
|
151
152
|
|
|
@@ -176,13 +177,13 @@ describe('plugin-meetings', () => {
|
|
|
176
177
|
|
|
177
178
|
const result = controller.resumeRecording();
|
|
178
179
|
|
|
179
|
-
assert.calledWith(request.
|
|
180
|
+
assert.calledWith(request.locusDeltaRequest, {
|
|
180
181
|
uri: `${locusUrl}/controls`,
|
|
181
182
|
body: {record: {recording: true, paused: false}},
|
|
182
183
|
method: HTTP_VERBS.PATCH,
|
|
183
184
|
});
|
|
184
185
|
|
|
185
|
-
assert.deepEqual(result, request.
|
|
186
|
+
assert.deepEqual(result, request.locusDeltaRequest.firstCall.returnValue);
|
|
186
187
|
});
|
|
187
188
|
});
|
|
188
189
|
});
|