开发者

jquery on event make sound

I want to know what is the most optimized and speed efficant way of playing开发者_StackOverflow中文版 a onevent sound (which will be repeated several if not 100's of times). Obv. adding a embed html code does not work as that would cause it to add and delete an embed html code 100's of times causing slowness or even crash.

What other methods are available for repeative sound?


I think the best way this time is still the use of a flash-player which can interact with javascript, so you don't need to embed a sound-file a couple of times, you simply can play the sound if you want to.

If some day HTML5 is supported enough by all browsers, it would be easier using the <audio>-element and its play/pause methods.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