Web Hosting Talk







View Full Version : <EMBED> question


Mekhu
11-29-2002, 03:45 PM
Here's my current code:
<EMBED SRC="moh_mix.mp3" AUTOSTART=FALSE LOOP=FALSE HEIGHT=89 WIDTH=160 CONTROLS="CONSOLE">

Is there anyway to load more than 1 song into this? If not, any suggestions?

Thanks,
Jeff

Rich2k
11-29-2002, 06:48 PM
Umm, if you are trying to put something like a jukebox up or something like that, I'd actually use flash as you can have total control over what audio clips and volume levels etc.

chrisb
11-30-2002, 05:09 AM
I'd use Javascript to do it.


PLAY 3 midi's in a row
------------------------------
NOTE: the 5 digit number is milliseconds.
Change it to whatever length your midis are for each. (1000 = 1 second) (10000 = 10 seconds)
NOTE: Only change the seconds,
and the sound file names in the <embeds> between the <BODY> and </BODY> tags.
Everything else should stay the same.
This will play 3 sounds or more if altered for it.
------------------------------

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function multiSounds(){
timer0 =
setTimeout("document.embeds[0].play()",10000);
timer1 =
setTimeout("document.embeds[1].play()",20500);
timer2 =
setTimeout("document.embeds[2].play()",32000);
}
//-->
</SCRIPT></HEAD>

<BODY onLoad="multiSounds();">
<embed src="sound0.mid" autostart="false" hidden="true"> <embed src="sound1.mid" autostart="false" hidden="true"> <embed src="sound2.mid" autostart="false" hidden="true">
</BODY></HTML>

El Nino
11-30-2002, 12:59 PM
For playing multiple mp3's you can try using m3u playlist file.

<EMBED SRC="mylist.m3u" AUTOSTART=FALSE LOOP=FALSE HEIGHT=89 WIDTH=160 CONTROLS="CONSOLE">


mylist.m3u put the following:
http://yourwebsite.com/moh_mix.mp3
http://yourwebsite.com/another.mp3
http://yourwebsite.com/one.mp3

and so on. Just make sure each mp3 is on its own line and it should (hopefully) work.

chrisb
11-30-2002, 03:23 PM
BTW, my javascript coding above should work with any type of music file, mp3's, wavs, etc.