1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #5183 from nyanmisaka/relax-hevc-safari

This commit is contained in:
Bill Thornton 2024-03-07 21:33:05 -05:00 committed by GitHub
commit 83f60afd16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,7 +194,8 @@ function supportsHdr10(options) {
|| browser.web0s || browser.web0s
|| browser.safari && ((browser.iOS && browser.iOSVersion >= 11) || browser.osx) || browser.safari && ((browser.iOS && browser.iOSVersion >= 11) || browser.osx)
// Chrome mobile and Firefox have no client side tone-mapping // Chrome mobile and Firefox have no client side tone-mapping
// Edge Chromium on Nvidia is known to have color issues on 10-bit video // Edge Chromium 121+ fixed the tone-mapping color issue on Nvidia
|| browser.edgeChromium && (browser.versionMajor >= 121)
|| browser.chrome && !browser.mobile || browser.chrome && !browser.mobile
); );
} }
@ -590,11 +591,7 @@ export default function (options) {
} }
if (canPlayHevc(videoTestElement, options)) { if (canPlayHevc(videoTestElement, options)) {
// safari is lying on HDR and 60fps videos, use fMP4 instead mp4VideoCodecs.push('hevc');
if (!browser.safari) {
mp4VideoCodecs.push('hevc');
}
if (browser.tizen || browser.web0s) { if (browser.tizen || browser.web0s) {
hlsInTsVideoCodecs.push('hevc'); hlsInTsVideoCodecs.push('hevc');
} }
@ -1113,6 +1110,25 @@ export default function (options) {
}); });
} }
// Safari quirks for HEVC direct-play
if (browser.safari) {
// Only hvc1 & dvh1 tags are supported
hevcCodecProfileConditions.push({
Condition: 'EqualsAny',
Property: 'VideoCodecTag',
Value: 'hvc1|dvh1',
IsRequired: true
});
// Framerate above 60fps is not supported
hevcCodecProfileConditions.push({
Condition: 'LessThanEqual',
Property: 'VideoFramerate',
Value: '60',
IsRequired: true
});
}
// On iOS 12.x, for TS container max h264 level is 4.2 // On iOS 12.x, for TS container max h264 level is 4.2
if (browser.iOS && browser.iOSVersion < 13) { if (browser.iOS && browser.iOSVersion < 13) {
const codecProfile = { const codecProfile = {