title: Embed YouTube with Video Selected from List
body: <p>Ok - let me start by saying that I am NOT a web developer, and I've done very little with HTML and absolutely nothing with javascript, and my development activities have all been pretty minor, as it is not my job but a side interest. I have been tasked to take over my church's website, and one of the things that is being asked for is to embed video, and have a selector to choose which video to play. For example, when the page loads up, I would have it load up the most recent video, and show a list off to the side or down below that has other videos to choose from. Selecting one of those videos would play it in the same player, without going to YouTube.</p>
  
  <p>I have tried a couple things, but I'm coming up pretty empty looking around the web for ideas, so this may not be possible, though I would be surprised if that were the case. Here is the latest thing I've tried, just to try to make the player load up a secondary video (I can figure out how to use variables in javascript later in order to handle multiple videos). To put it bluntly, the button doesn't seem to do a thing. I would appreciate any suggestions that anyone can give me.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
   &lt;head&gt;
    &lt;title&gt;
     Sample FPC Oakwood
    &lt;/title&gt;
   &lt;/head&gt;
  
          &lt;div id="ytplayer"&gt;&lt;/div&gt;
  
          &lt;script&gt;
              // Load the IFrame Player API code asynchronously.
              var tag = document.createElement('script');
              tag.src = "https://www.youtube.com/player_api";
              var firstScriptTag = document.getElementsByTagName('script')[0];
              firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
  
              // Replace the 'ytplayer' element with an &lt;iframe&gt; and
              // YouTube player after the API code downloads.
              var player;
              function onYouTubePlayerAPIReady() {
                  player = new YT.Player('ytplayer', {
                      height: '390',
                      width: '640',
                      videoId: 'RYDpE0SgXOw'
                  });
              }
  
              function onYouTubePlayerSelectOther() {
                  player = new YT.Player('ytplayer', {
                      height: '390',
                      width: '640',
                      videoId: '1HsmP-Gk7c4'
                  });
              }
          &lt;/script&gt;
          &lt;input id="submit" type="button" value="Sis Bernardini" onclick="onYouTubePlayerSelectOther();"/&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks for your help.</p>