PDA

View Full Version : incorporating sounds into C# web aplications


villagecirc
10-10-2003, 11:14 AM
I've recently been asked to develop a web aplication for a local band and they insist on haveing one of their tunes play on their home page when it is loaded up. I have incorporated sounds in to window aplications but have not been able to do the same with my aspx web pages. I've combed the internet to find a solution to incorporating sound in to web aplications and came up with some various solutions that I am going to try. But if anyone has a heads up way to do this please let me know even if I have to do it through scripting whatever if anyone has anything that will help me to incorporate sound in to my web aplication I would greatly apreciate it.

Matthew H. Paulson
smpaulson@msn.com
http://webpages.charter.net/bctrotzer/

bruce
10-10-2003, 11:26 AM
What is the sound file format?

It is relatively simple to incorporate, say, real media file to a webpage.



[b]quote:Originally posted by villagecirc

I've recently been asked to develop a web aplication for a local band and they insist on haveing one of their tunes play on their home page when it is loaded up. I have incorporated sounds in to window aplications but have not been able to do the same with my aspx web pages. I've combed the internet to find a solution to incorporating sound in to web aplications and came up with some various solutions that I am going to try. But if anyone has a heads up way to do this please let me know even if I have to do it through scripting whatever if anyone has anything that will help me to incorporate sound in to my web aplication I would greatly apreciate it.

Matthew H. Paulson
smpaulson@msn.com
http://webpages.charter.net/bctrotzer/
</blockquote id="quote"></font id="quote">

CompuGenie
10-13-2003, 01:31 AM
You can use either of these two methods:

This works in most browsers version 3 and higher. Place this in your <head> section:
<SCRIPT LANGUAGE = "JavaScript">
<!-- Hide from old browsers
function PlaySound(){
window.location = "yoursoundfile.mid"
}
// -->
</SCRIPT>

And this in your [b] tag:
[b]

This works only for Internet Explorer (if you want to leave out the other browsers) in your <head> section:
[b]

Hope this helps!