From 2ea1599e945732f29425a964f684f0df511e580e Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Tue, 19 Mar 2024 17:36:43 +0800 Subject: [PATCH 1/2] Enable 'Prefer fMP4-HLS Container' by default on certain platforms fMP4 is enabled by default only on verified patforms. This largely avoids transcoding HEVC and AV1, instead letting the client handle them. Signed-off-by: nyanmisaka --- src/scripts/settings/userSettings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/settings/userSettings.js b/src/scripts/settings/userSettings.js index d828eec77c..525a77a4d2 100644 --- a/src/scripts/settings/userSettings.js +++ b/src/scripts/settings/userSettings.js @@ -1,4 +1,5 @@ import appSettings from './appSettings'; +import browser from '../browser'; import Events from '../../utils/events.ts'; import { toBoolean } from '../../utils/string.ts'; @@ -140,7 +141,8 @@ export class UserSettings { return this.set('preferFmp4HlsContainer', val.toString(), false); } - return toBoolean(this.get('preferFmp4HlsContainer', false), false); + // 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); } /** From 6875f28c363ef5b062b050c3ab872fcae0680aa8 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Tue, 19 Mar 2024 17:40:13 +0800 Subject: [PATCH 2/2] Increase the minimum version of Tizen that supports native fMP4 to 5 Signed-off-by: nyanmisaka --- src/scripts/browserDeviceProfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index fb42980fa7..5fb650886a 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -68,7 +68,7 @@ function canPlayNativeHls() { } function canPlayNativeHlsInFmp4() { - if (browser.tizenVersion >= 3 || browser.web0sVersion >= 3.5) { + if (browser.tizenVersion >= 5 || browser.web0sVersion >= 3.5) { return true; }