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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user