Code: Learn about Silverlight

Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of Microsoft .NET–based media experiences and rich interactive applications for the Web.

Silverlight Streaming by Windows Live offers a free streaming and application hosting solution for delivering high-quality, cross-platform, cross-browser, media-enabled rich interactive applications (RIAs).

How we used Silverlight Streaming in BackgroundMotion

We allow users to add new streaming video content by referencing a streaming Silverlight application, which helps add the appropriate URLs to fetch the content.

The Add from Silverlight provider assists in referencing a Streaming Silverlight Application

To consume the streaming application, we use the API's provided with the Silverlight Streaming services. We need to reference an additional script which is conditionally rendered out when dealing with Silverlight content

ClientScript.RegisterClientScriptInclude("zzz_Silverlight",
    "http://agorigin.net/g/silverlight.js");

as well as rendering out a script block to instantiate the Silverlight control

<div id="SilverlightWrapper" style="width:425px; height:350px; overflow:hidden;"></div>
  <script type="text/javascript">
    var SilverlightWrapper = document.getElementById("SilverlightWrapper");Sys.Silverlight.createHostedObjectEx({source: "streaming:
+ link.PathAndQuery + ",parentElement: SilverlightWrapper});
  </script>
<div>

Tip: The Silverlight Streaming services administration web site will help you generate the scripts you need to add to your web pages for refering to Silverlight applications you upload!


Where can I find out more information?