DEMO+signin
Youtube API 사용법
YOUTUBE VIDEO 컨트롤러 없이 배경으로 삽입하기
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
function onYouTubeIframeAPIReady() {
new YT.Player('player', {
videoId: 'An6LvWQuj_8',
playerVars: {
autoplay: true,
loop: true,
playlist: 'An6LvWQuj_8'
},
events: {
onReady: function (event) {
event.target.mute()
}
}
});
}
```