=== µAudio Player === Contributors: jwriteclub Donate link: http://compu.terlicio.us/ Tags: mp3, flash player, jQuery, audio Requires at least: 2.5 Tested up to: 2.5 Stable tag: 0.1 µAudio is a slim and basic plugin. It does one thing: capture mp3 links and insert a small flash player on click. == Description == µAudio is a slim, fast plugin to create a flash mp3 player when mp3 links are clicked. In order to reduce clutter and file transfer, the links are unmodified until they are clicked, at which point a div with the player is faded in after the link. A second click on the link fades the player back out. In order to help keep file loads down, the basic javascript is extremely small*. In addition, every effort has been made to use the smallest player possible and generally keep the plugin as small and light as possible. *µAudio does rely upon jQuery, however, as WP 2.5 loads jQuery anyway, µAudio does not add a significant extra burden. == Installation == The most basic installation is a simple two step: 1. Upload the `microAudio` folder to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress In the event that you are using a recent version of the K2 theme (1.0 RC 2 or later), and the rolling archives feature, you will need to call the `prepare_player()` function from **k2.rollingarchives.js.php**. It should be placed in the `K2.ajaxGet` directly after `k2trimmer.trimAgain();`. The final code will look like this: ` . . . K2.ajaxGet(k2Rolling.url, k2Rolling.query, function(data) { jQuery('#rollhover').fadeOut('slow'); jQuery('#rollload').fadeOut('fast'); jQuery('#rollingcontent').html(data); k2Trimmer.trimAgain(); prepare_player(); } . . .` Alternatively, you can just use the **k2.rollingarchives.js.php** file which I have edited and included in the microAudio folder. == Frequently Asked Questions == = Do I need to do anything special in my posts? = No, µAudio automatically converts any link to an mp3 file so that it can automatically create a player. = Why doesn't it immediately load the player? = It waits for the user to click on the link for several reasons: 1. It saves bandwidth not to load a bunch of (potentially needless) flash players. 1. If the link is in the middle of a paragraph, it might look odd for the player to be sitting in the text. 1. It just makes sense that the player appears when the user indicates a desire to listen by clicking on the link == Screenshots == Nothing here now. == Notes == * µAudio uses the super slim mp3 player from [1 Pixel Out] (http://www.1pixelout.net/code/audio-player-wordpress-plugin/ "Crazy Cool"). This nifty little player clocks in at just 5 KB, smaller than many JavaScripts. Indeed, the total change to your pages (when no player is loaded) is a mere 560 Bytes. Even with a player loaded the entire system is under 6 KB. If bandwidth is expensive (and let's be honest, when isn't it?) µAudio is about the smallest you can get and still run. * Currently uses the same jQuery as K2 (in legacy versions of WordPress) (although it omits it if K2 is present). While this somewhat ameliorates the advantages of the small plugin, it is still quite small even with jQuery. Future versions will use a smaller (packed) jQuery if one is not already loaded. In the event that your theme manually loads jQuery and *is not* K2, then you can prevent jQuery from loading by removing the following lines from `microAudio.php`: `if (get_option('template') != "k2") {` `echo '\n';` `}` == Known Issues == * With k2: With recent versions of k2, the prepare_player function in dynamic-audio.js.php must be called from k2.rollingarchives at the end of the ajax get after 'trimAgain', or just use the included file. This will be updated in a future version of dynamic audio. * Please post any questions or bugs on the [Version Installation Page] (http://compu.terlicio.us/code/plugins/audio/micro-audio-installation/). Feature requests and comments of a more general nature should go on the [µAudio Home Page] (http://compu.terlicio.us/code/plugins/audio/). * In version 0.1, the "auto color" feature is not working, and the excess code has been removed. As of 0.2 the player should automatically color itself based upon the current WordPress CSS.