iframe 삽입에 대한 YouTube Player API 참조 문서



key value : videoId

// 3. This function creates an <iframe> (and YouTube player)
     
//    after the API code downloads.

     
var player;
     
function onYouTubeIframeAPIReady() {
        player
= new YT.Player('player', {
          height
: '390',
          width
: '640',
          videoId
: 'M7lc1UVf-VE',
          events
: {
           
'onReady': onPlayerReady,
           
'onStateChange': onPlayerStateChange
         
}
       
});
     
}


'SNS API' 카테고리의 다른 글

javascript SDK for Facebook API  (0) 2015.07.10
by 완도 김사랑 2015. 7. 10. 11:31