Habari Plugin: HB Audio Player
HB Audio Player is a highly configurable but simple Flash based MP3 player for all your audio needs. You can customise the player's colour scheme to match your blog theme, have it automatically show track information from the encoded ID3 tags and more.
![]()
This is a port of the great WP Audio Player plugin by Martin Laine.
Demo
Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.
(Track: Code Monkey - Jonathan Coulton License: CC by-nc)
Download
There are two different downloads, depending on the version of Habari you are using. The functionality is identical however the inner workings of the Habari plugin infrastructure is not. Please ensure you download the correct version:
For Habari 0.6.x:
HB Audio Player
1.1-0.6.x.zip HB Audio Player
1.1-0.6.x.tar.bz2
For Habari SVN r3624 or later:
HB Audio Player
1.1-svn.zip HB Audio Player
1.1-svn.tar.bz2
Installation
- Download either the zip or tar.bz2 to your server
- Extract the contents to a temporary location (not strictly necessary, but just being safe)
- Move the
hb-audio-playerdirectory to/path/to/your/habari/user/plugins/ - Refresh your plugins page, activate the plugin and configure it to suit your needs
If you're curious, here's a screenshot of the configuration page (click for larger image), oh and the colours in the configuration page demo player change as you change the various components to suit your needs...
That's it. You're ready to start using the audio player on your site.
Upgrade
The upgrade procedure is as per the installation procedure, but please ensure you de-activate the plugin first. This will ensure your current settings are merged with any new options that may be added with later releases.
Basic Usage
The default mechanism for inserting a player in a post is to use the [audio] syntax:
[audio:http://www.yourdomain.com/path/to/your_mp3_file.mp3]
This will insert a player and load your_mp3_file.mp3 into it.
Multiple file can be specified by separating their paths/names with commas.
You can configure HB Audio Player with a default audio files location so you don't have to specify the full URL everytime. You can set this location via the Configuration panel. Once set, you can use this syntax:
[audio:your_mp3_file.mp3]
HB Audio Player will automatically look for the file in your default audio files location. This can be very handy if you decide to move all your audio files to a different location in the future.
Advanced Usage
By default, HB Audio Player gets the track information from the ID3 tags of the MP3 file, however under some circumstances it won't be able to, for example if the file is on another domain. This is a restriction of the Flash player, but it can be over-ridden.
You can however pass the artist and title information when inserting the player using the following syntax:
[audio:your_mp3_file.mp3|titles=The title|artists=The artist]
For multiple files:
[audio:mp3_file_1.mp3,mp3_file_2.mp3|titles=Title 1,Title 2|artists=Artist 1,Artist 2]
FAQ
- Does Audio Player support file formats other than mp3?
- No. This is a limitation of the Adobe Flash Player
- Can Audio Player read mp3 streams or playlists?
- No. The player is not designed for streaming audio or playlists.
Revision History
- 1.1
- Resolved misbehaviour caused by incorrect assumption about location of theme stylesheet
- 1.0
- Initial release.
That's it folks. If you encounter any problems, please ensure you are using the latest version for your release of Habari and then feel free to leave a comment on the post that relates to the release.
- HB Audio Player 1.1
- HB Audio Player 1.0 Now Available (Comments Closed)
