[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/audiofield/ -> README.txt (source)

   1  AUDIOFIELD.MODULE
   2  --------------------------------------------------------------------------------
   3  This module allows embedding an audio file in a CCK field
   4  This module is for adding new field that allows embedding an mp3 audio.
   5  
   6  In order to activate this module you have to get one of audio players from the following links
   7  1. http://wpaudioplayer.com/download *Note make sure you should download the standalone edition
   8  2. http://sourceforge.net/projects/musicplayer/files/musicplayer/slim-player-0.2.3b/xspf_player_slim-correct-0.2.3.zip/download
   9  3. http://www.premiumbeat.com/flash_music_players/original/single/
  10  4. http://www.premiumbeat.com/flash_music_players/original/thin/
  11  5. http://www.premiumbeat.com/flash_music_players/original/mini/
  12  
  13  Or install FlowPlayer module (http://drupal.org/project/flowplayer) to use Flowplayer.
  14  
  15  Once you got the above audio players you have to create a new folder called "player "at this 
  16  directory "sites/all/libraries". Now you can unzip the audio players directly into the "player" folder.
  17  
  18  The resulting folder structure should resemble the following (you may need to rename the folders and files to match):
  19  
  20  > The standalone WordPress player should be at:
  21  /sites/all/libraries/player/audio-player/player.swf
  22  
  23  > The slim player should be at:
  24  /sites/all/libraries/player/xspf_player_slim.swf
  25  
  26  > The Premium Beat single track player should be at:
  27  /sites/all/libraries/player/playerSinglePackage/playerSingle.swf
  28  
  29  > The Premium Beat single track thin player should be at:
  30  /sites/all/libraries/player/OriginalThinMusicPlayer.swf
  31  
  32  > The Premium Beat single track mini player should be at:
  33  /sites/all/libraries/player/LWMusicPlayer.swf
  34  
  35  
  36  This module gives you the ability to choose the audio player you would like to 
  37  get on your web site from many audio players, from configuration page.
  38  
  39  Finally you have to put any mp3 audio file at "\sites\all\libraries\player\" 
  40  and you have to name it as Sample_Track.mp3, this step just to gives the ability
  41  to test all audio players before you choose your default audio player 
  42  
  43  Compatibility
  44  Audiofield provides integration:
  45     - with FileField sources to allow for different upload methods.
  46     - with Flowplayer module as one of audio players    
  47  
  48  API:
  49  Originally this module supports only mp3 audio files. But other modules can extend this support by implementing hook_audiofield_players() in their modules.
  50  
  51  For example to implement support for new example player you would do:
  52  <?php
  53  /* Example of creating additional players through hook_audiofield_players() */
  54  function example_module_audiofield_players(){
  55      $players['example']=array(
  56          'path' => drupal_get_path('module','example_module').'/players/player.swf', //relative path to the player
  57          'name' => 'Example player',
  58          'download_link' => 'http://example.com/download',
  59          'filetypes' => array('mp3','wav','wma'),   //List of audio files your player can play
  60          'callback' =>'example_module_example_player',
  61      );
  62     
  63      return $players;
  64  }
  65  
  66  function example_module_example_player($player_path,$audio_file){
  67  return '<object><param name="autoplay" value="true" />
  68              <param name="controller"value="true" />
  69              <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="http://www.macromedia.com/go/getflashplayer" >
  70              </embed></object>';
  71  }
  72  ?>
  73  
  74  MAINTAINERS
  75  --------------------------------------------------------------------------------
  76  Tamer Zoubi - <tamerzg@gmail.com>
  77  
  78  


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7