PlayPress

WordPress (version 3.6+) now has a built-in audio player, which conveniently accepts the same shortcode syntax as PlayPress, and is rather quite good, so you should probably use that instead. Just disable PlayPress and WordPress’s functions will work everywhere PlayPress did.

PlayPress is a JavaScript-free, low-Flash audio player plugin for WordPress, fortified with HTML5. “Free as in beer, speech and fat.”

Get PlayPress from the WordPress plugin repository

Lightweight

Some WordPress audio plugins inject JavaScript into every page of your website, even pages that don’t have any audio on them. PlayPress doesn’t need any JavaScript to work.

HTML5

Other plugins rely on Adobe’s proprietary Flash technology. So does PlayPress, but with the important distinction that it can fall back or to or from standard HTML5 audio, so it works on the iPhone and iPad.

How to use

Just put this where you want the audio player to be:

[audio mp3="http://example.com/bells.mp3"]

For optimal results, you may specify an additional copy of your audio file in Ogg Vorbis format:

[audio mp3="http://example.com/bells.mp3" ogg="http://example.com/bells.ogg"]

(Obviously, you must replace http://example.com/bells.mp3 with the URL of whatever audio you want to embed.)

New in version 1.2! Optionally, specify a title and/or artist:

[audio mp3="http://example.com/bells.mp3" title="Imagine" artist="John Lennon"]

Output

Here’s an example using a single MP3 file:

  1. If you have Flash installed, you’ll see a Flash audio player.
  2. If not, you’ll see an HTML5 audio player – but it won’t work in Firefox or Opera.
  3. If not, you’ll see a link to download the audio file.

Here, I’ve included both Ogg Vorbis and MP3 files:

  1. If your browser supports HTML5 audio, you’ll see its native audio player.
  2. If not, but Adobe Flash Player is installed, you’ll see a Flash audio player.
  3. If not, you’ll see a link to download the audio file.

RSS feed subscribers will get a link to download the audio file, and WordPress’s inbuilt mechanisms should take the necessary steps to add “enclosures” to the feed in the manner of a podcast.

Get PlayPress from the WordPress plugin repository

Troubleshooting

Credits

Thanks to Martin Laine for creating WordPress Audio Player, which is the player.swf used in this plugin.

Sean Ooi’s Audio For Everybody, itself inspired by Kroc Camen’s Video for Everybody, was an inspiration. His suggested markup includes references to Windows Media Player and QuickTime – I’ve chosen to avoid that can of worms for now.