@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 +7 -0
- package/dist/index.browser.es.js +7 -11
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +7 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7 -11
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/rtc/videoLayers.ts +7 -9
package/dist/index.cjs.js
CHANGED
|
@@ -2959,7 +2959,7 @@ const retryable = async (rpc, signal) => {
|
|
|
2959
2959
|
return result;
|
|
2960
2960
|
};
|
|
2961
2961
|
|
|
2962
|
-
const version = "1.9.
|
|
2962
|
+
const version = "1.9.1";
|
|
2963
2963
|
const [major, minor, patch] = version.split('.');
|
|
2964
2964
|
let sdkInfo = {
|
|
2965
2965
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -3396,9 +3396,9 @@ const findOptimalVideoLayers = (videoTrack, targetResolution = defaultTargetReso
|
|
|
3396
3396
|
const layer = {
|
|
3397
3397
|
active: true,
|
|
3398
3398
|
rid,
|
|
3399
|
-
width,
|
|
3400
|
-
height,
|
|
3401
|
-
maxBitrate,
|
|
3399
|
+
width: Math.round(width / downscaleFactor),
|
|
3400
|
+
height: Math.round(height / downscaleFactor),
|
|
3401
|
+
maxBitrate: Math.round(maxBitrate / bitrateFactor) || defaultBitratePerRid[rid],
|
|
3402
3402
|
maxFramerate: 30,
|
|
3403
3403
|
};
|
|
3404
3404
|
if (svcCodec) {
|
|
@@ -3408,14 +3408,10 @@ const findOptimalVideoLayers = (videoTrack, targetResolution = defaultTargetReso
|
|
|
3408
3408
|
}
|
|
3409
3409
|
else {
|
|
3410
3410
|
// for non-SVC codecs, we need to downscale proportionally (simulcast)
|
|
3411
|
-
layer.width = Math.round(width / downscaleFactor);
|
|
3412
|
-
layer.height = Math.round(height / downscaleFactor);
|
|
3413
|
-
const bitrate = Math.round(maxBitrate / bitrateFactor);
|
|
3414
|
-
layer.maxBitrate = bitrate || defaultBitratePerRid[rid];
|
|
3415
3411
|
layer.scaleResolutionDownBy = downscaleFactor;
|
|
3416
|
-
downscaleFactor *= 2;
|
|
3417
|
-
bitrateFactor *= bitrateDownscaleFactor;
|
|
3418
3412
|
}
|
|
3413
|
+
downscaleFactor *= 2;
|
|
3414
|
+
bitrateFactor *= bitrateDownscaleFactor;
|
|
3419
3415
|
// Reversing the order [f, h, q] to [q, h, f] as Chrome uses encoding index
|
|
3420
3416
|
// when deciding which layer to disable when CPU or bandwidth is constrained.
|
|
3421
3417
|
// Encodings should be ordered in increasing spatial resolution order.
|
|
@@ -12473,7 +12469,7 @@ class StreamClient {
|
|
|
12473
12469
|
});
|
|
12474
12470
|
};
|
|
12475
12471
|
this.getUserAgent = () => {
|
|
12476
|
-
const version = "1.9.
|
|
12472
|
+
const version = "1.9.1";
|
|
12477
12473
|
return (this.userAgent ||
|
|
12478
12474
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12479
12475
|
};
|