Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Audio doesn't play for Timer Feature on Linux #1

Closed
th3oth3rjak3 opened this issue Jan 26, 2025 · 0 comments · Fixed by #3
Closed

Audio doesn't play for Timer Feature on Linux #1

th3oth3rjak3 opened this issue Jan 26, 2025 · 0 comments · Fixed by #3
Assignees

Comments

@th3oth3rjak3
Copy link
Owner

th3oth3rjak3 commented Jan 26, 2025

When the timer expires, a sound is supposed to play indicating that the time has expired. On Windows, this was working as of version 0.1.1 or 0.1.2. The code hasn't changed in regards to how the audio is played so I don't suspect an issue with the implementation. However it's currently not playing the audio file when the timer expires on Linux systems. Only verified so far on Fedora 41 with KDE Plasma.

There is a known issue that's being tracked here: tauri-apps/tauri#3725

It seems like there may be an issue with webgtk and a possible workaround is shown below since it's a small audio file:

// Option 1
let sound = new Audio("data:audio/mpeg;base64,<insert base64 converted audio string>");
sound.currentTime = 0;
sound.play();

// Option 2
const blobUrl = URL.createObjectURL(await fetch(asset).then(res => res.blob()))
const sound = new Audio(blobUrl)

Binary FS Workaround

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant