开发者

Detection of userAgents that do/do not support Unity3d Plugin

The unity3d web player plugin is supported by Explorer, Firefox, Safari, Mozilla, Netscape, and Camino on Windows or OSX.

Via JavaScript, what is the best method for determining whether a users configuration is supported, so I can alert them with the appropriate message? Is there a plu开发者_C百科gin out there that might support this case well? I'm looking for an easier solution than combing through the properties manually and testing on different devices myself.

Thanks in advance!


Since Unity uses NPAPI (for non-IE browser support), it should work in essentially every browser. You don't list Chrome, for example, but Unity works perfectly well in Chrome. There's no reason it shouldn't work in all the Gecko- and WebKit-based browsers, which make up most of the rest.

So before you deploy code that does this, consider carefully whether you really want to show an alert that will probably annoy the vast majority of users who will see it for no reason. If you are really concerned about users for whom Unity won't work, a blacklist of browsers you (or your users) encounter problems with is likely a better solution.


You can detect operating system using a snippet like this: http://www.javascripter.net/faq/operatin.htm

For detecting a supported browser I'd just use jquery's $.browser property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