@stream-io/video-client 1.10.3 → 1.10.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 +14 -0
- package/dist/index.browser.es.js +9 -7
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +9 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9 -7
- package/dist/index.es.js.map +1 -1
- package/dist/src/types.d.ts +4 -0
- package/package.json +1 -1
- package/src/rtc/Publisher.ts +2 -1
- package/src/rtc/__tests__/Publisher.test.ts +39 -0
- package/src/rtc/bitrateLookup.ts +2 -2
- package/src/rtc/videoLayers.ts +7 -2
- package/src/types.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.10.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.4...@stream-io/video-client-1.10.5) (2024-11-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* ignore maxSimulcastLayers override for SVC codecs ([#1564](https://github.com/GetStream/stream-video-js/issues/1564)) ([48f8abe](https://github.com/GetStream/stream-video-js/commit/48f8abe5fd5b48c367a04696febd582573def828))
|
|
11
|
+
|
|
12
|
+
## [1.10.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.3...@stream-io/video-client-1.10.4) (2024-11-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* max simulcast layers preference ([#1560](https://github.com/GetStream/stream-video-js/issues/1560)) ([2b0bf28](https://github.com/GetStream/stream-video-js/commit/2b0bf2824dce41c2709e361e0521cf85e1b2fd16))
|
|
18
|
+
|
|
5
19
|
## [1.10.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.2...@stream-io/video-client-1.10.3) (2024-11-05)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -3108,7 +3108,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3108
3108
|
return result;
|
|
3109
3109
|
};
|
|
3110
3110
|
|
|
3111
|
-
const version = "1.10.
|
|
3111
|
+
const version = "1.10.5";
|
|
3112
3112
|
const [major, minor, patch] = version.split('.');
|
|
3113
3113
|
let sdkInfo = {
|
|
3114
3114
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -3443,8 +3443,8 @@ function getIceCandidate(candidate) {
|
|
|
3443
3443
|
const bitrateLookupTable = {
|
|
3444
3444
|
h264: {
|
|
3445
3445
|
2160: 5000000,
|
|
3446
|
-
1440:
|
|
3447
|
-
1080:
|
|
3446
|
+
1440: 3000000,
|
|
3447
|
+
1080: 2000000,
|
|
3448
3448
|
720: 1250000,
|
|
3449
3449
|
540: 750000,
|
|
3450
3450
|
360: 400000,
|
|
@@ -3536,12 +3536,13 @@ const findOptimalVideoLayers = (videoTrack, targetResolution = defaultTargetReso
|
|
|
3536
3536
|
const optimalVideoLayers = [];
|
|
3537
3537
|
const settings = videoTrack.getSettings();
|
|
3538
3538
|
const { width = 0, height = 0 } = settings;
|
|
3539
|
-
const { scalabilityMode, bitrateDownscaleFactor = 2 } = publishOptions || {};
|
|
3539
|
+
const { scalabilityMode, bitrateDownscaleFactor = 2, maxSimulcastLayers = 3, } = publishOptions || {};
|
|
3540
3540
|
const maxBitrate = getComputedMaxBitrate(targetResolution, width, height, codecInUse, publishOptions);
|
|
3541
3541
|
let downscaleFactor = 1;
|
|
3542
3542
|
let bitrateFactor = 1;
|
|
3543
3543
|
const svcCodec = isSvcCodec(codecInUse);
|
|
3544
|
-
|
|
3544
|
+
const totalLayers = svcCodec ? 3 : Math.min(3, maxSimulcastLayers);
|
|
3545
|
+
for (const rid of ['f', 'h', 'q'].slice(0, totalLayers)) {
|
|
3545
3546
|
const layer = {
|
|
3546
3547
|
active: true,
|
|
3547
3548
|
rid,
|
|
@@ -5559,7 +5560,8 @@ class Publisher {
|
|
|
5559
5560
|
? // for SVC, we only have one layer (q) and often rid is omitted
|
|
5560
5561
|
enabledLayers[0]
|
|
5561
5562
|
: // for non-SVC, we need to find the layer by rid (simulcast)
|
|
5562
|
-
enabledLayers.find((l) => l.name === encoder.rid)
|
|
5563
|
+
enabledLayers.find((l) => l.name === encoder.rid) ??
|
|
5564
|
+
(params.encodings.length === 1 ? enabledLayers[0] : undefined);
|
|
5563
5565
|
// flip 'active' flag only when necessary
|
|
5564
5566
|
const shouldActivate = !!layer?.active;
|
|
5565
5567
|
if (shouldActivate !== encoder.active) {
|
|
@@ -12701,7 +12703,7 @@ class StreamClient {
|
|
|
12701
12703
|
});
|
|
12702
12704
|
};
|
|
12703
12705
|
this.getUserAgent = () => {
|
|
12704
|
-
const version = "1.10.
|
|
12706
|
+
const version = "1.10.5";
|
|
12705
12707
|
return (this.userAgent ||
|
|
12706
12708
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12707
12709
|
};
|