title: Youtube Video Player in C#
body: <p>How do I embed a youtube video into my C# project?</p>
  
  <p>I've looked at so many others that "answer" this question but, I can't find what I'm looking for.</p>
  
  <p>I've tried many different ways to embed them but, they don't work.</p>
  
  <p>I'm looking to use a web browser to just play the video but, with two options: loop and pause/play.</p>
  
  <p>Reason I'm doing this is because I'm making a twitch chat bot and I'm trying to add song requests.</p>
  
  <p>Latest attempt (because it was there so I decided on trying it out):</p>
  
  <pre><code>bool MUrlSpecify = true;
  private void btnMSetCurrent_Click(object sender, EventArgs e)
  {
     const string page = "&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;&lt;body&gt;{0}&lt;/body&gt;&lt;/html&gt;";
       string YTUrl;
       if(MUrlSpecify == true)
       {
          YTUrl = "https://www.youtube.com/embed/" + txtMSetCurrent.Text;
           wbMPlayer.DocumentText = string.Format(page, "");
       }
  }
  </code></pre>
  
  <p>(MUrlSpecify is a variable I added because later I'm going to have a search function)</p>
  
  <p>If anyone can tell me how I should do this I'll try their method because I'm all 
  out of ideas.</p>