mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add option to limit maximum supported video resolution
This commit is contained in:
parent
2097c526d2
commit
6e6b696bd9
5 changed files with 40 additions and 6 deletions
|
@ -45,18 +45,27 @@ function getDeviceProfile(item) {
|
|||
const maxTranscodingVideoWidth = maxVideoWidth < 0 ? appHost.screen()?.maxAllowedWidth : maxVideoWidth;
|
||||
|
||||
if (maxTranscodingVideoWidth) {
|
||||
const conditionWidth = {
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'Width',
|
||||
Value: maxTranscodingVideoWidth.toString(),
|
||||
IsRequired: false
|
||||
};
|
||||
|
||||
if (appSettings.limitSupportedVideoResolution()) {
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'Video',
|
||||
Conditions: [conditionWidth]
|
||||
});
|
||||
}
|
||||
|
||||
profile.TranscodingProfiles.forEach((transcodingProfile) => {
|
||||
if (transcodingProfile.Type === 'Video') {
|
||||
transcodingProfile.Conditions = (transcodingProfile.Conditions || []).filter((condition) => {
|
||||
return condition.Property !== 'Width';
|
||||
});
|
||||
|
||||
transcodingProfile.Conditions.push({
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'Width',
|
||||
Value: maxTranscodingVideoWidth.toString(),
|
||||
IsRequired: false
|
||||
});
|
||||
transcodingProfile.Conditions.push(conditionWidth);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue