@webex/plugin-meetings 3.8.0-next.79 → 3.8.0-next.80

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.
@@ -236,6 +236,15 @@ export default class Meetings extends WebexPlugin {
236
236
  * @returns {undefined}
237
237
  */
238
238
  private _toggleDisableAudioMainDtx;
239
+ /**
240
+ * API to toggle usage of audio twcc support
241
+ *
242
+ * @param {Boolean} newValue
243
+ * @private
244
+ * @memberof Meetings
245
+ * @returns {undefined}
246
+ */
247
+ private _toggleEnableAudioTwccForMultistream;
239
248
  /**
240
249
  * API to toggle stopping ICE Candidates Gathering after first relay candidate,
241
250
  * needs to be called before webex.meetings.joinWithMedia()
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.8.0-next.79"
461
+ version: "3.8.0-next.80"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-meetings": "3.8.0-next.79",
46
+ "@webex/plugin-meetings": "3.8.0-next.80",
47
47
  "@webex/plugin-rooms": "3.8.0-next.27",
48
48
  "@webex/test-helper-chai": "3.8.0-next.22",
49
49
  "@webex/test-helper-mocha": "3.8.0-next.22",
@@ -63,7 +63,7 @@
63
63
  "dependencies": {
64
64
  "@webex/common": "3.8.0-next.22",
65
65
  "@webex/event-dictionary-ts": "^1.0.1753",
66
- "@webex/internal-media-core": "2.16.0",
66
+ "@webex/internal-media-core": "2.17.0",
67
67
  "@webex/internal-plugin-conversation": "3.8.0-next.27",
68
68
  "@webex/internal-plugin-device": "3.8.0-next.22",
69
69
  "@webex/internal-plugin-llm": "3.8.0-next.25",
@@ -71,8 +71,8 @@
71
71
  "@webex/internal-plugin-metrics": "3.8.0-next.22",
72
72
  "@webex/internal-plugin-support": "3.8.0-next.27",
73
73
  "@webex/internal-plugin-user": "3.8.0-next.22",
74
- "@webex/internal-plugin-voicea": "3.8.0-next.79",
75
- "@webex/media-helpers": "3.8.0-next.26",
74
+ "@webex/internal-plugin-voicea": "3.8.0-next.80",
75
+ "@webex/media-helpers": "3.8.0-next.27",
76
76
  "@webex/plugin-people": "3.8.0-next.24",
77
77
  "@webex/plugin-rooms": "3.8.0-next.27",
78
78
  "@webex/ts-sdp": "^1.8.1",
@@ -93,5 +93,5 @@
93
93
  "//": [
94
94
  "TODO: upgrade jwt-decode when moving to node 18"
95
95
  ],
96
- "version": "3.8.0-next.79"
96
+ "version": "3.8.0-next.80"
97
97
  }
package/src/config.ts CHANGED
@@ -99,5 +99,6 @@ export default {
99
99
  reachabilityGetClusterTimeout: 5000,
100
100
  logUploadIntervalMultiplicationFactor: 0, // if set to 0 or undefined, logs won't be uploaded periodically, if you want periodic logs, recommended value is 1
101
101
  stopIceGatheringAfterFirstRelayCandidate: false,
102
+ enableAudioTwccForMultistream: false,
102
103
  },
103
104
  };
@@ -144,6 +144,7 @@ Media.createMediaConnection = (
144
144
  bundlePolicy?: BundlePolicy;
145
145
  iceCandidatesTimeout?: number;
146
146
  disableAudioMainDtx?: boolean;
147
+ enableAudioTwcc?: boolean;
147
148
  stopIceGatheringAfterFirstRelayCandidate?: boolean;
148
149
  }
149
150
  ) => {
@@ -157,6 +158,7 @@ Media.createMediaConnection = (
157
158
  bundlePolicy,
158
159
  iceCandidatesTimeout,
159
160
  disableAudioMainDtx,
161
+ enableAudioTwcc,
160
162
  stopIceGatheringAfterFirstRelayCandidate,
161
163
  } = options;
162
164
 
@@ -175,6 +177,7 @@ Media.createMediaConnection = (
175
177
  if (isMultistream) {
176
178
  const config: MultistreamConnectionConfig = {
177
179
  iceServers,
180
+ disableAudioTwcc: !enableAudioTwcc,
178
181
  };
179
182
 
180
183
  if (bundlePolicy) {
@@ -7050,6 +7050,8 @@ export default class Meeting extends StatelessWebexPlugin {
7050
7050
  iceCandidatesTimeout: this.config.iceCandidatesGatheringTimeout,
7051
7051
  // @ts-ignore - config coming from registerPlugin
7052
7052
  disableAudioMainDtx: this.config.experimental.disableAudioMainDtx,
7053
+ // @ts-ignore - config coming from registerPlugin
7054
+ enableAudioTwcc: this.config.enableAudioTwccForMultistream,
7053
7055
  stopIceGatheringAfterFirstRelayCandidate:
7054
7056
  // @ts-ignore - config coming from registerPlugin
7055
7057
  this.config.stopIceGatheringAfterFirstRelayCandidate,
@@ -827,6 +827,26 @@ export default class Meetings extends WebexPlugin {
827
827
  }
828
828
  }
829
829
 
830
+ /**
831
+ * API to toggle usage of audio twcc support
832
+ *
833
+ * @param {Boolean} newValue
834
+ * @private
835
+ * @memberof Meetings
836
+ * @returns {undefined}
837
+ */
838
+ private _toggleEnableAudioTwccForMultistream(newValue: boolean) {
839
+ if (typeof newValue !== 'boolean') {
840
+ return;
841
+ }
842
+
843
+ // @ts-ignore
844
+ if (this.config.enableAudioTwccForMultistream !== newValue) {
845
+ // @ts-ignore
846
+ this.config.enableAudioTwccForMultistream = newValue;
847
+ }
848
+ }
849
+
830
850
  /**
831
851
  * API to toggle stopping ICE Candidates Gathering after first relay candidate,
832
852
  * needs to be called before webex.meetings.joinWithMedia()
@@ -4,7 +4,7 @@ import Media from '@webex/plugin-meetings/src/media/index';
4
4
  import {assert} from '@webex/test-helper-chai';
5
5
  import sinon from 'sinon';
6
6
  import StaticConfig from '@webex/plugin-meetings/src/common/config';
7
- import { BrowserInfo } from '@webex/web-capabilities';
7
+ import {BrowserInfo} from '@webex/web-capabilities';
8
8
 
9
9
  describe('createMediaConnection', () => {
10
10
  let clock;
@@ -80,7 +80,10 @@ describe('createMediaConnection', () => {
80
80
  enableRtx: ENABLE_RTX,
81
81
  enableExtmap: ENABLE_EXTMAP,
82
82
  turnServerInfo: {
83
- urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
83
+ urls: [
84
+ 'turns:turn-server-url-1:443?transport=tcp',
85
+ 'turns:turn-server-url-2:443?transport=tcp',
86
+ ],
84
87
  username: 'turn username',
85
88
  password: 'turn password',
86
89
  },
@@ -92,7 +95,10 @@ describe('createMediaConnection', () => {
92
95
  {
93
96
  iceServers: [
94
97
  {
95
- urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
98
+ urls: [
99
+ 'turns:turn-server-url-1:443?transport=tcp',
100
+ 'turns:turn-server-url-2:443?transport=tcp',
101
+ ],
96
102
  username: 'turn username',
97
103
  credential: 'turn password',
98
104
  },
@@ -155,12 +161,16 @@ describe('createMediaConnection', () => {
155
161
  },
156
162
  rtcMetrics,
157
163
  turnServerInfo: {
158
- urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
164
+ urls: [
165
+ 'turns:turn-server-url-1:443?transport=tcp',
166
+ 'turns:turn-server-url-2:443?transport=tcp',
167
+ ],
159
168
  username: 'turn username',
160
169
  password: 'turn password',
161
170
  },
162
171
  bundlePolicy: 'max-bundle',
163
172
  disableAudioMainDtx: false,
173
+ enableAudioTwcc: true,
164
174
  });
165
175
  assert.calledOnce(multistreamRoapMediaConnectionConstructorStub);
166
176
  assert.calledWith(
@@ -168,21 +178,27 @@ describe('createMediaConnection', () => {
168
178
  {
169
179
  iceServers: [
170
180
  {
171
- urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
181
+ urls: [
182
+ 'turns:turn-server-url-1:443?transport=tcp',
183
+ 'turns:turn-server-url-2:443?transport=tcp',
184
+ ],
172
185
  username: 'turn username',
173
186
  credential: 'turn password',
174
187
  },
175
188
  ],
176
189
  bundlePolicy: 'max-bundle',
177
190
  disableAudioMainDtx: false,
191
+ disableAudioTwcc: false,
178
192
  },
179
193
  'meeting id'
180
194
  );
181
195
 
182
196
  // check if rtcMetrics callbacks are configured correctly
183
197
  const addMetricsCallback = multistreamRoapMediaConnectionConstructorStub.getCalls()[0].args[2];
184
- const closeMetricsCallback = multistreamRoapMediaConnectionConstructorStub.getCalls()[0].args[3];
185
- const sendMetricsInQueueCallback = multistreamRoapMediaConnectionConstructorStub.getCalls()[0].args[4];
198
+ const closeMetricsCallback =
199
+ multistreamRoapMediaConnectionConstructorStub.getCalls()[0].args[3];
200
+ const sendMetricsInQueueCallback =
201
+ multistreamRoapMediaConnectionConstructorStub.getCalls()[0].args[4];
186
202
 
187
203
  assert.isFunction(addMetricsCallback);
188
204
  assert.isFunction(closeMetricsCallback);
@@ -212,7 +228,8 @@ describe('createMediaConnection', () => {
212
228
  assert.calledWith(
213
229
  multistreamRoapMediaConnectionConstructorStub,
214
230
  {
215
- iceServers: []
231
+ iceServers: [],
232
+ disableAudioTwcc: true,
216
233
  },
217
234
  'meeting id'
218
235
  );
@@ -235,6 +252,7 @@ describe('createMediaConnection', () => {
235
252
  iceServers: [],
236
253
  doFullIce: true,
237
254
  stopIceGatheringAfterFirstRelayCandidate: true,
255
+ disableAudioTwcc: true,
238
256
  },
239
257
  'meeting id'
240
258
  );
@@ -257,6 +275,7 @@ describe('createMediaConnection', () => {
257
275
  iceServers: [],
258
276
  doFullIce: true,
259
277
  stopIceGatheringAfterFirstRelayCandidate: false,
278
+ disableAudioTwcc: true,
260
279
  },
261
280
  'meeting id'
262
281
  );
@@ -292,6 +311,7 @@ describe('createMediaConnection', () => {
292
311
  multistreamRoapMediaConnectionConstructorStub,
293
312
  {
294
313
  iceServers: [],
314
+ disableAudioTwcc: true,
295
315
  },
296
316
  'meeting id'
297
317
  );
@@ -321,6 +341,7 @@ describe('createMediaConnection', () => {
321
341
  multistreamRoapMediaConnectionConstructorStub,
322
342
  {
323
343
  iceServers: [],
344
+ disableAudioTwcc: true,
324
345
  },
325
346
  'meeting id'
326
347
  );
@@ -349,6 +370,35 @@ describe('createMediaConnection', () => {
349
370
  multistreamRoapMediaConnectionConstructorStub,
350
371
  {
351
372
  iceServers: [],
373
+ disableAudioTwcc: true,
374
+ },
375
+ 'meeting id'
376
+ );
377
+ });
378
+
379
+ it('MultistreamRoapMediaConnection disable audio twcc by default', () => {
380
+ const multistreamRoapMediaConnectionConstructorStub = sinon
381
+ .stub(InternalMediaCoreModule, 'MultistreamRoapMediaConnection')
382
+ .returns(fakeRoapMediaConnection);
383
+
384
+ Media.createMediaConnection(true, 'debug string', 'meeting id', {
385
+ mediaProperties: {
386
+ mediaDirection: {
387
+ sendAudio: true,
388
+ sendVideo: true,
389
+ sendShare: false,
390
+ receiveAudio: true,
391
+ receiveVideo: true,
392
+ receiveShare: true,
393
+ },
394
+ },
395
+ });
396
+ assert.calledOnce(multistreamRoapMediaConnectionConstructorStub);
397
+ assert.calledWith(
398
+ multistreamRoapMediaConnectionConstructorStub,
399
+ {
400
+ iceServers: [],
401
+ disableAudioTwcc: true,
352
402
  },
353
403
  'meeting id'
354
404
  );
@@ -413,6 +413,19 @@ describe('plugin-meetings', () => {
413
413
  });
414
414
  });
415
415
 
416
+ describe('#_toggleEnableAudioTwccForMultistream', () => {
417
+ it('should have _toggleEnableAudioTwccForMultistream', () => {
418
+ assert.equal(typeof webex.meetings._toggleEnableAudioTwccForMultistream, 'function');
419
+ });
420
+
421
+ describe('success', () => {
422
+ it('should update meetings to enable audio twcc support', () => {
423
+ webex.meetings._toggleEnableAudioTwccForMultistream(true);
424
+ assert.equal(webex.meetings.config.enableAudioTwccForMultistream, true);
425
+ });
426
+ });
427
+ });
428
+
416
429
  describe('#_toggleStopIceGatheringAfterFirstRelayCandidate', () => {
417
430
  it('should have _toggleStopIceGatheringAfterFirstRelayCandidate', () => {
418
431
  assert.equal(typeof webex.meetings._toggleStopIceGatheringAfterFirstRelayCandidate, 'function');