@stream-io/video-client 1.23.3 → 1.23.5
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 +13 -0
- package/dist/index.browser.es.js +36 -8
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +36 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +36 -8
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/StreamSfuClient.ts +2 -0
- package/src/coordinator/connection/token_manager.ts +3 -1
- package/src/devices/BrowserPermission.ts +5 -1
- package/src/devices/CameraManager.ts +7 -1
- package/src/devices/devices.ts +14 -0
- package/src/rtc/__tests__/videoLayers.test.ts +21 -6
- package/src/rtc/videoLayers.ts +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.23.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.23.4...@stream-io/video-client-1.23.5) (2025-06-04)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **react-native:** skip browser permission for react native ([#1818](https://github.com/GetStream/stream-video-js/issues/1818)) ([b18f418](https://github.com/GetStream/stream-video-js/commit/b18f418698e12b9804efb43e712ba813b0dbb056))
|
|
10
|
+
|
|
11
|
+
## [1.23.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.23.3...@stream-io/video-client-1.23.4) (2025-06-03)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- attach original token provider error as cause to loadToken rejection ([#1812](https://github.com/GetStream/stream-video-js/issues/1812)) ([15f817c](https://github.com/GetStream/stream-video-js/commit/15f817c2548a8edba8ca1004e133277d67cbeb4f))
|
|
16
|
+
- improved video quality on low capture resolution ([#1814](https://github.com/GetStream/stream-video-js/issues/1814)) ([ebcfdf7](https://github.com/GetStream/stream-video-js/commit/ebcfdf7f7e8146fcaf18a8bee81086f5a23f5df3))
|
|
17
|
+
|
|
5
18
|
## [1.23.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.23.2...@stream-io/video-client-1.23.3) (2025-06-02)
|
|
6
19
|
|
|
7
20
|
- remove TODO ([9cfea4b](https://github.com/GetStream/stream-video-js/commit/9cfea4b54284cdd680a6d666436dedc5fd8956c3))
|
package/dist/index.browser.es.js
CHANGED
|
@@ -5685,7 +5685,7 @@ const aggregate = (stats) => {
|
|
|
5685
5685
|
return report;
|
|
5686
5686
|
};
|
|
5687
5687
|
|
|
5688
|
-
const version = "1.23.
|
|
5688
|
+
const version = "1.23.5";
|
|
5689
5689
|
const [major, minor, patch] = version.split('.');
|
|
5690
5690
|
let sdkInfo = {
|
|
5691
5691
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -6758,17 +6758,19 @@ const withSimulcastConstraints = (settings, optimalVideoLayers, useSingleLayer)
|
|
|
6758
6758
|
let layers;
|
|
6759
6759
|
const size = Math.max(settings.width || 0, settings.height || 0);
|
|
6760
6760
|
if (size <= 320) {
|
|
6761
|
-
// provide only one layer 320x240 (
|
|
6761
|
+
// provide only one layer 320x240 (f), the one with the highest quality
|
|
6762
6762
|
layers = optimalVideoLayers.filter((layer) => layer.rid === 'f');
|
|
6763
6763
|
}
|
|
6764
6764
|
else if (size <= 640) {
|
|
6765
|
-
// provide two layers,
|
|
6766
|
-
layers = optimalVideoLayers.filter((layer) => layer.rid !== '
|
|
6765
|
+
// provide two layers, 320x240 (h) and 640x480 (f)
|
|
6766
|
+
layers = optimalVideoLayers.filter((layer) => layer.rid !== 'q');
|
|
6767
6767
|
}
|
|
6768
6768
|
else {
|
|
6769
6769
|
// provide three layers for sizes > 640x480
|
|
6770
6770
|
layers = optimalVideoLayers;
|
|
6771
6771
|
}
|
|
6772
|
+
// we might have removed some layers, so we need to reassign the rid
|
|
6773
|
+
// to match the expected order of [q, h, f] for simulcast
|
|
6772
6774
|
const ridMapping = ['q', 'h', 'f'];
|
|
6773
6775
|
return layers.map((layer, index, arr) => ({
|
|
6774
6776
|
...layer,
|
|
@@ -7569,6 +7571,8 @@ class StreamSfuClient {
|
|
|
7569
7571
|
const eventsToTrace = {
|
|
7570
7572
|
callEnded: true,
|
|
7571
7573
|
changePublishQuality: true,
|
|
7574
|
+
changePublishOptions: true,
|
|
7575
|
+
connectionQualityChanged: true,
|
|
7572
7576
|
error: true,
|
|
7573
7577
|
goAway: true,
|
|
7574
7578
|
};
|
|
@@ -9021,7 +9025,12 @@ class BrowserPermission {
|
|
|
9021
9025
|
const signal = this.disposeController.signal;
|
|
9022
9026
|
this.ready = (async () => {
|
|
9023
9027
|
const assumeGranted = () => {
|
|
9024
|
-
|
|
9028
|
+
if (isReactNative()) {
|
|
9029
|
+
this.setState('granted');
|
|
9030
|
+
}
|
|
9031
|
+
else {
|
|
9032
|
+
this.setState('prompt');
|
|
9033
|
+
}
|
|
9025
9034
|
};
|
|
9026
9035
|
if (!canQueryPermissions()) {
|
|
9027
9036
|
return assumeGranted();
|
|
@@ -9244,6 +9253,16 @@ const getStream = async (constraints, tracer) => {
|
|
|
9244
9253
|
// every successful getUserMedia call.
|
|
9245
9254
|
navigator.mediaDevices.dispatchEvent(new Event('devicechange'));
|
|
9246
9255
|
}
|
|
9256
|
+
if (constraints.video) {
|
|
9257
|
+
const [videoTrack] = stream.getVideoTracks();
|
|
9258
|
+
if (videoTrack) {
|
|
9259
|
+
const { width, height } = videoTrack.getSettings();
|
|
9260
|
+
const target = constraints.video;
|
|
9261
|
+
if (width !== target.width || height !== target.height) {
|
|
9262
|
+
tracer?.trace(`${tag}Warn`, `Requested resolution ${target.width}x${target.height} but got ${width}x${height}`);
|
|
9263
|
+
}
|
|
9264
|
+
}
|
|
9265
|
+
}
|
|
9247
9266
|
return stream;
|
|
9248
9267
|
}
|
|
9249
9268
|
catch (error) {
|
|
@@ -10113,7 +10132,14 @@ class CameraManager extends InputMediaDeviceManager {
|
|
|
10113
10132
|
// Wait for any in progress camera operation
|
|
10114
10133
|
await this.statusChangeSettled();
|
|
10115
10134
|
const { target_resolution, camera_facing, camera_default_on } = settings;
|
|
10116
|
-
|
|
10135
|
+
// normalize target resolution to landscape format.
|
|
10136
|
+
// on mobile devices, the device itself adjusts the resolution to portrait or landscape
|
|
10137
|
+
// depending on the orientation of the device. using portrait resolution
|
|
10138
|
+
// will result in falling back to the default resolution (640x480).
|
|
10139
|
+
let { width, height } = target_resolution;
|
|
10140
|
+
if (width < height)
|
|
10141
|
+
[width, height] = [height, width];
|
|
10142
|
+
await this.selectTargetResolution({ width, height });
|
|
10117
10143
|
// Set camera direction if it's not yet set
|
|
10118
10144
|
if (!this.state.direction && !this.state.selectedDevice) {
|
|
10119
10145
|
this.state.setDirection(camera_facing === 'front' ? 'front' : 'back');
|
|
@@ -13454,7 +13480,9 @@ class TokenManager {
|
|
|
13454
13480
|
this.token = token;
|
|
13455
13481
|
}
|
|
13456
13482
|
catch (e) {
|
|
13457
|
-
return reject(new Error(`Call to tokenProvider failed with message: ${e}
|
|
13483
|
+
return reject(new Error(`Call to tokenProvider failed with message: ${e}`, {
|
|
13484
|
+
cause: e,
|
|
13485
|
+
}));
|
|
13458
13486
|
}
|
|
13459
13487
|
resolve(this.token);
|
|
13460
13488
|
}
|
|
@@ -13871,7 +13899,7 @@ class StreamClient {
|
|
|
13871
13899
|
this.getUserAgent = () => {
|
|
13872
13900
|
if (!this.cachedUserAgent) {
|
|
13873
13901
|
const { clientAppIdentifier = {} } = this.options;
|
|
13874
|
-
const { sdkName = 'js', sdkVersion = "1.23.
|
|
13902
|
+
const { sdkName = 'js', sdkVersion = "1.23.5", ...extras } = clientAppIdentifier;
|
|
13875
13903
|
this.cachedUserAgent = [
|
|
13876
13904
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13877
13905
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|