Friday, March 29, 2013

Embedding Silverlight Video Files in HTML5

Microsoft’s solution to displaying media files in a web page is Silverlight. Silverlight is seen as a competitor to Flash, but because it’s a relatively recent invention, it lags behind Flash in terms of popularity and widespread use. However, Silverlight is a flexible and powerful platform that can be programmed using .NET tools such as Visual Studio and Visual C#. You can also encode existing media files into a Silverlight specific format using Expression Web.

<object data="data:application/x-silverlight-2"
type="application/x-silverlight-2" width="300" height="300">
<param name="source" value="silverlightvideos/CleanTemplate.xap"/>
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="enableHtmlAccess" value="true" />
<param name="enableGPUAcceleration" value="true" />
<param name="initparams" value='playerSettings =<Playlist>
<a href="" style="text-decoration: none;">
<img src=""
alt="Get Microsoft Silverlight" style="border-style: none;"/>

Notice how the <object> tag now includes many pieces of information. The <param> and <Playlist> elements supply a great deal of data such as the path of the Silverlight compressed output file (.xap) and the configuration of the video being played.

No comments:
Write comments
Recommended Posts × +