1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge branch 'fork/bitrate-control'

This commit is contained in:
gnattu 2024-09-14 17:55:26 +08:00
commit 2f297971d7

View file

@ -35,14 +35,14 @@ export function getVideoQualityOptions(options) {
qualityOptions.push(autoQualityOption);
}
if (videoBitRate > 0 && videoBitRate < 120000000) {
if (videoBitRate > 0 && videoBitRate < bitrateConfigurations[0].bitrate) {
// Push one entry that has higher limit than video bitrate to allow using source bitrate when Auto is also limited
const sourceOptions = bitrateConfigurations.filter((c) => c.bitrate > videoBitRate).pop();
qualityOptions.push(sourceOptions);
}
bitrateConfigurations.forEach((c) => {
if (videoBitRate < 0 || (videoBitRate > 0 && c.bitrate < videoBitRate)) {
if (videoBitRate <= 0 || c.bitrate <= videoBitRate) {
qualityOptions.push(c);
}
});