title: Youtube API Set current time
body: <p>I am currently using the You-Tube API for a project of mine.
  The way I use it is the following:</p>
  
  <pre><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);
  
  // 3. This function creates an &lt;iframe&gt; (and YouTube player)
  //    after the API code downloads.
  var player;
  var alternatePlayer;
  function onYouTubeIframeAPIReady() {
      player = new YT.Player('player', {
          height: '390',
          width: '640',
          videoId: 'M7lc1UVf-VE',
          events: {
              'onReady': onPlayerReady
          }
      });
  
  }
  
  // 4. The API will call this function when the video player is ready.
  function onPlayerReady(event) {
      event.target.playVideo();
  }
  </code></pre>
  
  <p>It all works well, but for my project I need to be able to control the current time that the video is playing.
  I have searched the You-Tube API notes and data but could not find a paramter nor a function that enables me to set the current time of the video (There is a GET for the current time but not a set).
  There is a parameter <code>startseconds</code> that when mentioned in the youtube creation (I mean near the parameters height,width,videoId) can control what second the video starts from. This does not fit my needs because I need to change the current time of the SAME video and not load another one. Is there any way around this? Am I missing this set function? Must I recall the same videoId with the <code>startseconds</code>?
  Thanks very much in advance for any light on that matter.</p>
  
  <hr>
  
  <p>EDIT:
  Okay, I have found the solution in some weird way. For some reason I don't see it mentioned on the You-Tube API.</p>
  
  <pre><code>player.seekTo(55,true); 
  </code></pre>
  
  <p>This code will change the you-tube player to 55 seconds, which is a SET for the current time.
  Thanks everyone for your time.</p>