@stream-io/video-client 1.16.6 → 1.16.7
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 +21 -11
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +21 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +21 -11
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/devices/devices.ts +22 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.16.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.16.6...@stream-io/video-client-1.16.7) (2025-02-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* relax device constraints on NotFoundError DOMException ([#1680](https://github.com/GetStream/stream-video-js/issues/1680)) ([c682908](https://github.com/GetStream/stream-video-js/commit/c682908408395f6863fd1549958cf4203bcc7f32))
|
|
11
|
+
|
|
5
12
|
## [1.16.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.16.5...@stream-io/video-client-1.16.6) (2025-02-11)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -7464,7 +7464,7 @@ const aggregate = (stats) => {
|
|
|
7464
7464
|
return report;
|
|
7465
7465
|
};
|
|
7466
7466
|
|
|
7467
|
-
const version = "1.16.
|
|
7467
|
+
const version = "1.16.7";
|
|
7468
7468
|
const [major, minor, patch] = version.split('.');
|
|
7469
7469
|
let sdkInfo = {
|
|
7470
7470
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -8556,13 +8556,23 @@ const getStream = async (constraints) => {
|
|
|
8556
8556
|
}
|
|
8557
8557
|
return stream;
|
|
8558
8558
|
};
|
|
8559
|
-
function
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8559
|
+
function isNotFoundOrOverconstrainedError(error) {
|
|
8560
|
+
if (!error || typeof error !== 'object') {
|
|
8561
|
+
return false;
|
|
8562
|
+
}
|
|
8563
|
+
if ('name' in error && typeof error.name === 'string') {
|
|
8564
|
+
const name = error.name;
|
|
8565
|
+
if (['OverconstrainedError', 'NotFoundError'].includes(name)) {
|
|
8566
|
+
return true;
|
|
8567
|
+
}
|
|
8568
|
+
}
|
|
8569
|
+
if ('message' in error && typeof error.message === 'string') {
|
|
8570
|
+
const message = error.message;
|
|
8571
|
+
if (message.startsWith('OverconstrainedError')) {
|
|
8572
|
+
return true;
|
|
8573
|
+
}
|
|
8574
|
+
}
|
|
8575
|
+
return false;
|
|
8566
8576
|
}
|
|
8567
8577
|
/**
|
|
8568
8578
|
* Returns an audio media stream that fulfills the given constraints.
|
|
@@ -8587,7 +8597,7 @@ const getAudioStream = async (trackConstraints) => {
|
|
|
8587
8597
|
return await getStream(constraints);
|
|
8588
8598
|
}
|
|
8589
8599
|
catch (error) {
|
|
8590
|
-
if (
|
|
8600
|
+
if (isNotFoundOrOverconstrainedError(error) && trackConstraints?.deviceId) {
|
|
8591
8601
|
const { deviceId, ...relaxedConstraints } = trackConstraints;
|
|
8592
8602
|
getLogger(['devices'])('warn', 'Failed to get audio stream, will try again with relaxed constraints', { error, constraints, relaxedConstraints });
|
|
8593
8603
|
return getAudioStream(relaxedConstraints);
|
|
@@ -8622,7 +8632,7 @@ const getVideoStream = async (trackConstraints) => {
|
|
|
8622
8632
|
return await getStream(constraints);
|
|
8623
8633
|
}
|
|
8624
8634
|
catch (error) {
|
|
8625
|
-
if (
|
|
8635
|
+
if (isNotFoundOrOverconstrainedError(error) && trackConstraints?.deviceId) {
|
|
8626
8636
|
const { deviceId, ...relaxedConstraints } = trackConstraints;
|
|
8627
8637
|
getLogger(['devices'])('warn', 'Failed to get video stream, will try again with relaxed constraints', { error, constraints, relaxedConstraints });
|
|
8628
8638
|
return getVideoStream(relaxedConstraints);
|
|
@@ -13067,7 +13077,7 @@ class StreamClient {
|
|
|
13067
13077
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
13068
13078
|
};
|
|
13069
13079
|
this.getUserAgent = () => {
|
|
13070
|
-
const version = "1.16.
|
|
13080
|
+
const version = "1.16.7";
|
|
13071
13081
|
return (this.userAgent ||
|
|
13072
13082
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
13073
13083
|
};
|