Well, if it is your own page, just put the music file on that page, when it closes, no more music.
The problems you will run into with music:
1) They take time to load, and the song may not start or finish before the redirect kicks in.
2) placing music on a page is difficult to get HTML 4.01 strict valid code. Possible, but with autoplay - tricky
3) A lot of visitors, especially to a music site, will have CDs or MP3s playing already, and will not like the override of your sites music.
That said, there are a couple ways to do it:
in the HTML of the splash page....
if you don't care about valid code use:
Code:
<bgsound src="http://yoursite.com/path/to/sound.mp3" loop="once">
This can go in the <head> section of the page. Also note this will not play in all browsers.
If you DO care about valid code use the following (note each is different for various file types, I will do .wav and .mp3 for you here)
Code:
<p>
<object type="audio/x-wav" data="/path/to/soundfile.wav" width="200" height="20">
<param name="src" value="/path/to/soundfile.wav">
<param name="autoplay" value="true">
<param name="autoStart" value="0">
alt : <a href="/path/to/soundfile.wav">soundfile.wav</a>
</object>
</p>
Code:
<p>
<object type="audio/mpeg" data="/path/to/soundfile.mp3" width="200" height="20">
<param name="src" value="/path/to/soundfile.wav">
<param name="autoplay" value="true">
<param name="autoStart" value="0">
alt : <a href="/path/to/soundfile.wav">soundfile.mp3</a>
</object>
</p>
Obviously change the /path/to/soundfile.wav(or .mp3) to the location and name of your sound file.
If you have other sound types look here for their codes
Bookmarks