开发者

Playing Sound Javascript or HTML

I need to Implement an object(or sth else) to play sounds in Web.

I开发者_如何学运维've searched a lot but there were nothing that can play sounds in each browser. I mean that there was a code for each browser.

My question is that if there is a code that can be used in every browser.

Thanks in advance, and sorry for my bad English!!!!!!


May we can start by throwing some light on 5 widely accepted ways to add sound on ur webpage.

  1. MIDI Files - Small Size, Easy to implements but looks amateurish n dicy.
  2. WAV Files - Easy again, but they don't loop. So file size may get bigger too.
  3. MP3 Files - Ensure quality, but required external player, certainly not user-friendly.
  4. Flash Files - Flexible, Small and can loop. The only road block, creating one of ur own requires buying a Flash software.
  5. Pre-build Flash Loops - Small, made by professionals (www.flashmusictracks.com, www.flashkit.com). See if u can find something to suit u. Thr cud be more sites like i mentioned.

Just so u know, Google used flash loops when it embedded sounds for its pacman logo, on its home page.


For HTML5 you can use audio tag

<audio src="hello.wav"></audio>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