Skip to content

Fix audio playback in History tab on Linux#617

Merged
cjpais merged 3 commits intocjpais:mainfrom
GabeDuarteM:fix-linux-history-playback
Jan 19, 2026
Merged

Fix audio playback in History tab on Linux#617
cjpais merged 3 commits intocjpais:mainfrom
GabeDuarteM:fix-linux-history-playback

Conversation

@GabeDuarteM
Copy link
Contributor

Before Submitting This PR

Please confirm you have done the following:

Btw, just wanted to mention that the link for the contributing document above is broken on the template

Human Written Description

While I was working on the flatpak pr, I noticed that the play/seek functionality on the history tab wasn't working on my machine, after investigating, I saw that it wasn't a flatpak issue, but a linux issue (or at the very least an arch-linux issue). This should fix it, and I also added some missing portuguese translations while I was at it :)

Had to add the fs:scope so we can read from the recordings folder, and also had to switch away from convertFileSrc, since that was giving a MEDIA_ERR_SRC_NOT_SUPPORTED error when used, and duplicating the encoding of the url (e.g. / woudl became %2F)

Related Issues/Discussions

Couldn't find an issue, I just fixed it directly, but I'm happy to also file an issue/discussion if needed

Community Feedback

Testing

Tested the native dev build + the flatpak branch, both worked correctly. Couldn't get the appimage build due to the build errors on my machine (same thing that happened on the flatpak branch, which also happens to me on the main branch, not sure why tbh)

Screenshots/Videos (if applicable)

Before:

2026-01-18.21-47-37.mp4

After:

2026-01-18.21-50-00.mp4

AI Assistance

  • No AI was used in this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: OpenCode (opus 4.5)
  • How extensively: mostly for debugging, the fix was quite small

Add error message translations for the permission check flow in the Portuguese locale, covering both check failures and request failures.
WebKitGTK cannot play audio files via the asset:// protocol (or at least
not reliably), returning MEDIA_ERR_SRC_NOT_SUPPORTED. Additionally,
convertFileSrc was double- encoding the path (/ became %2F).

Changed to read audio files directly using the fs plugin and create
blob URLs instead. Also added APPDATA to fs:scope permissions to allow
reading recordings from the app data directory.
@GabeDuarteM GabeDuarteM changed the title Add Portuguese translations for permission error messages Fix audio playback in History tab on Linux Jan 18, 2026
@cjpais
Copy link
Owner

cjpais commented Jan 19, 2026

thank you for looking into this, but for what it's worth this breaks playback on macOS which we cannot do

maybe detect os and only for linux use this new codepath in the frontend?

The blob URL approach for audio playback works on Linux but breaks
macOS.
This reverts the blob change to use convertFileSrc with the asset
protocol on macOS/Windows while keeping the blob approach for Linux
where it's needed. Also adds proper cleanup of blob URLs to prevent
memory leaks when history entries are unmounted.
@GabeDuarteM
Copy link
Contributor Author

Sure, done on the last commit!
Also revoked the blob on component unmount

@cjpais
Copy link
Owner

cjpais commented Jan 19, 2026

Thank you, works on my Mac now

@cjpais cjpais merged commit 246fb4e into cjpais:main Jan 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants