Establishing a Player with Javascript


Advanced users only! Non-wizards use the HTML method.

Creating a player with Javascript requires 2 parts

<!DOCTYPE html>
<title>Wimpy Player</title>

<!-- 1. Wimpy Engine ============================== --> <script src="http:/"></script>

</head> <body>

<!-- 2. Create Player =============================== -->
<script> new wimpyPlayer({ media: "song1.mp3", skin: "http:/www/path/to/skin.json" }); </script>

</body> </html>



1Reference Wimpy Engine

<script src="/media/wimpy.js"></script>

This tag should go into the HEAD portion of your page (anywhere between the opening <head> and closing </head> tags on your page.)

• You only have to reference the wimpy.js file one time
• The URL in the example is using the recommended "from the root" style.
• Placing the reference into the <head> is recommended, but NOT required. Under certain circumstances placing the reference at the bottom of the page (just before the closing </body> tag) may help with any issues related to conflicts with other scripts.



2Create a Player

Wimpy will render the player where ever this code is situated wihtin the <body> of your HTML.

new wimpyPlayer({
					media: "song1.mp3",
					skin: "/path/to/skin.json" 



Next >