53d4c6ef3cb2c5f66a51876739ba25d03802f1ed3e62f3f927ce1395918d56c1

Source Code:

      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 playerTarget = document.querySelector(".kv iframe");
      var player;
      function onYouTubeIframeAPIReady() {
        player = new YT.Player('player', {
            height: '360',
            width: '640',
            videoId: 'AHD3fe7Fy94',
            playerVars: {
                loop: 1,
                playlist:"AHD3fe7Fy94",
                cc_load_policy: 0,
                fs: 0,
                playsinline: 1,
                rel: 0,
                controls: 0,
                showinfo: 0,
                modestbranding: 1,
                iv_load_policy: 3,
                disablekb:1,
          },
          events: {
            'onReady': onPlayerReady,
            'onStateChange': onPlayerStateChange,
            "onError": onPlayerError,
          }
        });
      }
      
    function onPlayerReady(event) {
      $(".kv iframe").attr("tabindex","-1");
      player.mute().setPlaybackQuality('hd720');
      player.playVideo();
      $(".player_hover").click(function () {
        togglePlayVideo($(this));
      });
    }
    function onPlayerStateChange(event) {
        if (event.data == YT.PlayerState.ENDED) {
            //console.log("再生終了");
        }
    }
    
    function onPlayerError(event){
      console.log("エラーが発生しました");
      $(".kv iframe").remove();
    }
function togglePlayVideo($elm) {
  //if ($elm.hasClass("pause")) {
  //  player.playVideo();
  //  $elm.removeClass("pause");
  //} else {
  //  player.pauseVideo();
  //  $elm.addClass("pause");
  //}
}