WordPress Audio Player

Frequently asked questions


Warning: array_splice() expects parameter 1 to be array, string given in /home/doryphores/webapps/wpap/wp-content/plugins/audio-player/audio-player.php on line 503

Warning: array_splice() expects parameter 1 to be array, string given in /home/doryphores/webapps/wpap/wp-content/plugins/audio-player/audio-player.php on line 503

How do I loop/repeat a song?

Add the loop option to the

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.

tag:

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.

How do I make the player start automatically?

Add the autostart option to the

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.

tag:

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.

How do I load multiple tracks into the player?

Use a comma delimited list of urls:

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.

You can also add titles for these tracks:

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.

Note: Titles and artist names are currently comma-delimited. I knowthis isn’t perfect as a title may contain a comma. I will try ti fix this in the future.

How do I center the player on the page?

In version 2.0 you can no longer center the player on the page using the usual “align center” button in the WordPress editor. But there is now a better way of applying consistent styling to the players.

Each player is placed inside a P tag with class audioplayer_container. So you can add this to your theme’s CSS (usually in style.css):

p.audioplayer_container {
  text-align: center;
}

How do I place a player in the sidebar, header or footer?

To insert a player anywhere else than in a page or post, use this “tag”:

<?php if (function_exists("insert_audio_player")) {
  insert_audio_player("

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.

"); } ?>

You can use all other options available. For example, if you want to change the width of the player:

<?php if (function_exists("insert_audio_player")) {
  insert_audio_player("

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.

"); } ?>

How do I prevent mp3 files from appearing as downloads in my feed?

If you link to a mp3 file in a post, WordPress automatically adds an ecnlosure tag to your feed. This means that subscribers will be able to download it. This is how podcast feeds work.

If you don’t want this to happen, you can remove all enclosures from your feeds by ticking the “Remove all enclosures from feeds” box in the Advanced tab of the Audio Player options.

Important: this option will remove ALL enclosures from your feeds. Do NOT use this option if you use your blog for podcasting.

How do I get the track information to show in the player?

By default, the player gets the track information from the ID3 tags of the mp3 file. These tags are usually set by the software you used to create the file. If they are set correctly, you should see the artist and title in the player.

However, Adobe recently changed their Flash Player to restrict access to ID3 tags if the file is located on a different domain than the player itself. In this case, the player cannot access the tags. Make sure your files are located on the same server and exactly the same domain. The player won’t be able to read the ID3 tags even if the file is located on a subdomain (e.g. your blog url is yourdomain.com and your files are on www.yourdomain.com). There is a way to allow Flash to read ID3 tags from files hosted remotely (see below).

You can also specify the track information via options like this:

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.

For multiple files:

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.

How do I set up Audio Player to check for policy files?

A policy file is a simple XML file that you place in the root of the server where you host your mp3 files. Here’s the syntax:

<?xml version="1.0" encoding="ISO-8859-1"?>
<cross-domain-policy>
	<allow-access-from domain="www.yourdomain.com"/>
</cross-domain-policy>

Replace yourdomain.com with the domain on which the player is hosted. You can also use wildcards to allow access from any subdomain (*.yourdomain.com).

More more information, read Adobe’s full cross-domain policy file specification.

Upload this file to your server and name it crossdomain.xml.

Now, all you need to do is go to the Audio Player settings page, go to Advanced Options and tick the Check for policy file option.

If you are using the standalone version, set the checkpolicy FlashVar to “yes”.

DTBSolutions