Flash Player & Database
Posted: 28 November 2008 10:12 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  296
Joined  12-21-2005

I have seen numerous flash mp3 players floating around that give you the convenience of an administrative back-end which lets you manage tracks, playlists, etc.  Has anyone ever integrated this into EE and can give some instruction on how difficult/simple this is?  It’d be good to see 2.0 with something like this.  Perhaps I’ll head over there and put in a request if it isn’t already available somehow.

Any input is appreciated.

 Signature 

EE v. 1.6.6

Profile
 
 
Posted: 29 November 2008 05:19 AM   [ Ignore ]   [ # 1 ]  
Grad Student
Avatar
Rank
Total Posts:  65
Joined  05-01-2007

Could you details your question ? Which MP3 player do you want to use, is it managed by XML file ? Are you dealing with flash integration or file handling ?

 Signature 

Portfolio : http://www.evasion.cc
Weblog : http://www.evasion.cc/blog

Profile
 
 
Posted: 29 November 2008 08:47 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  296
Joined  12-21-2005

Well, I’ve found a couple of mp3 players that use a backend management system.  One example is http://www.flamplayer.com/.

 Signature 

EE v. 1.6.6

Profile
 
 
Posted: 29 November 2008 09:35 AM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  65
Joined  05-01-2007

Well, what you need to do is possible with EE, but it need a few step to be set up.
I’ll try to describe a quick example.

First of all create a custom weblog named “tracks”, which will store all the tracks informations. You may create a few custom fields to add all the data you need (ie: author, track title, length, file…).

Here’s what I suggest :

- {title} for track title
- {track_author} for artist name
- {track_file} for MP3 file
- {track_album} for album name

If you want to do something usable, you may buy MCFileManager, a great plugin for TinyMCE (about 75$) or simply use EE built-in upload functionnality.

Then you must set up your templates : create a template group called “player”, then change the default “index” template type to “XML” (instead of web page).

In your “index” template, put some code like that :

<tracks>
{exp:weblog:entries weblog="tracks"}
<item id="{count}" author="{track_author}" album="{track_album}" title="{title}" file="{track_file}" />
{/exp:weblog:entries}
</tracks>

It will generate a XML track listing with all of your tracks.

The third step is to integrate your player to your webpage. Edit your webpage template and put the following code where you need to display the player :

<div id="myplayer"></div>
[removed]
var flashvars = {xmlURL:"{path=player/index}};
var params = {menu: "
false"};
var attributes = {id: "
myplayer_id"};
swfobject.embedSWF("
/flash/player.swf", "myplayer", "200", "50", "8", "/flash/expressInstall.swf", flashvars, params, attributes);
[removed]

This part of code is assuming that :
- You use SWFObject to load your flash
- Your player is located id the /flash folder and named player.swf
- Its width is 200 pixels and its height is 50 pixels.
- The flashvars to tell the player which XML file to use is named “xmlURL”.

Of course you’ll need to adapt this code to your player specification (ie: change flashvars name if needed, change path…).

That’s all your flash MP3 player is now loading its data from an XML file built by EE.

You may then add more functionnality like building playlists. For that here’s two hints :
- Create a new weblog “playlist”, which store playlist data. Add a custom field to the “tracks” weblog which type is “related entry”, to link it with the “playlist” weblog.

Then use the reverse_related_entries tag to generate your XML playlist.

- Another trick is to use the great Solspace tag module to tag all your tracks.

Then all you need is to couple the tag module with your templates to generate on-the-fly playlists based on tag.

Hope this will help smile

 Signature 

Portfolio : http://www.evasion.cc
Weblog : http://www.evasion.cc/blog

Profile
 
 
Posted: 29 November 2008 09:48 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  296
Joined  12-21-2005

Thanks so much for the great info!!!!  You have no idea how much easier this will make things for me if I can get it to work.

I’ll definitely give it a try some time today or tomorrow.

 Signature 

EE v. 1.6.6

Profile
 
 
Posted: 29 November 2008 12:11 PM   [ Ignore ]   [ # 5 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1613
Joined  08-28-2003

Thanks for the link to Flam Player. That brings up a good question about Flash MP3 Players. What MP3 audio players are others using in EE?

I’ve used JW Player (good, general player for both Flash audio and video), Dewplayer, and my favorite.

Any others? I’m trying to get a Flash MP3 player with playlist to work with jQuery. Easier said than done, it seems.

 Signature 

RonnieMc

Honolulu, HI USA

HomeHobby - Latest Job

Profile
 
 
Posted: 09 December 2008 02:08 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  127
Joined  01-30-2008

Hey Evasion,
great explanation but how exactly would you use MCFileManager to upload the mp3 tracks? would you have a TinyMCE WYSIWYG field for every track?

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66388 Total Logged-in Users: 43
Total Topics: 84713 Total Anonymous Users: 20
Total Replies: 454685 Total Guests: 197
Total Posts: 539398    
Members ( View Memberlist )