YouTube player api - addEventListener() does not work for me?
Posted
by user246114
on Stack Overflow
See other posts from Stack Overflow
or by user246114
Published on 2010-04-18T02:45:07Z
Indexed on
2010/04/18
2:53 UTC
Read the original article
Hit count: 529
youtube-api
|JavaScript
Hi,
I'm using the youtube player api. I'm following the doc here:
http://code.google.com/apis/youtube/js_api_reference.html
having a problem adding an event listener on the player, it seems to just get stuck there. I put an alert statement directly after, which never gets called:
ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
alert("I never get called...");
any idea why this would happen? Running it through FF chrome safari, same thing happens on all. Other player features all work fine. I'm using the swfobject version. I'm running this live from a server too. I don't get it.
Thanks
© Stack Overflow or respective owner