@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/CHANGELOG.md +7 -0
- package/dist/index.browser.es.js +8 -3
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +8 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +8 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/rtc/Publisher.ts +11 -2
package/package.json
CHANGED
package/src/rtc/Publisher.ts
CHANGED
|
@@ -531,9 +531,18 @@ export class Publisher {
|
|
|
531
531
|
this.logger('warn', 'No mid found for track. Trying to find it from SDP');
|
|
532
532
|
|
|
533
533
|
const parsedSdp = SDP.parse(sdp);
|
|
534
|
-
const media = parsedSdp.media.find((m) =>
|
|
534
|
+
const media = parsedSdp.media.find((m) => {
|
|
535
|
+
return (
|
|
536
|
+
m.type === track.kind &&
|
|
537
|
+
// if `msid` is not present, we assume that the track is the first one
|
|
538
|
+
(m.msid?.includes(track.id) ?? true)
|
|
539
|
+
);
|
|
540
|
+
});
|
|
535
541
|
if (typeof media?.mid === 'undefined') {
|
|
536
|
-
this.logger(
|
|
542
|
+
this.logger(
|
|
543
|
+
'warn',
|
|
544
|
+
`No mid found in SDP for track type ${track.kind} and id ${track.id}`,
|
|
545
|
+
);
|
|
537
546
|
return '';
|
|
538
547
|
}
|
|
539
548
|
return String(media.mid);
|