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