Current location: Hot Scripts Forums » General Web Coding » JavaScript » Simple Mp3 player


Simple Mp3 player

Reply
  #1 (permalink)  
Old 06-24-04, 11:03 PM
Psykho Psykho is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Simple Mp3 player

What I'm trying to achieve is make a simple script, where it plays one song, and when that song ends, it starts a different one up, and when the list of songs ends, it starts at the beginning. If someone could produce a small code of that for me, or give me some help transacting from one song to another, i'd greatly appreciate it. Thanks.
Reply With Quote
  #2 (permalink)  
Old 07-05-04, 09:48 AM
ShadowCat ShadowCat is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Hey. I can make that for you if you want. Ill post the script in a little while. All you'll need to do is edit a couple things.

PaYcE--->
-=Shadow*Cat=-
__________________
Check out my newly launched site, XGamers-- http://xgamers.uni.cc
Don't forget to apply for affiliation!
Reply With Quote
  #3 (permalink)  
Old 07-05-04, 09:55 AM
ShadowCat ShadowCat is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
All done!

OK, I'm done coding! First thing, just to make it easier for you, make a list of the songs and the order you want them in.

Code:
<HTML> 
<HEAD> 

<META HTTP-EQUIV="refresh" content="87;URL=http://yousite.com/nexttrack.htm"> 
<EMBED src="http://yoursite.com/trackname.mp3" autostart="true" loop="false" hidden="true">
</HEAD> 
<BODY bgcolor="#CC9933" link="#000000"> 
<br>
<center> <font size=2> You are currently listening to...<br>
<b><i>Song Name!</i></b><br>


<a href="http://yoursite.com/previoustrack.htm"><--Previous Song</a>
&nbsp; &nbsp;
<a href="http://yoursite.com/nexttrack.htm">Next Song--></a>

</BODY> 
</HTML>
Now to tell you what to do. The spots that need to be changed are in bold.

1. content="87; -- Change 87 with length of the mp3 in seconds.
2. URL=http://yousite.com/nexttrack.htm" -- Change this to the location of the page of the next track.
3. src="http://yoursite.com/trackname.mp3" -- Change this to the location of the current tracks' mp3
4. bgcolor="#CC9933" link="#000000" -- This sets the background color to a warm brown and the links to black. Change these with whatever you want, or take them out altogether.
5. href="http://yoursite.com/previoustrack.htm" -- Change this to the location of the page of the previous track.
6. href="http://yoursite.com/nexttrack.htm" -- Change this to the location of the page of the next track.

You will need to create a page for every song you wish to play. You said you wanted the player to loop the songs. On the last track, instead of setting the url to next track (since there is none ), set it to the url of the first track.
Hope that helps!

PaYcE--->
-=Shadow*Cat=-

If you found this useful, please visit my site http://xgamers.uni.cc.
__________________
Check out my newly launched site, XGamers-- http://xgamers.uni.cc
Don't forget to apply for affiliation!

Last edited by ShadowCat; 07-05-04 at 10:10 AM.
Reply With Quote
  #4 (permalink)  
Old 07-05-04, 10:31 AM
Psykho Psykho is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for all your help. I did a bit of javascript coding and made one, but yours is also alot smaller. I'll probaly submit my script in later today. Once again, thanks.
Reply With Quote
  #5 (permalink)  
Old 07-05-04, 05:49 PM
ShadowCat ShadowCat is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
np. it didnt take me that long. i jus had to edit an old mp3 playin script. for my just launched site, i'm coding a radio that gives an intro to the track, plays it, gives an extro, then randomly goes to a new song, or a user-sent in shoutout.
PaYcE--->
-=Shadow*Cat=-
__________________
Check out my newly launched site, XGamers-- http://xgamers.uni.cc
Don't forget to apply for affiliation!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with this keyword script - i'm sure it's simple! dudeman248 JavaScript 2 05-19-04 05:11 PM
Media player and coding for it HELLP! Arbitus Visual Basic 0 05-19-04 12:18 PM
Need a simple image with info text script (I can even pay you for this) nezbie Script Requests 2 04-05-04 09:47 AM
Need simple example of making a website with Perl JohnElmore Perl 5 10-04-03 09:46 PM
I need a very simple calendar Giullare Script Requests 0 09-24-03 06:53 PM


All times are GMT -5. The time now is 10:24 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.