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