プレーヤーの読み込み状態
プレーヤーの再生状態
プレーヤーの再生画質
プレーヤーの再生速度
JavaScript
        
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('movie', {
    videoId: 'E67bXEX3uqE',
    playerVars: {
      'mute': 1,
    },
    events: {
      'onReady': onPlayerReady,
      'onStateChange': onPlayerStateChange,
      'onPlaybackQualityChange': onPlayerPlaybackQualityChange,
      'onPlaybackRateChange': onPlayerPlaybackRateChange
    }
  });
};

function onPlayerReady(event) {
  $('#yt_ready').val('読み込み完了');
};
function onPlayerStateChange(event) {
  var status = event.data;
  var nums = {
      '-1' : '未開始',
      '0' : '終了',
      '1' : '再生中',
      '2' : '停止',
      '3' : 'バッファリング中',
      '5' : '頭出し済み'
  };
  $('#yt_state').val(nums[status]);
};
function onPlayerPlaybackQualityChange(event) {
  $('#yt_quality').val(event.data);
};
function onPlayerPlaybackRateChange(event) {
  $('#yt_rate').val('× ' + event.data);
};