본문 바로가기

나의 관심사항/여러가지 유용한 Tip

youtube api 사용해서 youtube hd 재생




<iframe id="player" src="https://www.youtube.com/embed/s4oO-CWTFV4?enablejsapi=1&amp;autoplay=1&#10;&amp;controls=1&amp;modestbranding=1&amp;showinfo=0&amp;rel=0&#10;&amp;theme=light&amp;iv_load_policy=3" frameborder="0" allowfullscreen="1" width="853" height="480">
</iframe>
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady(){player = new YT.Player('player',{events:{'onReady': onPlayerReady}});}
function onPlayerReady(event){event.target.setPlaybackQuality('hd1080');}
</script>





Total
491,298
Today
8
Yesterday
36
«   2020/10   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31