A while back I saw a post titled something like Displaying YouTube Videos in Silverlight. The implementation included a Windowless Silverlight application with a Flash video player on top. Video controls were implemented in Silverlight, and were wired up with JavaScript.
YouTube is moving toward the h.264 encoding for their videos. (My guess is to prepare for HTML 5. It’s crazy to think that YouTube could/might move away from Flash.) Silverlight 3 is a benefactor because it can support h.264. If anyone is looking for a great mashup, make a Silverlight video player that integrates with the YouTube API.
To be explicit, this post is not about using the YouTube API; it is a proof of concept. I used the YouTube HD Ultimate Greasemonkey script to get the url of an HD video from YouTube, then used it as the source for the MediaElement.
The below screen shot shows the Silverlight poc on the left (notice the Silverlight menu) and the actual YouTube video on the right.
The code & example
Code – http://85turns.com/silverlight/zips/YouTubeHDTest.zip
Example – http://85turns.com/silverlight/YouTubeHDTest.html
Related posts:




June 29th, 2009 at 3:45 am
ummm. it won’t load for me and asks me for the latest Silverlight. i guess it is locked for 2.0 since i am using 3.0 beta
June 29th, 2009 at 3:53 am
Same problem here:
- installed version 3.0.40307.0
- required version Silverlight 2 GDR 1 (2.0.40115.0)
June 29th, 2009 at 8:34 am
[...] YouTube video in Silverlight 3 (Corey Schuman) [...]
June 30th, 2009 at 2:51 am
Now it loads but nothing happens even when you click submit or change the url and click submit
July 3rd, 2009 at 1:13 pm
[...] Como é que posso ter vídeo do youtube em silverlight? [...]
July 3rd, 2009 at 4:45 pm
[...] via Frank La Vigne – Aaron Marten – Visual Studio 2010 User Interface Guidelines – Corey Schuman – YouTube video in Silverlight 3, via Alvin Ashcraft – Tina Wood – The History of Microsoft 1995 – Jaime Rodriguez - Best [...]
July 3rd, 2009 at 5:08 pm
[...] via Frank La Vigne – Aaron Marten – Visual Studio 2010 User Interface Guidelines – Corey Schuman – YouTube video in Silverlight 3, via Alvin Ashcraft – Tina Wood – The History of Microsoft 1995 – Jaime Rodriguez - Best [...]
July 4th, 2009 at 12:22 pm
YouTube video in Silverlight 3 | Corey Schuman…
Thank you for submitting this cool story – Trackback from NewsPeeps…
July 4th, 2009 at 11:20 pm
YouTube video in Silverlight 3 | Corey Schuman…
Thank you for submitting this cool story – Trackback from DotNet Feed…
July 7th, 2009 at 1:47 pm
[...] media codecs, On2 and Sorenson/FLV, Silverlight, Video Technology July 7th, 2009 I came across this blog which describes how to play Youtube videos in Silverlight. Wow – Microsoft going after Flash [...]
July 21st, 2009 at 7:28 am
Has anyone gotten this to work in Silverlight 3 RTM? The sample project doesn’t seem to work.
July 21st, 2009 at 9:05 am
Hi Paul, I have it working and will soon post an updated version. I can’t wait, I’m very excited to show the new player.
October 31st, 2009 at 11:21 am
Youtube is my favorite website and i am so addicted in watching music videos in it,,
November 11th, 2009 at 10:36 pm
i am so addicted to Youtube. I watch mostly music videos and funny videos on Youtube sometimes i also upload my own funny videos in youtube. `
January 14th, 2010 at 4:21 pm
this is so typical of MS products. crap. total crap that barely works half of the time. SILVERLIGHT = EPIC FAIL. will now return to FLASH development and continue to make money while peeps fumble with SILVERCRAP.
January 25th, 2010 at 6:24 pm
doesn’t work…
February 1st, 2010 at 11:17 pm
중스의 생각…
Youtube 비디오 Silverlight로 보는 법 그리고 관련한 추가 codeplex 프로젝트…
February 17th, 2010 at 9:51 pm
Youtube is my favortie site to visit aside from facebook. most of the time i watched movie trailers and music videos on it.
February 19th, 2010 at 7:28 pm
Thanks a lot I really enjoyed reading this. It makes me want to create my own blog! Just what subject though? I am a dentist by profession but can’t imagine many people wanting to read about dentistry? Maybe I am wrong!
March 15th, 2010 at 10:45 am
[...] YouTube video in Silverlight 3 | Corey Schuman – http://www.85turns.com/2009/06/28/youtube-video-in-silverlight-3/ – http://www.GetShawty.com [...]
April 26th, 2010 at 10:12 pm
I love watching videos online specially on Youtube. There are lots of music clips, movie clips and instructional videos on Youtube. I love em all.
April 29th, 2010 at 10:14 am
i use Youtube to watch Taylor Swift videos. I always watch movie clips on Youtube. What an awesome site. :-
April 29th, 2010 at 2:26 pm
i use Youtube to watch Taylor Swift videos. I always watch movie clips on Youtube. What an awesome site. “
May 27th, 2010 at 10:35 am
hey,this is Sadie Rote,just discovered your Post on google and i must say this blog is great.may I quote some of the Post found in the website to my local people?i’m not sure and what you think?in any case,Many thanks!
May 29th, 2010 at 10:32 am
Hey, Admin, I am starting my own blog, I was wondering which blog platform you are using? Sorry for the noob question and thanks for you help in advance
June 3rd, 2010 at 10:13 am
Hey, very nice website. I actually came across this on Ask Jeeves, and I am happy I did. I will definately be revisiting here more often. Wish I could add to the post and bring a bit more to the table, but am just taking in as much info as I can at the moment.
Thank You
watch free movie online net
June 4th, 2010 at 4:36 pm
Dude.. I am not much into reading, but somehow I got to read lots of articles on your blog. Its amazing how interesting it is for me to visit you very often.
Thanks
receding hairline
June 5th, 2010 at 7:53 pm
Muy interesante, voy a compartirlo en mi blog
June 6th, 2010 at 7:45 am
Hey there, Really good going, I’m going to post a quote of your content on my blog (with a link back). I trust that’s ok?
June 14th, 2010 at 9:29 pm
Hey, great blog! I’ve used this procedure a number of times already and i’ve had great success. All dentists should take note of this. Fast with a good end result, what more could you want? Thanks.
August 21st, 2010 at 12:35 pm
Saludos desde el frío Polo Sur
October 9th, 2010 at 5:58 pm
Some interesting information on here. Slightly off topic but I am so excited !. I saw Cats The Musical for the first time and the music along with the dancing is extraordinary. It is definitely an emotional journey that all the audience gets involved with !. ‘Cats’ will make you laugh and smile and touch certain places inside your heart. Everybody left the theater singing, pleased and uplifted. If you get a chance to go and see ‘Cats’ I really recommend it.
October 14th, 2010 at 12:27 am
youtube is very addicting, i spend 5 hours a day just watching videos on youtube*:`