Describe the bug
new Audio(localAudioPath).play() throws Unhandled Promise Rejection: NotSupportedError: The operation is not supported
When playing external audio it works.
new Audio("https://samplelib.com/lib/preview/wav/sample-3s.wav").play()
Reproduction
Load audio path with open() and convert it to asset path using convertFileSrc, then try to play with new Audio(path).play()
Expected behavior
It should play the sound
Full tauri info output
[✔] Environment
- OS: Ubuntu 22.04 X64
✔ webkit2gtk-4.0: 2.42.4
✔ rsvg2: 2.52.5
✔ rustc: 1.75.0 (82e1608df 2023-12-21)
✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
- node: 20.7.0
- npm: 10.1.0
- bun: 1.0.3
[-] Packages
- tauri [RUST]: 1.5.4
- tauri-build [RUST]: 1.5.1
- wry [RUST]: 0.24.7
- tao [RUST]: 0.16.5
- tauri-cli [RUST]: 1.5.9
- @tauri-apps/api : not installed!
- @tauri-apps/cli [NPM]: 1.5.9
[-] App
- build-type: bundle
- CSP: unset
- distDir: ../dist
- devPath: http://localhost:1420/
- framework: React
Stack trace
No response
Additional context
https://discord.com/channels/616186924390023171/1198765010558664704
Describe the bug
new Audio(localAudioPath).play()throwsUnhandled Promise Rejection: NotSupportedError: The operation is not supportedWhen 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 infooutputStack trace
No response
Additional context
https://discord.com/channels/616186924390023171/1198765010558664704