title: Playing youtube in WPF application. Embedded video is not supported
body: <p>I have a problem with an old WPF application i am building upon. When the application was made it was build to support playback of a Youtube video in an embedded WebBrowser control in WPF.</p>
  
  <p>When im doing this now, then i get an error saying that this is not supported any longer. I have made a really simple implementation of this here: <a href="https://github.com/BHvarregaard/WPFYoutubePlayer/" rel="nofollow noreferrer">https://github.com/BHvarregaard/WPFYoutubePlayer/</a> - in the MainWindow.xaml.cs file i have the code:</p>
  
  <pre><code>string videoId = idtextBox.Text;            
              string videoUrl = "http://www.youtube.com/v/{0}?version=3&amp;playlist=1&amp;hd=1&amp;autoplay=1&amp;fs=0&amp;autohide=1&amp;loop=1";
              string url = string.Format(videoUrl, videoId);
              browser.Source = new System.Uri(url);
  </code></pre>
  
  <p>Does anyone know how to do this or find another way of doing this. Right now i'm tied to the WPF application so i really would like to find the solution for WPF. The only other option i see would be to make a web based player of some sorts (maybe based on electron). But for now i really need a solution for the WPF.</p>
  
  <p>The actual error i get in the code above is shown in the image below<a href="https://i.stack.imgur.com/WnYUP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WnYUP.jpg" alt="enter image description here"></a></p>