mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
qualityoptions.js now shows correct options for aspect ratios below 16:9 (1.77) (such as 4:3 (1.33))
qualityoptions.js assumes that all videos are wider than 16:9 (1.77). So a video with resolution 1440x1080 (4:3 1080p) only exposes options of 720p as the width is not considered for 1080p. This fixes that by checking if the aspect ratio is less than 1.77, and if so padding the width to 16:9.
This commit is contained in:
parent
4662e19567
commit
146e592a6d
2 changed files with 11 additions and 0 deletions
|
@ -5,6 +5,13 @@ define(['globalize'], function (globalize) {
|
|||
|
||||
var maxStreamingBitrate = options.currentMaxBitrate;
|
||||
var videoWidth = options.videoWidth;
|
||||
var videoHeight = options.videoHeight;
|
||||
|
||||
//If the aspect ratio is less than 16/9 (1.77), set the height as if it were pillerboxed.
|
||||
// 4:3 1440x1080 -> 1920x1080
|
||||
if (videoWidth/videoHeight < 16/9) {
|
||||
videoWidth=videoHeight*(16/9);
|
||||
}
|
||||
|
||||
var maxAllowedWidth = videoWidth || 4096;
|
||||
//var maxAllowedHeight = videoHeight || 2304;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue