The best way to add loads of sounds on a webpage?
I am creating a browsergame in ASP.NET (using AJAX, jQuery, ect. - NO Flash). In this game I need to play some sound files. Right now I have those files as .WAV, but if the solution can play .MP3, that is preferred.
I have several events during the game which need soun开发者_如何学Cds: You hit the monster, you die, you level up, ect. The page is based upon update panels, which means I will have to add several sounds (and replay them at specific events) without a postback. As some of the sounds is replayed every 3-5th second and others are played way more rare, it has to be efficient to this requirement.
What would be the best and most efficient solution to solve this? :-)
Thanks a lot! Best regards, Lars
HTML5 ready browsers have the ability to play sounds and videos without any flash. I am not sure about using javascript or AJAX.
For reference to HTML5 sounds (<audio>
) http://html5doctor.com/native-audio-in-the-browser/
There is a very interesting tutorial on different ways of playing sounds in a browser over here http://www.phon.ucl.ac.uk/home/mark/audio/play.htm which could help you a lot.
精彩评论