@webex/plugin-meetings 3.0.0-beta.16 → 3.0.0-beta.18

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 (156) hide show
  1. package/dist/breakouts/breakout.js +116 -0
  2. package/dist/breakouts/breakout.js.map +1 -0
  3. package/dist/breakouts/collection.js +23 -0
  4. package/dist/breakouts/collection.js.map +1 -0
  5. package/dist/breakouts/index.js +226 -0
  6. package/dist/breakouts/index.js.map +1 -0
  7. package/dist/config.js +4 -1
  8. package/dist/config.js.map +1 -1
  9. package/dist/constants.js +43 -6
  10. package/dist/constants.js.map +1 -1
  11. package/dist/locus-info/controlsUtils.js +2 -1
  12. package/dist/locus-info/controlsUtils.js.map +1 -1
  13. package/dist/locus-info/index.js +48 -0
  14. package/dist/locus-info/index.js.map +1 -1
  15. package/dist/locus-info/parser.js +1 -0
  16. package/dist/locus-info/parser.js.map +1 -1
  17. package/dist/locus-info/selfUtils.js +19 -11
  18. package/dist/locus-info/selfUtils.js.map +1 -1
  19. package/dist/media/index.js +3 -3
  20. package/dist/media/index.js.map +1 -1
  21. package/dist/media/properties.js +4 -4
  22. package/dist/media/properties.js.map +1 -1
  23. package/dist/meeting/in-meeting-actions.js +5 -1
  24. package/dist/meeting/in-meeting-actions.js.map +1 -1
  25. package/dist/meeting/index.js +652 -459
  26. package/dist/meeting/index.js.map +1 -1
  27. package/dist/meeting/request.js +25 -44
  28. package/dist/meeting/request.js.map +1 -1
  29. package/dist/meeting/request.type.js.map +1 -1
  30. package/dist/meeting/util.js +22 -57
  31. package/dist/meeting/util.js.map +1 -1
  32. package/dist/meeting-info/meeting-info-v2.js +2 -0
  33. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  34. package/dist/meetings/index.js +28 -18
  35. package/dist/meetings/index.js.map +1 -1
  36. package/dist/meetings/request.js +14 -12
  37. package/dist/meetings/request.js.map +1 -1
  38. package/dist/member/index.js +9 -0
  39. package/dist/member/index.js.map +1 -1
  40. package/dist/member/util.js +14 -1
  41. package/dist/member/util.js.map +1 -1
  42. package/dist/members/index.js +8 -6
  43. package/dist/members/index.js.map +1 -1
  44. package/dist/members/request.js +3 -1
  45. package/dist/members/request.js.map +1 -1
  46. package/dist/multistream/mediaRequestManager.js +46 -6
  47. package/dist/multistream/mediaRequestManager.js.map +1 -1
  48. package/dist/multistream/multistreamMedia.js +4 -0
  49. package/dist/multistream/multistreamMedia.js.map +1 -1
  50. package/dist/multistream/receiveSlot.js +3 -3
  51. package/dist/multistream/receiveSlot.js.map +1 -1
  52. package/dist/multistream/receiveSlotManager.js +8 -6
  53. package/dist/multistream/receiveSlotManager.js.map +1 -1
  54. package/dist/multistream/remoteMedia.js.map +1 -1
  55. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  56. package/dist/multistream/remoteMediaManager.js +168 -63
  57. package/dist/multistream/remoteMediaManager.js.map +1 -1
  58. package/dist/reachability/index.js +63 -51
  59. package/dist/reachability/index.js.map +1 -1
  60. package/dist/reactions/constants.js +13 -0
  61. package/dist/reactions/constants.js.map +1 -0
  62. package/dist/reactions/reactions.type.js.map +1 -1
  63. package/dist/reconnection-manager/index.js +25 -12
  64. package/dist/reconnection-manager/index.js.map +1 -1
  65. package/dist/recording-controller/enums.js +17 -0
  66. package/dist/recording-controller/enums.js.map +1 -0
  67. package/dist/recording-controller/index.js +343 -0
  68. package/dist/recording-controller/index.js.map +1 -0
  69. package/dist/recording-controller/util.js +63 -0
  70. package/dist/recording-controller/util.js.map +1 -0
  71. package/dist/roap/request.js +88 -68
  72. package/dist/roap/request.js.map +1 -1
  73. package/dist/roap/turnDiscovery.js +72 -47
  74. package/dist/roap/turnDiscovery.js.map +1 -1
  75. package/dist/statsAnalyzer/index.js +3 -3
  76. package/dist/statsAnalyzer/index.js.map +1 -1
  77. package/dist/statsAnalyzer/mqaUtil.js +18 -6
  78. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  79. package/package.json +24 -19
  80. package/src/breakouts/README.md +190 -0
  81. package/src/breakouts/breakout.ts +110 -0
  82. package/src/breakouts/collection.ts +19 -0
  83. package/src/breakouts/index.ts +225 -0
  84. package/src/config.ts +4 -1
  85. package/src/constants.ts +39 -1
  86. package/src/locus-info/controlsUtils.ts +2 -0
  87. package/src/locus-info/index.ts +59 -1
  88. package/src/locus-info/parser.ts +1 -0
  89. package/src/locus-info/selfUtils.ts +8 -0
  90. package/src/media/index.ts +1 -2
  91. package/src/media/properties.ts +6 -9
  92. package/src/meeting/in-meeting-actions.ts +8 -0
  93. package/src/meeting/index.ts +360 -111
  94. package/src/meeting/request.ts +9 -31
  95. package/src/meeting/request.type.ts +2 -0
  96. package/src/meeting/util.ts +25 -60
  97. package/src/meeting-info/meeting-info-v2.ts +2 -0
  98. package/src/meetings/index.ts +10 -5
  99. package/src/meetings/request.ts +1 -1
  100. package/src/member/index.ts +9 -0
  101. package/src/member/util.ts +14 -1
  102. package/src/members/index.ts +1 -0
  103. package/src/members/request.ts +1 -0
  104. package/src/multistream/mediaRequestManager.ts +79 -15
  105. package/src/multistream/multistreamMedia.ts +4 -0
  106. package/src/multistream/receiveSlot.ts +17 -12
  107. package/src/multistream/receiveSlotManager.ts +22 -21
  108. package/src/multistream/remoteMedia.ts +1 -1
  109. package/src/multistream/remoteMediaGroup.ts +2 -2
  110. package/src/multistream/remoteMediaManager.ts +150 -37
  111. package/src/reachability/index.ts +16 -13
  112. package/src/reactions/constants.ts +4 -0
  113. package/src/reactions/reactions.type.ts +25 -0
  114. package/src/reconnection-manager/index.ts +18 -9
  115. package/src/recording-controller/enums.ts +8 -0
  116. package/src/recording-controller/index.ts +315 -0
  117. package/src/recording-controller/util.ts +58 -0
  118. package/src/roap/request.ts +78 -73
  119. package/src/roap/turnDiscovery.ts +8 -6
  120. package/src/statsAnalyzer/index.ts +4 -4
  121. package/src/statsAnalyzer/mqaUtil.ts +6 -0
  122. package/test/unit/spec/breakouts/breakout.ts +119 -0
  123. package/test/unit/spec/breakouts/collection.ts +15 -0
  124. package/test/unit/spec/breakouts/index.ts +293 -0
  125. package/test/unit/spec/locus-info/controlsUtils.js +20 -0
  126. package/test/unit/spec/locus-info/index.js +103 -0
  127. package/test/unit/spec/locus-info/selfConstant.js +25 -0
  128. package/test/unit/spec/locus-info/selfUtils.js +84 -0
  129. package/test/unit/spec/media/index.ts +1 -1
  130. package/test/unit/spec/media/properties.ts +9 -9
  131. package/test/unit/spec/meeting/effectsState.js +5 -1
  132. package/test/unit/spec/meeting/in-meeting-actions.ts +5 -1
  133. package/test/unit/spec/meeting/index.js +241 -50
  134. package/test/unit/spec/meeting/request.js +17 -0
  135. package/test/unit/spec/meeting/utils.js +28 -122
  136. package/test/unit/spec/meetings/index.js +1 -0
  137. package/test/unit/spec/member/util.js +26 -1
  138. package/test/unit/spec/multistream/mediaRequestManager.ts +312 -50
  139. package/test/unit/spec/multistream/receiveSlot.ts +6 -6
  140. package/test/unit/spec/multistream/receiveSlotManager.ts +13 -13
  141. package/test/unit/spec/multistream/remoteMedia.ts +2 -2
  142. package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
  143. package/test/unit/spec/multistream/remoteMediaManager.ts +354 -65
  144. package/test/unit/spec/reachability/index.ts +58 -24
  145. package/test/unit/spec/reconnection-manager/index.js +42 -13
  146. package/test/unit/spec/recording-controller/index.js +231 -0
  147. package/test/unit/spec/recording-controller/util.js +102 -0
  148. package/test/unit/spec/roap/index.ts +2 -1
  149. package/test/unit/spec/roap/request.ts +114 -0
  150. package/test/unit/spec/roap/turnDiscovery.ts +45 -29
  151. package/test/unit/spec/stats-analyzer/index.js +2 -2
  152. package/test/utils/webex-test-users.js +1 -0
  153. package/tsconfig.json +6 -0
  154. package/dist/media/internal-media-core-wrapper.js +0 -18
  155. package/dist/media/internal-media-core-wrapper.js.map +0 -1
  156. package/src/media/internal-media-core-wrapper.ts +0 -9
