View Full Version : Mp3 Playlist
Reshad
07-27-2005, 12:49 PM
Hello, this is my first post here on HTMLforums.com...
I'm Reshad, I'm a PHP-Coder and only have a small question.
<HTML>
<BODY>
<EMBED src="1.mp3" autostart="true" loop="true" hidden="false">
<NOEMBED>
<BGSOUND src="1.mp3">
</NOEMBED>
</BODY>
</HTML>
That is the source to play ONE SINGLE mp3 file on a site.
But I got twenty or so, how do I make it so it runs each of those mp3's in a row?
Like, a kind of playlist...
First, 1.mp3, then 2.mp3 then 3.mp3, and then over again.
Is this possible?
Kind Regards,
Reshad :)
_Aerospace_Eng_
07-27-2005, 01:02 PM
If that is your real code then you have more than one problem. The basic layout of a proper page is this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
All content that is meant to be seen by the user goes inside the body tags. Now your code may work for most browsers but I prefer using type/mplayer2 which is Windows Media Player for my embedded media. So use this basic setup.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<object width="300" height="45"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
type="application/x-oleobject">
<param name="fileName" value="playlist.m3u">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="loop" value="true">
<embed type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
showcontrols="true" showstatusbar="-1" width="300" height="45"
src="playlist.m3u" autostart="true" loop="true">
</embed>
</object>
</body>
</html>
Now to make the playlist.m3u file. A playlist is a basic text file. Read the 2nd post on this thread http://www.htmlforums.com/showthread.php?t=56608
Reshad
07-27-2005, 01:12 PM
Thanks buddy!
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.