Word Press Audio Player

Standalone version #

The standalone version comes with a JavaScript file to simplify configuring and embedding the player. This file includes the  swfobject 2.1 library.
Note: the zip file includes two other files:

  • audio-player-noswfobject.js (a version of audio-player.js without the swfobject 2.1 library if you are including it separately)
  • audio-player-uncompressed.js (same as above but uncompressed so you can read the code)

Installation and usage #

  1. Download the zip file
  2. Extract and upload the files to your server (only two files are required: audio-player.js and player.swf)
  3. Include the audio-player.js file in the HEAD section of your html page
  4. Still in the HEAD section, setup Audio Player as seen in the example below (the only required option is width)
  5. 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
  6. 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)
  7. Insert the script tag after the element as shown below

Example #

Ensure you replace “http://yoursite.com/path/to” with the correct paths to all files.

<html> <head>
<title>Your website</title>
...

이 글에는 0 개의 댓글이 있습니다.