经典的audio-player

Audio Player WordPress plugin是WORDPRESS下一款经典的音乐播放器插件,虽然功能简陋(只支持mp3文件播放),界面简单(不支持播放列表),但是正应了那句广告词“简约不简单”,虽然WP下的音乐播放插件多不胜数,但唯独这个小东西最合我的心意,我也只安装了这个唯一的音乐播放插件,正所谓“弱水三千只取一瓢饮”

Audio Player WordPress plugin唯一的不足是只能在WORDPRESS日志和页面使用,在插件页面用黑体字很确定的告诉你想都别想在侧边栏,博客头部和底部使用Audio Player 。虽然我很爱很爱它也很想在侧边栏和其他什么地方放一个但人家官方都说不支持了我也就放弃了。没想到今天被我不小心发现它居然出现在它不该出现的地方。Google一下才发现原来我心爱的Audio Player是可以出现在任何地方任何页面的。只要下载Audio Player WordPress plugin解压后把player.swf和audio-player.js上传到服务器Audio目录下然后把下面的代码放在你想放的地方就可以了,记住把代码里URL改成你自己的。

<script language=”JavaScript” src=”http://www.fakedomain.com/myname/audio/audio-player.js“></script>

<object type=”application/x-shockwave-flash” data=”http://www.fakedomain.com/myname/audio/player.swf” id=”audioplayer1″ height=”24″ width=”290″>

<param name=”movie” value=”http://www.fakedomain.com/myname/audio/player.swf“>

<param name=”FlashVars” value=”playerID=1&amp;soundFile=http://www.fakedomain.com/myname/audio/music.mp3“>

<param name=”quality” value=”high”>

<param name=”menu” value=”false”>

<param name=”wmode” value=”transparent”>

</object>

你还可以根据自己的喜好定制播放器界面,你需要使用下面的代码,同样把URL换成你自己的

<script language=”JavaScript” src=”http://www.fakedomain.com/myname/audio/audio-player.js“></script>

<object type=”application/x-shockwave-flash” data=”http://www.fakedomain.com/myname/audio/player.swf” id=”audioplayer1″ height=”24″ width=”290″>

<param name=”movie” value=”http://www.fakedomain.com/myname/audio/player.swf“>

<param name=”FlashVars” value=”playerID=1&amp;

bg=0xf8f8f8&amp;

leftbg=0xeeeeee&amp;

lefticon=0×666666&amp;

rightbg=0xcccccc&amp;

rightbghover=0×999999&amp;

righticon=0×666666&amp;

righticonhover=0xffffff&amp;

text=0×666666&amp;

slider=0×666666&amp;

track=0xFFFFFF&amp;

border=0×666666&amp;

loader=0x9FFFB8&amp;

loop=no&amp;

autostart=no&amp;

soundFile=http://www.fakedomain.com/myname/audio/music.mp3“>

<param name=”quality” value=”high”>

<param name=”menu” value=”false”>

<param name=”wmode” value=”transparent”>

</object>

上面代码里定制界面的参数可以参照下面的图片和说明:

Color Options

There are 12 color options:

bg

Background color (see diagram)

leftbg

Left background (see diagram)

lefticon

Left icon (see diagram)

rightbg

Right background (see diagram)

rightbghover

The color the right background will change to on mouseover

righticon

Right icon (see diagram)

righticonhover

The color the right icon will change to on mouseover

text

Text (see diagram)

slider

Slider (see diagram)

track

Track (see diagram)

border

This is the line surrounding the loader bar

loader

Loader bar (see diagram)

If you don’t understand hexadecimal colors, see this page.

Other Options

These options are not related to the appearance of the player:

loop

Will the audio file repeat automatically?

Can be yes or no

autostart

Will the audio file start to play

without the player being clicked?

Can

想了解更多直接看指南吧,地址是http://www.macloo.com/examples/audio_player/

2010-09-21 11:080