Audio Playlist Manager

v 1.0.9

Tierra’s Audio Playlist Manager offers extensive flexibility when embedding mp3 audio into your posts or templates.

Features:

  • Embed single/multiple audio file(s) on a post page or template
  • Embed single/multiple audio playlist(s) on a post page or template
  • Build your own XSPF compatible player and link our XML to it (we’ve tested against Tom Boutell’s Enhanced XSPF player

Short Code Examples

We have set up some easy to use short code that can be pasted into any post / page within WordPress.

Multi-Track Audio Playlist:

If you are looking to embed a playlist on to your page, you can use the following short code.

1
2
3
4
// using the short code `[ti_audio]` by itself  will attempt to play playlist #1,
// which may or may not exist. It's always preferable to use a named Playlist
// when calling the player or to set the id.
[ti_audio]
1
2
// Plays playlist with name "Name of Playlist"  (case sensitive) 
[ti_audio name="Name of Playlist"]
1
2
// Plays playlist #1
[ti_audio id="1"]
1
2
3
4
5
// Uses the swf located at this location, rather than the default.
// Your root folder must contain a crossdomain.xml file allowing
// another domain's swf access to XML data.  Also passed is the
// name of the player and the swf's width and height values.
[ti_audio skin="/player/xspf_player_custom.swf" width="260" height="315"]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// In addition, you can also change the following attributes of the player (defaults shown):
 
// Sets player to begin playing on load. Default is off, 0.
autoplay="0"
 
// Sets player to begin loading assets before the user clicks anything. Default is on, 1.
autoload="1"
 
// Sets player to repeat once it reaches the end of the playlist. Default is off, 0.
repeat="0"
 
// URL of the XSPF swf to use for display. Uses default player unless specified.
skin="xspf_player.swf"
 
// Set if the skin attribute points to a SWF of different dimensions.
width="400"
height="170"
 
// Set default volume level (in percent)
volume="50"

Single Audio Track:

If you are looking to embed a single file, use the following short code.

1
2
// Plays audio file with id of 1
[ti_audio media='201']
1
2
// Plays single audio file, set to auto play, repeat and volume at 60%
[ti_audio media='201' autoplay="1" repeat="1" volume="60"]

Templates:

You can embed the audio player into any WordPress template.  Much like the short code examples above, you can customize the values within your own templates. Here are all of the fields that you can specify should you choose. Omitting a field will set it to the plugin’s default values.

1
2
3
4
5
6
7
8
9
10
<? if (function_exists ("ti_apm_print_player")) {
   print ti_apm_print_player (array(
    "name" => "Name of Playlist",
    "skin" => "/player/xspf_player_custom.swf",
    "autoplay" => "0",
    "repeat" => "0",
    "width" => "400",
    "height" => "170"
    )); 
} ?>

To play a single audio file within your template, specify the following:

1
2
3
4
5
6
// Set the media id to play a single audio track
<? if (function_exists ("ti_apm_print_player")) {
    ti_apm_print_player (array(
    "media" => "3"
    )); 
} ?>

Player API:

Want to use your own player? That’s no problem. We built our custom player to follow a default set of XML that is compatible with any skinned XSPF audio player. You can choose to use the core XSPF player by downloading it here or can skin your own.

Change Log:

1.0.9 – Fixed bug in admin playlist display reported to affect IE users.

1.0.8 – Fixed bug in player that could lead to simultaneous sound playing. Added logo to admin page.

1.0.7 – Fixed glitches in Admin UI lightbox. Updated ti-player.swf to better accomodate long album, artist and track names. Removed visual glitch when ti-player.swf is launched without autoplay (Player would expand and shrink upon load). Fixed error thrown when selecting tracks from right-click menu while player was paused.

1.0.6 – Changed Roles & Capabilities user level code to check against edit_others_posts per some users permissions issues.

1.0.5 – Fixed the template embed code to render the player inside a theme.

1.0.4 – Changed embed code to increase compatibility with older XSPF players. (Flash 7 v. 8 specifically)

1.0.3 – Fixed issue where users who were not administators could not access the plugin page. You can now access if you are an Editor or Administrator. If you are an Editor, you will see the link to the plugin page under the “Tools” menu. If you are an “Administrator” you will see the link to the plugin page under both “Tools” and “Settings.” Also fixed an HTML bug on the edit asset screen.

58 Responses to “Audio Playlist Manager”

  1. Lonny says:

    I was curious as to whether or not your plug-in was compatible with the newest version of word press, I believe its 2.9.1.
    Report this comment

  2. Shane says:

    Hi Todd,

    Thanks for creating this plugin!

    Unfortunately, like many here, I’m writing because of a small problem I’ve encountered. I used the plugin to embed a single track (.mp3 file) in one of my posts.

    When I press play to start the audio, everything seems fine for about 45 seconds or so. Then, the track starts playing again from the beginning, while the already started track keeps going. So, I suddenly have the audio running twice. When I press pause, the original track pauses but the duplicate track keeps going and there seems to be no way to stop it.

    What could be causing this problem?

    I’m using the most up-to-date versions of both WP and the plugin, by the way.

    Regards,
    Shane
    Report this comment

  3. Rodrigo Zamorano says:

    Hello,

    Thanks for your plugin, I’m trying it. Now I’m getting this error message:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /home/albertop/public_html/wp-content/plugins/tierra-audio-playlist-manager/audio-playlist-manager.php on line 962

    Could you help me.

    Thank you again and Happy New Year
    Report this comment

    • Todd Stowell says:

      @Rodrigo Zamorano – try placing the following into your site’s .htaccess file:

      php_value upload_max_filesize 100M
      php_value post_max_size 105M
      php_value max_execution_time 300

      Also, are you on shared hosting or a dedicated server? If you’re on a shared server, it may be possible that the machine is running out of memory since there are other accounts on there. If you have ssh access, are you able to see how much free memory is available?
      Report this comment

      • Rodrigo Zamorano says:

        Hi,

        Thank you very much. In my case modifying the .htaccess file didn’t work but I found this another tip that worked well:

        To add this line of code in my Wordpress WP-CONFIG.PHP file. Add it before any other values:

        define(‘WP_MEMORY_LIMIT’, ‘64M’);

        Good luck!

        Rodrigo
        Report this comment

  4. eRnest says:

    Great plugin! I especially love how it populates your media library in its config page and you dont have to type out long html /locations :-)
    Im a newbie and unclear as to how to embed this in my template (i’d like to have music player on the side with “now playing” songs. So I’m looking foward to when this works with widgets! :-) (Im currently using a different plugin that is widget compatible.
    thanks again!
    Report this comment

  5. hans says:

    Hi,

    Wondering if it is possible to have several players on one page (I think so), AND the feature that the player that is playing at a certain moment is automatically stopped when you click on another one.
    (I know you could use playlists to have more pieces of music on one page. But the playlist has the disadvantage that you cannot see the whole list and pick for example the third track.)
    Report this comment

  6. Michael says:

    Hello, i have added the audio player, but when i add a song to a post i get an ugly gray box surrounding the player… how can i get rid of it?? I use thesis theme
    thank you very much.
    Report this comment

  7. Mindy says:

    Hi and Merry Christmas / Happy Holidays!

    I am trying to post a couple audio files for my son. He is taking guitar lessons and I have used your plug-in on one other site and it was easy peasy and worked splendidly … so this morning… I thought “hey, I will do the same for my son’s blog” … but I am pulling my hair out. The player is on ‘hyper-mode’ and is listing the two songs over and over and over and over – but nothing ever plays.

    When I converted the files ( aiff ) to mp3 in itunes – they actually saved as mp4 files – would that be an issue? I can’t figure this out. I have the latest WP 2.9… maybe that is the problem? Hmmm… any help would be great!
    Report this comment

  8. Pete Blake says:

    What a great plug in! I am putting about 10 single audio tracks on to one page. Everything works superbly. Is it possible to change the colors of the player? I’ve looked in the php files but can’t see anything to change, yet. I may want to change the size of the single players as well. Is this possible. Apologies if I’ve missed it in the coding.
    Report this comment

    • Todd Stowell says:

      @Pete Blake – The current version does not allow for color or size changes unless you use your own XSPF skin, which you can read up on here – http://www.boutell.com/xspf/. We can also help you build your own skin if you’d like. Just drop us at note on our contact page if you’re interested. At some point after the first of the year, we’ll be revisiting the plugin to see about color picking, etc.
      Report this comment

  9. Shanna Korby says:

    Can this not work in a widget??
    Report this comment

  10. Joni says:

    Hey Todd,

    That worked! You are smart and handsome!

    Thanks for the quick reply!

    -Joni
    Report this comment

  11. Joni says:

    Hi Todd,
    THanks for your quick reply. I have solved the files not being visible problem. I had my mp3 file in 2 places within the same site, under ’sounds’ and ‘uploads’. I deleted all, and added through the media library as you suggested and this fixed the problem.

    My next endeavor: I would like a single mp3 to play on my home page and can put the code in my footer.php
    Heres the code: (w/o the brackets-am afraid the code will disappear in this post)

    if (function_exists (“ti_apm_print_player”)) {ti_apm_print_player (array(“media” => “37″)); }

    The below would be the post embed code, which does not work incidently in my sidebar text widgets.

    ti_audio media=”37″ autoplay=”1″

    The above code for the page does not show up at all. What part is incorrect and how do I insert the autoplay in the page code as well?

    Thank you for your help!
    Report this comment

  12. Christina says:

    I’m trying to add the a single file player to a lyrics page for my friend’s band site and it’s not even showing up.

    http://amberalert.miss-a-beat.org/index.php/music/meet-you-last-tuesday-by-the-lake/
    Report this comment

    • Todd Stowell says:

      @Christina – can you verify the following:

      header.php – just before the closing head tag make sure you have:

      1
      
      <?php wp_head(); ?>

      footer.php – just before the closing body tag make sure you have:

      1
      
      <?php wp_footer(); ?>

      Report this comment

  13. Joni says:

    Hello, I am getting stuck right at the beginning. I have uploaded 2 mp3’s successfully from your add button. They are visible in the WP media library. However, they are not visible from the Available Audio Files which shows No audio results, and therefore I cannot make a playlist.
    I am using WP 2.8.6 and your plugin is 1.0.7

    Thank you for your help!

    -Joni
    Report this comment

  14. Daniel says:

    Ok so i just started working on a website and im currently using the Scarlett Theme. I am able to put the audio in a post, and it works fine. But I am not able to put it in the theme some where. For example I would like to put the player either at the top right above the Search box or dead center above the picture strip. I am not sure where all the code is supposed to go??? So far any time i put the following:

    “Name of Playlist”,
    “skin” => “/player/xspf_player_custom.swf”,
    “autoplay” => “0″,
    “repeat” => “0″,
    “width” => “400″,
    “height” => “170″
    ));
    } ?>

    I either get this big white box on my theme or my theme just gets all messed up. I have every page basically default, and I have modified very little on this theme…this is just experimental and i am still learning. Please help.
    Report this comment

    • Todd Stowell says:

      @Daniel – you can skip the “skin” setting. If you don’t specify it, it will load the default. You’re telling the plugin to load the default swf from /player/xspf_player_custom.swf which it looks like you don’t need to do. If you remove that one line from your template, it should work.
      Report this comment

  15. Desiree says:

    I was just wondering if you could use this plugin to add an individual track to individual images on a website?
    Report this comment

  16. Hello, I am getting the upload_max_size error. Where exactly do I make changes to the php.ini? Can someone please give me instructions on how to make the correct changes so that I can upload files?

    I have WP 2.8.5 and Atahualpa 3.4.4.

    Thanks,
    Natasha
    Report this comment

    • Todd Stowell says:

      @nathsha elane – If you have access to your php.ini, you can do the following: change upload_max_filesize, post_max_size & memory_limit so upload_max_filesize < post_max_size < memory_limit. My settings locally, for example, are:

      upload_max_filesize = 40M
      post_max_size = 50M
      memory_limit = 128M

      You will need to restart apache when making changes to your php.ini. You can also edit your .htaccess file and try setting this:

      php_value post_max_size 128M
      php_value upload_max_size 128M
      Report this comment

  17. Paul says:

    Thanks Todd, Its working for me now!
    Report this comment

  18. Chris says:

    This plugin seems very promising to me, but I am having a bit of a challenge customizing it w/ the skin you recommended above (http://www.boutell.com/xspf/). The new skin/swf shows on the page, but it seems like it is not linking to the playlist(s). Am I missing something?

    Thanks in advance for any help.
    Report this comment

    • Todd Stowell says:

      @Chris – are you using the short code version or the version embedded into your template. If you can paste to us the code that you’re using, we can take a look and make recommendations.
      Report this comment

  19. Paul says:

    1.) Yes
    2.) Administrator
    3.) Yes

    I am using Firefox, but also tried to access in IE with no luck.
    Report this comment

  20. I am getting the same error as Paul. I am the administrator and I can access the media uploader. I can’t access it from either settings or tools.
    Report this comment

    • Todd Stowell says:

      @Kriselle Laran & @Paul – We just pushed 1.0.6 up to WordPress. When the new version shows, download it and see if it resolves the issue. We think it may be due to WordPress not properly defining the right user roles for blogs that have been upgraded frequently, so we’re setting a different check in hopes that will fix the issue.
      Report this comment

  21. Todd Stowell says:

    @Paul – a couple of questions:

    1.) are you accessing from the settings menu or from the tools menu?
    2.) can you verify that you are an editor or administrator?
    3.) can you verify that you are able to access the media uploader built into wordpress?
    Report this comment

  22. Paul says:

    @Todd – I upgraded, still get the same error.
    Report this comment

  23. Paul says:

    plugin = 1.0.4
    WordPress = 2.7.1

    Obviously I can update WP version, have been told by some to wait awhile to update. Is it your opinion that I should update?
    Report this comment

  24. Paul says:

    Todd,

    I have the same issue Hugh does, getting the “ACCESS ERROR: You do not have permission to access this page.” I am the administrator, what should I try next?

    Paul
    Report this comment

  25. Joni says:

    Hello,
    After uploading a mp3 file, which went to this path:
    …/wp-content/uploads/2009/11
    The playlist does not show anything, nor can I ‘add’ even though the file said it was successfully uploaded.
    Also tried putting the mp3 under …/wp-content/uploads/
    still no results.
    What am I doing wrong?
    Thank you for your help.
    -Joni
    Report this comment

    • Todd Stowell says:

      @joni – does the file show in your media library? I know that if you add the mp3 directly to /wp-content/uploads/ it won’t show within WordPress because it needs a database record associated to display in the admin. It sounds like you may have a limit set on the server for the maximum file size when uploading.
      Report this comment

  26. Scott says:

    I actually had already found the boutell player and am currently using it. That saved me a lot of work. You are quick with the responses, which is awesome!

    I am curious about embedding the player into the sidebar of a wordpress theme. Can you give some more information on that process – I edited the code you provided, and added it to my PHP, but it did not work. To be honest, I’m a hack, when it comes to PHP – Any additional explanation would be helpful.
    Report this comment

  27. Darren says:

    is there a way to put the player on the right side of the screen instead of the left?
    Report this comment

  28. Hugh Pryor says:

    This looks like exactly what I need. However I’ve installed it in wordpress, activated it and when I click on “audio Playlist Manager under the Settings tab I get the error message “ACCESS ERROR: You do not have permission to access this page.”
    Can you help me out here?
    All the best,

    Hugh Pryor
    Report this comment

    • Todd Stowell says:

      @hugh – We just pushed up version 1.0.3 which will fix the issues you located. Please download the latest version and let us know if you still see the issue. Any user with either “editor” or “administrator” privileges now will have access to manage the plugin. Please review our changelog for additional items and thanks for the feedback!
      Report this comment

  29. scott says:

    I’m using WP 2.8.5, and wanted to use a different skin with your plug-in.
    This does not appear to work. So I replaced the SWF file with the core SXPF player SWF file, which gives the appearance I want, but does not respond to any of the plug-in options such as autoplay. With this skin, the player always autoplays, and this cannot be reset.

    ?? Is there an easier way to use the core player skin?

    S.
    Report this comment

    • Todd Stowell says:

      @scott – Unfortunately, it is up to the individual player implementation as to how to handle the autoplay and other options passed from the HTML page to the player SWF file. While we’ve tried to adhere to the Flash XSPF player URL options listed on this page http://musicplayer.sourceforge.net/, we cannot speak for the third-party developers who produced these players (and interestingly, we’ve noticed that even on the “official” Flash XSPF player site, there seems to be a difference in whether the “autoplay ” parameter is acknowledged among the three versions of the XSPF Flash player there).

      That said, we have had success testing multiple implementations of Tom Boutell’s Enhanced XSPF player (http://www.boutell.com/xspf/) with our plugin, and they appear to work correctly with all the standard published options. Hopefully that will help in your re-skinning process. Let us know if we can be of further help.
      Report this comment

    • Todd Stowell says:

      @scott – We did find one issue with different versions of XSPF players, specifically with the version of Flash they were exported as. We added a check in the plugin to try and add additional compatibility with older Flash versions of the player. Download 1.0.4 and check it out and let us know if it resolves any issues for you.
      Report this comment

  30. Jim says:

    I redesigned what I wanted to do in order to use the player in pages. It works very well. Thank you. For a new feature, how about scrolling lyrics.
    Report this comment

  31. Jim says:

    I was looking for an audio player for a site I’m building and thought yours would work just fine. It doesn’t for me as I am trying to put the function call in the page template with no success. I have tried your examples but they don’t work for me. Can you please help?
    Report this comment

Leave a Reply

Want to receive announcements about the latest plugin releases? Sign up for our email newsletter: