AUDIOFIELD.MODULE -------------------------------------------------------------------------------- This module allows embedding an audio file in a CCK field This module is for adding new field that allows embedding an mp3 audio. In order to activate this module you have to get one of audio players from the following links 1. http://wpaudioplayer.com/download *Note make sure you should download the standalone edition 2. http://sourceforge.net/projects/musicplayer/files/musicplayer/slim-player-0.2.3b/xspf_player_slim-correct-0.2.3.zip/download 3. http://www.premiumbeat.com/flash_music_players/original/single/ (DEPRECATED) 4. http://www.premiumbeat.com/flash_music_players/original/thin/ (DEPRECATED) 5. http://www.premiumbeat.com/flash_music_players/original/mini/ (DEPRECATED) 6. Soundmanager2 http://www.schillmania.com/projects/soundmanager2/doc/download/ Or install FlowPlayer module (http://drupal.org/project/flowplayer) to use Flowplayer. Or use Google Reader player (already installed with the module). Once you got the above audio players you have to create a new folder called "player "at this directory "sites/all/libraries". Now you can unzip the audio players directly into the "player" folder. The 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: /sites/all/libraries/player/audio-player/player.swf > The slim player should be at: /sites/all/libraries/player/xspf_player_slim.swf > The Premium Beat single track player should be at: /sites/all/libraries/player/playerSinglePackage/playerSingle.swf > The Premium Beat single track thin player should be at: /sites/all/libraries/player/OriginalThinMusicPlayer.swf > The Premium Beat single track mini player should be at: /sites/all/libraries/player/LWMusicPlayer.swf > Soundmanager2 should be at: /sites/all/libraries/player/soundmanager2/script/soundmanager2.js This module gives you the ability to choose the audio player you would like to get on your web site from many audio players, from configuration page. Soundmanager2 and AJAX (advanced usage): To make Soundmanager2 work with AJAX (when the audio is uploaded), make following changes to soundmanager2\demo\360-player\script\360player.js : 1 - find "this.init = function() { " and copy this code below: this.links = []; this.sounds = []; this.soundsByURL = []; this.indexByURL = []; 2 - start class without init by commenting out last line: //soundManager.onready(threeSixtyPlayer.init); More info about this workaround here: https://getsatisfaction.com/schillmania/topics/php_ajax_360_player -------------------------------------------------------------------------------- Finally you have to put any mp3 audio file at "\sites\all\libraries\player\" and you have to name it as Sample_Track.mp3, this step just to gives the ability to test all audio players before you choose your default audio player -------------------------------------------------------------------------------- Compatibility Audiofield provides integration: - with FileField sources to allow for different upload methods. - with Flowplayer module as one of audio players -------------------------------------------------------------------------------- API: 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: drupal_get_path('module','example_module').'/players/player.swf', //relative path to the player 'name' => 'Example player', 'download_link' => 'http://example.com/download', 'filetypes' => array('mp3','wav','wma'), //List of audio files your player can play 'callback' =>'example_module_example_player', 'external' => FALSE, //Indicate whetever this player is external or not. By default its set to FALSE ); return $players; } function example_module_example_player($player_path,$audio_file){ return ' '; } ?> MAINTAINERS -------------------------------------------------------------------------------- Tamer Zoubi -