audio-player-wordpress-plugin Delivers Worldpress Audio Player created by 1pixelout for non-Worldpress based projects (now called aii-audio-player)

Aii Audio Player

  1. (known also as Audio Player Wordpress Plugin )
  2. Documentation
  3. Change Log
  4. Release 0.2.1
  5. Release 0.2.0
  6. Release 0.1.0
  7. Release 0.0.1

(known also as Audio Player Wordpress Plugin )

This extensions delivers audio player, which you may use on you site. You can customize its outlook and use as many players on one page as needed. It's a port of Wordpress extension created by 1 Pixel Out with changes introduced by Mindy McAdams for non-Wordpress based sites.

Documentation

Requirements
  • Yii 1.0.9 or above
Installation
  • Extract the release file under protected/extensions.
  • Install AiiPublishRegisterBehavior extension
Usage

See the following code example:

/* create widget in you view file */
<?php $this->widget( 
	'AiiAudioPlayer' , 
		array ( 
			'playerID' => 'mpl',		
			'singlePlayer' => true,
			'trackOptions'=> array( 'soundFile' => 'blah.mp3' , 'alternative' => 'nothing' ),
			'flashPlayerOptions' => array( 'width' => 350 ),
	) ); ?>

Above example creates one player which will play blah.mp3 from protected/extensions/aii-audio-player/mp3.

Everything you always wanted to know about enhanced usage of Aii
$playerId

