Silverlight Again
After much complaining, I finally decided to pay my dues and learn Silverlight. After all, I am an entrenched Microsoft camper and it is not possible to forever deprive my colleagues and users of the pleasure and ease of uploading, sharing and enjoying videos on our own website. After all, a picture is worth a thousand of words, a video is worth 10,000 images.
So I went ahead ...
The process of setting up media files and play them in Silverlight is actually smooth and straightforward, albeit the steps are one too many, so are the required files.
Microsoft Silverlight QuickStarts has offered a good step-by-step workthrough. http://silverlight.net/quickstarts/silverlight10/media.aspx
Install silverlight plugin
add references to the silverlight javascript files: Silverlight.js and createSilverlight.js
step 2: create the HTML host element and initialization block
step 3: define the creation function that initializes your plug-in instance
create your Silverlight content files
...
Finally, to add media to your files, you create a MediaElement and set its Source property to reference your media source file through a URI path. The following is an example.
<Canvas
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<MediaElement
Source="thebutterflyandthebear.wmv" Width="300" Height="300" />
</Canvas>
Some limitations:
a. Silverlight only works with certain media types, mostly Windows Media Video/Audio files (.wmv and .wma ) and some MP3 files.
b. It also has a size limit. Since every single streamed file have two memory mapped files, therefore very large file can be denied due to the limit of user memory space available.
Prerequisites:
Microsoft Silverlight is fast evolving, and seems that 2.0 is now at the horizon. However, it also seems that the list of prerequisite is fast expanding too. Now to work with Silverlight 1.1, you will need the following:
-
Microsoft Silverlight 1.1 Alpha.
-
Microsoft Visual Studio 2008 Beta 2.
-
Microsoft Silverlight Tools Alpha for Visual Studio 2008 Beta 2.
-
An ASP.NET Web site.
Even with an organization backing, it is not easy for me to get all the newest toys.
Final Thoughts: Flash vs. Silverlight
While i am writing, I am keenly aware of my status as a beginner or outsider with regards to both of the technologies. My feeling is that Silverlight has a lot of potential, however it will experience a lot of growth pain and its future is uncertain. However it does provide a great tool for .NET developers to jump in to manipulate graphics, animation, videos and audios programatically and much much more sophistically.
However, in the battleground of online video streaming, Flash is still the king, because its 90% installation base and long-running success stories represented by YouTube, of which I have wonderful user experiences.