Setup litePlayer using Standard HTML
To add a basic instance of litePlayer to your website or application, place the following OBJECT element wherever you want litePlayer to appear in the body of your document:
<html>
<head>
<title></title>
</head>
<body>
<OBJECT data="litePlayer.swf" type="application/x-shockwave-flash" width="50" height="50"><PARAM name="movie" value="litePlayer.swf"></OBJECT>
</body>
</html>
1. Be sure to include the correct path to your litePlayer.swf file.
2. This value sets the width of the player instance in pixels.
3. This value sets the height of the player instance in pixels.
4. The correct path to your litePlayer.swf file must be repeated here.
Finally, add a PARAM tag with the name "flashvars" and with a value specifying the audio file or stream to play. The "flashvars" value can also include various options to customize the player's appearance or behavior.
<html>
<head>
<title></title>
</head>
<body>
<OBJECT data="litePlayer.swf" type="application/x-shockwave-flash" width="50" height="50"><PARAM name="movie" value="litePlayer.swf"><PARAM name="flashvars" value="file=audiofile.mp3"></OBJECT>
</body>
</html>
Be sure to include the correct path to your audio file or stream. If using a relative URL, location is relative to the document in which litePlayer is embedded.
Additional Tips
Customization Options
The litePlayer API provides various options to dynamically customize the appearance or behavior of each player instance. These options can be included as ampersand-separated name=value pairs in the flashvars tag as follows:
<PARAM name="flashvars" value="file=audiofile.mp3&loop=true&color=CC0000">
Player Transparency
If you're using external images with transparency, you'll need to make litePlayer transparent as well in order for the document background to show through. You can achieve this by adding a PARAM tag to set the wmode to "transparent" as follows:
<PARAM name="wmode" value="transparent">
Object IDs for External Control
The litePlayer API provides various functions to externally control each player instance using javascript. In order for javascript to communicate with a player instance, you must assign that instance a unique object ID as follows:
<OBJECT data="litePlayer.swf" type="application/x-shockwave-flash" width="50" height="50" id="playerID"><PARAM name="movie" value="litePlayer.swf"><PARAM name="flashvars" value="file=audiofile.mp3"></OBJECT>
Key Installation
Your license key can be included as a name=value pair in the flashvars tag as follows:
<PARAM name="flashvars" value="file=audiofile.mp3&key=0123456789ABCDEF">
Please refer to our extensive
Demos area for practical litePlayer implementations with complete code examples that you can copy-and-paste.