@stream-io/video-client 1.9.0 → 1.9.1

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.9.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.9.0...@stream-io/video-client-1.9.1) (2024-10-18)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **svc:** announce downscaled layers in setPublisher ([#1526](https://github.com/GetStream/stream-video-js/issues/1526)) ([96cadd0](https://github.com/GetStream/stream-video-js/commit/96cadd05e995392eac4ec300828d07b287d691a0))
11
+
5
12
  ## [1.9.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.8.4...@stream-io/video-client-1.9.0) (2024-10-16)
6
13
 
7
14
 
@@ -2938,7 +2938,7 @@ const retryable = async (rpc, signal) => {
2938
2938
  return result;
2939
2939
  };
2940
2940
 
2941
- const version = "1.9.0";
2941
+ const version = "1.9.1";
2942
2942
  const [major, minor, patch] = version.split('.');
2943
2943
  let sdkInfo = {
2944
2944
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -3375,9 +3375,9 @@ const findOptimalVideoLayers = (videoTrack, targetResolution = defaultTargetReso
3375
3375
  const layer = {
3376
3376
  active: true,
3377
3377
  rid,
3378
- width,
3379
- height,
3380
- maxBitrate,
3378
+ width: Math.round(width / downscaleFactor),
3379
+ height: Math.round(height / downscaleFactor),
3380
+ maxBitrate: Math.round(maxBitrate / bitrateFactor) || defaultBitratePerRid[rid],
3381
3381
  maxFramerate: 30,
3382
3382
  };
3383
3383
  if (svcCodec) {
@@ -3387,14 +3387,10 @@ const findOptimalVideoLayers = (videoTrack, targetResolution = defaultTargetReso
3387
3387
  }
3388
3388
  else {
3389
3389
  // for non-SVC codecs, we need to downscale proportionally (simulcast)
3390
- layer.width = Math.round(width / downscaleFactor);
3391
- layer.height = Math.round(height / downscaleFactor);
3392
- const bitrate = Math.round(maxBitrate / bitrateFactor);
3393
- layer.maxBitrate = bitrate || defaultBitratePerRid[rid];
3394
3390
  layer.scaleResolutionDownBy = downscaleFactor;
3395
- downscaleFactor *= 2;
3396
- bitrateFactor *= bitrateDownscaleFactor;
3397
3391
  }
3392
+ downscaleFactor *= 2;
3393
+ bitrateFactor *= bitrateDownscaleFactor;
3398
3394
  // Reversing the order [f, h, q] to [q, h, f] as Chrome uses encoding index
3399
3395
  // when deciding which layer to disable when CPU or bandwidth is constrained.
3400
3396
  // Encodings should be ordered in increasing spatial resolution order.
@@ -12454,7 +12450,7 @@ class StreamClient {
12454
12450
  });
12455
12451
  };
12456
12452
  this.getUserAgent = () => {
12457
- const version = "1.9.0";
12453
+ const version = "1.9.1";
12458
12454
  return (this.userAgent ||
12459
12455
  `stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
12460
12456
  };