If you need to use more than one player per page, you have to set unique value of parameter `playerID' for each widget.

/**
  	 * @var string - Player Id (needed when using multiple players on one site)
	 * default to 'audioplayer'
  	 */
  	public $playerID = 'audioplayer';
$singlePlayer

If you need to use just one player per page, set the property to true

/**
  	 * 
  	 * @var boolean, true if only one player appears on page
  	 */
  	public $singlePlayer = false;
$trackOptions

It's an array specifying files to be played

/**
  	 * @var array - list of mp3 files {@link mp3Folder}
  	 * It's an array with 4 entries
  	 * - soundFile - required, comma-delimited list of mp3 files
  	 * - alternative - required, alternative content if player will not be displayed 
  	 * - titles - optional, comma-delimited list of titles (overrides ID3 information) 
  	 * - artists - optional, comma-delimited list of artists, overrides ID3 information
  	 * with this way of declaration you will get one player with one or multiple mp3s.
  	 * Example:
  	 * 	<code>
  	 * 		array( 
  	 * 			'soundFile' => "example.mp3, interview.mp3", 
  	 * 			'titles' => "Example MP3 , My latest interview",
  	 * 			'artists' => "Artist name 1, artist name 2"
  	 * 			'alternative' => "sorry, no file found"
  	 * 		);
  	 * 	</code>
  	 * If you wan't to create more than one player, 
  	 * please pass to this property array of aforementioned options
  	 * with player ids. I
  	 * Example:
  	 * 	<code>
  	 * 		array(
  	 * 			'player1' => array(
  	 * 				'soundFile' => "poker_face-lady_gaga.mp3", 
  	 * 				'alternative' => "sorry, no file found"
  	 * 			), 
  	 * 			'player2' => array( 
  	 * 				'soundFile' => "example.mp3, interview.mp3", 
  	 * 				'titles' => "Example MP3 , My latest interview",
  	 * 				'artists' => "Artist name 1, artist name 2"
  	 * 				'alternative' => "sorry, no file found"
  	 * 			); 
  	 * 		);
  	 * 	</code>
  	 */
    public $trackOptions = array( );
$playerOptions

It's a list of player options

/**
     * 
     * @var array list of player options
     * Below code shows also default values
     * 	<code>
     * 		array (
     * 			'autostart' => "no",	//if yes, player starts automatically
	 * 			'loop' 		=> "no",	//if yes, player loops
	 * 			'animation'	=> "yes", 	//if no, player is always open
	 * 			'remaining'	=> "no",	//if yes, shows remaining track time rather than ellapsed time
	 * 			'noinfo'	=> "no",	//if yes, disables the track information display
	 *			'initialvolume' => 60, 	//initial volume level (from 0 to 100)
	 *			'buffer'	=> 5,		//buffering time in seconds
	 * 			'encode'	=> "no",	//indicates that the mp3 file urls are encoded
	 * 			'checkpolicy' => "no"	//tells Flash to look for a policy file when loading mp3 files
	 *			(this allows Flash to read ID3 tags from files hosted on a different domain)
	 * 			'rtl'		=> "no"		//switches the layout to RTL (right to left) for Hebrew and Arabic languages
	 * 		);
	 * </code>
	 * 
	 * If you would like to specify different options to each player 
	 * please pass array of array options here, where key in first array is player id
	 * Example:
	 * 	<code>
	 * 		array(
	 * 			'player1' => array ( ... ),	//header options for 1st player
	 * 			'player2' => array ( ... ), //header options for 2nd player
	 * 			...
	 * 			'playerN' => array ( ... ), //header options for Nth player
	 * 		);
	 * 	</code>
     */
    public $playerOptions = array( );
$flashPlayerOptions

It's a list of flash player options

/**
     * 
     * @var array list of flash player options
     * 	<code>
     * 		array(
	 *			'width' => 290,					//required, width of the player. e.g. 290 (290 pixels) or 100%		
	 * 			'transparentpagebg' => "no",	//if yes, the player background is transparent (matches the page background)
	 * 			'pagebg' => NA,					//player background color (set it to your page background when transparentbg is set to ‘no’) 
     * 		);
     * 	</code>
     * 
	 * If you would like to specify different options to each player 
	 * please pass array of array options here, where key in first array is player id
	 * Example:
	 * 	<code>
	 * 		array(
	 * 			'player1' => array ( ... ),	//header options for 1st player
	 * 			'player2' => array ( ... ), //header options for 2nd player
	 * 			...
	 * 			'playerN' => array ( ... ), //header options for Nth player
	 * 		);
	 * 	</code> 
     */
    public $flashPlayerOptions = array( );
$colourSchemeOptions

It's an array of parameters helping to style the player the way you like.

/**
	 * 
	 * @var array of colour scheme options
	 * 	<code>
	 * 		array(
	 * 			'bg' => "E5E5E5", 				//Background
	 * 			'leftbg' =>	"CCCCCC",			//Speaker icon/Volume control background
	 * 			'lefticon' => "333333",			//Speaker icon
	 * 			'voltrack' => "F2F2F2",			//Volume track
	 * 			'volslider'	=> "666666",		//Volume slider
	 * 			'rightbg' => "B4B4B4"			//Play/Pause button background
	 * 			'rightbghover' => "999999"		//Play/Pause button background (hover state)
	 * 			'righticon' => "333333"			//Play/Pause icon
	 * 			'righticonhover' => "FFFFFF"	//Play/Pause icon (hover state)
	 *			'loader' => "009900",			//Loading bar
	 * 			'track'	=> "FFFFFF"				//Loading/Progress bar track backgrounds
	 * 			'tracker' => "DDDDDD",			//Progress track
	 * 			'border' => "CCCCCC",			//Progress bar border
	 * 			'skip' => "666666",				//Previous/Next skip buttons
	 * 			'text' => "333333",				//Text
	 * 		);
	 * 	</code>
	 * 
	 * If you would like to specify different options to each player 
	 * please pass array of array options here, where key in first array is player id
	 * Example:
	 * 	<code>
	 * 		array(
	 * 			'player1' => array ( ... ),	//header options for 1st player
	 * 			'player2' => array ( ... ), //header options for 2nd player
	 * 			...
	 * 			'playerN' => array ( ... ), //header options for Nth player
	 * 		);
	 * 	</code>
	 */    
    public $colourSchemeOptions = array( );
$setupOptions

If you use many players on the page and you would like to set them up with the same options, this parameter is what you need.

/**
     * Options used to initialize all players. The are overwritten 
     * options set via {@link playerOptions}, {@link flashPlayerOptions} , 
     * 	<code>
     * 		array(
     * 			AiiAudioPlayer::OPTION_PLAYER = array (	
     * 			... here options like in {@link playerOptions}
     * 			),
     * 			AiiAudioPlayer::OPTION_FLASH = array (	
     * 			... here options like in {@link flashOptions}
     * 			),
     * 			AiiAudioPlayer::OPTION_COLOUR = array (	
     * 			... here options like in {@link colourOptions}
     * 			),
     * 		);
     * 	</code>
     * 
     * {@link colourSchemeOptions}
     * @var array
     */
    public $setupOptions = array( );
$mp3Folder

Path to the mp3 you would like to play (and publish before playing them).

/**
  	 * 
  	 * @var string - Publised folder with mp3 files
	 * Default to null, which means that standard '{basepath}/mp3' folder under
	 * extension directory will be published
  	 */
  	public $mp3Folder = null;

Change Log

Release 0.2.1

September 13,2012
  • fixed nasty bug with DEBUG option

Release 0.2.0

March 14,2010
  • extension is using now latest standalone version 2.0 of WordPress Audio Player
  • integrated with AiiPublishRegisterBehavior extension
  • array-based instead of property-based configuration of player
  • support for creating more than one players using one widget
  • support for playing more mp3 in one player
  • code clean up

Release 0.1.0

March 11,2010
(deprecated and not supported)
  • Renamed extension to yii-audio-player
  • SVN repositorry added
  • New release 0.1.0 avaliable
  • New height and widht property added
  • Enhancement error handling
  • Code clean up
  • Render method completely rewritten. Echoes used instead of view file
  • two defualt skins added

Release 0.0.1

September 19, 2009
(deprecated and not supported)
  • Initial release (not supported yet)
3 0
5 followers
1 044 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: aztech
Created on: Sep 19, 2009
Last updated: 11 years ago

Downloads

show all

Related Extensions