From 2ea1599e945732f29425a964f684f0df511e580e Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Tue, 19 Mar 2024 17:36:43 +0800 Subject: [PATCH] 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); } /**