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

Merge pull request #3717 from dmitrylyzo/resolution

(cherry picked from commit f1ff81884a)
Signed-off-by: Bill Thornton <billt2006@gmail.com>
This commit is contained in:
Joshua M. Boniface 2022-06-20 10:01:01 -04:00 committed by Bill Thornton
parent 8d46c7bddc
commit 08c8907f5a
6 changed files with 80 additions and 6 deletions

View file

@ -1,5 +1,6 @@
import { appHost } from '../components/apphost';
import globalize from '../scripts/globalize';
import appSettings from '../scripts/settings/appSettings';
export function getVideoQualityOptions(options) {
const maxStreamingBitrate = options.currentMaxBitrate;
@ -12,7 +13,9 @@ export function getVideoQualityOptions(options) {
videoWidth = videoHeight * (16 / 9);
}
const hostScreenWidth = appHost.screen()?.maxAllowedWidth || 4096;
const maxVideoWidth = options.maxVideoWidth == null ? appSettings.maxVideoWidth() : options.maxVideoWidth;
const hostScreenWidth = (maxVideoWidth < 0 ? appHost.screen()?.maxAllowedWidth : maxVideoWidth) || 4096;
const maxAllowedWidth = videoWidth || 4096;
const qualityOptions = [];