tauri
tauri copied to clipboard
[bug] macOS audio bug with .webm
Describe the bug
Im working on a app with Tauri so far so good on windows everything works as expected but on macOS i can not play any files it alwasy gives me a error that the operation is not supported. I can confirm its only when using webm i tried it with mp3 too and that worked without any problems.
Reproduction
- Clone Vleer on a macOS machine
- install all the dependencies
- run the app in dev mode
- download a song through the search page
- look into the browser console (right click inspect element)
Expected behavior
It should play normally like on windows
Full tauri info
output
[✔] Environment
- OS: Mac OS 14.4.1 X64
✔ Xcode Command Line Tools: installed
✔ rustc: 1.76.0 (07dca489a 2024-02-04)
✔ cargo: 1.76.0 (c84b36747 2024-01-18)
✔ rustup: 1.26.0 (2023-04-05)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 18.18.2
- pnpm: 8.15.1
- yarn: 1.22.19
- npm: 10.4.0
- bun: 1.1.3
[-] Packages
- tauri [RUST]: 2.0.0-beta.15
- tauri-build [RUST]: 2.0.0-beta.12
- wry [RUST]: 0.39.1
- tao [RUST]: 0.27.0
- tauri-cli [RUST]: 1.5.11
- @tauri-apps/api [NPM]: 2.0.0-beta.7
- @tauri-apps/cli [NPM]: 2.0.0-beta.12
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:3000/
- framework: Vue.js (Nuxt)
- bundler: Webpack
Stack trace
$ tauri dev
Running BeforeDevCommand (`pnpm nuxt dev`)
Nuxt 3.11.2 with Nitro 2.9.6
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
Info Watching /Users/pandadev/Developer/App/Vleer/src-tauri for changes...
Compiling vleer v1.0.0 (/Users/pandadev/Developer/App/Vleer/src-tauri)
ℹ ✨ new dependencies optimized: axios, @tauri-apps/plugin-dialog
ℹ ✨ optimized dependencies changed. reloading
ℹ Vite client warmed up in 1379ms
✔ Nuxt Nitro server built in 811 ms
Finished dev [unoptimized + debuginfo] target(s) in 4.24s
RemoteLayerTreeDrawingAreaProxyMac::scheduleDisplayLink(): page has no displayID
Additional context
https://github.com/Vleerapp/Vleer
It looks like WKWebView and Safari do not support this type of .webm
(audio only?). I just tried using Safari to play the .webm
file that was downloaded from Vleer, but it shows no support.
Exactly that is what i also observed so is there a workaround or do we have to wait for apple to „fix“ this issue?
Unfortunately yes. But there could still be some workarounds like converting the webm
to another format that webview currently supports by Rust or Javascript.