View Full Version : MP3 in web page
JamesI
04-25-2004, 05:39 PM
Does anyone know how to insert an MP3 to play as a background sound.. hopefully with play/pause/forward/rewind/stop controls?
Thanks :)
JohnnyPotseed
04-25-2004, 06:02 PM
Do you have any idea how long it would take to download a page with an MP3 attached to it on a 56k connection?
zoobie
04-26-2004, 06:41 AM
Try messin with this:
<embed src="homer.mp3" width="150" height="45"></embed>
DooM_MonkeY
05-31-2004, 05:11 PM
I dont no how you would add play, rewind, ect... but look at this page that im testing all my scripts with: http://www.freewebs.com/death_by_monkeys/glow%20test.htm
hope it helps
<script>
function playMusic() {
document.all.sound.src=MP3.value;
}
</script>
<bgsound id="sound">
<select id="MP3" onchange="playMusic();">
<option value="music file">File 1
<option value="music file">File 2
<option value="music file">File 3
<option value="music file">File 4
</select>
Psychoman
05-31-2004, 09:54 PM
umm.. JohnnyPotseed is right, it would take forever to load a page like that, you would have to have a streaming server so that they can start playing it as the mp3 loads...
however, the code you need is:
<BGSOUND SRC="filename.mp3" LOOP="99999999" autostart="true">
filname.mp3 ofcourse being your file's location
99999999 being the max times that the mp3 can loop... since no one can star on a site for that long, its basicly infinitite times
hope that works for you, but again, loading will be a pain.
Ray
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.