James Hughes
James Hughes

Reputation: 6194

Determine if Silverlight CAN be installed

I am developing a page that needs to work in a variety of scenarios that is determined using JavaScript. Firstly if Silverlight is installed it should use Silverlight. Simple.

if(Silverlight.isInstalled()){
    // do stuff
}

Next I need to be able to determine if Silverlight CAN be installed. This is the hard bit. Basically if I am viewing the on, say for example, an iPad (but could be any non-Silverlight capable device) I want to use plain HTML. But if I am on a desktop machine that doesn't have Silverlight installed but can install it I wan't the usual install Silverlight stuff

Silverlight.getSilverlight();

I have seen the Silverlight.supportedUserAgent.js but like most UA sniffing techniques is a bit backwards. Is there a way feature detect such a thing?

Upvotes: 3

Views: 215

Answers (1)

James Hughes
James Hughes

Reputation: 6194

I am not entirely sure this is possible using feature detection. Not reliably anyway. I have decided to use the above Silverlight.supportedUserAgent.js library instead.

Upvotes: 1

Related Questions