페이지에서 YouTube 플레이어를 초기화하는 웹 앱 구성 요소를 만들었습니다. 이 플레이어는 주문형 비디오에 익숙해 질 것입니다. 초기화 될 때까지 플레이어를 초기화 할 때 그러나, 나는에있는 은 비디오를 전달합니다 Youtube Javascript API로 빈 플레이어 초기화
//javascript swfobject.embedSWF(makeUrl('http://www.youtube.com/v/NINOxRxze9k', { version : 3,//youtube api version autoplay : 0,//automatically start playing color : 'white',//color for the 'viewed' part of the video autohide : 0,//automatically hide the controls controls : 0,//don't show the controls disablekb : 1,//disable keyboard shortcuts enablejsapi : 1,//enable javascript api fs : 0,//disable full-screen playerapiid : id,//player api id that is used for javascript api //playlist : videoIds.join(','),//the list of video ids to play (it can be only one item) showinfo : 0,//don't show video information like title rel : 0,//don't show related videos after playback is finished theme : 'light',//use the light theme (the other one is 'dark') showsearch : 0, //don't show the search bar (it's disabled when 'rel' is 0) origin : window.location.hostname//it is a security thing necessary for enabling javascript api }), id, '300', '200', '8', null, null, params, atts);
가 (첫 번째 줄의 'NINOxRxze9k'부분을주의). 질문 : 특정 동영상에 대해 초기화하지 않고 YouTube 플레이어를 초기화하려면 어떻게해야합니까? 나는 그것이 준비되어있는 비디오의 스냅 사진을 보여주기를 원하지 않습니다. 나는 그 위에 아무것도 연주하기 전에 그것을 비워 둡니다.
SitNote : Google's documentation에서 볼 수 있듯이 VIDEO_ID
은 embedSWF()
으로 전달됩니다. 제거를 시도했지만 작동이 멈췄습니다.
내 검색과이 사람에 따르면 안된다고 생각합니다. http://stackoverflow.com/a/7828791/1460591 – YouYou