-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[bug] Can't play local audio file in Linux #8654
Comments
Duplicate of #3725 (don't mind the title, it's for audio and video), thanks for the report nonetheless. |
@FabianLars |
Not really, no. The only this is to spawn a http server on the rust side that serves the file :/ |
@FabianLars What about multipurpose custom protocol as workaround for such cases? And of course I prefer not to spawn http server |
The custom protocol is the issue here. webkitgtk simply cannot load audio/video from custom protocols, seemingly no matter how the rust side of it is implemented. iirc it doesn't accept unknown schemes. In the issue i linked there should also be a reference to the webkit bugtracker with hopefully more info. |
I reproduces the problem in simple |
+1, my experience with Tauri has been pretty pleasant except for webkitgtk, which has honestly been a real PITA. |
Describe the bug
new Audio(localAudioPath).play()
throwsUnhandled Promise Rejection: NotSupportedError: The operation is not supported
When playing external audio it works.
Reproduction
Load audio path with
open()
and convert it to asset path usingconvertFileSrc
, then try to play withnew Audio(path).play()
Expected behavior
It should play the sound
Full
tauri info
outputStack trace
No response
Additional context
https://discord.com/channels/616186924390023171/1198765010558664704
The text was updated successfully, but these errors were encountered: