연습장:구면: 두 판 사이의 차이

편집 요약 없음
태그: 수동 되돌리기
편집 요약 없음
1번째 줄: 1번째 줄:
<includeonly>
<includeonly>
<div style="text-align: center; margin-top: 10px;">
<div style="text-align: center; margin-top: 10px;">
   <iframe id="yt-audio" width="0" height="0"
   <button id="playButton">음악 재생</button>
    src="https://www.youtube-nocookie.com/embed/{{{video_id|8S5OGyl1ejo}}}?autoplay=1&loop=1&playlist={{{video_id|8S5OGyl1ejo}}}&mute=1"
  <div id="playerContainer" style="display: none;">
    frameborder="0" allow="autoplay; encrypted-media">
    <iframe id="yt-audio" width="200" height="150"
   </iframe>
      src="https://www.youtube-nocookie.com/embed/{{{video_id|8S5OGyl1ejo}}}?autoplay=1&loop=1&playlist={{{video_id|8S5OGyl1ejo}}}&mute=1"
      frameborder="0" allow="autoplay; encrypted-media">
    </iframe>
   </div>
</div>
</div>


<script>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("playButton").addEventListener("click", function() {
     setTimeout(() => {
     var container = document.getElementById("playerContainer");
        var iframe = document.getElementById("yt-audio");
    container.style.display = "block";
        iframe.src = iframe.src.replace("&mute=1", "&mute=0");
   
    }, 2000); // 2초 후 음소거 해제
    var iframe = document.getElementById("yt-audio");
    iframe.src = iframe.src.replace("&mute=1", "&mute=0"); // 음소거 해제
});
});
</script>
</script>
</includeonly>
</includeonly>

2025년 3월 15일 (토) 13:48 판