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

Merge pull request #5553 from GeorgeH005/older-web0s-dovi-fix

Fix Dolby Vision playback on webOS
This commit is contained in:
Bill Thornton 2024-07-15 10:12:47 -04:00 committed by GitHub
commit 86ff77924e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 10 deletions

View file

@ -247,9 +247,13 @@ function supportedDolbyVisionProfilesHevc(videoTestElement) {
.replace(/no/, '')) {
supportedProfiles.push(5);
}
if (videoTestElement
.canPlayType('video/mp4; codecs="dvh1.08.09"')
.replace(/no/, '')) {
if (
videoTestElement
.canPlayType('video/mp4; codecs="dvh1.08.09"')
.replace(/no/, '')
// LG TVs from at least 2020 onwards should support profile 8, but they don't report it.
|| (browser.web0sVersion >= 4)
) {
supportedProfiles.push(8);
}
}
@ -1259,17 +1263,16 @@ export default function (options) {
});
if (browser.web0s && supportsDolbyVision(options)) {
// Disallow direct playing of DOVI media in containers not mp4.
// This paired with the "Prefer fMP4-HLS Container" client playback setting enables DOVI playback on webOS.
// Disallow direct playing of DOVI media in containers not ts or mp4.
profile.CodecProfiles.push({
Type: 'Video',
Container: '-mp4',
Container: '-mp4,ts',
Codec: 'hevc',
Conditions: [
{
Condition: 'EqualsAny',
Property: 'VideoRangeType',
Value: 'SDR|HDR10|HLG',
Value: hevcVideoRangeTypes.split('|').filter((v) => !v.startsWith('DOVI')).join('|'),
IsRequired: false
}
]

View file

@ -1,7 +1,7 @@
import appSettings from './appSettings';
import browser from '../browser';
import Events from '../../utils/events.ts';
import { toBoolean } from '../../utils/string.ts';
import browser from '../browser';
import appSettings from './appSettings';
function onSaveTimeout() {
const self = this;
@ -142,7 +142,7 @@ export class UserSettings {
}
// Enable it by default only for the platforms that play fMP4 for sure.
return toBoolean(this.get('preferFmp4HlsContainer', false), browser.safari || browser.firefox || browser.chrome || browser.edgeChromium);
return toBoolean(this.get('preferFmp4HlsContainer', false), browser.safari || browser.firefox || (browser.chrome && !browser.web0s && !browser.tizen) || browser.edgeChromium);
}
/**