title: youtube api get current video title
body: <p>I have a chromeless Youtube iframe api player that plays a Youtube playlist shuffled. 
  all works well but I would like to display the title of the currently playing video in a div
  underneath the player but I don't have a clue how to do this any help would be much appreciated.</p>
  
  <p>I have tried other examples from stackoverflow but they were for in-line playlists and was impracticle
  for a youtube playlist that has 100+ videos and with my very limited script knowledge I never got them to work anyway
  and the google api website does not seem to cover what i'm looking for.
  I tried the jwplayer which gets the titles but the shuffle function is poor and plays the same videos over and over 
  again sometimes one video multiple times. I found a script that sorts out the shuffle problem but I loose the get title
  function. I've decided to stick with youtube and hope that someone can help me out. </p>
  
  <p>So once again I would really appreciate any help with this thanks. 
  This is what I have </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
    &lt;div id="player"&gt;&lt;/div&gt;
  
      &lt;script&gt;
  
      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', {
      height: '390',
      width: '640',
      playerVars : { 'rel' : 0,  'showinfo' :0, 'autoplay': 1, 'controls': 0 },
      events: {
      'onReady': onPlayerReady 
      }
      });
      }
  
      var getRandom = function(min, max) {
      return Math.random() * (max - min) + min;
      `enter code here`};
  
  
        var playRandomTrack = function() {
        num = getRandom(0, 99);
        player.playVideoAt(num);  
        };
  
    function onPlayerReady(event) {
    player.loadPlaylist({'listType': 'playlist', 'list': 'PLmc_AnfxCB6t6Lwwgx3x5OxfNOWwHluU-','index': '99','startSeconds': '0','suggestedQuality': 'hd720'});
    player.setShuffle({'shufflePlaylist' : 1});
    }
  
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>