Last updated 4 September 2013. Created on 18 June 2012.
Edited by myglobaldata_gil, tamerzg. Log in to edit this page.

Go back to AudioField


In order to activate this module you have to get one of audio players from the following links
1. *Note make sure you should download the standalone edition
( no longer offers the music players)
6. Install FlowPlayer module ( to use Flowplayer (optional)
7. VERSION 2.0, not 2.1 (7.x-1.x only)
8. Soundmanager2
9. Use Google reader player, no installation required. NEW

Where to extract the players?

Once you have installed any of the above audio players you must create a new folder called "player "at this
directory "sites/all/libraries". Now you can unzip the audio players directly into the "player" folder.
If you wish to save players in a different folder you can change it from admin/settings/audiofield and enter the new path under "Audio Players Directory".

If using the default settings, resulting folder structure should resemble the following (you may need to rename the folders and files to match):

> The standalone WordPress player should be at:

> The slim player should be at:

> The Premium Beat single track player should be at:

> The Premium Beat single track thin player should be at:

> The Premium Beat single track mini player should be at:

>The jPlayer should be at:

>Soundmanager2 should be at:

Select default player

Go to admin/settings/audiofield and you will see list of available players. Player you select will be used as default player for all audio files.

Add audio upload to the content type

First you must add audiofield to the preferred content type. Adding a field is done as adding any other CCK field, select field type of "File" and widget of "Audio Upload".

How to upload and play audio file?

After adding audiofield to content type you can upload audio files when creating new nodes. Uploaded audio files will be rendered in default player you selected in admin form.


Originally this module supports only mp3 audio files. But other modules can extend this support by implementing hook_audiofield_players() in their modules.

For example to implement support for new example player you would do:

/* Example of creating additional players through hook_audiofield_players() */
function example_module_audiofield_players(){
		'path' => drupal_get_path('module','example_module').'/players/player.swf', //relative path to the player
		'name' => 'Example player',
		'download_link' => '',
		'filetypes' => array('mp3','wav','wma'),   //List of audio files your player can play
		'callback' =>'example_module_example_player',
	return $players;

function example_module_example_player($player_path,$audio_file){
return '<object><param name="autoplay" value="true" />
            <param name="controller"value="true" /> 
            <embed src="' . $player_path . '"  width="65" height="21" float="left" wmode="transparent" flashvars="mediaPath=' . $audio_file .'&defaultVolume=100" autostart="true" loop="false"  controller="true" bgcolor="#FF9900" pluginspage="" >

Looking for support? Visit the forums, or join #drupal-support in IRC.