javascript - onYouTubePlayerReady callback not triggering -


according documentation

calling embed url http://www.youtube.com/v/video_id?version=3&enablejsapi=1 should trigger callback onyoutubeplayerready() when video ready. have tried achive this:

<body> <iframe id="ytplayer" type="text/html" width="100%" height="56.25"                 src="http://www.youtube.com/v/m7lc1uvf-ve?version=3&enablejsapi=1&playerapiid=ytplayer"                 frameborder="0" allowfullscreen></iframe> </body> 

javascript:

function onyoutubeplayerready(playerid){     console.log(playerid);     console.log('working');     alert('working'); } 

but callback isn't triggered, see js-fiddle: doing wrong?

http://jsfiddle.net/b85p5/1/


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -