I'm currently using the below way to play sound effect on my website. I need the sound to play out everytime I received a protocol from my slave device:
But seems like this way the audio played is delayed everytime. After I received my protocol for 2 seconds, the audio only played.
"<embed src=\""+soundfile+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />";
Is it because I did not preload my audio? Could you guys teach me how to modify my code and make it into preload enable?