@@ -46,7 +46,8 @@ describe('TurnDiscovery', () => {
46
46
  testMeeting.roapSeq = newSeq;
47
47
  }),
48
48
  updateMediaConnections: sinon.stub(),
49
- webex: {meetings: {reachability: {isAnyClusterReachable: () => false}}},
49
+ webex: {meetings: {reachability: {isAnyClusterReachable: () => Promise.resolve(false)}}},
50
+ isMultistream: false
50
51
  };
51
52
  });
52
53
 
@@ -75,6 +76,7 @@ describe('TurnDiscovery', () => {
75
76
  audioMuted: testMeeting.isAudioMuted(),
76
77
  videoMuted: testMeeting.isVideoMuted(),
77
78
  meetingId: testMeeting.id,
79
+ preferTranscoding: !testMeeting.isMultistream
78
80
  });
79
81
 
80
82
  if (messageType === 'TURN_DISCOVERY_REQUEST') {
@@ -97,39 +99,44 @@ describe('TurnDiscovery', () => {
97
99
  };
98
100
 
99
101
  describe('doTurnDiscovery', () => {
100
- it('sends TURN_DISCOVERY_REQUEST, waits for response and sends OK', async () => {
101
- const td = new TurnDiscovery(mockRoapRequest);
102
+ [false, true].forEach(function (enabledMultistream ) {
103
+ it('sends TURN_DISCOVERY_REQUEST'+ (enabledMultistream ? ' when enable Multistream':'') + ', waits for response and sends OK', async () => {
104
+ testMeeting.isMultistream = enabledMultistream;
102
105
 
103
- const result = td.doTurnDiscovery(testMeeting, false);
106
+ const td = new TurnDiscovery(mockRoapRequest);
104
107
 
105
- // check that TURN_DISCOVERY_REQUEST was sent
106
- await checkRoapMessageSent('TURN_DISCOVERY_REQUEST', 0);
108
+ const result = td.doTurnDiscovery(testMeeting, false);
107
109
 
108
- mockRoapRequest.sendRoap.resetHistory();
110
+ // check that TURN_DISCOVERY_REQUEST was sent
111
+ await checkRoapMessageSent('TURN_DISCOVERY_REQUEST', 0);
109
112
 
110
- // simulate the response
111
- td.handleTurnDiscoveryResponse({
112
- headers: [
113
- `x-cisco-turn-url=${FAKE_TURN_URL}`,
114
- `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
115
- `x-cisco-turn-password=${FAKE_TURN_PASSWORD}`,
116
- ],
117
- });
113
+ // @ts-ignore
114
+ mockRoapRequest.sendRoap.resetHistory();
118
115
 
119
- await testUtils.flushPromises();
116
+ // simulate the response
117
+ td.handleTurnDiscoveryResponse({
118
+ headers: [
119
+ `x-cisco-turn-url=${FAKE_TURN_URL}`,
120
+ `x-cisco-turn-username=${FAKE_TURN_USERNAME}`,
121
+ `x-cisco-turn-password=${FAKE_TURN_PASSWORD}`,
122
+ ]
123
+ });
120
124
 
121
- // check that we've sent OK
122
- await checkRoapMessageSent('OK', 0);
125
+ await testUtils.flushPromises();
123
126
 
124
- const {turnServerInfo, turnDiscoverySkippedReason} = await result;
127
+ // check that we've sent OK
128
+ await checkRoapMessageSent('OK', 0);
125
129
 
126
- assert.deepEqual(turnServerInfo, {
127
- url: FAKE_TURN_URL,
128
- username: FAKE_TURN_USERNAME,
129
- password: FAKE_TURN_PASSWORD,
130
- });
130
+ const {turnServerInfo, turnDiscoverySkippedReason} = await result;
131
131
 
132
- assert.isUndefined(turnDiscoverySkippedReason);
132
+ assert.deepEqual(turnServerInfo, {
133
+ url: FAKE_TURN_URL,
134
+ username: FAKE_TURN_USERNAME,
135
+ password: FAKE_TURN_PASSWORD
136
+ });
137
+
138
+ assert.isUndefined(turnDiscoverySkippedReason);
139
+ });
133
140
  });
134
141
 
135
142
  it('sends TURN_DISCOVERY_REQUEST with empty mediaId when isReconnecting is true', async () => {
@@ -141,6 +148,7 @@ describe('TurnDiscovery', () => {
141
148
  await checkRoapMessageSent('TURN_DISCOVERY_REQUEST', 0, '');
142
149
 
143
150
  // the main part of the test is complete now, checking the remaining part of the flow just for completeness
151
+ // @ts-ignore
144
152
  mockRoapRequest.sendRoap.resetHistory();
145
153
 
146
154
  // simulate the response
@@ -173,7 +181,7 @@ describe('TurnDiscovery', () => {
173
181
 
174
182
  // check that TURN_DISCOVERY_REQUEST was sent
175
183
  await checkRoapMessageSent('TURN_DISCOVERY_REQUEST', 0);
176
-
184
+ // @ts-ignore
177
185
  mockRoapRequest.sendRoap.resetHistory();
178
186
 
179
187
  // simulate the response with some extra headers
@@ -206,7 +214,7 @@ describe('TurnDiscovery', () => {
206
214
  const prevConfigValue = testMeeting.config.experimental.enableTurnDiscovery;
207
215
 
208
216
  testMeeting.config.experimental.enableTurnDiscovery = false;
209
-
217
+ // @ts-ignore
210
218
  const result = await new TurnDiscovery(mockRoapRequest).doTurnDiscovery(testMeeting);
211
219
 
212
220
  const {turnServerInfo, turnDiscoverySkippedReason} = result;
@@ -236,7 +244,7 @@ describe('TurnDiscovery', () => {
236
244
 
237
245
  it('resolves with undefined when cluster is reachable', async () => {
238
246
  const prev = testMeeting.webex.meetings.reachability.isAnyClusterReachable;
239
- testMeeting.webex.meetings.reachability.isAnyClusterReachable = () => true;
247
+ testMeeting.webex.meetings.reachability.isAnyClusterReachable = () => Promise.resolve(true);
240
248
  const result = await new TurnDiscovery(mockRoapRequest).doTurnDiscovery(testMeeting);
241
249
 
242
250
  const {turnServerInfo, turnDiscoverySkippedReason} = result;
@@ -267,6 +275,8 @@ describe('TurnDiscovery', () => {
267
275
  const td = new TurnDiscovery(mockRoapRequest);
268
276
  const turnDiscoveryPromise = td.doTurnDiscovery(testMeeting, false);
269
277
 
278
+ await testUtils.flushPromises();
279
+
270
280
  // simulate the response without the password
271
281
  td.handleTurnDiscoveryResponse({
272
282
  headers: [
@@ -286,6 +296,8 @@ describe('TurnDiscovery', () => {
286
296
  const td = new TurnDiscovery(mockRoapRequest);
287
297
  const turnDiscoveryPromise = td.doTurnDiscovery(testMeeting, false);
288
298
 
299
+ await testUtils.flushPromises();
300
+
289
301
  // simulate the response without the headers
290
302
  td.handleTurnDiscoveryResponse({});
291
303
 
@@ -301,6 +313,8 @@ describe('TurnDiscovery', () => {
301
313
  const td = new TurnDiscovery(mockRoapRequest);
302
314
  const turnDiscoveryPromise = td.doTurnDiscovery(testMeeting, false);
303
315
 
316
+ await testUtils.flushPromises();
317
+
304
318
  // simulate the response without the headers
305
319
  td.handleTurnDiscoveryResponse({headers: []});
306
320
 
@@ -317,9 +331,11 @@ describe('TurnDiscovery', () => {
317
331
 
318
332
  const turnDiscoveryPromise = td.doTurnDiscovery(testMeeting, false);
319
333
 
334
+ await testUtils.flushPromises();
335
+
320
336
  // check that TURN_DISCOVERY_REQUEST was sent
321
337
  await checkRoapMessageSent('TURN_DISCOVERY_REQUEST', 0);
322
-
338
+ // @ts-ignore
323
339
  mockRoapRequest.sendRoap.resetHistory();
324
340
 
325
341
  // setup the mock so that sending of OK fails
@@ -2,7 +2,7 @@ import 'jsdom-global/register';
2
2
  import chai from 'chai';
3
3
  import chaiAsPromised from 'chai-as-promised';
4
4
  import sinon from 'sinon';
5
- import {MediaConnection as MC} from '@webex/internal-media-core';
5
+ import {ConnectionState} from '@webex/internal-media-core';
6
6
 
7
7
  import {StatsAnalyzer, EVENTS} from '../../../../src/statsAnalyzer';
8
8
  import NetworkQualityMonitor from '../../../../src/networkQualityMonitor';
@@ -136,7 +136,7 @@ describe('plugin-meetings', () => {
136
136
  };
137
137
 
138
138
  pc = {
139
- getConnectionState: sinon.stub().returns(MC.ConnectionState.Connected),
139
+ getConnectionState: sinon.stub().returns(ConnectionState.Connected),
140
140
  getTransceiverStats: sinon.stub().resolves({
141
141
  audio: {
142
142
  sender: [fakeStats.audio.sender],
@@ -8,6 +8,7 @@ const config = require('./webex-config');
8
8
 
9
9
  // Include the plugins which you feel will be used by the webex instance
10
10
  require('@webex/internal-plugin-mercury');
11
+ require('@webex/internal-plugin-llm');
11
12
  require('@webex/internal-plugin-user');
12
13
  require('@webex/internal-plugin-device');
13
14
  require('@webex/internal-plugin-conversation');
package/tsconfig.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": [
4
+ "src"
5
+ ],
6
+ }
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.RoapMediaConnection = exports.MultistreamRoapMediaConnection = void 0;
8
- var _internalMediaCore = require("@webex/internal-media-core");
9
- /* We have this wrapper just because otherwise it's impossible to mock
10
- * RoapMediaConnection and MultistreamRoapMediaConnection constructors in unit tests,
11
- * because they are exported by @webex/internal-media-core as non-writable, non-configurable
12
- * properties of MediaConnection and sinon doesn't allow spying on them or stubbing them.
13
- */
14
- var RoapMediaConnection = _internalMediaCore.MediaConnection.RoapMediaConnection;
15
- exports.RoapMediaConnection = RoapMediaConnection;
16
- var MultistreamRoapMediaConnection = _internalMediaCore.MediaConnection.MultistreamRoapMediaConnection;
17
- exports.MultistreamRoapMediaConnection = MultistreamRoapMediaConnection;
18
- //# sourceMappingURL=internal-media-core-wrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["RoapMediaConnection","MC","MultistreamRoapMediaConnection"],"sources":["internal-media-core-wrapper.ts"],"sourcesContent":["import {MediaConnection as MC} from '@webex/internal-media-core';\n\n/* We have this wrapper just because otherwise it's impossible to mock\n * RoapMediaConnection and MultistreamRoapMediaConnection constructors in unit tests,\n * because they are exported by @webex/internal-media-core as non-writable, non-configurable\n * properties of MediaConnection and sinon doesn't allow spying on them or stubbing them.\n */\nexport const {RoapMediaConnection} = MC;\nexport const {MultistreamRoapMediaConnection} = MC;\n"],"mappings":";;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAOA,mBAAmB,GAAIC,kCAAE,CAAzBD,mBAAmB;AAAO;AACjC,IAAOE,8BAA8B,GAAID,kCAAE,CAApCC,8BAA8B;AAAO"}
@@ -1,9 +0,0 @@
1
- import {MediaConnection as MC} from '@webex/internal-media-core';
2
-
3
- /* We have this wrapper just because otherwise it's impossible to mock
4
- * RoapMediaConnection and MultistreamRoapMediaConnection constructors in unit tests,
5
- * because they are exported by @webex/internal-media-core as non-writable, non-configurable
6
- * properties of MediaConnection and sinon doesn't allow spying on them or stubbing them.
7
- */
8
- export const {RoapMediaConnection} = MC;
9
- export const {MultistreamRoapMediaConnection} = MC;