@stream-io/video-client 0.0.34 → 0.0.35

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/index.es.js CHANGED
@@ -6402,9 +6402,14 @@ class Publisher {
6402
6402
  }
6403
6403
  this.logger('warn', 'No mid found for track. Trying to find it from SDP');
6404
6404
  const parsedSdp = SDP.parse(sdp);
6405
- const media = parsedSdp.media.find((m) => m.type === track.kind);
6405
+ const media = parsedSdp.media.find((m) => {
6406
+ var _a, _b;
6407
+ return (m.type === track.kind &&
6408
+ // if `msid` is not present, we assume that the track is the first one
6409
+ ((_b = (_a = m.msid) === null || _a === void 0 ? void 0 : _a.includes(track.id)) !== null && _b !== void 0 ? _b : true));
6410
+ });
6406
6411
  if (typeof (media === null || media === void 0 ? void 0 : media.mid) === 'undefined') {
6407
- this.logger('warn', `No mid found in SDP for track type ${track.kind}`);
6412
+ this.logger('warn', `No mid found in SDP for track type ${track.kind} and id ${track.id}`);
6408
6413
  return '';
6409
6414
  }
6410
6415
  return String(media.mid);
@@ -11832,7 +11837,7 @@ class StreamClient {
11832
11837
  }
11833
11838
  getUserAgent() {
11834
11839
  return (this.userAgent ||
11835
- `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.33"}`);
11840
+ `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.34"}`);
11836
11841
  }
11837
11842
  setUserAgent(userAgent) {
11838
11843
  this.userAgent = userAgent;