Click to See Complete Forum and Search --> : html music adivice please


evan5
06-05-2009, 06:41 PM
whats up fellas,
I have a question about some music stuff. I am using this code to play a music file on my webpage named "music.mp3" and this is my html code:


<embed src="music.mp3" autostart="true" loop="true"
width="2" height="0" volume="60">
</embed>
<noembed>
<bgsound src="music.mp3" loop="infinite" volume="60">
</noembed>


The thing is i once that music.mp3 file stops... i want a second music file(or song) lets say "music2.mp3" to start playing afterwards...do any of you guys know how i can implement that.:cool:

also my mp3 music file is 3.5k kb, do you think having a .mid file is better for music playing?

sommardahl
06-05-2009, 06:57 PM
Embedding a single sound file, beit mp3, wav, or mid, is simple as you have already found. It's an altogether different thing to expect the HTML page to be "smart" enough to line up another song after the first one is finished. You're going to need to look at maybe a flash applet to do this. That's what the music player on MySpace.com is... flash. One such applet would be http://musicplayer.sourceforge.net/, which is a pretty easy to use/customize radio you can place on your page. Check it out.

evan5
06-05-2009, 08:03 PM
hey sommardahl,
do I have to purchase flash player prior to using this?

jam
06-05-2009, 08:36 PM
"purchase flash player" - flash player is free. And the music player site linked states that you don't have to use flash at all, because there are pre-compiled swf files, you just have to edit an XML playlist.

Cheers,
Jamey

evan5
06-05-2009, 09:22 PM
wow i'm sorry but i dont understand that application at all or what its talking about. i suck at this :rolleyes:

anyone know how to just embed a music file that works with google chrome. that would help alot:cool:

jam
06-06-2009, 12:48 PM
Haha, don't worry. We were all noobs at some point (flashwise etc.)...

And if you want a playlist like application (so that more than one song can play then try using last.fm's player (google it). Basically just because it's all online and you just compile a playlist then use their embed code to put it on your page...

Cheers,
Jamey

evan5
06-06-2009, 06:08 PM
oh ok jam, i will try that. thanx for the advice
appreciate it

jam
06-06-2009, 07:12 PM
Hope all goes well =]