<div class="videoWrapper">
<div id="player"></div>
</div>
<script>
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
playerVars: {
autoplay: 1,
controls: 0,
showinfo: 0,
autohide: 1,
modestbranding: 1,
vq: 'hd1080'},
videoId: 'VGz0eoTSNZ8',
events: {
onReady: onPlayerReady,
onStateChange: function(event){
if (event.data == YT.PlayerState.ENDED) {
player.playVideo();
}
}
}
});
}
function onPlayerReady(event) {
player.mute();
}
</script>