Cannot play webm from data url with "video/webm" mime type (from webpack)
Using howler 2.2.3 (loving it so far, thanks!)
In a vue-cli project, webpack is configured to embed a data url when a resource is small enough. It interprets a webm file as video and uses data:video/webm;base64,... which howler refuses to load (entirely silently; none of the error callbacks are called).
Workaround:
let src = require("@/path/to/sound.webm")
if (src.startsWith("data:video/webm")) {
src = src.replace("data:video/webm", "data:audio/webm")
}
The workaround works fine; howler loads and can play the sound.
In case it matters, I created the webm via ffmpeg -i sound.wav sound.webm (nothing fancy).
I'm not sure if it would be appropriate to have howler treat mime type "video/webm" as an acceptable source of audio. Minimally, please signal an error callback. Thanks for your consideration!
they @nebaughman thank you very much for sharing this.