Go Back   CodingForums.com > :: Client side development > Graphics and Multimedia discussions

Before you post, read our: Rules & Posting Guidelines

Closed Thread
 
Thread Tools Rating: Thread Rating: 31 votes, 3.42 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-20-2005, 03:23 AM   PM User | #31
wenwen8282
New to the CF scene

 
Join Date: Mar 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
wenwen8282 is an unknown quantity at this point
Is there any Javascript or HTML codes for that???

Hi hi, thanks for the reply. Am just wondering whether it is possible to use Javascript or HTML code to create a playlist that will play songs one after another automatically instead of using notepad??? Tks a million!!! :P
wenwen8282 is offline  
Old 03-20-2005, 03:34 AM   PM User | #32
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
did you even read my post? there is a link in there that explains how to make a playlist(that plays by itself moving from song to song) using notepad, then rather than linking to mp3 files you would link to .m3u files, notepad is just the easiest program to use to make a playlist type file which is y i suggested it
_Aerospace_Eng_ is offline  
Old 03-20-2005, 07:15 AM   PM User | #33
wenwen8282
New to the CF scene

 
Join Date: Mar 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
wenwen8282 is an unknown quantity at this point
Hi Aerospace, am sorry, but u see, am planning to embed the player in my blog and not website, therefore, I wun be able to upload files... So am just wondering whether there is any method to play songs automatically one after another using Javascript or HTML. Tks a lot... :P
wenwen8282 is offline  
Old 03-20-2005, 05:20 PM   PM User | #34
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
okay thats fine the playlist will work as long as u can upload .m3u files and the location of the files are correct, please read the link in my post, the files dont have to be on your hard drive, they can be anywhere on the net and the m3u file will play the songs one by one automatically moving from one song to the other when the previous one has finished, y make things harder than they have to be
_Aerospace_Eng_ is offline  
Old 03-21-2005, 01:04 AM   PM User | #35
wenwen8282
New to the CF scene

 
Join Date: Mar 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
wenwen8282 is an unknown quantity at this point
Hi hi Aerospace, is it possible to link the playlist from http://webjay.org/ to my embedded player??? Tks and sorry for the trouble, cos am quite new in this field... :P
wenwen8282 is offline  
Old 03-21-2005, 06:34 PM   PM User | #36
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
okay lets try this again since my previous posts have seemed to be unclear to you (don't know how), i will explain this step by step so you have NO problems of understanding what to do!!

1. Open notepad.exe or notepad (same program) then type this as your first line
Code:
#EXTM3U
2. On the next line type this, it will be what you want displayed on the status bar of the player if you have it enabled
Code:
#EXTINF:Artist of Song Goes Here - Title of Song Goes Here
3. On the line after that type this, it will be the exact location relative to your root directory on your server for compatibility put the exact location of the file
Code:
http://locationtosongfilehere.mp3
4. You have now made a playlist for one song, to have multiple songs repeat steps 2-3 for the other songs, for example a playlist with 5 songs would look like this
Code:
#EXTM3U
#EXTINF:Artist of Song 1 Goes Here - Title of Song 1 Goes Here
http://locationtosongfile1here.mp3
#EXTINF:Artist of Song 2 Goes Here - Title of Song 2 Goes Here
http://locationtosongfile2here.mp3
#EXTINF:Artist of Song 3 Goes Here - Title of Song 3 Goes Here
http://locationtosongfile3here.mp3
#EXTINF:Artist of Song 4 Goes Here - Title of Song 4 Goes Here
http://locationtosongfile4here.mp3
#EXTINF:Artist of Song 5 Goes Here - Title of Song 5 Goes Here
http://locationtosongfile5here.mp3
5. Now that you know what it looks like, you have to save it, click on the File menu in notepad, then click on save as, to the left of the save and cancel buttons you will see 3 boxes, the first box is the filename that you want to save it as, the second box is the file type (change this to all types), and the last one is encoding type, DO NOT change this box. In the file name box after you have changed the second box to all types, you should type in this
Code:
yourplaylistfilename.m3u
find the location you want to save your file at, this will be needed later so u can upload your playlist file, once u find your location to save the file, click save, you will now see a file that has the name u gave it this will be your playlist
6. Upload your playlist(s) to your server, and in the media player code that is on this thread, rather than having values of mp3 files you should change the value to .m3u, so for example the stuff in bold should look something like the values that you should use
Code:
<!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">
<script type="text/javascript"><!--
function song(){
document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
}
//-->
</script>
</head>
<div id="jukebox">JUKEBOX<br><br>
<select  id="cancion" onchange="song()" size="1"> 
   <option value="none">::::::::::::: Choose Your Song Here :::::::::::::</option>
   <option value="http://urltosong1playlist.m3u">Playlist 1</option>
   <option value="http://urltosong2playlist.m3u">Playlist 2</option>
   <option value="http://urltosong3playlist.m3u">Playlist 3</option>
   <option value="http://urltosong4playlist.m3u">Playlist 4</option>
   <option value="http://urltosong5playlist.m3u">Playlist 5</option>	
</select><br> 
<span id="music1"><embed type="application/x-mplayer2" id="music1"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" 
src="" 
name="MediaPlayer1" 
width="300"
height="70"
controltype="2" 
showcontrols="1"
showstatusbar="1"
AutoStart="0">
</embed></span>
</div>
</body>
</html>
7. If you had read this page click here earlier which I dont think you did, I wouldn't have had to spend my time writing this semi tutorial up for you
8. Any questions?

P.S. Someone should make this a sticky (glares at mods)

Last edited by _Aerospace_Eng_; 03-21-2005 at 06:42 PM..
_Aerospace_Eng_ is offline  
Old 03-21-2005, 08:25 PM   PM User | #37
codegoboom
Regular Coder

 
Join Date: Aug 2004
Location: codegoboom@yahoo.com
Posts: 999
Thanks: 0
Thanked 0 Times in 0 Posts
codegoboom is an unknown quantity at this point
Quote:
Originally Posted by _Aerospace_Eng_
make this a sticky
You said it!
I vote for sub-forum.
__________________
*this message will self destruct in n-seconds*

Last edited by codegoboom; 03-21-2005 at 08:28 PM.. Reason: sorry...
codegoboom is offline  
Old 04-04-2005, 04:30 AM   PM User | #38
aaroncavanaugh2
New Coder

 
Join Date: Feb 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
aaroncavanaugh2 is an unknown quantity at this point
see this script in action

Hi,

To see how the radio button works go to www.Christianradio.me.uk and click on the archives link.

Thanks. God Bless.

Aaron.
aaroncavanaugh2 is offline  
Old 04-04-2005, 05:32 AM   PM User | #39
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
which version did u use? the older one or the newer one? i made it use the embed tag so it works for the gecko browsers also.
_Aerospace_Eng_ is offline  
Old 04-18-2005, 02:27 AM   PM User | #40
Descendants
New Coder

 
Join Date: Apr 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Descendants is an unknown quantity at this point
not sure am i late in here but i have some problems that totally differs.
Is there a way to make window media player to play files which wasnt target on playlist but instead it had a browse button where u could browse to your own windows directory and have it played music.

to be more specific:
embed src="locationoffile.mp3" to be configure to a fact that
embed src="file"
where file value ="browse on your pc for any available mp3 to be played not playlist"
Its like adding an eject button for window media player
Descendants is offline  
Old 04-18-2005, 05:02 AM   PM User | #41
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Okay so yes it is possible to do this clientside, here you go, enjoy.
Code:
<!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>Jukebox</title>
<style type="text/css">
<!--
div#music1 {
text-align:center;
}
div#playlist {
text-align:center;
}
-->
</style>
<script type="text/javascript">
<!--
function song(what){
document.getElementById("music1").innerHTML='<object id="mediaplayer1" width="200" height="45" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"><param name="URL" value="'+what+'"><param name="AutoStart" VALUE="True"><param name="uiMode" value="full"><embed type="application/x-mplayer2" src="'+what+'" ShowControls="1" AutoStart="1" width="200" height="45"></embed></object>';
return false;
}
//-->
</script>
</head>
<body>
<div id="playlist">
Browse for a song to play from your PC, and then click submit
<form onsubmit="return song(document.getElementById('thefile').value)">
<input type="file" name="thefile" id="thefile"><br>
<input type="submit" value="Submit">
</form>
</div>
<div id="music1">
<object width="200" height="45" 
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<param name="URL" value="">
<param name="AutoStart" VALUE="True">
<param name="uiMode" value="full">
<embed type="application/x-mplayer2" 
src=""
ShowControls="1"
width="200"
height="45">
</embed>
</object>
</div>
</body>
</html>

