I'm trying to manipulate an Youtube object via JavaScript. But once I call a function like seekTo(), JS engine tells me there is no such function:
<script type="text/javascript" src="swfobject.js"></script>
<div id="ytapiplayer"></div>
<script type="text/javascript">
var params = { allowScriptAccess: "always" };
var atts = { id: "ytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/tS3J2BkLamQ?enablejsapi=1&playerapiid=ytplayer",
"ytapiplayer", "425", "356", "8", null, null, params, atts);
</script>
<a href="javascript:void(0);" onclick="ytplayer.seekTo(10,true)">seek</a>
There are three IDs in the official example. I tried them all with no result.
Fiefox 6 AFAIK
UPD Finally I figured out such code must be run at the server side.
idsfail the same is because they don't matter. You get to choose any id you want with theattsparameter.