Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dolby Vision playback on webOS #5553

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/scripts/browserDeviceProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/settings/userSettings.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fMP4 is enabled by default only for the following browsers. It is unchecked on others.
(browser.safari || browser.firefox || browser.chrome || browser.edgeChromium)

Perhaps you want to disable it completely to avoid confusing users?

if ((browser.safari || browser.tizen || browser.web0s) && !canPlayNativeHlsInFmp4()) {

Copy link
Contributor Author

@GeorgeH005 GeorgeH005 Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to ask if we wanted it completely disabled to be honest but I would prefer to have the option there, maybe with an edited description to state that it can cause problems on certain platforms. I can't remember there being any problems with SDR content and at least in this thread there isn't any info on Tizen's behaviour when it comes to item resume when fmp4 is enabled. Also, correct me if I'm wrong but as far as I can tell changing this conditional to "force disable" fmp4 would just make the checkbox have absolutely no effect, no matter its state. I can see this causing confusion in other users. A better option in my opinion would be to hide the checkbox altogether to completely disable the feature, but I would have to check if that's easily achievable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my Tizen 4 TV, fMP4 requires the transcoding job to complete. But I have no idea if it works on modern models.

This checkbox is part (sort of) of the device profile settings, like Enable DTS and Enable TrueHD. So I agree with @GeorgeH005, we should leave it up to the user and add a warning.

Btw, Tizen isn't detected as Chrome, so this option wasn't turned on by default.

}

/**
Expand Down