This article is more than 1 year old

Get started with Silverlight

A time to shine

Going with the flow

There's nothing to stop you taking this example, extending it and incorporating it into your own site, but that's only part of the Silverlight story – with the Silverlight Streaming Service (currently in Alpha), Microsoft is also offering to host your application. Currently, that's free of charge.

You can sign up for a Silverlight Streaming account here, and host up to 4Gb of content including video. Individual videos can be no larger than 22Mb – equating to about 10 minutes at 300Kbps.

The current Silverlight Streaming service gives you access to a global, high performance, high availability content distribution network - the same content delivery network that recently carried the video clips and demonstrations for the launch of Microsoft's Halo 3.

You start by creating a manifest.xml file that tells the streaming service which XAML file to load and run:

<SilverlightApp>
        <version>1.0</version> 
        <source>Scene.xaml</source>
</SilverlightApp>

Next you create a ZIP file that includes this manifest file, the Scene.xaml file and the video MyVideo.wmv. You can also include JavaScript files that add functionality, but we'll keep this demonstration application simple.

On Windows, multiple select the files, right click and select Send To Compressed (zipped) folder - you can use any of the popular ZIP compression programmers, but you need to make sure that the manifest file appears in the top level root of the zip file - zipping the parent directory will not work.

Having signed up, you simply log in to Silverlight using a Windows Live ID - something you must use - and then click Manage Applications. Select Upload a Silverlight Application, specify a name and browse for your ZIP file. Click Upload. Depending on your connection speed, this may take a while. If all goes well, you will be presented with a page that allows you to test your application. You will also be given sample HTML and JavaScript that you can cut and paste into your own web site to host the application.

Next steps

To create more serious XAML applications you really need a good XML editor. The Microsoft Silverlight 1.0 SDK includes an add-in for Visual Studio 2005 that provides context-sensitive XAML editing and IntelliSense. The forthcoming Visual Studio 2008 will include a XAML based Graphical User Interface builder.

Expression Encoder is available as a free trial download and allows you to edit and manipulate video and audio clips. Available here, Expression Encoder – part of the Expression suite - will generate XAML video player applications in a variety of styles for use with Silverlight Streaming with an appropriate manifest.xml file.

Conclusion

So to wrap up, Silverlight is a browser-based plug-in that extends programming in DOM using XAML to program video and graphics. Using XAML, you can construct a basic framework that's relatively simple to customize and extend while the Silverlight Streaming Service lets you harness Microsoft's content distribution network to deliver media on a global scale. These are early days for Silverlight, but the platform shows great promise. ®

Rob Blackwell is director of R&D for Active Web Solutions who worked with the Royal National Lifeboat Institute (RNLI) to build its award winning Sea Safety tracking system. You can keep up with Rob here.

More about

TIP US OFF

Send us news


Other stories you might like