YouTube video in Silverlight 3

Posted by Corey on June 28, 2009 at 11:27 pm.

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.

image

 

The code & example

Code – http://85turns.com/silverlight/zips/YouTubeHDTest.zip

Example – http://85turns.com/silverlight/YouTubeHDTest.html

Related posts:

  1. Silverlight Video Player – topics and thoughts
  2. NBC Olympics video player
  3. Styling a Play/Pause button for Silverlight video
  4. Create a video player in Silverlight 2 – Part 1
  5. Silverlight and VOIP

33 Responses to “YouTube video in Silverlight 3”