mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
Merge pull request #3713 from nyanmisaka/video-range-condition
Add VideoRangeType condition for web client
(cherry picked from commit c8590d37ed
)
Signed-off-by: Bill Thornton <billt2006@gmail.com>
This commit is contained in:
parent
c2229c409f
commit
b632824314
@ -851,6 +851,29 @@ import browser from './browser';
|
||||
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 = [
|
||||
{
|
||||
Condition: 'NotEquals',
|
||||
@ -864,6 +887,12 @@ import browser from './browser';
|
||||
Value: h264Profiles,
|
||||
IsRequired: false
|
||||
},
|
||||
{
|
||||
Condition: 'EqualsAny',
|
||||
Property: 'VideoRangeType',
|
||||
Value: h264VideoRangeTypes,
|
||||
IsRequired: false
|
||||
},
|
||||
{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'VideoLevel',
|
||||
@ -885,6 +914,12 @@ import browser from './browser';
|
||||
Value: hevcProfiles,
|
||||
IsRequired: false
|
||||
},
|
||||
{
|
||||
Condition: 'EqualsAny',
|
||||
Property: 'VideoRangeType',
|
||||
Value: hevcVideoRangeTypes,
|
||||
IsRequired: false
|
||||
},
|
||||
{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'VideoLevel',
|
||||
@ -893,6 +928,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) {
|
||||
h264CodecProfileConditions.push({
|
||||
Condition: 'NotEquals',
|
||||
@ -982,6 +1035,18 @@ import browser from './browser';
|
||||
Conditions: hevcCodecProfileConditions
|
||||
});
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'Video',
|
||||
Codec: 'vp9',
|
||||
Conditions: vp9CodecProfileConditions
|
||||
});
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'Video',
|
||||
Codec: 'av1',
|
||||
Conditions: av1CodecProfileConditions
|
||||
});
|
||||
|
||||
const globalVideoConditions = [];
|
||||
|
||||
if (globalMaxVideoBitrate) {
|
||||
|
@ -1643,5 +1643,10 @@
|
||||
"ThemeSong": "Theme Song",
|
||||
"ThemeVideo": "Theme Video",
|
||||
"EnableEnhancedNvdecDecoderHelp": "Experimental NVDEC implementation, do not enable this option unless you encounter decoding errors.",
|
||||
"EnableSplashScreen": "Enable the splash screen"
|
||||
"EnableSplashScreen": "Enable the splash screen",
|
||||
"LabelVppTonemappingBrightness": "VPP Tone mapping brightness gain:",
|
||||
"LabelVppTonemappingBrightnessHelp": "Apply brightness gain in VPP tone mapping. Both recommended and default values are 0.",
|
||||
"LabelVppTonemappingContrast": "VPP Tone mapping contrast gain:",
|
||||
"LabelVppTonemappingContrastHelp": "Apply contrast gain in VPP tone mapping. The recommended and default values are 1.2 and 1.",
|
||||
"VideoRangeTypeNotSupported": "The video's range type is not supported"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user