2005
09.09

The WordPress XSPF Player Plugin

[Spanish]

Warning: Comments are closed here. For support, please go to the forum.

I wanted my WordPress site to have some MP3 background music, but didn’t found any suitable plugin for it:

My webhosting server has little space, and cannot store tracks online. I just wanted a flash player or alike to be embedded into my pages which reads mp3 files via HTTP anywere on the internet. The XSPF web player does exactly that, and is licensed GPL.

I have developed this tiny plugin to allow WordPress pages to have background MP3 music embedding this player. You can see the player on the right sidebar. Just press play and music should start playing.

Features:

  • Works under Linux and Windows (and probably on every PC with a flash-compatible browser).
  • Plays local and remote MP3 music (HTTP)
  • Autostart playing and autorepeat if desired.
  • Song and Categories database managed from the Options menu
  • 3 player modes selectables.
  • Track order defined by user.
  • Inline (on the fly) parameter customization. New!

 
Hope you enjoy it.

Samples:

  • [xspf]_start(FALSE, ‘order=1-10&mode=2&width=180’)[/xspf]
    Slim mode. Just an horizontal bar. Clicking on the little arrow on the right jumps to the artists page (when available).
     
  • [xspf]_start(FALSE, ‘order=1-10&mode=3&width=180&height=100’)[/xspf]
    Wide List mode. A list-box with the tracks. Clicking on the photo jumps to the artists page (when available).

[Download] Current version of XSPF Player plugin

To do:
A nice online tutorial. Please, contribute to the Wiki.
 
Changelog:

  • Version 3.4
    * Bugfix: Possible security vulnerability. XSPF Player setup could be changed by a CSRF / XSS attack. Fixed.
  • Version 3.3
    + Feature: URL and category description can now have up to 255 chars long.
    + Feature: Version displayed in config menu, and other cosmetics.
    + Feature: Better directory protection.
    + Feature: Button to CLEAR all SQL xspf tables.
    * Bugfix: Category edition not shown when no tracks on database. Fixed.
  • Version 3.2
    * Bugfix: When no default player mode selected, the player may not work. Fixed.
    * Bugfix: The [XSPF] button does not work on WP 2.1. Fixed (Thanks, Renato Alves).
    * Bugfix: Cleanup database songs tables when installing for first time.
    + Feature: Now it’s possible (and preferred) to use [XSPF] … [ /XSPF] instead of <xspf>…</xspf> tags.
    Other: Everything is in one folder now (source code rearranged)
  • Version 3.1
    * Bugfix: Playlist sometimes does not works with PHP version < 5.x (MBCS). Fixed.
    * Bugfix: Slim mode sometimes showed an underlining color background. Fixed.
    * Bugfix: Sometimes the height and width were not set when choosing the mode on-the-fly (advanced users). Fixed.
    * Bugfix: When calling the player inside a post/page body, the output was not XHTML compliant. Fixed (MUST use _start() function now).
    + Feature: Under some free web-hosts, the playlist did not work because header insertions. This have been solved.
  • Version 3.0 “D.A.R.Y.L.” Major Release
    + Feature: Can insert the player within the post body
    + Feature: Added mode 0 (player can choose player URL)
    + Feature: Added mode 4 (button with overlay menu)
    + Feature: Parameters changeable on the fly (see Wiki)
    Other: Some glitches and code rearrangement.
  • Version 2.1
    * Bugfix: Total page number not correctly displayed in the tracks management panel.
    + Feature: Improved track management.
    + Feature: Plugin background color selectable via color picker.
    + Feature: Improved player mode selection.
  • Version 2.0 “The Grinch” Major Release
    * Bug Fix: No more than 10 Tracks displayed on the Tracks management panel. FIXED.
    * Bug Fix: Sometimes didn’t delete tracks from database if WP was localized to other languages. FIXED.
    * Bug Fix: Some glitches with de CSS fixed.
    + Feature: Song order now available per category!
    + Feature: The 3 Player bundled, and selectable with one click (3 player modes)!
    Change: Categories now moved to the management page.
    + Feature: Tracks now are paginated for better management.
    + Feature: Shuffle and Autoplay options available for each category.
  • Version 1.6
    + Feature: Autoload playlist
    + Feature: Preview in Options panel!
    * Bugfix: Playlist may give errors with some plugins. Fixed.
    * Bugfix: Entering a blank URL trak made the management panel to dissapear until page reloaded. FIXED.
    * Bugfix: Characters ‘ and ” escaped. Fixed.
  • Version 1.5
    * Bugfix: Compatible with PHP 5.0.x
    Note: This plugin was already compatible with PHP 5.1.x
  • Version 1.4
    * XHTML compliant code
  • Version 1.3
    * Bugfix: The playlist did not load if category specified. FIXED.
    + Feature: If no title is specified for a song, the URL track is used as default in the management section.
    + Feature: Shuffle tracks for each category.
  • Version 1.2
    * Bugfix: The playlist did not load on Internet Explorer. FIXED.
  • Version 1.1
    * Bugfix: The XML playlist was not correctly generated and the plugin might not work. FIXED.
    Known Bugs:
    * Seems not to load the playlist with Internet Explorer. Working on it…
  • Version 1.0
    Initial version.

 
