title: onYouTubeIframeAPIReady called once but multiple videos needed on a page
body: <p>I am using a server-side method to drop in YouTube videos with playlists and functioning buttons (think of a website widget that can be called anyway on a page, and potentially more than once on the page). </p>
  
  <p>I am using the IFrame API. I can get a single video to render by creating a new instance of YT.Player inside the onYouTubeIframeAPIReady() method. This makes sense to me - waiting for the library to be loaded. However when I want to have more than one video players on a page I don't know how to trigger the launch of the second, third, forth, etc.</p>
  
  <p>I can't define another onYouTubeIframeAPIReady() method because it will overwrite the first. How is it possible to add more players to the page? It seems strange that there isn't a way to create more videos after this initial method has fired...</p>
  
  <p>Documention on the above method is here:
  <a href="https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player" rel="noreferrer">https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player</a></p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Edit: (for clarification following the first answer from Miha Lampret)</strong></p>
  
  <p>I can't declare additional players inside the onYouTubeIframeAPIReady() method because this code is introduced via a server side called e.g. a "widget". So rather than:</p>
  
  <pre><code>function onYouTubeIframeAPIReady() {
      ytplayer1 = new YT.Player('player-youtube-1', {
          width: '640',
          height: '480',
          videoId: 'M7lc1UVf-VE'
      });
  
      ytplayer2 = new YT.Player('player-youtube-2', {
          width: '640',
          height: '480',
          videoId: 'smEqnnklfYs'
      });
  }
  </code></pre>
  
  <p>my code would equivalent to:</p>
  
  <pre><code>function onYouTubeIframeAPIReady() {
      ytplayer1 = new YT.Player('player-youtube-1', {
          width: '640',
          height: '480',
          videoId: 'M7lc1UVf-VE'
      });
  }
  function onYouTubeIframeAPIReady() {
      ytplayer2 = new YT.Player('player-youtube-2', {
          width: '640',
          height: '480',
          videoId: 'smEqnnklfYs'
      });
  }
  </code></pre>
  
  <p>The onYouTubeIframeAPIReady() is only executed once. What I need to check is the whether is has already been executed once.</p>