1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Merge branch 'release/3.4.0' into develop

This commit is contained in:
Chocobozzz 2021-10-11 16:00:39 +02:00
commit badacdbb4a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 5 additions and 2 deletions

View file

@ -237,5 +237,8 @@ export {
function capBitrate (inputBitrate: number, targetBitrate: number) {
if (!inputBitrate) return targetBitrate
return Math.min(targetBitrate, inputBitrate)
// Add 30% margin to input bitrate
const inputBitrateWithMargin = inputBitrate + (inputBitrate * 0.3)
return Math.min(targetBitrate, inputBitrateWithMargin)
}