title: How to play youtube videos on windows application C#
body: <p>I've created a windows application with a WebBrowser control and trying to play youtube videos.. I've installed Adobe Shockwave Player, and tried to watch video on my windows application, but it doesn't show any videos. When I hit play button the screen looks like this
  <img src="https://i.stack.imgur.com/lLEx5.jpg" alt="enter image description here"> </p>
  
  <p>My code for playing video is </p>
  
  <pre><code>StreamWriter sw = new StreamWriter("utube.html");
          string PlayString = currentVideoUrl.Trim().Replace("watch?v=", "v/");
          string Finalplaycode = "&lt;embed src=" + PlayString + "&amp;hl=en&amp;fs=1&amp; type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true width=425 height=344&gt;&lt;/embed&gt;";
          sw.Write(Finalplaycode);
          sw.Close();
          string PathToNavigate = Directory.GetParent(Application.ExecutablePath) + @"\utube.html";
          webBrowser1.Navigate(PathToNavigate);
  </code></pre>
  
  <p>and my example video link is : <a href="http://www.youtube.com/watch?v=oZdnezj9Dfg&amp;feature=BFa&amp;list=PLD3E900BFF6534896&amp;lf=plpp_video" rel="nofollow noreferrer">http://www.youtube.com/watch?v=oZdnezj9Dfg&amp;feature=BFa&amp;list=PLD3E900BFF6534896&amp;lf=plpp_video</a></p>
  
  <p>can anyone help me about this issue? Did I missing any plug-in or something? I am using .NetFramework 4.0</p>