Last edited by _Aerospace_Eng_; 04-18-2005 at 08:51 AM..
_Aerospace_Eng_ is offline  
Old 04-18-2005, 08:13 AM   PM User | #42
Descendants
New Coder

 
Join Date: Apr 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Descendants is an unknown quantity at this point
wow that was a real quick reply... thanks anyways.This is what i had been lookin for.thanks for solving this problem.. i had been figuring this problem for like 3 days ......
Descendants is offline  
Old 04-18-2005, 08:52 AM   PM User | #43
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Take out the method="get" from the file input, it shouldn't go there sorry.
_Aerospace_Eng_ is offline  
Old 04-18-2005, 09:13 AM   PM User | #44
Descendants
New Coder

 
Join Date: Apr 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Descendants is an unknown quantity at this point
Erm.. i was thinking if i could request another help regarding showing a scrolling marquee of which shows the song title.. i reconfigure some of the settings which now looks like this.when opening the html it would show exactly what i mean.. Thanks again

Code:
<!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>Jukebox</title>
<style type="text/css">
<!--
div#music1 {
text-align:right;
}
div#playlist {
text-align:right;
}
-->
</style>
<script type="text/javascript">
<!--
function song(what){
document.getElementById("music1").innerHTML='<object id="mediaplayer1" width="235" height="160" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"><param name="URL" value="'+what+'"><param name="AutoStart" VALUE="True"><param name="uiMode" value="full"><embed type="application/x-mplayer2" src="'+what+'" ShowControls="1" AutoStart="1" width="235" height="160"></embed></object>';
return false;
}
//-->
</script>
</head>
<body>
<div id="music1">
<object width="235" height="160" 
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<param name="URL" value="">
<param name="AutoStart" VALUE="True">
<param name="uiMode" value="full">
<embed type="application/x-mplayer2" 
src=""
ShowControls="1"
width="235"
height="160">
</embed>
</object>
</div>
<div id="playlist">
<form onsubmit="return song(document.getElementById('thefile').value)">
<input type="file" name="thefile" id="thefile" method="get"><BR>
<input type="submit" value="Play">-Song Title Over here Scrolling-
</form>
</div>
</body>
</html>
Descendants is offline  
Old 04-18-2005, 10:35 AM   PM User | #45
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Code:
<!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>Jukebox</title>
<style type="text/css">
<!--
div#music1 {
text-align:right;
}
div#playlist {
text-align:right;
width:240px;
float:right;
}
#scroll {
width:200px;
height:25px;
right:0px;
position:absolute;
}
-->
</style>
<script type="text/javascript">
<!--
function song(what){
document.getElementById("music1").innerHTML='<object id="mediaplayer1" width="235" height="160" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"><param name="URL" value="'+what+'"><param name="AutoStart" VALUE="True"><param name="uiMode" value="full"><embed type="application/x-mplayer2" src="'+what+'" ShowControls="1" AutoStart="1" width="235" height="160"></embed></object>';
document.getElementById("marquee").innerHTML=document.getElementById('thefile').value;
return false;
}
//-->
</script>
</head>
<body>
<div id="music1">
<object width="235" height="160" 
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<param name="URL" value="">
<param name="AutoStart" VALUE="True">
<param name="uiMode" value="full">
<embed type="application/x-mplayer2" 
src=""
ShowControls="1"
width="235"
height="160">
</embed>
</object>
</div>
<div id="playlist">
<form onsubmit="return song(document.getElementById('thefile').value);" style="margin:0px;" method="post">
<input type="file" name="thefile" id="thefile"><br>
<input style="float:left;" type="submit" value="Play">
<marquee id="scroll"><span id="marquee">&nbsp;</span></marquee>
</form>
</div>
</body>
</html>
next time try to make an attempt at this, it uses the same innerHTML method that I have already used.
_Aerospace_Eng_ is offline  
Closed Thread

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:59 AM.


Advertisement
Log in to turn off these ads.