@stream-io/video-client 1.11.8 → 1.11.10
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 +22 -18
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +22 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +22 -18
- package/dist/index.es.js.map +1 -1
- package/dist/src/types.d.ts +0 -2
- package/package.json +1 -1
- package/src/Call.ts +4 -3
- package/src/devices/InputMediaDeviceManager.ts +1 -0
- package/src/devices/devices.ts +16 -22
- package/src/events/call.ts +5 -3
- package/src/types.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.11.10](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.9...@stream-io/video-client-1.11.10) (2024-11-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* ringing calls not being left when ended ([#1601](https://github.com/GetStream/stream-video-js/issues/1601)) ([1c2b9d1](https://github.com/GetStream/stream-video-js/commit/1c2b9d1a54767652acc52cae9bb3d348c9df566f))
|
|
11
|
+
|
|
12
|
+
## [1.11.9](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.8...@stream-io/video-client-1.11.9) (2024-11-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* cover some device selection edge cases ([#1604](https://github.com/GetStream/stream-video-js/issues/1604)) ([a8fc0ea](https://github.com/GetStream/stream-video-js/commit/a8fc0eaf1ed6c79ce24f77f52351a1e90701bd02))
|
|
18
|
+
|
|
5
19
|
## [1.11.8](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.7...@stream-io/video-client-1.11.8) (2024-11-27)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -3297,7 +3297,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3297
3297
|
return result;
|
|
3298
3298
|
};
|
|
3299
3299
|
|
|
3300
|
-
const version = "1.11.
|
|
3300
|
+
const version = "1.11.10";
|
|
3301
3301
|
const [major, minor, patch] = version.split('.');
|
|
3302
3302
|
let sdkInfo = {
|
|
3303
3303
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -6781,7 +6781,9 @@ const watchCallEnded = (call) => {
|
|
|
6781
6781
|
const { callingState } = call.state;
|
|
6782
6782
|
if (callingState !== CallingState.IDLE &&
|
|
6783
6783
|
callingState !== CallingState.LEFT) {
|
|
6784
|
-
call
|
|
6784
|
+
call
|
|
6785
|
+
.leave({ reason: 'call.ended event received', reject: false })
|
|
6786
|
+
.catch((err) => {
|
|
6785
6787
|
call.logger('error', 'Failed to leave call after call.ended ', err);
|
|
6786
6788
|
});
|
|
6787
6789
|
}
|
|
@@ -8344,7 +8346,7 @@ const getAudioStream = async (trackConstraints) => {
|
|
|
8344
8346
|
const constraints = {
|
|
8345
8347
|
audio: {
|
|
8346
8348
|
...audioDeviceConstraints.audio,
|
|
8347
|
-
...trackConstraints,
|
|
8349
|
+
...normalizeContraints(trackConstraints),
|
|
8348
8350
|
},
|
|
8349
8351
|
};
|
|
8350
8352
|
try {
|
|
@@ -8355,11 +8357,6 @@ const getAudioStream = async (trackConstraints) => {
|
|
|
8355
8357
|
return await getStream(constraints);
|
|
8356
8358
|
}
|
|
8357
8359
|
catch (error) {
|
|
8358
|
-
if (error instanceof OverconstrainedError && trackConstraints?.deviceId) {
|
|
8359
|
-
const { deviceId, ...relaxedContraints } = trackConstraints;
|
|
8360
|
-
getLogger(['devices'])('warn', 'Failed to get audio stream, will try again with relaxed contraints', { error, constraints, relaxedContraints });
|
|
8361
|
-
return getAudioStream(relaxedContraints);
|
|
8362
|
-
}
|
|
8363
8360
|
getLogger(['devices'])('error', 'Failed to get audio stream', {
|
|
8364
8361
|
error,
|
|
8365
8362
|
constraints,
|
|
@@ -8379,7 +8376,7 @@ const getVideoStream = async (trackConstraints) => {
|
|
|
8379
8376
|
const constraints = {
|
|
8380
8377
|
video: {
|
|
8381
8378
|
...videoDeviceConstraints.video,
|
|
8382
|
-
...trackConstraints,
|
|
8379
|
+
...normalizeContraints(trackConstraints),
|
|
8383
8380
|
},
|
|
8384
8381
|
};
|
|
8385
8382
|
try {
|
|
@@ -8390,11 +8387,6 @@ const getVideoStream = async (trackConstraints) => {
|
|
|
8390
8387
|
return await getStream(constraints);
|
|
8391
8388
|
}
|
|
8392
8389
|
catch (error) {
|
|
8393
|
-
if (error instanceof OverconstrainedError && trackConstraints?.deviceId) {
|
|
8394
|
-
const { deviceId, ...relaxedContraints } = trackConstraints;
|
|
8395
|
-
getLogger(['devices'])('warn', 'Failed to get video stream, will try again with relaxed contraints', { error, constraints, relaxedContraints });
|
|
8396
|
-
return getVideoStream(relaxedContraints);
|
|
8397
|
-
}
|
|
8398
8390
|
getLogger(['devices'])('error', 'Failed to get video stream', {
|
|
8399
8391
|
error,
|
|
8400
8392
|
constraints,
|
|
@@ -8402,6 +8394,16 @@ const getVideoStream = async (trackConstraints) => {
|
|
|
8402
8394
|
throw error;
|
|
8403
8395
|
}
|
|
8404
8396
|
};
|
|
8397
|
+
function normalizeContraints(constraints) {
|
|
8398
|
+
if (constraints?.deviceId === 'default' ||
|
|
8399
|
+
(typeof constraints?.deviceId === 'object' &&
|
|
8400
|
+
'exact' in constraints.deviceId &&
|
|
8401
|
+
constraints.deviceId.exact === 'default')) {
|
|
8402
|
+
const { deviceId, ...contraintsWithoutDeviceId } = constraints;
|
|
8403
|
+
return contraintsWithoutDeviceId;
|
|
8404
|
+
}
|
|
8405
|
+
return constraints;
|
|
8406
|
+
}
|
|
8405
8407
|
/**
|
|
8406
8408
|
* Prompts the user for a permission to share a screen.
|
|
8407
8409
|
* If the user grants the permission, a screen sharing stream is returned. Throws otherwise.
|
|
@@ -8628,6 +8630,7 @@ class InputMediaDeviceManager {
|
|
|
8628
8630
|
}
|
|
8629
8631
|
catch (error) {
|
|
8630
8632
|
this.state.setDevice(prevDeviceId);
|
|
8633
|
+
await this.applySettingsToStream();
|
|
8631
8634
|
throw error;
|
|
8632
8635
|
}
|
|
8633
8636
|
}
|
|
@@ -9922,7 +9925,7 @@ class Call {
|
|
|
9922
9925
|
/**
|
|
9923
9926
|
* Leave the call and stop the media streams that were published by the call.
|
|
9924
9927
|
*/
|
|
9925
|
-
this.leave = async ({ reject
|
|
9928
|
+
this.leave = async ({ reject, reason = 'user is leaving the call', } = {}) => {
|
|
9926
9929
|
await withoutConcurrency(this.joinLeaveConcurrencyTag, async () => {
|
|
9927
9930
|
const callingState = this.state.callingState;
|
|
9928
9931
|
if (callingState === CallingState.LEFT) {
|
|
@@ -9938,14 +9941,15 @@ class Call {
|
|
|
9938
9941
|
};
|
|
9939
9942
|
await waitUntilCallJoined();
|
|
9940
9943
|
}
|
|
9941
|
-
if (callingState === CallingState.RINGING) {
|
|
9944
|
+
if (callingState === CallingState.RINGING && reject !== false) {
|
|
9942
9945
|
if (reject) {
|
|
9943
9946
|
await this.reject(reason);
|
|
9944
9947
|
}
|
|
9945
9948
|
else {
|
|
9949
|
+
// if reject was undefined, we still have to cancel the call automatically
|
|
9950
|
+
// when I am the creator and everyone else left the call
|
|
9946
9951
|
const hasOtherParticipants = this.state.remoteParticipants.length > 0;
|
|
9947
9952
|
if (this.isCreatedByMe && !hasOtherParticipants) {
|
|
9948
|
-
// I'm the one who started the call, so I should cancel it when there are no other participants.
|
|
9949
9953
|
await this.reject('cancel');
|
|
9950
9954
|
}
|
|
9951
9955
|
}
|
|
@@ -12613,7 +12617,7 @@ class StreamClient {
|
|
|
12613
12617
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12614
12618
|
};
|
|
12615
12619
|
this.getUserAgent = () => {
|
|
12616
|
-
const version = "1.11.
|
|
12620
|
+
const version = "1.11.10";
|
|
12617
12621
|
return (this.userAgent ||
|
|
12618
12622
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12619
12623
|
};
|