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?
Comments
Post a Comment