|
When creating you XML playlist, you are free to include custom tags.
The data contained within the additional (custom) tags are sent into the player when an item is launched, and are available for retrieval using the Javascript API.
If you would like your custom tag to appear within Pickle's visible playlist, create a "render" attribute on your tag and set it to "true".
<playlist>
<item>
<filename>example_A.mp3</filename>
<title>Song A</title>
<artist>Some Artist</artist>
<image>path/to/image.jpg</image>
<myTag render="true">
<div class="buyButton" onclick="doLink(1)">BUY</div>
</myTag>
</item>
<item>
<filename>example_B.mp3</filename>
<title>Song B</title>
<artist>Some Other Artist</artist>
<image>path/to/image.jpg</image>
<myTag render="true">
<div class="buyButton" onclick="doLink(2)">BUY</div>
</myTag>
</item>
</playlist>
You can also include HTML code within your custom tag (as seen in the example above), which opens infinite possibilities, such as providing a "BUY" button, or "More Info" button.
We've provided a simple example setup that shows a working example of how to leverage custom tags in the following package:
Click here to download example setup.
IMPORTANT: Move the example files into the same folder as pickle.js on your server.
Live demo + more info
Click here for more info and to see a live example here at Pickle Player.
|