РЕШЕНИЕ (работает на моем сайте WordPress): загрузите и установите его на свой сайт - http://www.tikku.com/jquery-youtube-tubeplayer-plugin
, затем вставьте этот код на свою страницу но изменить1) yoursite.com на ваш2) alert («Hello»); на нужную вам функцию;3) DkoeNLuMbcI на ваш идентификатор видео;
<div id="youtube-player-container" style="float:right"> </div>
<script type="text/javascript" src="http://yoursite.com/folder/jQuery.tubeplayer.min.js"></script>
<script type="text/javascript">
jQuery("#youtube-player-container").tubeplayer({
width: 422, // the width of the player
height: 285, // the height of the player
allowFullScreen: "true", // true by default, allow user to go full screen
initialVideo: "DkoeNLuMbcI?autoplay=1", // the video that is loaded into the player
preferredQuality: "default",// preferred quality: default, small, medium, large, hd720
onPlay: function(id){}, // after the play method is called
onPause: function(){}, // after the pause method is called
onStop: function(){}, // after the player is stopped
onSeek: function(time){}, // after the video has been seeked to a defined point
onMute: function(){}, // after the player is muted
onPlayerEnded: function(){ alert("Hello"); },
onUnMute: function(){} // after the player is unmuted
});
</script>