1

I am developing a chat application in asp.net using vb.net. In this, if a user receives a new message from other users then I want to play a sound to let him know that he received a message. I wanted to play some .wav files. Can some one help me with this?

krrish
  • 163
  • 5
  • 12
  • Can you give a little more information about the way you're developing the chat application? I assume you're using some sort of client side polling to get more information from the server, if that's the case then you can always play a sound as a response to that event. – sngregory Feb 20 '12 at 06:02

1 Answers1

1

From the one hand you have the bgsound that can play the beeps that you say, using loop=1, but not all browser support it.

http://msdn.microsoft.com/en-us/library/ms535198(VS.85).aspx

<bgsound src="system-message.wav" id="mysound"></bgsound>

and from the other hand there is always the flash player that can be as hidden on page and send him the file that you like to play.

An example: http://www.phon.ucl.ac.uk/home/mark/audio/play9.htm

Also, how to play sound on HTML5 https://developer.mozilla.org/en/Using_HTML5_audio_and_video

All the control/code must be done using javascript.

Aristos
  • 66,005
  • 16
  • 114
  • 150