TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-21-2009, 01:33 AM   #1 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Help Music Player

Hey everyone I am back I have been working on a artist website I did it all from scratch also But now I have run into a problem... I want to add a music player with the artists music I have never done anything like this before so I have no idea where to begin so I came to some people with knowledge... I would like it to be where when you click on a different link that goes into the site to where the song does not change... Does anyone have any ideas for me?
KingOfTheSouth is offline  
Reply With Quote
Old 01-21-2009, 08:53 AM   #2 (permalink)
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

Well, the playlist of the music player (or a single song at a time) is loaded by passing the URL to the song to the player, using PHP or a similar server-side technology. If that's the case, then you can easily store the currently playing song URL into a session or a cookie variable and load that if it's set.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote
The Following User Says Thank You to xenon For This Useful Post:
KingOfTheSouth (01-21-2009)
Old 01-21-2009, 12:59 PM   #3 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

It is actually easy to do since JavaScript can interact with Flash. You simply add an onclick to each link with the path to the music files, and then pass that to the Flash player when the user clicks it. The Flash should be constantly aware that the track can change at any moment.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
The Following User Says Thank You to Wildhoney For This Useful Post:
KingOfTheSouth (01-21-2009)
Old 01-21-2009, 04:22 PM   #4 (permalink)
The Acquainted
 
buildakicker's Avatar
 
Join Date: Jan 2008
Posts: 119
Thanks: 21
buildakicker is on a distinguished road
Default

A great player with tons of functionality is the JW Player. You can find it here: http://www.longtailvideo.com/. I've used it now and again.
__________________
SkiLeases.com
buildakicker is offline  
Reply With Quote
The Following User Says Thank You to buildakicker For This Useful Post:
KingOfTheSouth (01-21-2009)
Old 01-21-2009, 06:08 PM   #5 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

Thanks, But I got the files and everything. But the problem now here is I do not know how to add the music. Also I do not know how to get it to show up
KingOfTheSouth is offline  
Reply With Quote
Old 01-23-2009, 01:37 AM   #6 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

Ok I got it all up. Can someone help me make it automatically play please? Here is the code.

Code:
<div name="mediaspace" id="mediaspace"><!--player and image for lucky 7's demo  ... song rims spin --></div>
<script type='text/javascript' src="silverlight.js"></script>
<script type='text/javascript' src="wmvplayer.js"></script>
<script type="text/javascript">
var cnt = document.getElementById("mediaspace");
var src = 'wmvplayer.xaml';
var cfg = {
file:'swf_files/RimsSpin.mp3',
image:'swf_files/Lucky.jpg',
height:'240',
width:'440'
};
var ply = new jeroenwijering.Player(cnt,src,cfg);
</script>
KingOfTheSouth is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
what do you like on a music community webtuto The Lounge 2 12-26-2008 04:46 PM
Change MP3 Link into Player? buildakicker Javascript, AJAX, E4X 3 11-26-2008 10:15 PM
Parse Podcast XML and put up instance of player buildakicker General 7 11-14-2008 05:42 PM
a very great music website webtuto The Lounge 7 05-06-2008 08:26 PM
Make Your Own PHP Flash Player Which You Can Pass a File Variable with Preview!!!! thegrayman Tips & Tricks 2 12-12-2007 12:44 AM


All times are GMT. The time now is 03:07 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design