<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Townes &#187; 非插件方式</title>
	<atom:link href="https://thetownes.coolpage.biz/?feed=rss2&#038;tag=%E9%9D%9E%E6%8F%92%E4%BB%B6%E6%96%B9%E5%BC%8F" rel="self" type="application/rss+xml" />
	<link>https://thetownes.coolpage.biz</link>
	<description>本站已转移至：http://www.thetownes.info</description>
	<lastBuildDate>Thu, 01 Aug 2013 11:49:56 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2</generator>
		<item>
		<title>WordPress Audio Player 非插件方式使用方法</title>
		<link>https://thetownes.coolpage.biz/?p=412</link>
		<comments>https://thetownes.coolpage.biz/?p=412#comments</comments>
		<pubDate>Sun, 14 Jul 2013 13:24:55 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress Audio Player]]></category>
		<category><![CDATA[使用方法]]></category>
		<category><![CDATA[非插件方式]]></category>

		<guid isPermaLink="false">http://thetownes.coolpage.biz/?p=412</guid>
		<description><![CDATA[Standalone version The standalone versio &#8230; <a href="https://thetownes.coolpage.biz/?p=412">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>Standalone version</h2>
<p>The standalone version comes with a JavaScript file to simplify configuring and embedding the player. This file includes the<a href="http://code.google.com/p/swfobject/">swfobject</a>&nbsp;library.</p>
<p><strong>Note</strong>: the zip file includes two other files:</p>
<ul>
<li><strong>audio-player-noswfobject.js</strong>&nbsp;(a version of audio-player.js without the swfobject library if you are including it separately)</li>
<li><strong>audio-player-uncompressed.js</strong>&nbsp;(same as above but uncompressed so you can read the code)</li>
</ul>
<h3>Installation and usage</h3>
<ol>
<li><a href="http://wpaudioplayer.com/standalone/download.htm">Download</a>&nbsp;the zip file</li>
<li>Extract and upload the files to your server (only two files are required:&nbsp;<strong>audio-player.js</strong>&nbsp;and&nbsp;<strong>player.swf</strong>)</li>
<li>Include the&nbsp;<strong>audio-player.js</strong>&nbsp;file in the HEAD section of your html page</li>
<li>Still in the HEAD section, setup Audio Player as seen in the example below (the only required option is&nbsp;<strong>width</strong>)</li>
<li>To insert a player on the page, place an HTML element (a P tag in the example but it can be anything) and give it a unique ID</li>
<li>This element will be replaced with a player. If the browser doesn’t support Audio Player, the element will not be replaced so use it to show alternative content (maybe a message telling the user to download Flash)</li>
<li>Insert the script tag after the element as shown below</li>
</ol>
<h4>Example</h4>
<p>Ensure you replace “http://yoursite.com/path/to” with the correct paths to all files.</p>
<div>
<div>&nbsp;</div>
<ol start="1">
<li>&lt;html&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&lt;head&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Your&nbsp;website&lt;/title&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&nbsp;type=&#8221;text/javascript&#8221;&nbsp;src=&#8221;path/to/audio-player.js&#8221;&gt;&lt;/script&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&nbsp;type=&#8221;text/javascript&#8221;&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AudioPlayer.setup(&#8220;http://yoursite.com/path/to/player.swf&#8221;,&nbsp;{&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width:&nbsp;290&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/head&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&lt;body&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&nbsp;id=&#8221;audioplayer_1&#8243;&gt;Alternative&nbsp;content&lt;/p&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&nbsp;type=&#8221;text/javascript&#8221;&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AudioPlayer.embed(&#8220;audioplayer_1&#8243;,&nbsp;{soundFile:&nbsp;&#8221;http://yoursite.com/path/to/mp3_file.mp3&#8243;});&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&nbsp;id=&#8221;audioplayer_2&#8243;&gt;Alternative&nbsp;content&lt;/p&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&nbsp;type=&#8221;text/javascript&#8221;&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AudioPlayer.embed(&#8220;audioplayer_2&#8243;,&nbsp;{soundFile:&nbsp;&#8221;http://yoursite.com/path/to/mp3_file_2.mp3&#8243;});&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/body&gt;&nbsp;&nbsp;</li>
<li>&lt;/html&gt;&nbsp;&nbsp;</li>
</ol>
</div>
<h3>Configuration</h3>
<p>You can configure Audio Player with the&nbsp;<strong>setup</strong>&nbsp;call in the HEAD section like this:</p>
<div>
<div>&nbsp;</div>
<ol start="1">
<li>&lt;script&nbsp;type=&#8221;text/javascript&#8221;&nbsp;src=&#8221;path/to/audio-player.js&#8221;&gt;&lt;/script&gt;&nbsp;&nbsp;</li>
<li>&lt;script&nbsp;type=&#8221;text/javascript&#8221;&gt;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;AudioPlayer.setup(&#8220;http://yoursite.com/path/to/player.swf&#8221;,&nbsp;{&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width:&nbsp;290,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initialvolume:&nbsp;100,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transparentpagebg:&nbsp;&#8221;yes&#8221;,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left:&nbsp;&#8221;000000&#8243;,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lefticon:&nbsp;&#8221;FFFFFF&#8221;&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
<li>&lt;/script&gt;&nbsp;&nbsp;</li>
</ol>
</div>
<p>You can configure each separate player using the&nbsp;<strong>embed</strong>&nbsp;call like this:</p>
<div>
<div>&nbsp;</div>
<ol start="1">
<li>&lt;script&nbsp;type=&#8221;text/javascript&#8221;&gt;&nbsp;&nbsp;</li>
<li>AudioPlayer.embed(&#8220;audioplayer_1&#8243;,&nbsp;{&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;soundFile:&nbsp;&#8221;http://yoursite.com/path/to/mp3_file.mp3&#8243;,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;titles:&nbsp;&#8221;Title&#8221;,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;artists:&nbsp;&#8221;Artist&nbsp;name&#8221;,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;autostart:&nbsp;&#8221;yes&#8221;&nbsp;&nbsp;</li>
<li>});&nbsp;&nbsp;</li>
<li>&lt;/script&gt;&nbsp;&nbsp;</li>
</ol>
</div>
<h3>To load multiple files</h3>
<p>Simply set&nbsp;<strong>soundFile&nbsp;</strong>to a comma delimited list of mp3 files. Optionally, you can also provide a comma delimited list of titles and artists:</p>
<div>
<div>&nbsp;</div>
<ol start="1">
<li>&lt;script&nbsp;type=&#8221;text/javascript&#8221;&gt;&nbsp;&nbsp;</li>
<li>AudioPlayer.embed(&#8220;audioplayer_1&#8243;,&nbsp;{&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;soundFile:&nbsp;&#8221;http://yoursite.com/path/to/mp3_file_1.mp3,http://yoursite.com/path/to/mp3_file_2.mp3&#8243;,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;titles:&nbsp;&#8221;Title&nbsp;1,Title&nbsp;2&#8243;,&nbsp;&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;artists:&nbsp;&#8221;Artist&nbsp;name&nbsp;1,Artist&nbsp;name&nbsp;2&#8243;&nbsp;&nbsp;</li>
<li>});&nbsp;&nbsp;</li>
<li>&lt;/script&gt;</li>
</ol>
</div>
<p>&nbsp;</p>
<h3>List of options</h3>
<h4>Tracks</h4>
<table border="0">
<colgroup>
<col />
<col />
<col /></colgroup>
<thead>
<tr>
<th scope="col">Option</th>
<th scope="col">Default</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">soundFile</th>
<td><strong>required</strong></td>
<td>comma-delimited list of mp3 files</td>
</tr>
<tr>
<th scope="row">titles</th>
<td>overrides ID3 information</td>
<td>comma-delimited list of titles</td>
</tr>
<tr>
<th scope="row">artists</th>
<td>overrides ID3 information</td>
<td>comma-delimited list of artists</td>
</tr>
</tbody>
</table>
<h4>Options</h4>
<table border="0">
<colgroup>
<col />
<col />
<col /></colgroup>
<thead>
<tr>
<th scope="col">Option</th>
<th scope="col">Default</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">autostart</th>
<td>no</td>
<td>if yes, player starts automatically</td>
</tr>
<tr>
<th scope="row">loop</th>
<td>no</td>
<td>if yes, player loops</td>
</tr>
<tr>
<th scope="row">animation</th>
<td>yes</td>
<td>if no, player is always open</td>
</tr>
<tr>
<th scope="row">remaining</th>
<td>no</td>
<td>if yes, shows remaining track time rather than ellapsed time</td>
</tr>
<tr>
<th scope="row">noinfo</th>
<td>no</td>
<td>if yes, disables the track information display</td>
</tr>
<tr>
<th scope="row">initialvolume</th>
<td>60</td>
<td>initial volume level (from 0 to 100)</td>
</tr>
<tr>
<th scope="row">buffer</th>
<td>5</td>
<td>buffering time in seconds</td>
</tr>
<tr>
<th scope="row">encode</th>
<td>no</td>
<td>indicates that the mp3 file urls are encoded</td>
</tr>
<tr>
<th scope="row">checkpolicy</th>
<td>no</td>
<td>tells Flash to look for a policy file when loading mp3 files<br />
(this allows Flash to read ID3 tags from files hosted on a different domain)</td>
</tr>
<tr>
<th scope="row">rtl</th>
<td>no</td>
<td>switches the layout to RTL (right to left) for Hebrew and Arabic languages</td>
</tr>
</tbody>
</table>
<h4>Flash player options</h4>
<table border="0">
<colgroup>
<col />
<col />
<col /></colgroup>
<thead>
<tr>
<th scope="col">Option</th>
<th scope="col">Default</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">width</th>
<td><strong>required</strong></td>
<td>width of the player. e.g. 290 (290 pixels) or 100%</td>
</tr>
<tr>
<th scope="row">transparentpagebg</th>
<td>no</td>
<td>if yes, the player background is transparent (matches the page background)</td>
</tr>
<tr>
<th scope="row">pagebg</th>
<td>NA</td>
<td>player background color (set it to your page background when transparentbg is set to ‘no’)</td>
</tr>
</tbody>
</table>
<h4>Colour scheme options</h4>
<p>All colour codes must be 6-digit HEX codes without ‘#’ or ’0x’ in front.</p>
<table border="0">
<colgroup>
<col />
<col />
<col /></colgroup>
<thead>
<tr>
<th scope="col">Option</th>
<th scope="col">Default</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">bg</th>
<td>E5E5E5</td>
<td>Background</td>
</tr>
<tr>
<th scope="row">leftbg</th>
<td>CCCCCC</td>
<td>Speaker icon/Volume control background</td>
</tr>
<tr>
<th scope="row">lefticon</th>
<td>333333</td>
<td>Speaker icon</td>
</tr>
<tr>
<th scope="row">voltrack</th>
<td>F2F2F2</td>
<td>Volume track</td>
</tr>
<tr>
<th scope="row">volslider</th>
<td>666666</td>
<td>Volume slider</td>
</tr>
<tr>
<th scope="row">rightbg</th>
<td>B4B4B4</td>
<td>Play/Pause button background</td>
</tr>
<tr>
<th scope="row">rightbghover</th>
<td>999999</td>
<td>Play/Pause button background (hover state)</td>
</tr>
<tr>
<th scope="row">righticon</th>
<td>333333</td>
<td>Play/Pause icon</td>
</tr>
<tr>
<th scope="row">righticonhover</th>
<td>FFFFFF</td>
<td>Play/Pause icon (hover state)</td>
</tr>
<tr>
<th scope="row">loader</th>
<td>009900</td>
<td>Loading bar</td>
</tr>
<tr>
<th scope="row">track</th>
<td>FFFFFF</td>
<td>Loading/Progress bar track backgrounds</td>
</tr>
<tr>
<th scope="row">tracker</th>
<td>DDDDDD</td>
<td>Progress track</td>
</tr>
<tr>
<th scope="row">border</th>
<td>CCCCCC</td>
<td>Progress bar border</td>
</tr>
<tr>
<th scope="row">skip</th>
<td>666666</td>
<td>Previous/Next skip buttons</td>
</tr>
<tr>
<th scope="row">text</th>
<td>333333</td>
<td>Text</td>
</tr>
</tbody>
</table>
<p>转自：<a href="http://www.cnblogs.com/noevil/archive/2011/01/26/1945390.html">http://www.cnblogs.com/noevil/archive/2011/01/26/1945390.html</a></p>
]]></content:encoded>
			<wfw:commentRss>https://thetownes.coolpage.biz/?feed=rss2&#038;p=412</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://yoursite.com/path/to/mp3_file.mp3" length="20" type="audio/mpeg" />
<enclosure url="http://yoursite.com/path/to/mp3_file_2.mp3" length="20" type="audio/mpeg" />
<enclosure url="http://yoursite.com/path/to/mp3_file_1.mp3" length="20" type="audio/mpeg" />
		</item>
	</channel>
</rss>
