@stream-io/video-client 0.7.4 → 0.7.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 +7 -0
- package/dist/index.browser.es.js +7 -2
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +7 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/rtc/__tests__/videoLayers.test.ts +20 -0
- package/src/rtc/videoLayers.ts +8 -1
package/dist/index.es.js
CHANGED
|
@@ -6097,6 +6097,11 @@ const defaultTargetResolution = {
|
|
|
6097
6097
|
width: 1280,
|
|
6098
6098
|
height: 720,
|
|
6099
6099
|
};
|
|
6100
|
+
const defaultBitratePerRid = {
|
|
6101
|
+
q: 300000,
|
|
6102
|
+
h: 750000,
|
|
6103
|
+
f: DEFAULT_BITRATE,
|
|
6104
|
+
};
|
|
6100
6105
|
/**
|
|
6101
6106
|
* Determines the most optimal video layers for simulcasting
|
|
6102
6107
|
* for the given track.
|
|
@@ -6120,7 +6125,7 @@ const findOptimalVideoLayers = (videoTrack, targetResolution = defaultTargetReso
|
|
|
6120
6125
|
rid,
|
|
6121
6126
|
width: Math.round(w / downscaleFactor),
|
|
6122
6127
|
height: Math.round(h / downscaleFactor),
|
|
6123
|
-
maxBitrate: Math.round(maxBitrate / downscaleFactor),
|
|
6128
|
+
maxBitrate: Math.round(maxBitrate / downscaleFactor) || defaultBitratePerRid[rid],
|
|
6124
6129
|
scaleResolutionDownBy: downscaleFactor,
|
|
6125
6130
|
// Simulcast on iOS React-Native requires all encodings to share the same framerate
|
|
6126
6131
|
maxFramerate: {
|
|
@@ -14468,7 +14473,7 @@ class StreamClient {
|
|
|
14468
14473
|
});
|
|
14469
14474
|
};
|
|
14470
14475
|
this.getUserAgent = () => {
|
|
14471
|
-
const version = "0.7.
|
|
14476
|
+
const version = "0.7.5" ;
|
|
14472
14477
|
return (this.userAgent ||
|
|
14473
14478
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
14474
14479
|
};
|