Open ollej opened 1 year ago
Looks like Safari doesn't support OGG vorbis: https://caniuse.com/ogg-vorbis
yes, macroquad on web is just feeding the whole file to the browser instead of parsing it, therefore if the browser does not support ogg
- this is not going to work :(
not sure what the correct fix would be here
Possibly a more informative error message and/or a note in the docs. I'm fine with just closing the issue as well.
I thought about writing a js function that detects the browser and chooses file type based on that. But for now, converting to WAV seemed good enough.
I think ogg support will not come to Safari. The issue is opened since at least 2014. So we should use another format for all browsers or detect safari and have a fallback audio format for safari users.
Playing an OGG file crashes in Safari on Mac. It seems to be the same issue for iOS, as nothing happens, but I haven't checked the console. It works fine in Firefox and Chrome on Mac, as well as natively on Mac.
Browser: Safari Version 16.1 (18614.2.9.1.12) OS: MacOS 13.0.1 (22A400) Ventura CPU: Apple M1 Max
Macroquad: 0.3.25 quad-snd: 0.2.5
Error message from javascript console in Safari:
I've made a minimal example, which is basically just loading the
test.ogg
file from the quad-snd repo and playing it.Full example with compiled WASM demo: https://github.com/ollej/macroquad-safarisoundissue