How to play a YouTube video in WPF using C#

13,242

You'll have to use a WebBrowser control - Here's an example: http://www.codeproject.com/Articles/27121/Stream-YouTube-Videos-in-WPF

Cut and past of what Mike posted as comment :)

Share:
13,242
Vero009
Author by

Vero009

I am a student of C# programming school and i love programming too much !!!

Updated on July 12, 2022

Comments

  • Vero009
    Vero009 almost 2 years

    I want to play a YouTube video in my WPF application. I am using Google API and successfully get information about video but i don`t understand how to play a video. Here is my code which is i used for retrieve information.

      YouTubeRequestSettings setting = new YouTubeRequestSettings("MyAPP", "ID");
      YouTubeRequest request = new YouTubeRequest(setting);
      YouTubeQuery myQuery = new YouTubeQuery(YouTubeQuery.MostPopular);
      myQuery.OrderBy = "viewCount";
      Feed<Video> videoFeed = request.Get<Video>(myQuery);
      foreach (Video item in videoFeed.Entries)
           {
              listBox1.Items.Add(item.Title);
           }
    

    thank`s