Running Silverlight 2 on Google Chrome using the Chrome Dev Channel - Jon Galloway

Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

When Google Chrome first came out and I read that it used Webkit, the same rendering engine that powers Safari, I tried browsing a few Silverlight 2 sites. It kind of worked, as long as the sites didn’t exclude browsers that weren’t on Microsoft’s official Silverlight support list. The controls loaded, but didn’t animate or update smoothly. While Microsoft still isn’t officially supporting Silverlight on Chrome, Chrome’s latest Dev Build (0.2.151.2) includes some specific fixes to support Silverlight 2 Beta 2. The information about the updates is in the release notes, specifically revision 1735:

The basic issue here was that the plugin would not paint correctly. The URLs mentioned in this bug load windowed silverlight plugin instances, which invoke the NPN_InvalidateRect API to paint. We send over the rects to the renderer, however these don't generate paints as the plugin is windowed. A peek at Safari's webkit implementation revealed that they merely invoke the InvalidateRect windows API in this context.

I followed the link in Jonas Follesø’s post over to the Chromium Developer instructions for running the Chrome developer build, which are really simple:

  1. Download and run the Google Chrome Channel Chooser (http://chromium.googlecode.com/files/chromechannel-1.0.exe).
  2. Click the circle next to Dev.
  3. Click Update to save your choice.
  4. Click Close.
  5. In Google Chrome, click the wrench menu and choose About Google Chrome. Note: On Windows Vista, updates from the About box require Service Pack 1. With 0.2.149.29 (the current release), on demand updates do not work in Vista SP1 if User Account Control is disabled.
  6. Click Update Now to install the current Dev channel release.
  7. Restart Google Chrome.

And yes, it really is that easy – I had it running in under 5 minutes. First, I ran the Chrome Channel Switcher. It’s a simple EXE, not an install. Select Dev, press the Update button, then press the Close button:

Google Chrome - Build Channel Switcher

Then open the about box (in the wrench menu) and click the Update Now button:

Google Chrome / About Menu

Google Chrome - Dev Build Update

The update runs:

Google Chrome - Updating

After the update finishes, close and reopen Chrome. If you want to verify you’ve updated, check the about box – you’ll see the version number is different:

Google Chrome 0.2.152.1

That’s it. The whole process took just a few minutes for me. Now, off to view some of my favorite Silverlight 2 Sites! First, the Hard Rock Memorabilia page. There’s a check to see if the browser is supported, but it still lets me in if it’s not on the list (which is a good policy anyways, since it allows Linux / Moonlight users to view the site):

Google Chrome / Silverlight / Hard Rock Memorabilia

I hit okay, and we’re in. The site is snappy and everything works just fine:

Google Chrome / Silverlight / Hard Rock

How about the Mojave Experiment site, which uses a fancy Deep Zoom / video cloud thing? Yep.

Google Chrome / Silverlight / Mojave Experiment

Jonas has some screenshots of other Silverlight sites, which also worked well for him, and it worked for Samiq as well. From the release notes, this Dev release also fixes issues with Flash, such as YouTube videos freezing when you use the slider. Go get it!

Note: All the computers I tested this on had Silverlight installed before upgrading Google Chrome to the dev build. One had Safari / Windows installed, the other didn’t. Google Chrome doesn’t include Silverlight; you’ll need to install Silverlight separately if you don’t already have it.

Published Wednesday, September 17, 2008 12:29 AM by Jon Galloway

Comments

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

Hmmm...I already did this but I am still not finding *my* sites are working.  I wonder whether its Silverlight.js's hosting pattern (I tend to use this instead of the ASP.NET control).  Any suggestions?

Wednesday, September 17, 2008 4:59 AM by Shawn Wildermuth

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

Its windowless=true that's not working...

Wednesday, September 17, 2008 5:35 AM by Shawn Wildermuth

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

Great tutorial Jon, and thanks for the link backs.

@Shawn Hmm strange... But I think you're right, it's probably a JS problem. I noticed how my Webcam Proof of concept application didn't load, and that's the only one where I'm using the JavaScript file instead of the ASP.NET Service Side control to serve up Silverlight.

Wednesday, September 17, 2008 6:55 AM by Jonas Follesø

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

@Shawn Read your post, and I think you're right. Quite a coincidence, but that Webcam POC app which is the only one where I use the JS to include the control, is also the only one where I'm using windowless=true (I'm showing Flash content on top of the Silverlight plugin).

Wednesday, September 17, 2008 6:58 AM by Jonas Follesø

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

Nice! Great post Jon.

Wednesday, September 17, 2008 7:56 PM by Greg

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

it's funny, the more i use Chrome (for windows), the more unstable it seems to get... crashes a lot more, can't handle sites with flash, hangs every time i close a tab... all that to say, i'm switching back to Firefox

Saturday, September 20, 2008 6:51 PM by movie fan

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

Jon, I'm curious.  Can you use your mouse wheel to zoom in and out on the Hardrock Memorabilia site when using Chrome as your browser?  After installing and verifying that I've got the dev version running, if I go the Hardrock site and use my mousewheel to zoom, CPU usage goes to 100% and Chrome pops the unresponsive sad face.

Tuesday, September 23, 2008 9:04 AM by George Kapsambelis

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

Another reason not to use Silverlight.

Wednesday, December 3, 2008 4:08 PM by Scott White

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

@Scott White -- or, another reason not to use Chrome...

Friday, December 19, 2008 3:25 PM by erikny

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

Great post, Jon... but it still doesn't work for me running Vista 64... Chrome just crashes... seems to be normal for just about everything I want to run on this OS.

I've got a quad processor 64bit system, and it looks like I'll be going back to Vista 32... what a waste.

Sunday, March 1, 2009 7:49 PM by Bill Richardson

# re: Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

It works!! Thank alot!!

Wednesday, April 1, 2009 2:31 AM by JT - Google Chrome Lover