mirror of
https://github.com/wukko/cobalt.git
synced 2025-04-29 22:14:26 +02:00
web/settings/defaults: toggle localProcessing depending on device
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:
parent
029934e580
commit
ea8560e8a9
@ -27,6 +27,7 @@ const device = {
|
|||||||
share: false,
|
share: false,
|
||||||
directDownload: false,
|
directDownload: false,
|
||||||
haptics: false,
|
haptics: false,
|
||||||
|
defaultLocalProcessing: false,
|
||||||
},
|
},
|
||||||
userAgent: "sveltekit server",
|
userAgent: "sveltekit server",
|
||||||
}
|
}
|
||||||
@ -81,6 +82,8 @@ if (browser) {
|
|||||||
// not sure if vibrations feel the same on android,
|
// not sure if vibrations feel the same on android,
|
||||||
// so they're enabled only on ios 18+ for now
|
// so they're enabled only on ios 18+ for now
|
||||||
haptics: modernIOS,
|
haptics: modernIOS,
|
||||||
|
|
||||||
|
defaultLocalProcessing: !iOS && !device.browser.webkit,
|
||||||
};
|
};
|
||||||
|
|
||||||
device.userAgent = navigator.userAgent;
|
device.userAgent = navigator.userAgent;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { device } from "$lib/device";
|
||||||
import { defaultLocale } from "$lib/i18n/translations";
|
import { defaultLocale } from "$lib/i18n/translations";
|
||||||
import type { CobaltSettings } from "$lib/types/settings";
|
import type { CobaltSettings } from "$lib/types/settings";
|
||||||
|
|
||||||
@ -20,7 +21,7 @@ const defaultSettings: CobaltSettings = {
|
|||||||
},
|
},
|
||||||
save: {
|
save: {
|
||||||
alwaysProxy: false,
|
alwaysProxy: false,
|
||||||
localProcessing: false,
|
localProcessing: device.supports.defaultLocalProcessing || false,
|
||||||
audioBitrate: "128",
|
audioBitrate: "128",
|
||||||
audioFormat: "mp3",
|
audioFormat: "mp3",
|
||||||
disableMetadata: false,
|
disableMetadata: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user