Cross-platform sound support (#23)

* Cross-platform sound support

WAV files work on linux, macos, and windows with the builtin commands.
Particularly `aplay` in Linux, which is the only preinstalled command in Ubuntu, only works with .wav files.

* Make sound notification work in WSL2
This commit is contained in:
Solomon
2025-07-01 10:03:43 +01:00
committed by GitHub
parent 7817a4fc9e
commit 1a721236b3
18 changed files with 169 additions and 47 deletions

View File

@@ -39,7 +39,7 @@ export function Settings() {
const { setTheme } = useTheme();
const playSound = async (soundFile: SoundFile) => {
const audio = new Audio(`/api/sounds/${soundFile}.mp3`);
const audio = new Audio(`/api/sounds/${soundFile}.wav`);
try {
await audio.play();
} catch (err) {