Sound not playing on Safari

I am trying to play the sound on a button click - there is user interaction. However, no sound at all…

Do you have a project that reproduces the issue that people can look at?

Have you checked on Chrome?
Is the tab muted?
Is the audio format a format that Safari can play? (Safari can’t play OGG files "ogg" | Can I use... Support tables for HTML5, CSS3, etc)

1 Like

Safari can’t play ogg files?! Oh…that’s the reason…I think it would be nice if there was a warning for this. As a user, if the PlayCanvas framework can import the file and work with it, I expect it to work on all browsers. A small tip or something would suffice. Like there are many tips when importing images, saying stuff like “Texture Dimensions are not power of 2 and address UV are not clamped”. Etc.

Yep, that was the reason…ogg is unsupported by Safari…I can’t believe I wasted so much time on this. Thanks yaustar. I really think a warning or tip would be nice. Should I make a feature request for this? In my opinion inconsistencies like this should be documented. And here I was thinking I somehow was not using a user gesture correctly or something.

Yes, please add a feature request for this on the Editor repo. I do think it deserves a warning here.