mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add VideoRangeType condition for HDR content
This commit is contained in:
parent
0bd774dd45
commit
7195e8a15d
1 changed files with 65 additions and 0 deletions
|
@ -838,6 +838,29 @@ import browser from './browser';
|
||||||
hevcProfiles = 'main|main 10';
|
hevcProfiles = 'main|main 10';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const h264VideoRangeTypes = 'SDR';
|
||||||
|
let hevcVideoRangeTypes = 'SDR';
|
||||||
|
let vp9VideoRangeTypes = 'SDR';
|
||||||
|
let av1VideoRangeTypes = 'SDR';
|
||||||
|
|
||||||
|
if (browser.safari && ((browser.iOS && browser.iOSVersion >= 11) || browser.osx)) {
|
||||||
|
hevcVideoRangeTypes += '|HDR10|HLG';
|
||||||
|
if ((browser.iOS && browser.iOSVersion >= 13) || browser.osx) {
|
||||||
|
hevcVideoRangeTypes += '|DOVI';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (browser.tizen || browser.web0s) {
|
||||||
|
hevcVideoRangeTypes += '|HDR10|HLG|DOVI';
|
||||||
|
vp9VideoRangeTypes += '|HDR10|HLG';
|
||||||
|
av1VideoRangeTypes += '|HDR10|HLG';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (browser.edgeChromium || browser.chrome || browser.firefox) {
|
||||||
|
vp9VideoRangeTypes += '|HDR10|HLG';
|
||||||
|
av1VideoRangeTypes += '|HDR10|HLG';
|
||||||
|
}
|
||||||
|
|
||||||
const h264CodecProfileConditions = [
|
const h264CodecProfileConditions = [
|
||||||
{
|
{
|
||||||
Condition: 'NotEquals',
|
Condition: 'NotEquals',
|
||||||
|
@ -851,6 +874,12 @@ import browser from './browser';
|
||||||
Value: h264Profiles,
|
Value: h264Profiles,
|
||||||
IsRequired: false
|
IsRequired: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Condition: 'EqualsAny',
|
||||||
|
Property: 'VideoRangeType',
|
||||||
|
Value: h264VideoRangeTypes,
|
||||||
|
IsRequired: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Condition: 'LessThanEqual',
|
Condition: 'LessThanEqual',
|
||||||
Property: 'VideoLevel',
|
Property: 'VideoLevel',
|
||||||
|
@ -872,6 +901,12 @@ import browser from './browser';
|
||||||
Value: hevcProfiles,
|
Value: hevcProfiles,
|
||||||
IsRequired: false
|
IsRequired: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Condition: 'EqualsAny',
|
||||||
|
Property: 'VideoRangeType',
|
||||||
|
Value: hevcVideoRangeTypes,
|
||||||
|
IsRequired: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Condition: 'LessThanEqual',
|
Condition: 'LessThanEqual',
|
||||||
Property: 'VideoLevel',
|
Property: 'VideoLevel',
|
||||||
|
@ -880,6 +915,24 @@ import browser from './browser';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const vp9CodecProfileConditions = [
|
||||||
|
{
|
||||||
|
Condition: 'EqualsAny',
|
||||||
|
Property: 'VideoRangeType',
|
||||||
|
Value: vp9VideoRangeTypes,
|
||||||
|
IsRequired: false
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const av1CodecProfileConditions = [
|
||||||
|
{
|
||||||
|
Condition: 'EqualsAny',
|
||||||
|
Property: 'VideoRangeType',
|
||||||
|
Value: av1VideoRangeTypes,
|
||||||
|
IsRequired: false
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
if (!browser.edgeUwp && !browser.tizen && !browser.web0s) {
|
if (!browser.edgeUwp && !browser.tizen && !browser.web0s) {
|
||||||
h264CodecProfileConditions.push({
|
h264CodecProfileConditions.push({
|
||||||
Condition: 'NotEquals',
|
Condition: 'NotEquals',
|
||||||
|
@ -969,6 +1022,18 @@ import browser from './browser';
|
||||||
Conditions: hevcCodecProfileConditions
|
Conditions: hevcCodecProfileConditions
|
||||||
});
|
});
|
||||||
|
|
||||||
|
profile.CodecProfiles.push({
|
||||||
|
Type: 'Video',
|
||||||
|
Codec: 'vp9',
|
||||||
|
Conditions: vp9CodecProfileConditions
|
||||||
|
});
|
||||||
|
|
||||||
|
profile.CodecProfiles.push({
|
||||||
|
Type: 'Video',
|
||||||
|
Codec: 'av1',
|
||||||
|
Conditions: av1CodecProfileConditions
|
||||||
|
});
|
||||||
|
|
||||||
const globalVideoConditions = [];
|
const globalVideoConditions = [];
|
||||||
|
|
||||||
if (globalMaxVideoBitrate) {
|
if (globalMaxVideoBitrate) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue