@stream-io/video-client 0.0.33 → 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 +14 -0
- package/dist/index.browser.es.js +10 -5
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +10 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10 -5
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +2 -2
- package/src/rtc/Publisher.ts +11 -2
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) =>
|
|
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);
|
|
@@ -10063,7 +10068,7 @@ class Call {
|
|
|
10063
10068
|
/**
|
|
10064
10069
|
* Sends a custom event to all call participants.
|
|
10065
10070
|
*
|
|
10066
|
-
* @param
|
|
10071
|
+
* @param payload the payload to send.
|
|
10067
10072
|
*/
|
|
10068
10073
|
this.sendCustomEvent = (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
10069
10074
|
return this.streamClient.post(`${this.streamClientBasePath}/event`, { custom: payload });
|
|
@@ -10126,7 +10131,7 @@ class Call {
|
|
|
10126
10131
|
const currentUserId = this.currentUserId;
|
|
10127
10132
|
if (currentUserId &&
|
|
10128
10133
|
metadata.blocked_user_ids.includes(currentUserId)) {
|
|
10129
|
-
this.logger('info', 'Leaving call
|
|
10134
|
+
this.logger('info', 'Leaving call because of being blocked');
|
|
10130
10135
|
yield this.leave();
|
|
10131
10136
|
}
|
|
10132
10137
|
})),
|
|
@@ -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.
|
|
11840
|
+
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.34"}`);
|
|
11836
11841
|
}
|
|
11837
11842
|
setUserAgent(userAgent) {
|
|
11838
11843
|
this.userAgent = userAgent;
|