web/settings/defaults: toggle localProcessing depending on device
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled

webkit is really weird with wasm ram management, so we disable local processing by default there. the user can still enable it manually in settings, but then we're not at fault by allowing potentially broken behavior by default
This commit is contained in:
wukko 2025-04-21 23:06:25 +06:00
parent 029934e580
commit ea8560e8a9
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2
2 changed files with 5 additions and 1 deletions

View File

@ -27,6 +27,7 @@ const device = {
share: false,
directDownload: false,
haptics: false,
defaultLocalProcessing: false,
},
userAgent: "sveltekit server",
}
@ -81,6 +82,8 @@ if (browser) {
// not sure if vibrations feel the same on android,
// so they're enabled only on ios 18+ for now
haptics: modernIOS,
defaultLocalProcessing: !iOS && !device.browser.webkit,
};
device.userAgent = navigator.userAgent;

View File

@ -1,3 +1,4 @@
import { device } from "$lib/device";
import { defaultLocale } from "$lib/i18n/translations";
import type { CobaltSettings } from "$lib/types/settings";
@ -20,7 +21,7 @@ const defaultSettings: CobaltSettings = {
},
save: {
alwaysProxy: false,
localProcessing: false,
localProcessing: device.supports.defaultLocalProcessing || false,
audioBitrate: "128",
audioFormat: "mp3",
disableMetadata: false,