views:

388

answers:

2

I'm working on a new ASP.NET MVC / JQuery app which will need to play short sound files in response to user actions. For example, in some cases, when a user clicks on a word, the computer should pronounce that word (there is a small finite list of words).

I'd like advice on the following:

  1. Which sound file format(s) would you recommend?
  2. What do I need to know about browser idiosyncracies regarding playing sound?
  3. What do you think is the most bandwidth-efficient way to deal with sound files? If there are 5 clickable words on a page, for example, would you send all 5 sound files to the browser with the page, or would you send none and use ajax to retrieve the sound file when the user clicks on it?

And, of course, what else do I need to know? :)

Thanks.

+1  A: 

You can embed your audio in mp3 or wrap them in flash (just like you do it in HTML). If you want to add some jazz, create a custom control with play,pause,stop buttons for your words.

This link should help you --> http://www.beansoftware.com/ASP.NET-Tutorials/Media-Player.aspx

CodeToGlory
+1  A: 

I'm using SoundManager2. It has pre-load and load on demand. There is a demo with functionality you need - play on click. The only issue is making sure the js can find the swf player, the path may not be what you need.

felixg