유튜브 찬송가 645 js 파일
작성자 정보
- 관리자 작성
- 작성일
본문
요즘 아는 지인의 부탁으로 온라인 교회 홈페이지를 만들고 있는데...
하도 찬송가 전곡을 홈페이지에 깔아달라고 해서...
유튜브에서 플레이리스트 하나 파싱하여 js 파일로 만들어 보았습니다.
https://blog.kakaocdn.net/dn/AkFRq/btrEhZIUuKy/HEabAgJmg8hIHB2Icllhy1/tfile.js
사용하기에 따라 무궁무진한 자료를 만들 수 있을 거에요.
결과물은 http://www.mediaplayer.kr/main/bbs/html_editor.php
의 좌측창에 소스입력 후 결과보기 클릭해 보세요.
아주 간단하게 찬송가 201장부터 230장까지 가로 4단 정렬하여 썸네일 동영상 코드를 만들어 보았습니다.
유튜브에 전체 동영상을 공유하신 분은 비컴퍼니입니다.^^
<script src=https://blog.kakaocdn.net/dn/AkFRq/btrEhZIUuKy/HEabAgJmg8hIHB2Icllhy1/tfile.js></script>
<script>
startHymn = 201;
lastHymn = 230;
widthCut = 4;
document.write("<div id=ytDiv></div>");
ytDiv.style.height = ytDiv.offsetWidth * 9 / 16 + "px";
function ytHtml(yt) {
ytDiv.innerHTML = "<iframe style=width:100%;height:100%;display:block src=https://www.youtube.com/embed/" + (this['numberList_' + yt][2]) + " frameborder=0 allowfullscreen></iframe>";
}
for (i = startHymn; i <= lastHymn; i++) {
document.write("<img id=yt_" + i + " style=width:" + 100 / widthCut + "%;display:block;float:left;cursor:pointer src=https://img.youtube.com/vi/" + this['numberList_'+i][2] + "/mqdefault.jpg>");
this["yt_" + i].num = i;
this["yt_" + i].onclick = function() {
ytHtml(this.num);
}
}
this["yt_" + startHymn].onclick();
</script> 관련자료
-
링크
-
이전
-
다음
댓글 0개
등록된 댓글이 없습니다.