ColdFusion, WordPress, Flash & other web things


Audio Player Wordpress plugin

File name:
audio-player.zip
Version:
1.2.3
Last updated:
4 September 2006
Requirements:
Wordpress 1.5 - 2.3

If you wish to make a donation to the author of the Audio Player plugin (that’s me), use the Paypal button.

If you want to use this player on a non-WordPress site, Mindy McAdams has written a very detailed tutorial here.

Important note: This plugin only works in posts and pages. It does NOT work in headers, sidebars or footers and I do not provide support for placing it there.

Other important note: This plugin only plays MP3 files. This is a limitation of the Adobe Flash Player.

Contents Usage

Once installed, this plugin allows you to insert mp3 audio files into your posts and pages. Use the following syntax:

[audio:name_of_mp3_file.mp3]

This code will insert a flash player and will load the file named name_of_mp3_file.mp3 located in your audio files folder. You can store your audio files anywhere in the web root as long as you update the path in the plugin’s options panel. The default is /audio.

You can also use absolute paths to link to files on other servers:

[audio:http://www.somedomain.com/path/to/name_of_mp3_file.mp3]

Audio Player can also play a sequence of audio clips. Use commas to separate the files:

[audio:name_of_mp3_file1.mp3,name_of_mp3_file2.mp3,name_of_mp3_file3.mp3#093;

You can also pre-append and post-append a clip to all your players. Explained in the Podcasting section.

Contents Examples

Default colour scheme

Custom colour scheme

Contents Podcasting

If you are using the player for a podcasting blog, Audio Player has special options just for you.

Enclosures

If you are unsure what an enclosure is, read the definition on Wikipedia. You have 3 options:

  • If you set your enclosures manually, Audio Player can insert a player automatically at the end of your posts. Select the Enclosure integration option in the Audio Player options panel.
  • If you let WordPress set enclosures automatically (by reading mp3 links in your posts), you can still use the Enclosure integration option.
  • You can also use the [audio] syntax but you must use absolute URLs:

    e.g. http://www.somedomain.com/path/to/name_of_mp3_file.mp3

    WordPress will automatically detect the file and set the relevant enclosure option for you.

Pre/Post appended clips

You may wish to pre-append or post-append audio clips into your players. To do this, enter the full urls in the relevant section of the options panel. The pre-appended audio will be played before the main audio, and the post-appended will come after. A typical podcasting use-case for this feature is adding a sponsorship message or simple instructions that help casual listeners become subscribers. This will apply to all audio players on your site. Your chosen audio clips should be substantially shorter than your main feature.

Contents RSS Feeds

You have a choice over what to show in your RSS feed:

  • A download link: Choose this if you are OK with subscribers downloading the file.
  • Nothing: Choose this if you feel that your feed shouldn’t contain any reference to the audio file.
  • Custom: Choose this to use your own alternative content for all player instances. You can use this option to tell subscribers that they can listen to the audio file if they read the post on your blog. You can set the content in the options panel.

Go to the options panel to set these options.

Contents The “chipmunk” effect

The Macromedia Flash player has a problem playing files that are encoded at a rate that is not a multiple of 11.025 kHz. This effect is sometimes called the “chipmunk” effect: the file is played at double speed. To avoid this, encode MP3s at 11.025 kHz 22.050 kHz or 44.100 kHz.

Contents Colour scheme

The entire player colour scheme is customisable. Use the Audio Player options panel in your WP admin to set the colour scheme of your player. You can also change the colours per player instance by using runtime options. Here are the colours that you can set:

Player colour options

Contents Runtime options

Use these if you want to use a different colour scheme for a particular player instance. You can also make the player open automatically or loop the loaded clip. You can pass a number of options to a player instance. To do this use the following syntax:

[audio:name_of_mp3_file.mp3|option1=value|option2=value]
Option Effect
autostart=yes The player will automatically open and start to play the track (default value is no)
loop=yes The track will be looped indefinitely (default value is no)
bg=0xHHHHHH Background colour option (where HHHHHH is a valid hexadecimal colour value such as FFFFFF or 009933)
leftbg=0xHHHHHH Left background colour
rightbg=0xHHHHHH Right background colour
rightbghover=0xHHHHHH Right background colour (hover)
lefticon=0xHHHHHH Left icon colour
righticon=0xHHHHHH Right icon colour
righticonhover=0xHHHHHH Right icon colour (hover)
text=0xHHHHHH Text colour
slider=0xHHHHHH Slider colour
loader=0xHHHHHH Loader bar colour
track=0xHHHHHH Progress track colour
border=0xHHHHHH Progress track border colour

Example:

[audio:name_of_mp3_file.mp3|autostart=yes|bgcolor=0x000000]

This will set the main background colour of the player to black and automatically start the player when the page loads.

Contents Installation

  1. Extract and upload the files to your plugins folder
    You should end up with this folder structure:
    Folder structure
  2. Create a folder in your blog root (where your wordpress install lives) where you will store all your mp3 files
    I recommend an audio folder in the root of your blog so it doesn’t interfere with your WP install. If you wish to use another folder, remember to change the audio files directory option on your options panel.
  3. Activate the plugin in your WP admin
  4. Go to Options > Audio Player in the WP admin
    Here, you can choose how you want to use Audio Player and also set the colours to match your site’s design.

Contents Upgrading from 0.x to 1.x

Once installed, the old player is overwritten with the new one and all colour options should be transfered to the new scheme. Some adjusting to the slider and loader bar colours might be necessary.

Contents Upgrade wizard

Upgrade wizard screenshotAudio Player comes with an upgrade wizard. On the options panel, you can find out if a new update is available by clicking the Check for updates button. If an update is available, you will be prompted to open the upgrade wizard. Simply click Upgrade and the wizard will download the latest version and install it for you. Note: The upgrade wizard relies on some PHP functionality that is not available on all server configurations. You host may have disabled these features, in which case the upgrade wizard will be disabled.

Contents Change log

1.2.3 (4 September 2006)

  • Added a page background option. Transparent is no longer the only option. Transparent backgrounds can create problems for Firefox and some WordPress themes.

1.2.2 (14 February 2006)

  • “replace all mp3 links” now works with uppercase href attribute in <a> tags

1.2.1 (12 February 2006)

  • Fixed bug with “replace all mp3 links” option (now supports extra attributes in <a> tags)

1.2 (07 February 2006)

  • Added configurable behaviour options: [audio] syntax, enclosure integration and mp3 link replace
  • Added configurable RSS alternate content option: insert download link, nothing or custom content
  • Amended player to allow for clip sequence playback
  • Implemented post/pre append clip feature
  • Check for updates and automatic upgrade feature
  • Player now closes automatically if you open another one on the same page
  • Minor improvements to slider bar appearance
  • Fixed a problem with colour options in Flash 6
  • Added player preview to colour scheme configurator
  • Improved plugn php code syntax

1.0.1 (31 December 2005)

  • All text fields now use device fonts (much crisper text rendering, support for many more characters and even smaller player file size)
  • General clean up and commenting of source code

1.0 (26 December 2005)

  • Player now based on the emff player
  • New slimmer design (suggested by Don Bledsoe)
  • More colour options
  • New slider function to move around the track
  • Simple scrolling ID3 tag support for title and artist (thanks to Ari)
  • Time display now includes hours for very long tracks
  • Support for autostart and loop (suggested by gotjosh)
  • Support for custom colours per player instance
  • Fixed an issue with rss feeds. Post content in rss feeds now only shows a link to the file rather than the player (thanks to Blair Kitchen)
  • Better handling of buffering and file not found errors

0.7.1 beta (29 October 2005)

  • MP3 files are no longer pre-loaded (saves on bandwidth if you have multiple players on one page). Thanks go to Craig Leikis for warning me about this one

0.7 beta (24 October 2005)

  • Added colour customisation options.

0.6 beta (23 October 2005)

  • Fixed bug in flash player: progress bar was not updating properly.

0.5 beta (19 October 2005)

  • Moved player.swf to plugins folder
  • Default location of audio files is now top-level /audio folder
  • Better handling of paths and URIs
  • Added support for linking to external files

0.2 beta (19 October 2005)

  • Bug fix: the paths to the flash player and the mp3 files didn’t respect the web path option. This caused problems for blogs that don’t live in the root of the domain (eg www.mydomain.com/blog/)

Contents Download


Download audio-player.zip

2774 comments

Pages: « 278277 276 275 274 273 [272] 271 270 269 268 2671 » Show All

  1. #2720: modi Says:

    i’ve been trying for 4 hours to get this damn thing working! someone hit me @ modi10 at gmail dot com to get it working?! it’s so confusing. it just doesn’t show.

  2. #2719: j2punky Says:

    Hi,

    This is great thanks but do you know why it doesn’t work in Firefox?

    Cheers!

  3. #2718: Alexey Businessman Says:

    Oh, there a problem with some text in my previous message. I mean:
    “<” = _
    So:
    “_object …__param name=”movie” value=”…”__/param__embed src=”…” type=”application/x-shockwave-flash” wmode=”transparent”__/embed__/object_’.

  4. #2717: Alexey Businessman Says:

    >>A download link: Choose this if you are OK with subscribers downloading the file.

    I want to make my file free to downloads. But I also want to make the same link on this file as it can be seen on Youtube. I mean link like ”. Can it be usefull and realised in Your plugin?

  5. #2716: Ossetin Says:

    i am trying to put the audio player on the left site bar..
    i don’t know how to set it up.

  6. #2715: Stella Says:

    Hi Martin,

    I want to share with you my Ebook named “Add Music And Videos To Your Blog”. There are 4 Tutorials in it!

    One tutorial explains in detail with images how to install your player (especially for Bloggers, Blogger.com users and everyone who need a hosting service for their files).

    Grab your free copy from my blog at http://fragrancediva.blogspot.com (on the right sidebar).

    Thanks and Nice looking player, Martin. It works great on my blog! ;)

    Cheers,

    Stella S. D.

  7. #2714: Jonah Says:

    I had used this player for a while, but have since switched only to save a little time coding. Just wanted to say to those of you having the “BUFFERING” problem, it is not caused by the player, but by flash.

    If you are attempting to load more than 2 audio files at once, you will get a buffering state on the third one. I thought it was this player, but the issue is the loadMovie function in flash. You can only buffer two files on one page at one time. Once it finishes loading, you can then play the third file.

    This doesn’t effect people that are using relatively small .mp3’s. If it is only 1-2 mbs, it will buffer in a few seconds, so you don’t have to worry. I was working with files upwards of 30-45 mbs, so it becamse a problem. No, I didn’t find a workaround, other than making it clear on the webpage what the cause of the problem was.

    Just thought I would let you know.

  8. #2713: dalef Says:

    @Gary

    thanks for the screenshot but that page is the one that does work for me and the one i have linked to for the public to use. i think that one has 15 players.

    the one where i get stuck on the buffer message has 18 players and is at:
    http://www.slso.org/concert/index_new2.htm

    in any case you don’t need to send a screenshot as you already checked that one for me in a previous post and i know it worked fine for you.

    i’m going to try a test page with 18 players using dewplayer with swfobject and see if that works or not.

    thanks for all the help…dale

  9. #2712: Gary Says:

    @Dalef

    Here’s how I see your page in the latest FF.

    http://i25.tinypic.com/mmtwgg.jpg

    It is not stuck in buffer, loads fine, shows the tag and the time. I’m running XP and VER 2.0.0.14. I think I read somewhere you are on a Mac so perhaps the mac FF has been tweaked differently.http://i25.tinypic.com/mmtwgg.jpg

    Cheers,

    Gary

  10. #2711: dalef Says:

    gary thanks for trying to help, it’s appreciated. a coworker of mine experienced the same “stuck in buffer” problem i’ve been seeing, so at least i know it’s not just me.

    i also see the same problem when i visit kevin’s music page - the player loads the file but stays stuck in buffer and never plays.

Pages: « 278277 276 275 274 273 [272] 271 270 269 268 2671 » Show All

Leave a comment