@stream-io/video-client 1.44.5 → 1.45.0
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 +10 -0
- package/dist/index.browser.es.js +23 -5
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +23 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +23 -5
- package/dist/index.es.js.map +1 -1
- package/dist/src/coordinator/connection/types.d.ts +22 -1
- package/dist/src/devices/DeviceManager.d.ts +1 -0
- package/package.json +1 -1
- package/src/coordinator/connection/types.ts +23 -0
- package/src/devices/DeviceManager.ts +20 -1
- package/src/devices/__tests__/DeviceManager.test.ts +8 -0
- package/src/devices/__tests__/mocks.ts +4 -0
- package/src/helpers/AudioBindingsWatchdog.ts +14 -2
- package/src/helpers/__tests__/AudioBindingsWatchdog.test.ts +27 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.45.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.44.5...@stream-io/video-client-1.45.0) (2026-04-02)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **client:** Disconnected device event ([#2178](https://github.com/GetStream/stream-video-js/issues/2178)) ([5017ca0](https://github.com/GetStream/stream-video-js/commit/5017ca0fd53f5d203167d55227cb7fddc055705a))
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- **client:** warn about dangling audio bindings only for published audio tracks ([#2183](https://github.com/GetStream/stream-video-js/issues/2183)) ([ff47662](https://github.com/GetStream/stream-video-js/commit/ff47662484cd666cf321b61d9b49dd4eb161192f))
|
|
14
|
+
|
|
5
15
|
## [1.44.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.44.4...@stream-io/video-client-1.44.5) (2026-03-27)
|
|
6
16
|
|
|
7
17
|
### Bug Fixes
|
package/dist/index.browser.es.js
CHANGED
|
@@ -6283,7 +6283,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6283
6283
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6284
6284
|
};
|
|
6285
6285
|
|
|
6286
|
-
const version = "1.
|
|
6286
|
+
const version = "1.45.0";
|
|
6287
6287
|
const [major, minor, patch] = version.split('.');
|
|
6288
6288
|
let sdkInfo = {
|
|
6289
6289
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -9549,11 +9549,14 @@ class AudioBindingsWatchdog {
|
|
|
9549
9549
|
for (const p of this.state.participants) {
|
|
9550
9550
|
if (p.isLocalParticipant)
|
|
9551
9551
|
continue;
|
|
9552
|
-
const { audioStream, screenShareAudioStream, sessionId, userId } = p;
|
|
9553
|
-
if (audioStream &&
|
|
9552
|
+
const { audioStream, screenShareAudioStream, sessionId, userId, publishedTracks, } = p;
|
|
9553
|
+
if (audioStream &&
|
|
9554
|
+
publishedTracks.includes(TrackType.AUDIO) &&
|
|
9555
|
+
!this.bindings.has(toBindingKey(sessionId))) {
|
|
9554
9556
|
danglingUserIds.push(userId);
|
|
9555
9557
|
}
|
|
9556
9558
|
if (screenShareAudioStream &&
|
|
9559
|
+
publishedTracks.includes(TrackType.SCREEN_SHARE_AUDIO) &&
|
|
9557
9560
|
!this.bindings.has(toBindingKey(sessionId, 'screenShareAudioTrack'))) {
|
|
9558
9561
|
danglingUserIds.push(userId);
|
|
9559
9562
|
}
|
|
@@ -11187,6 +11190,7 @@ class DeviceManager {
|
|
|
11187
11190
|
isDeviceReplaced = true;
|
|
11188
11191
|
}
|
|
11189
11192
|
if (isDeviceDisconnected) {
|
|
11193
|
+
this.dispatchDeviceDisconnectedEvent(prevDevice);
|
|
11190
11194
|
await this.disable();
|
|
11191
11195
|
await this.select(undefined);
|
|
11192
11196
|
}
|
|
@@ -11196,7 +11200,7 @@ class DeviceManager {
|
|
|
11196
11200
|
await this.enable();
|
|
11197
11201
|
this.isTrackStoppedDueToTrackEnd = false;
|
|
11198
11202
|
}
|
|
11199
|
-
else {
|
|
11203
|
+
else if (!hasPending(this.statusChangeConcurrencyTag)) {
|
|
11200
11204
|
await this.applySettingsToStream();
|
|
11201
11205
|
}
|
|
11202
11206
|
}
|
|
@@ -11210,6 +11214,20 @@ class DeviceManager {
|
|
|
11210
11214
|
const kind = this.mediaDeviceKind;
|
|
11211
11215
|
return devices.find((d) => d.deviceId === deviceId && d.kind === kind);
|
|
11212
11216
|
}
|
|
11217
|
+
dispatchDeviceDisconnectedEvent(device) {
|
|
11218
|
+
const event = {
|
|
11219
|
+
type: 'device.disconnected',
|
|
11220
|
+
call_cid: this.call.cid,
|
|
11221
|
+
status: this.isTrackStoppedDueToTrackEnd
|
|
11222
|
+
? this.state.prevStatus
|
|
11223
|
+
: this.state.status,
|
|
11224
|
+
deviceId: device.deviceId,
|
|
11225
|
+
label: device.label,
|
|
11226
|
+
kind: device.kind,
|
|
11227
|
+
};
|
|
11228
|
+
this.call.tracer.trace('device.disconnected', event);
|
|
11229
|
+
this.call.streamClient.dispatchEvent(event);
|
|
11230
|
+
}
|
|
11213
11231
|
persistPreference(selectedDevice, status) {
|
|
11214
11232
|
const deviceKind = this.mediaDeviceKind;
|
|
11215
11233
|
const deviceKey = deviceKind === 'audioinput' ? 'microphone' : 'camera';
|
|
@@ -15979,7 +15997,7 @@ class StreamClient {
|
|
|
15979
15997
|
this.getUserAgent = () => {
|
|
15980
15998
|
if (!this.cachedUserAgent) {
|
|
15981
15999
|
const { clientAppIdentifier = {} } = this.options;
|
|
15982
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
16000
|
+
const { sdkName = 'js', sdkVersion = "1.45.0", ...extras } = clientAppIdentifier;
|
|
15983
16001
|
this.cachedUserAgent = [
|
|
15984
16002
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
15985
16003
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|