mp3 player on WordPress/php

I have spent way too much time trying to find a solution.  I want to use a stylish mp3 player on a wordpress site, where I can set parameters like the song list and if it will autoplay or not.  I set on up using a plugin (FMP) that uses JW's media player.  It is really nice, except I have to set it to autoplay or not throughout the site.

I want to have the home page autoplay and not the others.  You can see what I did at http://jandrentertainment.net/about.  That has the player that doesn't autoplay.  I can't figure out how to call the same player and then autoplay it on the home page.  This plugin has zero documentation, and I can't figure out how to manually call it.

I would love help on finding a nice solution, or a great guide for a skinned (with my background) player like the one on my site where it is easy to select the playlist and if it autostarts or not.
dougfosterNYCAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
James RodgersConnect With a Mentor Web Applications DeveloperCommented:
this is the code block the is generated by the plugin

using code similar to the condition block above

you would replace the paramaters given for the config file and playlist files

 
<?php
if(is_home()){                                 // we are on the home page so do this
      var $playlistpath=
      var $configpath=
}else if is_single('post-slug') {  //it's a single post with the post-slug, can also use page title but these might be long
      var $playlistpath=
      var $configpath=
} else if (is_page('page-slug')){  //specific page can use page slug or page name, slug might be easier/cleaner
      var $playlistpath=
      var $configpath=
} else{                                        // absolute default setting when no other option tested true
      var $playlistpath="http://jandrentertainment.net/wp-content/fmp-jw-files/playlists/fmp_jw_widget_playlist.xml?1649821582";
      var $configpath="http://jandrentertainment.net/wp-content/fmp-jw-files/configs/fmp_jw_widget_config.xml?2037294446";
}

?>

<ul>
                  <li id="fmp-jw-widget-428207761" class="widget fmp-jw-widget"><h2 class="widgettitle">Music</h2>

<div>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="177" height="220">
        <param name="movie" value="http://jandrentertainment.net/wp-content/plugins/flash-mp3-player/player/player.swf?config=<? echo $configpath; ?>&amp;file=<? echo $playlistpath; ?>" />
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="http://jandrentertainment.net/wp-content/plugins/flash-mp3-player/player/player.swf?config=<? echo $configpath; ?>&amp;file=<? echo $playlistpath; ?>" width="177" height="220">
    <!--<![endif]-->
        <param name="wmode" value="Window"/>
        <param name="quality" value="high" />
        <param name="allowFullScreen" value="true" />

        <param name="allowScriptAccess" value="always" />
        <param name="flashvars" value="config=<? echo $configpath; ?>&amp;file=<? echo $playlistpath; ?>" />
        <p>Here is the Music Player. You need to installl flash player to show this cool thing!</p>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
</div>

        </li>            </ul>
0
 
James RodgersWeb Applications DeveloperCommented:
here a few wp plugins you might be interested in

http://wordpress.org/extend/plugins/search.php?q=mp3+player
0
 
dougfosterNYCAuthor Commented:
Thanks Jester.

As I mentioned, I have tried most the plugins, so I am aware of how to search for them.  What i need is more specific help.  

What would be helpful is to find out how to call the JW media player manually, so that I can specify if it will be autoplayed or not.  

Or, find a specific solution that will allow me to easily call on a media player that will hold multiple songs, looks cool and is modifyable, and I can have it shuffle and/or autoplay.  

Any help?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
James RodgersWeb Applications DeveloperCommented:
the player you hve uses a config file located at
http://jandrentertainment.net/wp-content/fmp-jw-files/configs/fmp_jw_widget_config.xml

it looks like this

<mp3config>
<autostart>false</autostart>
<shuffle>true</shuffle>
<repeat>all</repeat>
<volume>50</volume>
<showdisplay>true</showdisplay>
<showplaylist>true</showplaylist>
<linktarget>_blank</linktarget>
<backcolor>0xFFFFFF</backcolor>
<frontcolor>0x000000</frontcolor>
<lightcolor>0xA81414</lightcolor>

<jpgfile>
http://www.jandrentertainment.net/music/jandraudio.png
</jpgfile>
</mp3config>

try changing autostart to true
0
 
James RodgersWeb Applications DeveloperCommented:
if you want it to be page spcific you will need to alter a couple of file, inc the header.php file

each page has a unique id, what you can do is point to a new/alternate config file based on page id

<?php
if(is_home()){
point to auto play config
} else {
point to manual config
}

?>

problem is there are not a lot of options built in so you would need o create some of your own variables and test for them

this alos allows you to create custom play lists per page, you could point to different play list config files per page etc.

0
 
James RodgersWeb Applications DeveloperCommented:
something similar to this

<?php
if(is_home()){                                 // we are on the home page so do this
      var $playlistpath=
      var $configpath=
}else if is_single('post-slug') {  //it's a single post with the post-slug, can also use page title but these might be long
      var $playlistpath=
      var $configpath=
} else if (is_page('page-slug')){  //specific page can use page slug or page name, slug might be easier/cleaner
      var $playlistpath=
      var $configpath=
} else{                                        // absolute default setting when no other option tested true
      var $playlistpath=
      var $configpath=
}

?>

and then in your plugin change the output line to replace the config and playlist values with the values created above
also see hre for some conditions you can check for when determining outputs

http://codex.wordpress.org/Conditional_Tags
0
 
dougfosterNYCAuthor Commented:
Thanks Jester, this is the approach I need.
 
 I won't have time to test it now, but it makes sense for me to put something into the header.  My sense is that it would be done in place of the widget.  
 
 So, I already have a separate template for the home page which doesn't use the sidebar, but has it's own code in place of the sidebar.  So I can call the player from the template.
 
 I will set up the variables as you specify in the header to point to a different folder with the xml files (or different file names in the same folder) for the home page.

So in the home page template, in the sidebar section, what code do I use to call the player, or link it?  
0
 
dougfosterNYCAuthor Commented:
Thanks Jester, you rock!

It's up and running at http://jandrentertainment.net.


0
 
James RodgersWeb Applications DeveloperCommented:
glad i could help

thanks for the points
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.