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

Backport pull request #5553 from jellyfin-web/release-10.9.z

Fix Dolby Vision playback on webOS

Original-merge: 86ff77924e

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
GeorgeH005 2024-07-21 01:43:53 -04:00 committed by Bill Thornton
parent cf6eaa6b92
commit a3c0fb05c3
2 changed files with 13 additions and 10 deletions

View file

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

View file

@ -1,7 +1,7 @@
import appSettings from './appSettings';
import browser from '../browser';
import Events from '../../utils/events.ts'; import Events from '../../utils/events.ts';
import { toBoolean } from '../../utils/string.ts'; import { toBoolean } from '../../utils/string.ts';
import browser from '../browser';
import appSettings from './appSettings';
function onSaveTimeout() { function onSaveTimeout() {
const self = this; const self = this;
@ -142,7 +142,7 @@ export class UserSettings {
} }
// Enable it by default only for the platforms that play fMP4 for sure. // 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);
} }
/** /**