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




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 [...]