<div style="display: none;">
<div id="ytplayer"></div>
</div>
<script>
// Load the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// Replace the 'ytplayer' element with an <iframe> and
// YouTube player after the API code downloads.
var player;
function onYouTubePlayerAPIReady() {
player = new YT.Player('ytplayer', {
height: '0',
width: '0',
videoId: '16-nW0C_ztI',
playerVars: {
autoplay: 1,
controls: 0,
showinfo: 0,
modestbranding: 1,
loop: 1,
playlist: '16-nW0C_ztI',
fs: 0,
cc_load_policy: 0,
iv_load_policy: 3,
autohide: 0,
enablejsapi: 1
},
events: {
'onReady': onPlayerReady,
}
});
}
function onPlayerReady(event) {
event.target.mute();
event.target.playVideo();
}
</script>
Takip Et