@webex/web-client-media-engine 3.3.0 → 3.3.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/dist/cjs/index.js CHANGED
@@ -9146,9 +9146,17 @@ function filterCodecs(parsedSdp, allowedCodecs) {
9146
9146
  }
9147
9147
  function filterCandidates(parsedSdp) {
9148
9148
  const supportedTransportTypes = ['udp', 'tcp'];
9149
+ let filtered = false;
9149
9150
  parsedSdp.media.forEach((mline) => {
9150
- mline.iceInfo.candidates = mline.iceInfo.candidates.filter((candidate) => supportedTransportTypes.includes(candidate.transport.toLowerCase()));
9151
+ mline.iceInfo.candidates = mline.iceInfo.candidates.filter((candidate) => {
9152
+ if (supportedTransportTypes.includes(candidate.transport.toLowerCase())) {
9153
+ return true;
9154
+ }
9155
+ filtered = true;
9156
+ return false;
9157
+ });
9151
9158
  });
9159
+ return filtered;
9152
9160
  }
9153
9161
  function setMaxBandwidth(parsedSdp, maxBandwidth) {
9154
9162
  parsedSdp.avMedia.forEach((mline) => {
@@ -9224,9 +9232,9 @@ function injectJmpAttributes(parsedSdp, csiMap, streamSignalingMode) {
9224
9232
  function injectDummyCandidates(parsedSdp) {
9225
9233
  parsedSdp.media.forEach((mLine) => {
9226
9234
  if (mLine.iceInfo.candidates.length === 0) {
9227
- mLine.addLine(new CandidateLine('dummy1', 1, 'udp', 1, '0.0.0.0', 1, 'host'));
9228
- mLine.addLine(new CandidateLine('dummy2', 2, 'tcp', 2, '0.0.0.0', 2, 'host'));
9229
- mLine.addLine(new CandidateLine('dummy3', 3, 'udp', 3, '0.0.0.0', 3, 'relay'));
9235
+ mLine.addLine(new CandidateLine('dummy1', 1, 'udp', 1, '0.0.0.0', 9, 'host'));
9236
+ mLine.addLine(new CandidateLine('dummy2', 1, 'tcp', 2, '0.0.0.0', 9, 'host'));
9237
+ mLine.addLine(new CandidateLine('dummy3', 1, 'tcp', 3, '0.0.0.0', 9, 'relay'));
9230
9238
  }
9231
9239
  });
9232
9240
  }
@@ -14342,18 +14350,11 @@ class MultistreamConnection extends EventEmitter$2 {
14342
14350
  const parsedOffer = parse((_a = this.pc.getLocalDescription()) === null || _a === void 0 ? void 0 : _a.sdp);
14343
14351
  const recvTransceiversByMid = new Map([...this.recvTransceivers.values()].flat().map((t) => [t.mid, t]));
14344
14352
  matchMlinesInAnswer(parsedOffer, parsedAnswer, recvTransceiversByMid);
14345
- filterCandidates(parsedAnswer);
14353
+ if (filterCandidates(parsedAnswer)) {
14354
+ logger.info('Some unsupported remote candidates have been removed');
14355
+ }
14346
14356
  if (getBrowserDetails().name === 'Firefox') {
14347
14357
  setupBundle(parsedAnswer, this.options.bundlePolicy, this.midPredictor.getMidMap());
14348
- if (this.options.bundlePolicy === 'max-bundle') {
14349
- const { ufrag, pwd } = parsedAnswer.media[0].iceInfo;
14350
- parsedAnswer.media.forEach((mline, index) => {
14351
- if (index > 0) {
14352
- mline.iceInfo.ufrag = ufrag;
14353
- mline.iceInfo.pwd = pwd;
14354
- }
14355
- });
14356
- }
14357
14358
  }
14358
14359
  return parsedAnswer.toString();
14359
14360
  }