List of sites using this plugin (Random order) all over the world:
[Lavondys] [KHertz] [Darran] [SilentEve] [Chester] [Le Blog de FredoMikado] [Wang Inc. Blog] [Ende Blog] [Podcast Blog] [La-Bella.Net] [Loonyworld] [Xarcell] [The Palomar] [Centralvet] [Spreeblick] [Xyth’s Phrontistery] [Bandsalat-zum-Fruehstueck] [Wuzz Bloggin’?] [AAwakenings] [How about that … Melody?] [Aeternus Tenebrae] [En el tren] [marcus’ tagebuch] [Easy Does It University] [பெட�?டிக�?கடை] [Go 2 Malawi] [El Desviado] [What it is] [.: ray = out :.] [American Liar]

Share
  1. […] Xspf_player Um den Xspf_player bequem in WordPressbeiträgen hinzufügen zu können. Eine feine Sache, auch wenn die Readme-Datei etwas dürftig ist. Ein Blick in den Wiki lohnt sich und hilft sehr! Webseite: http://www.boriel.com/plugins/the-wordpress-xspf-player-plugin/ […]

    Like or Dislike: Thumb up 0 Thumb down 0

  2. […] 此插件地址为:The WordPress XSPF Player Plugin。 […]

    Like or Dislike: Thumb up 0 Thumb down 0

  3. […] Oct 19 初步测试 By adminAdd comments☆ 闲言 ★      修改了Sodelicious样式做为本站themes,增加了NextGEN Gallery相册插件,增加了Xspf_player音乐插件,感觉还是满好的。遗憾就是Xspf_player音乐插件不能支持中文,所以其中添加的中文歌曲名字和作者都是用拼音来代替。 […]

    Like or Dislike: Thumb up 0 Thumb down 0

  4. […] Del.icio.us MP3 Player Audio Player XSFP Player  Audio/Misceláneas Evoca Browser Mic […]

    Like or Dislike: Thumb up 0 Thumb down 0

  5. […] XSFP Player – Flash播放器 […]

    Like or Dislike: Thumb up 0 Thumb down 0

  6. […] 应Carrie要求写个我的侧边栏音乐播放器的使用简要说明。此插件地址为:The WordPress XSPF Player Plugin。 […]

    Like or Dislike: Thumb up 0 Thumb down 0

  7. […] Embedded Video With Link: Sitede yaptığımız video incelemeleri sayfa içerilerine koymak için vya YouTube videolarını yazılara entegre etmek için kullanılabilecek eklenti. Daha bir çok video servisini de kullanabiliyorsunuz. WordTube bir diğer favorim. Podcasting için ise Audio Player eklentisini kullanıyorum. Bir diğer alternatif ise XSPF medya oynatıcısı. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  8. […] XSFP Player – Flash player that allows you to embed music on your blog via http. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  9. […] XSFP Player – Flash player that allows you to embed music on your blog via http. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  10. […] load the XSPF plugin here: http://www.boriel.com/?page_id=12, upload it to your wordpress plugins […]

    Like or Dislike: Thumb up 0 Thumb down 0

  11. […] Audio Player – позволяет добавить в посты простой MP3-плеер. XSFP Player – Flash-плеер в блог. DG PlayingNow Updater – показывает мелодии, […]

    Like or Dislike: Thumb up 0 Thumb down 0

  12. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  13. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  14. […] Another nice audio player is XSPF Player […]

    Like or Dislike: Thumb up 0 Thumb down 0

  15. […] XSFP Player (link) […]

    Like or Dislike: Thumb up 0 Thumb down 0

  16. […] XSFP Player (link) […]

    Like or Dislike: Thumb up 0 Thumb down 0

  17. […] Player – позволяет добавить в посты простой MP3-плеер. XSFP Player – Flash-плеер в […]

    Like or Dislike: Thumb up 0 Thumb down 0

  18. […] Strona wtyczki do WP: XSPF Player WP Plug-in […]

    Like or Dislike: Thumb up 0 Thumb down 0

  19. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  20. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  21. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  22. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  23. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  24. […] 45) Xspf_player (TR) Link […]

    Like or Dislike: Thumb up 0 Thumb down 0

  25. […] some research on how to get an audio player to run, so I went looking for one to use. I found the XSPF Player for WordPress, and it is absolutely excellent. It is easy to use and allows you to play one or many different mp3 […]

    Like or Dislike: Thumb up 0 Thumb down 0

  26. […] XSFP Player – Flash player that allows you to embed music on your blog via http. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  27. […] hack of the XSPF Player Plugin provides an easy way to play mp3 files (local or remote) and on-line radios using XSPF Web Music […]

    Like or Dislike: Thumb up 0 Thumb down 0

  28. […] XSPF Player […]

    Like or Dislike: Thumb up 0 Thumb down 0

  29. […] XSFP Player – Se trata de un reproductor flash al que puedes meterle música vía http. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  30. […] XSFP Player  […]

    Like or Dislike: Thumb up 0 Thumb down 0

  31. […] – Del.icio.us MP3 Player – Audio Player – XSFP Player […]

    Like or Dislike: Thumb up 0 Thumb down 0

  32. […] XSFP Player […]

    Like or Dislike: Thumb up 0 Thumb down 0

  33. […] XSFP Player – Flash player that allows you to embed music on your blog via http. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  34. […] XSPF Player: Permite poner música MP3 en las páginas de WordPress integrando el reproductor flash XSPF Player. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  35. It makes nonsense to me, that people ask the same questions over and over again, and don’t read or search this page wich (by the way) is getting heavier and heavier.

    This is why I’ve closed comments here.
    For support questions, please, go to the forums at
    http://www.boriel.com/phpbb2/

    Like or Dislike: Thumb up 0 Thumb down 0

  36. Peter (#457, #513 , #514):

    I supposed someone already had answered you: It’s not an issue of the plugin, but of your template.

    If you don’t want this error to repeat again, you have to invoke the player within your template this way (php 5.x):
    [code lang=”php”]
    < ?php if method_exists('xspf_player', 'start') xspf_player::start(); ?>
    [/code]

    Like or Dislike: Thumb up 0 Thumb down 0

  37. Still works with WP 2.2.1

    Any news about the issue in my comment # 457 ?

    Like or Dislike: Thumb up 0 Thumb down 0

  38. Still works with WP 2.2.1

    But the issue in my comment # 457 has not been addressed 🙁

    Like or Dislike: Thumb up 0 Thumb down 0

  39. […] 一直很想给我的WP加个音乐插件,几经挑选决定使用XSPF Player,歌曲及分类信息放在数据库里,前台显示有4种模式,而且在后台还可以设置播放器宽度和高度,嗯,不错。 […]

    Like or Dislike: Thumb up 0 Thumb down 0

  40. […] da so ‘ne fluxe Idee und hab auch gleich ein Plugin dafür gefunden. Schimpft sich XSPF Player, und wird hiermit angetestet. Auf der Page scheint es einwandfrei zu funktionieren, jetzt bin ich […]

    Like or Dislike: Thumb up 0 Thumb down 0

  41. Elena (#509): It’s not autoresume=’1′, but ‘autoresume=1’ (notice the quotes).

    On the other hand, I’m going to close comments on this page. People is asking the same questions over and over again.

    The forum is more suitable for this matters. 🙂

    Like or Dislike: Thumb up 0 Thumb down 0

  42. ==>@SDark

    Thank you very much for answering me! 😉
    Ok, I understand this patch is a Beta, but I didn’t know if I wrote right the code?

    I invoke the player in my wordpress-template sidebar.php with:
    <?php xspf_player::start(FALSE, autoresume='1'); ?>

    PHP isn’t my power-suite so, I don’t know if maybe the diffrence semicolon is important for the code?

    Have a nice evening! 😉
    So long

    Elena

    Like or Dislike: Thumb up 0 Thumb down 0

  43. Elena the enhanced plugin version is still a beta.
    You have to download the enhanced player from the original website. The link is on my previous post.

    You also have to use the modified version of the plugin that can be downloaded here: http://www.boriel.com/files/xspf_player_autoresume.zip
    Replace the files on the plugin folder with this one.

    However there are some known problems with this patch, if you come across one wait for the next release.

    If you only use the FALSE, autoresume=’1′ options then you should be fine.

    Like or Dislike: Thumb up 0 Thumb down 0

  44. Mea maxima culpa for the double post, the code wasn’t wrote 😉

    I have a Problem with the Enahnced Edition, if I use this code in sidebar.php:
    <?php xspf_player::start(); ?>
    This works, but this code:
    <?php xspf_player::start(FALSE, autoresume='1'); ?>
    dosn’t work. Why?

    Any help please, thank you in advance for your answer!

    Namaste

    Elena

    Like or Dislike: Thumb up 0 Thumb down 0

  45. Mea maxima culpa for the double post, the code wasn’t wrote 😉

    I have a Problem with the Enahnced Edition, if I use this code in sidebar.php:

    This works, but this code:

    dosn't work. Why?

    Any help please, thank you in advance for your answer!

    Namaste

    Elena

    Like or Dislike: Thumb up 0 Thumb down 0

  46. Hallo, thank you very much for your effort and time to realize this PlugIn! 😉

    Second, I have a Problem with the Enahnced Edition, if I use this code in sidebar.php:

    This works, but this code:

    dosn’t work. Why?

    Any help please, thank you in advance for your answer!

    Namaste

    Elena

    Like or Dislike: Thumb up 0 Thumb down 0

  47. Thanks for good article!

    Like or Dislike: Thumb up 0 Thumb down 0

  48. phew! maybe I was not clear enough. When I mentioned the last version I was talking about the plugin. And when I said enhanced flash player, I was referring to this: http://www.boutell.com/xspf/

    Download the latest plugin and replace the files on the plugin folder with the flash player that is on the website I mentioned.

    See if the player changes and if the menu still shows up when you right click it. I’m pretty sure you are still using the original “not-enhanced” version. With the enhanced version I see no download button. You can check my website and tell me if you can “right-click download” the song I have there.

    Like or Dislike: Thumb up 0 Thumb down 0

  49. Hi SDark!

    I am using the latest plugin and the slim version of the flash player but when I right-click it, a scrolldown menu appears that clear spelled DOWNLOAD. So I checked on it and it leads to a Quicktime window with an option ‘PRO:save as source’.

    What does this mean? Sorry guys, I’m a newbie here and I’m quite surprised I managed to embed the flash player successfully though!:mrgreen:

    Cheers!:)

    Like or Dislike: Thumb up 0 Thumb down 0

  50. phew! use the latest version of the plugin and the enhanced flash player that was also mentioned above. This version doesn’t allow you to download it, at least I have no option for that.

    I’m using the slim version.

    Also you should use the playlist with order method. I’m not sure but I’ve heard that some methods might display the full address of the song in the source code… If so you could just link directly and get the files anyway.

    Like or Dislike: Thumb up 0 Thumb down 0