Search code examples
javascripthtmlaudioplayback

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!!!!!!


Solution

  • 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.