Scott Hanselman

Moonlight 1.0 Release - Open Source Silverlight 1.0 Implementation on Linux

February 12, '09 Comments [4] Posted in ASP.NET | Open Source | Silverlight | Windows Client | WPF
Sponsored By

image Congrats to Miguel (nice guy and a fine dancer) and team for the release of Moonlight 1.0. What is it?

"Implementation of Silverlight for Unix systems has officially reached its 1.0 level. We are feature complete, we pass all the Microsoft regression test suites and we shipped support for Microsoft's Media Pack for x86 and x86-64 architectures.

Moonlight is available as a Firefox plugin that can be installed with a single click from the moonlight download page."

It's an implementation of Silverlight 1.0 for Unix. That includes graphics, video/audio and the JavaScript bridge. It's not Silverlight 2.0, yet, so it has no execution engine. There's no CLR. Rather one uses Javascript to do work.

In the future (pronto, espero, Miguel?) Moonlight 2.0 will be the Unix version of Silverlight 2.0 and include the ECMA CLR execution engine (fancy words for "CLR on Linux in the browser").

You can watch a Silverlight, ahem, 2, screencast of the installation process over on Tim's blog or check these static screenies of me running OpenSUSE and Firefox, visiting http://videoshow.vertigo.com/ (a Silverlight 1.0 site), installing Moonlight, and watching a video. If you want to try it, you can burn a LiveCD (bootable ISO) that includes it here.

Moonlight 1.0 Installation Screenshots

I'm running OpenSuse 10.3 and Firefox 2, just to point out that you don't have to be super-bleeding edge to run this plugin. I visit http://videoshow.vertigo.com/ first, and I get the Microsoft Silverlight plug-in download badge.

Moonlight Install Step 1

Note that the folks that ran this page have not coded specially for Moonlight. When the badge is shown, clicking on it sends you to a Microsoft link that will sniff your browser and OS and send you to the right place for Silverlight. If Microsoft sees you need Silverlight 1.0 and you've got Linux, you're sent to http://www.go-mono.com/moonlight. This is cool (read: no evil) as Microsoft's detection code redirects you to Mono. Next, you get this screen:

Moonlight Install Step 2

Now, I select 32-bit vs. 64-bit, the click Download the Plugin, and I get the standard Firefox installation dialog, like any Firefox plugin:

Moonlight Install Step 2

Click "Install Now" and restart Firefox. I hit http://videoshow.vertigo.com/ and I can see the Silverlight application right there.

Moonlight Install Step 3

At this point in our installation, you're running all Open Source software. You won't, however, be able to play videos that require non-Open-Source-ed codecs. But, you can install the Microsoft Media Pack that includes codecs Microsoft has made available for Moonlight by right clicking on the Silverlight player and clicking "Install Microsoft Media Pack." Or, you'll be prompted the first time the Silverlight app tries to play the media.

Even thought Moonlight 1.0 exposes Silverlight 1.0 features, it uses a 2.0 media stack (minus DRM). That means, you can use media that uses these codecs:

Video:

  • WMV1: Windows Media Video 7
  • WMV2: Windows Media Video 8
  • WMV3: Windows Media Video 9
  • WMVA: Windows Media Video Advanced Profile, non-VC-1
  • WMVC1: Windows Media Video Advanced Profile, VC-1

Audio:

  • WMA 7: Windows Media Audio 7
  • WMA 8: Windows Media Audio 8
  • WMA 9: Windows Media Audio 9
  • WMA 10: Windows Media Audio 10
  • MP3: ISO/MPEG Layer-3
    • Input: ISO/MPEG Layer-3 data stream
    • Channel configurations: mono, stereo
    • Sampling frequencies: 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, and 48 kHz
    • Bit rates: 8-320 kbps, variable bit rate
    • Limitations: "free format mode" (see ISO/IEC 11172-3, sub clause 2.4.2.3) is not supported.

Basically, the first time that Moonlight hits a page that contains media, it will ask you whether you want to install the Microsoft Media Pack which contains the codecs for all of the formats listed before. Microsoft offers the codecs for Linux on x86 and Linux x86-x64. If you want codecs on other *nix platforms, go vote here.

Now, click a video, and it'll play nicely in Moonlight on Linux:

Moonlight Install Step 3

Very cool. It was a smooth and fast install and it runs great. Where's Moonlight 2.0?! ;) Seriously, though, congrats to the team. If you want to check out the source for Moonlight 1.0, you can find it here.

Detecting and Supporting Moonlight and Google Chrome

While the Video.Show guys didn't have to do anything to support Moonlight, if you want to really customize the detection experience, make sure to visit Tim's blog post on Moonlight and Silverlight Detection scripts. He's updated the Silverlight.supportedUserAgent.js helper script to check for Linux and report correctly, and shows you how to hack in support (the currently unsupported but seems to work but don't quote me on that) for Google Chrome.

If you're interested in learning more about Silverlight, check out http://silverlight.net/learn/ as it's full of video tutorials and samples.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Thursday, February 12, 2009 4:13:43 AM UTC
I was there when this was concieved - thrilled it's public now! My post about the start of the project - Dancing in the Moonlight!
Thursday, February 12, 2009 4:26:04 AM UTC
Sorry - linked to an older post - this is one where Moonlight was concieved
Thursday, February 12, 2009 10:54:57 AM UTC
Chrome 1.0 (and Safari for Windows 3.2.1 and Opera 9.63) have issues when rendering windowless Silverlight. It's a little frustrating working with Silverlight when these browsers will claim that Silverlight "works fine" on them but actually doesn't, leading to some rather unpleasant browser detection script.
Joe Chung
Thursday, February 12, 2009 5:19:20 PM UTC
Great news! What i need now is more time to polish my SL skils. With all the new toys around (LINQ, EF, MVC, etc.) is it getting harder to stay current :)
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.