tags:

views:

134

answers:

3

In an ASP.NET environment, what's the best way to play a mp3 file? Do I need to use a flash plugin (some users may not have flash). Also, this needs to work on a IPhone or an IPod.

+1  A: 

The HTML 5 <audio> tag is perfect for this situation. It works on the iPhone/iPod perfectly as well, contrary to the buggy, bloated and unnecessary cruft of Flash.

Delan Azabani
+1  A: 

The HTML 5 audio tag will be your best option for the iPhone since Flash is not supported but keep in mind that HTML 5 is not yet supported on the majority of PCs on the internet because the behemoth of the browser world (Internet Explorer) does not yet support it. This will change with IE9 when it is released, but there will still be quite a lot of people/entities that will not upgrade.

If you care about the audience that does not support HTML 5, you will need to use an alternative method like Flash or Silverlight. Fortunately, the audio tag takes this into account by allowing you to specify alternate content if the tag is not supported.

<audio src="blah.mp3" controls="controls">
  Put alternate content here
</audio>
Bradley Mountford
@Bradley - This website should support FF, Safari, IE, Chrome and Opera. Which of these browsers support the audio tag? Also, for those that don't support, how do I the flash one?
All non-IE browsers support `<audio>` and if you want alternate Flash, just put the flash tags inside the audio tags.
Delan Azabani
Thanks for adding the follow up comment, Delan. Was AFK.
Bradley Mountford
A: 

check this page . I like these methods . clean and simple

http://www.labnol.org/internet/design/html-embed-mp3-songs-podcasts-music-in-blogs-websites/2232/

metal-gear-solid