Hey all,

After YouTube changed the autoplay, this code still worked.
But the playlist doesn't, as it is always the same video playing over and over again.
And also, how not to get the related videos when scrolling down (and thus pausing the video) and not seeing information when hovering?
Is there more code to be added, please?
Live example: http://brunomazereel.com/other/bruno2017/index.php
Thanks.

Code:
<script src="http://www.youtube.com/player_api"></script>
<script type="text/javascript">
var player;
function onYouTubePlayerAPIReady() {
    player = new YT.Player('player', {
        playerVars: {
            'controls': 0,
            'showinfo': 0,
            'loop': 0,
            'rel': 0,
            'playlist': 'YQEOfIU-hOE,9MKvqVTtzzc,MAtwgOsycc0,nvENEbvSMW4,ELFdbTwJkJE'
            },
        videoId: 'YQEOfIU-hOE',
        events: {
            'onReady': onPlayerReady
        }
    });
}
function onPlayerReady(event) {
    event.target();
    $('#text').fadeIn(400);
}
$(window).scroll(function() {
   var hT = $('.m-video').height(),
       wS = $(this).scrollTop();
   if (wS > hT) {
      player.pauseVideo();
   }
   else {
      player.playVideo();
   }
});
    function onPlayerReady(event) {
        event.target.playVideo();
    }
</script>