mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1251 from adavier/4-3-videoselectfix
Fix Quality Settings for Aspect Ratios less than 16:9 (1.77)
This commit is contained in:
commit
e89461e18e
2 changed files with 11 additions and 0 deletions
|
@ -7,11 +7,13 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
|
||||||
return stream.Type === 'Video';
|
return stream.Type === 'Video';
|
||||||
})[0];
|
})[0];
|
||||||
var videoWidth = videoStream ? videoStream.Width : null;
|
var videoWidth = videoStream ? videoStream.Width : null;
|
||||||
|
var videoHeight = videoStream ? videoStream.Height : null;
|
||||||
|
|
||||||
var options = qualityoptions.getVideoQualityOptions({
|
var options = qualityoptions.getVideoQualityOptions({
|
||||||
currentMaxBitrate: playbackManager.getMaxStreamingBitrate(player),
|
currentMaxBitrate: playbackManager.getMaxStreamingBitrate(player),
|
||||||
isAutomaticBitrateEnabled: playbackManager.enableAutomaticBitrateDetection(player),
|
isAutomaticBitrateEnabled: playbackManager.enableAutomaticBitrateDetection(player),
|
||||||
videoWidth: videoWidth,
|
videoWidth: videoWidth,
|
||||||
|
videoHeight: videoHeight,
|
||||||
enableAuto: true
|
enableAuto: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -91,11 +93,13 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
var videoWidth = videoStream ? videoStream.Width : null;
|
var videoWidth = videoStream ? videoStream.Width : null;
|
||||||
|
var videoHeight = videoStream ? videoStream.Height : null;
|
||||||
|
|
||||||
var options = qualityoptions.getVideoQualityOptions({
|
var options = qualityoptions.getVideoQualityOptions({
|
||||||
currentMaxBitrate: playbackManager.getMaxStreamingBitrate(player),
|
currentMaxBitrate: playbackManager.getMaxStreamingBitrate(player),
|
||||||
isAutomaticBitrateEnabled: playbackManager.enableAutomaticBitrateDetection(player),
|
isAutomaticBitrateEnabled: playbackManager.enableAutomaticBitrateDetection(player),
|
||||||
videoWidth: videoWidth,
|
videoWidth: videoWidth,
|
||||||
|
videoHeight: videoHeight,
|
||||||
enableAuto: true
|
enableAuto: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,13 @@ define(['globalize'], function (globalize) {
|
||||||
|
|
||||||
var maxStreamingBitrate = options.currentMaxBitrate;
|
var maxStreamingBitrate = options.currentMaxBitrate;
|
||||||
var videoWidth = options.videoWidth;
|
var videoWidth = options.videoWidth;
|
||||||
|
var videoHeight = options.videoHeight;
|
||||||
|
|
||||||
|
// If the aspect ratio is less than 16/9 (1.77), set the width as if it were pillarboxed.
|
||||||
|
// 4:3 1440x1080 -> 1920x1080
|
||||||
|
if (videoWidth / videoHeight < 16 / 9) {
|
||||||
|
videoWidth = videoHeight * (16 / 9);
|
||||||
|
}
|
||||||
|
|
||||||
var maxAllowedWidth = videoWidth || 4096;
|
var maxAllowedWidth = videoWidth || 4096;
|
||||||
//var maxAllowedHeight = videoHeight || 2304;
|
//var maxAllowedHeight = videoHeight || 2304;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue