@webex/plugin-meetings 3.0.0-next.3 → 3.0.0-next.30

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.
Files changed (130) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/config.d.ts +1 -0
  4. package/dist/config.js +2 -1
  5. package/dist/config.js.map +1 -1
  6. package/dist/constants.d.ts +3 -4
  7. package/dist/constants.js +2 -2
  8. package/dist/constants.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +6 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/interpretation/index.js +3 -3
  13. package/dist/interpretation/index.js.map +1 -1
  14. package/dist/interpretation/siLanguage.js +1 -1
  15. package/dist/locus-info/mediaSharesUtils.js +15 -1
  16. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  17. package/dist/locus-info/selfUtils.js +5 -0
  18. package/dist/locus-info/selfUtils.js.map +1 -1
  19. package/dist/media/MediaConnectionAwaiter.d.ts +61 -0
  20. package/dist/media/MediaConnectionAwaiter.js +163 -0
  21. package/dist/media/MediaConnectionAwaiter.js.map +1 -0
  22. package/dist/media/index.js +4 -1
  23. package/dist/media/index.js.map +1 -1
  24. package/dist/media/properties.js +4 -24
  25. package/dist/media/properties.js.map +1 -1
  26. package/dist/meeting/index.d.ts +18 -7
  27. package/dist/meeting/index.js +859 -674
  28. package/dist/meeting/index.js.map +1 -1
  29. package/dist/meeting/muteState.d.ts +2 -8
  30. package/dist/meeting/muteState.js +37 -25
  31. package/dist/meeting/muteState.js.map +1 -1
  32. package/dist/meeting/request.d.ts +3 -0
  33. package/dist/meeting/request.js +32 -23
  34. package/dist/meeting/request.js.map +1 -1
  35. package/dist/meeting/util.js +1 -0
  36. package/dist/meeting/util.js.map +1 -1
  37. package/dist/meeting-info/utilv2.js +4 -1
  38. package/dist/meeting-info/utilv2.js.map +1 -1
  39. package/dist/meetings/index.d.ts +8 -0
  40. package/dist/meetings/index.js +20 -0
  41. package/dist/meetings/index.js.map +1 -1
  42. package/dist/multistream/mediaRequestManager.d.ts +1 -2
  43. package/dist/multistream/mediaRequestManager.js.map +1 -1
  44. package/dist/multistream/remoteMediaGroup.d.ts +1 -1
  45. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  46. package/dist/multistream/remoteMediaManager.d.ts +1 -2
  47. package/dist/multistream/remoteMediaManager.js.map +1 -1
  48. package/dist/multistream/sendSlotManager.d.ts +1 -2
  49. package/dist/multistream/sendSlotManager.js.map +1 -1
  50. package/dist/reachability/clusterReachability.d.ts +1 -0
  51. package/dist/reachability/clusterReachability.js +29 -15
  52. package/dist/reachability/clusterReachability.js.map +1 -1
  53. package/dist/reachability/index.d.ts +4 -0
  54. package/dist/reachability/index.js +18 -2
  55. package/dist/reachability/index.js.map +1 -1
  56. package/dist/reachability/request.js +12 -10
  57. package/dist/reachability/request.js.map +1 -1
  58. package/dist/reachability/util.d.ts +7 -0
  59. package/dist/reachability/util.js +19 -0
  60. package/dist/reachability/util.js.map +1 -1
  61. package/dist/reconnection-manager/index.js +2 -1
  62. package/dist/reconnection-manager/index.js.map +1 -1
  63. package/dist/roap/index.d.ts +10 -2
  64. package/dist/roap/index.js +15 -0
  65. package/dist/roap/index.js.map +1 -1
  66. package/dist/roap/request.js +2 -2
  67. package/dist/roap/request.js.map +1 -1
  68. package/dist/roap/turnDiscovery.d.ts +64 -17
  69. package/dist/roap/turnDiscovery.js +307 -126
  70. package/dist/roap/turnDiscovery.js.map +1 -1
  71. package/dist/statsAnalyzer/index.js +53 -30
  72. package/dist/statsAnalyzer/index.js.map +1 -1
  73. package/dist/webinar/index.js +1 -1
  74. package/package.json +22 -22
  75. package/src/config.ts +1 -0
  76. package/src/constants.ts +3 -3
  77. package/src/index.ts +1 -0
  78. package/src/interpretation/index.ts +2 -2
  79. package/src/locus-info/mediaSharesUtils.ts +16 -0
  80. package/src/locus-info/selfUtils.ts +5 -0
  81. package/src/media/MediaConnectionAwaiter.ts +174 -0
  82. package/src/media/index.ts +3 -1
  83. package/src/media/properties.ts +6 -31
  84. package/src/meeting/index.ts +283 -105
  85. package/src/meeting/muteState.ts +34 -20
  86. package/src/meeting/request.ts +18 -2
  87. package/src/meeting/util.ts +1 -0
  88. package/src/meeting-info/utilv2.ts +2 -1
  89. package/src/meetings/index.ts +18 -0
  90. package/src/multistream/mediaRequestManager.ts +1 -1
  91. package/src/multistream/remoteMediaGroup.ts +1 -1
  92. package/src/multistream/remoteMediaManager.ts +1 -2
  93. package/src/multistream/sendSlotManager.ts +1 -2
  94. package/src/reachability/clusterReachability.ts +20 -5
  95. package/src/reachability/index.ts +24 -1
  96. package/src/reachability/request.ts +15 -11
  97. package/src/reachability/util.ts +21 -0
  98. package/src/reconnection-manager/index.ts +1 -1
  99. package/src/roap/index.ts +25 -3
  100. package/src/roap/request.ts +2 -2
  101. package/src/roap/turnDiscovery.ts +244 -78
  102. package/src/statsAnalyzer/index.ts +63 -27
  103. package/test/integration/spec/journey.js +14 -14
  104. package/test/integration/spec/space-meeting.js +1 -1
  105. package/test/unit/spec/interpretation/index.ts +4 -1
  106. package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
  107. package/test/unit/spec/locus-info/selfUtils.js +35 -0
  108. package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
  109. package/test/unit/spec/media/index.ts +89 -78
  110. package/test/unit/spec/media/properties.ts +16 -70
  111. package/test/unit/spec/meeting/index.js +618 -143
  112. package/test/unit/spec/meeting/muteState.js +219 -67
  113. package/test/unit/spec/meeting/request.js +21 -0
  114. package/test/unit/spec/meeting/utils.js +6 -1
  115. package/test/unit/spec/meeting-info/utilv2.js +6 -0
  116. package/test/unit/spec/meetings/index.js +40 -20
  117. package/test/unit/spec/multistream/remoteMediaGroup.ts +0 -1
  118. package/test/unit/spec/multistream/remoteMediaManager.ts +0 -1
  119. package/test/unit/spec/reachability/clusterReachability.ts +86 -22
  120. package/test/unit/spec/reachability/index.ts +197 -60
  121. package/test/unit/spec/reachability/request.js +15 -7
  122. package/test/unit/spec/reachability/util.ts +32 -2
  123. package/test/unit/spec/reconnection-manager/index.js +28 -0
  124. package/test/unit/spec/roap/index.ts +61 -6
  125. package/test/unit/spec/roap/turnDiscovery.ts +298 -16
  126. package/test/unit/spec/stats-analyzer/index.js +179 -0
  127. package/dist/member/member.types.d.ts +0 -11
  128. package/dist/member/member.types.js +0 -17
  129. package/dist/member/member.types.js.map +0 -1
  130. package/src/member/member.types.ts +0 -13
