×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

First a congratulations to the Moonlight team for reaching their official release of 1.0!  Miguel and team have done a great job providing parity with Silverlight 1.0 and should be proud of their accomplishments.  Miguel, when is Moonlight 2 coming out :-) -- no rest!!

But seriously, this is a good accomplishment for the ecosystem.  Last month I wrote and recorded my experience of the Moonlight installer/rendering on an OpenSUSE environment.  What this demonstrated was that we’d integrated the Moonlight redirection/installer into the server-side installer detection from Microsoft.  Users on Linux visiting a Silverlight 1.0 application and not having the plugin would be directed to the Moonlight installer, using the same install link that other Silverlight applications currently leverage.  I think this shows great partnership to both teams to acknowledge and integrate that process.

Today, I updated the user agent detection script for Silverlight to also accommodate this release.  For those who don’t know, there are two helper scripts for Silverlight developers you can leverage:

  • Silverlight.js – this script helps to detect if the plugin is installed and if so, create’s the appropriate <object> tag representation.
  • Silverlight.supportedUserAgent.js – this script is also a helper script that can be used with Silverlight.js or alone.  The purpose of this script is to do some pre-checking to see if the browser/platform combination (based on the reporting User Agent string of the browser) will support Silverlight.

It is the second script that I’m referring to.  The updated release on the release site for the script (2.0.40211.0) now includes checking for Linux and reporting correctly.  Using this script is as simple as:

   1: var canSilverlightRun = Silverlight.supportedUserAgent("2.0");

This code above is basically asking: I’ve got this combination, is this version of Silverlight going to be supported?  This helper can be used by developers to pre-check if Silverlight can run on the platform of the user. 

If you are using the UA detection script, you’ll want to update it to the latest version if you have a Silverlight 1.0 solution and want to expand to Linux users.  That is the only change in this update.  No changes to Silverlight.js have occurred as a result of this, as remember, that only checks if the desired version is installed on the user machine.

If you want to play around with some settings, you can visit a quick-and-dirty page I created that uses both scripts and reports the results (Version Supported reports Silverlight.isInstalled, and UA Supported reports Silverlight.supportedUserAgent).  Hope this may help.

Hey what about this Google Chrome hack you mentioned?

Officially Google Chrome is not a supported browser, but most (your mileage may vary) Silverlight applications run.  Since the detection scripts are Ms-PL licensed, you’re welcome to change them to fit your needs.  The official copy on the release site will map to the supported matrix for Silverlight for now.  If you want to add support for Google Chrome, here’s what you’d do.

On line 93 in Silverlight.supportedUserAgent.js, insert this line:

   1: else if (ua.indexOf('Chrome') >= 0) {
   2:     slua.Browser = 'Chrome';
   3: }

Before the Safari check is important because Chrome’s user agent reports Safari in it as well as Chrome.  Then you will have Chrome detection working in your script.  Again, only if you need/want it.  We continue to evaluate the browser support matrix for Silverlight and before you ask – no decisions have been made just yet to change the current supported matrix.

Hope this helps!  Congratulations Moonlight team!


This work is licensed under a Creative Commons Attribution By license.


2/12/2009 8:32 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
I've been using Chrome since it was released and Silverlight apps do not really work in it. They'll render their first couple of frames, and that's about it. If I resize the Chrome window, it'll refresh the Silverlight control, but it still won't react to user input. :-P
2/12/2009 9:12 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
Robert - hence why it still isn't supported yet :-) -- do you have a sample site though I can look at that exhibits this behavior?
2/13/2009 8:21 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
You'll note that Silverlight works just fine in Chrome if you start it in single process mode (command line switch -single-process). So the issues that people experience with Chrome are very likely the fault of Chrome and not of Silverlight. Google made a bold move by deciding to load all plug-ins out of process and attempt to render them in-line with the HTML. Because plug-ins are simply not designed to be hosted out-of-process a lot of them flat-out didn't work or behaved very erratically. In order to get various plug-ins like Flash to work they had to hard code different loading behaviors to change how the plug-in is hosted or where the rendering takes place. It's a huge hack and will always be prone to failure.

My opinion is that since Google and Microsoft are both moving towards process isolation of rendering and plug-ins within the browser that it would be beneficial if both companies could collaborate on a basic framework and guidelines to plug-in developers for hosting these plug-ins out-of-process in restricted security contexts. This would benefit all browsers as they follow Microsoft and Google to provide isolation for the purposes of reliability. Combined Microsoft and Google would bring trust and market clout to any such framework ensuring that plug-in developers consider it and even that other browsers embrace the concept.

Until then Chrome and plug-ins will always be hacks on hacks where plug-ins like Silverlight are doomed to not function very well unless Google adds another hard coded hack to their code base.

Also, if you want an example of a Silverlight applet losing the ability to accept input, just navigate to MSDN's front page. Normally it works out of the gate, but if you scroll the page it stops working. If Chrome is in single-process mode it will work just fine.
2/13/2009 10:29 PM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
Is there anything out there that's still using Silverlight 1.0, or at least will work with Moonlight? I haven't found anything. Everything seems to be using Silverlight 2.0.
2/17/2009 8:14 PM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
Rene - there are a few sites running Silverlight 1.0 -- the Moonlight project page has a list of their test sites they used. http://videoshow.vertigo.com is a sample media site that will run in Moonlight and give you the Moonlight + media codec pack experience.
2/20/2009 10:16 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
The current version of Silverlight.js (2.0.31030.0) seems to be outdated, though it's the most recent version available. Silverlight.getSilverlight() calls Silverlight.followFWLink("114576" + verArg); but the LinkID 114576 is outdated, and verArg only contains the first 2 parts of the version passed to the function (2.0 instead of 2.0.31005.0). If you launch the link created (go.microsoft.com/fwlink/?LinkId=114576&v=2.0) in Safari on Windows it will say that "The site that you visited was built for an earlier, beta version of Silverlight." Changing the above mentioned line to Silverlight.followFWLink("124807"); fixes the problem. Am I doing something wrong, or is this indeed a bug?
2/20/2009 10:19 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
Erik - Safari on Windows isn't a supported platform for Silverlight.
3/18/2009 10:46 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
You are right, Safari is not supported, but that's not the point I am making. The point is that Silverlight.js contains the wrong LinkId. LinkId 114576 is for the beta of Silverlight, and the most recent Silverlight.js still has that outdated LinkId.
3/18/2009 10:54 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
Erik all those FWLinks were redirected to the actual release.
6/2/2011 11:34 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
I bought a sony google tv player recently. I have subscribed to a paid tv channel sight that shows content using silverlight plug in. I am unable to play that content when using sony google tv player.
Gravatar
11/24/2012 2:29 AM | # re: Moonlight 1.0 Released, Silverlight script updated – and a Chrome hack
Where Silverlight.supportedUserAgent.js can be located on Fedora machine?

I tried to install Moonlight on both Firefox and Chrome. Firefox makes itself "OK, installed" but doesn't use Moonlight. Chrome even doesn't try to install Moonlight.
Thanks.

 
Please add 8 and 2 and type the answer here:

DISCLAIMER:

The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.