Skip to content Skip to sidebar Skip to footer

Youtube Onplayerready Is Never Triggered

Any idea why this script doesn't work? All I want is to track onStateChanged event, but that is never called either. When I open the html document with below code, I have no errors

Solution 1:

I found an answer here: How do I get the reference to an existing YouTube player?

The reason my solution didn't work, was that my iframe was missing an attribute: enablejsapi="1" and also I was missing: ?enablejsapi=1 in YouTube video url.

You may find the working solution here: http://jsfiddle.net/bf7zQ/2/

Post a Comment for "Youtube Onplayerready Is Never Triggered"