While trying to integrate Yahoo Media Player into my own website, I want to allow users to click on a link to add the clicked track to the playlist. YMP API has got a function for doing that (http://mediaplayer.yahoo.com/api/#method_addTracks). It takes a DOM element. Now how should I pass the dom element. My code looks like this right now: …
<li id='track1'> <a href='location of track' style='display:none'>track1</a> <a href='#' onclick='YAHOO.MediaPlayer.addTracks(WHAT SHOULD I PUT HERE?, null, true);'>Add this to the playlist</a> </li>
if anyone has worked with YMP or has any idea about this please help.
As far as I understand from the API page, you should be using
(the documentation says ‘HTML DOM element (possibly contains media anchor tags)’)