I bumped into a weird problem. I want to play a simple “click” sound when the user clicks a button. All works as intended when previewing my project in Safari. Although, after html export there is about a one second delay between the “mouse down event” and the playing of the sound bit. Attached you can find a simple illustration of the problem. I am on a Mac, using Safari 8.0.6. Any ideas? Thx.Audio_Test.zip (106.3 KB)
It seems because you have it on button down, it is waiting for that trigger. If you change it to click, or tap, it works as expected
Thanks for your reply Andrew. I doesn’t seem to matter what event triggers the sound, I tried them all and I always get the one second delay. Here is the strange part; when I Hype-preview the file in Safari it works perfectly. It’s only after html-export that the delay appears. I did some more research and found out that all works well in Firefox. It seems to be a Safari issue (on my Mac?). Weird. I’ll post my findings if I find the culprit.
I documented the audio issue in a short screencast (http://tinyurl.com/ky5uetb). There seems to be an issue with HTML5/Safari. PS: I disabled all extensions in Safari (latest version 8.0.6 & Yosemite 10.10.3). I am clueless. This should be simple, right?
I see, can you send the exported version on here, see if i get the same results ?
I have made a piano, and exported it to HTML5.
This works fine on my iOS devices (iPhone 4, 6s and iPad). On my Android tab, there is about half a second delay between the mouse down/touch and the sound.
- Can someone please test it on their Android device to see if it is the same.
- Does anyone have a solution to this issue?
My results were the same as @Hermosa69. Safari is a laggard - no matter what the setting.
On Firefox & Chrome a “click~tap” is a hair slower than “mouseDown” - which is what I would expect - business as usual.
This situation also highlights the time wasters when coding - there are all these exceptions… things that should work but they don’t… is it the code or something in the “black box”. Usually it is the code writer ;-> Reading this forum has been immensely helpful for these types of situations. My goodness it is a simple click to play and Safari boots it (and the sound is preloaded).