@stream-io/video-client 1.23.3 → 1.23.4

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 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.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)
6
+
7
+ ### Bug Fixes
8
+
9
+ - 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))
10
+ - 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))
11
+
5
12
  ## [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
13
 
7
14
  - remove TODO ([9cfea4b](https://github.com/GetStream/stream-video-js/commit/9cfea4b54284cdd680a6d666436dedc5fd8956c3))
@@ -5685,7 +5685,7 @@ const aggregate = (stats) => {
5685
5685
  return report;
5686
5686
  };
5687
5687
 
5688
- const version = "1.23.3";
5688
+ const version = "1.23.4";
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 (q), the one with the highest quality
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, 160x120 (q) and 640x480 (h)
6766
- layers = optimalVideoLayers.filter((layer) => layer.rid !== 'h');
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
  };
@@ -9244,6 +9248,16 @@ const getStream = async (constraints, tracer) => {
9244
9248
  // every successful getUserMedia call.
9245
9249
  navigator.mediaDevices.dispatchEvent(new Event('devicechange'));
9246
9250
  }
9251
+ if (constraints.video) {
9252
+ const [videoTrack] = stream.getVideoTracks();
9253
+ if (videoTrack) {
9254
+ const { width, height } = videoTrack.getSettings();
9255
+ const target = constraints.video;
9256
+ if (width !== target.width || height !== target.height) {
9257
+ tracer?.trace(`${tag}Warn`, `Requested resolution ${target.width}x${target.height} but got ${width}x${height}`);
9258
+ }
9259
+ }
9260
+ }
9247
9261
  return stream;
9248
9262
  }
9249
9263
  catch (error) {
@@ -10113,7 +10127,14 @@ class CameraManager extends InputMediaDeviceManager {
10113
10127
  // Wait for any in progress camera operation
10114
10128
  await this.statusChangeSettled();
10115
10129
  const { target_resolution, camera_facing, camera_default_on } = settings;
10116
- await this.selectTargetResolution(target_resolution);
10130
+ // normalize target resolution to landscape format.
10131
+ // on mobile devices, the device itself adjusts the resolution to portrait or landscape
10132
+ // depending on the orientation of the device. using portrait resolution
10133
+ // will result in falling back to the default resolution (640x480).
10134
+ let { width, height } = target_resolution;
10135
+ if (width < height)
10136
+ [width, height] = [height, width];
10137
+ await this.selectTargetResolution({ width, height });
10117
10138
  // Set camera direction if it's not yet set
10118
10139
  if (!this.state.direction && !this.state.selectedDevice) {
10119
10140
  this.state.setDirection(camera_facing === 'front' ? 'front' : 'back');
@@ -13454,7 +13475,9 @@ class TokenManager {
13454
13475
  this.token = token;
13455
13476
  }
13456
13477
  catch (e) {
13457
- return reject(new Error(`Call to tokenProvider failed with message: ${e}`));
13478
+ return reject(new Error(`Call to tokenProvider failed with message: ${e}`, {
13479
+ cause: e,
13480
+ }));
13458
13481
  }
13459
13482
  resolve(this.token);
13460
13483
  }
@@ -13871,7 +13894,7 @@ class StreamClient {
13871
13894
  this.getUserAgent = () => {
13872
13895
  if (!this.cachedUserAgent) {
13873
13896
  const { clientAppIdentifier = {} } = this.options;
13874
- const { sdkName = 'js', sdkVersion = "1.23.3", ...extras } = clientAppIdentifier;
13897
+ const { sdkName = 'js', sdkVersion = "1.23.4", ...extras } = clientAppIdentifier;
13875
13898
  this.cachedUserAgent = [
13876
13899
  `stream-video-${sdkName}-v${sdkVersion}`,
13877
13900
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),