@@ -253,6 +253,19 @@ describe('plugin-meetings', () => {
253
253
  });
254
254
  });
255
255
 
256
+ describe('#_toggleTlsReachability', () => {
257
+ it('should have _toggleTlsReachability', () => {
258
+ assert.equal(typeof webex.meetings._toggleTlsReachability, 'function');
259
+ });
260
+
261
+ describe('success', () => {
262
+ it('should update meetings to do TLS reachability', () => {
263
+ webex.meetings._toggleTlsReachability(true);
264
+ assert.equal(webex.meetings.config.experimental.enableTlsReachability, true);
265
+ });
266
+ });
267
+ });
268
+
256
269
  describe('Public API Contracts', () => {
257
270
  describe('#register', () => {
258
271
  it('emits an event and resolves when register succeeds', async () => {
@@ -412,9 +425,13 @@ describe('plugin-meetings', () => {
412
425
  assert.exists(result);
413
426
  assert.instanceOf(result, NoiseReductionEffect);
414
427
  assert.containsAllKeys(result, ['audioContext', 'isEnabled', 'isReady', 'options']);
428
+ assert.equal(result.options.authToken, 'fake_token');
415
429
  assert.deepEqual(result.options, {
416
- authToken: 'fake_token',
417
430
  audioContext: {},
431
+ authToken: 'fake_token',
432
+ mode: 'WORKLET',
433
+ env: 'prod',
434
+ avoidSimd: false,
418
435
  });
419
436
  assert.exists(result.enable);
420
437
  assert.exists(result.disable);
@@ -424,8 +441,9 @@ describe('plugin-meetings', () => {
424
441
  it('creates noise reduction effect with custom options passed', async () => {
425
442
  const effectOptions = {
426
443
  audioContext: {},
427
- mode: 'WORKLET',
428
- env: 'prod',
444
+ mode: 'LEGACY',
445
+ env: 'int',
446
+ avoidSimd: true,
429
447
  };
430
448
 
431
449
  const result = await webex.meetings.createNoiseReductionEffect(effectOptions);
@@ -2003,24 +2021,27 @@ describe('plugin-meetings', () => {
2003
2021
  assert.notCalled(loggerProxySpy);
2004
2022
  });
2005
2023
 
2006
- forEach([
2007
- {user: undefined},
2008
- {user: {userPreferences: {}}},
2009
- {user: {userPreferences: {userPreferencesItems: {}}}},
2010
- {user: {userPreferences: {userPreferencesItems: {preferredWebExSite: undefined}}}},
2011
- ], ({user}) => {
2012
- it(`should handle invalid user data ${user}`, async () => {
2013
- setup({user});
2024
+ forEach(
2025
+ [
2026
+ {user: undefined},
2027
+ {user: {userPreferences: {}}},
2028
+ {user: {userPreferences: {userPreferencesItems: {}}}},
2029
+ {user: {userPreferences: {userPreferencesItems: {preferredWebExSite: undefined}}}},
2030
+ ],
2031
+ ({user}) => {
2032
+ it(`should handle invalid user data ${user}`, async () => {
2033
+ setup({user});
2014
2034
 
2015
- await webex.meetings.fetchUserPreferredWebexSite();
2035
+ await webex.meetings.fetchUserPreferredWebexSite();
2016
2036
 
2017
- assert.equal(webex.meetings.preferredWebexSite, '');
2018
- assert.calledOnceWithExactly(
2019
- loggerProxySpy,
2020
- 'Failed to fetch preferred site from user - no site will be set'
2021
- );
2022
- });
2023
- });
2037
+ assert.equal(webex.meetings.preferredWebexSite, '');
2038
+ assert.calledOnceWithExactly(
2039
+ loggerProxySpy,
2040
+ 'Failed to fetch preferred site from user - no site will be set'
2041
+ );
2042
+ });
2043
+ }
2044
+ );
2024
2045
 
2025
2046
  it('should handle a get user failure', async () => {
2026
2047
  setup();
@@ -2035,7 +2056,6 @@ describe('plugin-meetings', () => {
2035
2056
  'Failed to fetch preferred site from user - no site will be set'
2036
2057
  );
2037
2058
  });
2038
-
2039
2059
  });
2040
2060
  });
2041
2061
 
@@ -6,7 +6,6 @@ import {RemoteMedia} from '@webex/plugin-meetings/src/multistream/remoteMedia';
6
6
  import {ReceiveSlot} from '@webex/plugin-meetings/src/multistream/receiveSlot';
7
7
  import sinon from 'sinon';
8
8
  import {assert} from '@webex/test-helper-chai';
9
- import { NamedMediaGroup } from "@webex/json-multistream";
10
9
 
11
10
  class FakeSlot extends EventEmitter {
12
11
  public mediaType: MediaType;
@@ -18,7 +18,6 @@ import testUtils from '../../../utils/testUtils';
18
18
  import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
19
19
  import LoggerConfig from '@webex/plugin-meetings/src/common/logs/logger-config';
20
20
  import { expect } from 'chai';
21
- import { NamedMediaGroup } from "@webex/json-multistream";
22
21
 
23
22
  class FakeSlot extends EventEmitter {
24
23
  public mediaType: MediaType;
@@ -4,7 +4,7 @@ import sinon from 'sinon';
4
4
  import testUtils from '../../../utils/testUtils';
5
5
 
6
6
  // packages/@webex/plugin-meetings/test/unit/spec/reachability/clusterReachability.ts
7
- import { ClusterReachability } from '@webex/plugin-meetings/src/reachability/clusterReachability'; // replace with actual path
7
+ import {ClusterReachability} from '@webex/plugin-meetings/src/reachability/clusterReachability'; // replace with actual path
8
8
 
9
9
  describe('ClusterReachability', () => {
10
10
  let previousRTCPeerConnection;
@@ -28,9 +28,8 @@ describe('ClusterReachability', () => {
28
28
  isVideoMesh: false,
29
29
  udp: ['stun:udp1', 'stun:udp2'],
30
30
  tcp: ['stun:tcp1.webex.com', 'stun:tcp2.webex.com:5004'],
31
- xtls: ['xtls1', 'xtls2'],
31
+ xtls: ['stun:xtls1.webex.com', 'stun:xtls2.webex.com:443'],
32
32
  });
33
-
34
33
  });
35
34
 
36
35
  afterEach(() => {
@@ -50,8 +49,26 @@ describe('ClusterReachability', () => {
50
49
  iceServers: [
51
50
  {username: '', credential: '', urls: ['stun:udp1']},
52
51
  {username: '', credential: '', urls: ['stun:udp2']},
53
- {username: 'webexturnreachuser', credential: 'webexturnreachpwd', urls: ['turn:tcp1.webex.com?transport=tcp']},
54
- {username: 'webexturnreachuser', credential: 'webexturnreachpwd', urls: ['turn:tcp2.webex.com:5004?transport=tcp']}
52
+ {
53
+ username: 'webexturnreachuser',
54
+ credential: 'webexturnreachpwd',
55
+ urls: ['turn:tcp1.webex.com?transport=tcp'],
56
+ },
57
+ {
58
+ username: 'webexturnreachuser',
59
+ credential: 'webexturnreachpwd',
60
+ urls: ['turn:tcp2.webex.com:5004?transport=tcp'],
61
+ },
62
+ {
63
+ username: 'webexturnreachuser',
64
+ credential: 'webexturnreachpwd',
65
+ urls: ['turns:xtls1.webex.com?transport=tcp'],
66
+ },
67
+ {
68
+ username: 'webexturnreachuser',
69
+ credential: 'webexturnreachpwd',
70
+ urls: ['turns:xtls2.webex.com:443?transport=tcp'],
71
+ },
55
72
  ],
56
73
  iceCandidatePoolSize: 0,
57
74
  iceTransportPolicy: 'all',
@@ -79,7 +96,7 @@ describe('ClusterReachability', () => {
79
96
  assert.deepEqual(clusterReachability.getResult(), {
80
97
  udp: {result: 'untested'},
81
98
  tcp: {result: 'untested'},
82
- xtls: {result: 'untested'}
99
+ xtls: {result: 'untested'},
83
100
  });
84
101
  });
85
102
 
@@ -92,7 +109,7 @@ describe('ClusterReachability', () => {
92
109
 
93
110
  afterEach(() => {
94
111
  clock.restore();
95
- })
112
+ });
96
113
 
97
114
  it('should initiate the ICE gathering process', async () => {
98
115
  const promise = clusterReachability.start();
@@ -107,11 +124,11 @@ describe('ClusterReachability', () => {
107
124
  assert.calledOnceWithExactly(fakePeerConnection.createOffer, {offerToReceiveAudio: true});
108
125
  assert.calledOnce(fakePeerConnection.setLocalDescription);
109
126
 
110
- await clock.tickAsync(3000);// move the clock so that reachability times out
127
+ await clock.tickAsync(3000); // move the clock so that reachability times out
111
128
  await promise;
112
129
  });
113
130
 
114
- it('resolves and has correct result as soon as it finds that both udp and tcp is reachable', async () => {
131
+ it('resolves and has correct result as soon as it finds that all udp, tcp and tls are reachable', async () => {
115
132
  const promise = clusterReachability.start();
116
133
 
117
134
  await clock.tickAsync(100);
@@ -120,12 +137,17 @@ describe('ClusterReachability', () => {
120
137
  await clock.tickAsync(100);
121
138
  fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp'}});
122
139
 
140
+ await clock.tickAsync(100);
141
+ fakePeerConnection.onicecandidate({
142
+ candidate: {type: 'relay', address: 'someTurnRelayIp', port: 443},
143
+ });
144
+
123
145
  await promise;
124
146
 
125
147
  assert.deepEqual(clusterReachability.getResult(), {
126
148
  udp: {result: 'reachable', latencyInMilliseconds: 100, clientMediaIPs: ['somePublicIp']},
127
149
  tcp: {result: 'reachable', latencyInMilliseconds: 200},
128
- xtls: {result: 'untested'}
150
+ xtls: {result: 'reachable', latencyInMilliseconds: 300},
129
151
  });
130
152
  });
131
153
 
@@ -139,7 +161,7 @@ describe('ClusterReachability', () => {
139
161
  assert.deepEqual(clusterReachability.getResult(), {
140
162
  udp: {result: 'unreachable'},
141
163
  tcp: {result: 'unreachable'},
142
- xtls: {result: 'untested'}
164
+ xtls: {result: 'unreachable'},
143
165
  });
144
166
  });
145
167
 
@@ -148,7 +170,7 @@ describe('ClusterReachability', () => {
148
170
  isVideoMesh: true,
149
171
  udp: ['stun:udp1', 'stun:udp2'],
150
172
  tcp: ['stun:tcp1.webex.com', 'stun:tcp2.webex.com:5004'],
151
- xtls: ['xtls1', 'xtls2'],
173
+ xtls: ['stun:xtls1.webex.com', 'stun:xtls1.webex.com:443'],
152
174
  });
153
175
 
154
176
  const promise = clusterReachability.start();
@@ -160,7 +182,7 @@ describe('ClusterReachability', () => {
160
182
  assert.deepEqual(clusterReachability.getResult(), {
161
183
  udp: {result: 'unreachable'},
162
184
  tcp: {result: 'unreachable'},
163
- xtls: {result: 'untested'}
185
+ xtls: {result: 'unreachable'},
164
186
  });
165
187
  });
166
188
 
@@ -176,7 +198,7 @@ describe('ClusterReachability', () => {
176
198
  assert.deepEqual(clusterReachability.getResult(), {
177
199
  udp: {result: 'unreachable'},
178
200
  tcp: {result: 'unreachable'},
179
- xtls: {result: 'untested'}
201
+ xtls: {result: 'unreachable'},
180
202
  });
181
203
  });
182
204
 
@@ -194,7 +216,7 @@ describe('ClusterReachability', () => {
194
216
  assert.deepEqual(clusterReachability.getResult(), {
195
217
  udp: {result: 'reachable', latencyInMilliseconds: 30, clientMediaIPs: ['somePublicIp1']},
196
218
  tcp: {result: 'unreachable'},
197
- xtls: {result: 'untested'}
219
+ xtls: {result: 'unreachable'},
198
220
  });
199
221
  });
200
222
 
@@ -211,15 +233,19 @@ describe('ClusterReachability', () => {
211
233
  await clock.tickAsync(10);
212
234
  fakePeerConnection.onicecandidate({candidate: {type: 'srflx', address: 'somePublicIp3'}});
213
235
 
214
- await clock.tickAsync(3000);// move the clock so that reachability times out
236
+ await clock.tickAsync(3000); // move the clock so that reachability times out
215
237
 
216
238
  await promise;
217
239
 
218
240
  // latency should be from only the first candidates, but the clientMediaIps should be from all UDP candidates (not TCP)
219
241
  assert.deepEqual(clusterReachability.getResult(), {
220
- udp: {result: 'reachable', latencyInMilliseconds: 10, clientMediaIPs: ['somePublicIp1', 'somePublicIp2', 'somePublicIp3']},
242
+ udp: {
243
+ result: 'reachable',
244
+ latencyInMilliseconds: 10,
245
+ clientMediaIPs: ['somePublicIp1', 'somePublicIp2', 'somePublicIp3'],
246
+ },
221
247
  tcp: {result: 'unreachable'},
222
- xtls: {result: 'untested'}
248
+ xtls: {result: 'unreachable'},
223
249
  });
224
250
  });
225
251
 
@@ -236,7 +262,7 @@ describe('ClusterReachability', () => {
236
262
  await clock.tickAsync(10);
237
263
  fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp3'}});
238
264
 
239
- await clock.tickAsync(3000);// move the clock so that reachability times out
265
+ await clock.tickAsync(3000); // move the clock so that reachability times out
240
266
 
241
267
  await promise;
242
268
 
@@ -244,7 +270,38 @@ describe('ClusterReachability', () => {
244
270
  assert.deepEqual(clusterReachability.getResult(), {
245
271
  udp: {result: 'unreachable'},
246
272
  tcp: {result: 'reachable', latencyInMilliseconds: 10},
247
- xtls: {result: 'untested'}
273
+ xtls: {result: 'unreachable'},
274
+ });
275
+ });
276
+
277
+ it('should store latency only for the first tls relay candidate', async () => {
278
+ const promise = clusterReachability.start();
279
+
280
+ await clock.tickAsync(10);
281
+ fakePeerConnection.onicecandidate({
282
+ candidate: {type: 'relay', address: 'someTurnRelayIp1', port: 443},
283
+ });
284
+
285
+ // generate more candidates
286
+ await clock.tickAsync(10);
287
+ fakePeerConnection.onicecandidate({
288
+ candidate: {type: 'relay', address: 'someTurnRelayIp2', port: 443},
289
+ });
290
+
291
+ await clock.tickAsync(10);
292
+ fakePeerConnection.onicecandidate({
293
+ candidate: {type: 'relay', address: 'someTurnRelayIp3', port: 443},
294
+ });
295
+
296
+ await clock.tickAsync(3000); // move the clock so that reachability times out
297
+
298
+ await promise;
299
+
300
+ // latency should be from only the first candidates, but the clientMediaIps should be from only from UDP candidates
301
+ assert.deepEqual(clusterReachability.getResult(), {
302
+ udp: {result: 'unreachable'},
303
+ tcp: {result: 'unreachable'},
304
+ xtls: {result: 'reachable', latencyInMilliseconds: 10},
248
305
  });
249
306
  });
250
307
 
@@ -266,13 +323,20 @@ describe('ClusterReachability', () => {
266
323
 
267
324
  // send also a relay candidate so that the reachability check finishes
268
325
  fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp'}});
326
+ fakePeerConnection.onicecandidate({
327
+ candidate: {type: 'relay', address: 'someTurnRelayIp', port: 443},
328
+ });
269
329
 
270
330
  await promise;
271
331
 
272
332
  assert.deepEqual(clusterReachability.getResult(), {
273
- udp: {result: 'reachable', latencyInMilliseconds: 10, clientMediaIPs: ['somePublicIp1', 'somePublicIp2']},
333
+ udp: {
334
+ result: 'reachable',
335
+ latencyInMilliseconds: 10,
336
+ clientMediaIPs: ['somePublicIp1', 'somePublicIp2'],
337
+ },
274
338
  tcp: {result: 'reachable', latencyInMilliseconds: 40},
275
- xtls: {result: 'untested'}
339
+ xtls: {result: 'reachable', latencyInMilliseconds: 40},
276
340
  });
277
341
  });
278
342
  });