how to detect flash using SWFObject

2019-01-25 06:18发布

I have downloaded SWFObject, and included it in my website. Now I want to simply get a true or false value based on whether or not Flash is installed in the users browser when they visit my site.

How can I do this?

2条回答
地球回转人心会变
2楼-- · 2019-01-25 06:54
if (swfobject.hasFlashPlayerVersion("9.0.18")) {
  // has Flash
}
else {
  // no Flash
}

or replace "9.0.18" with the minimum version you require

查看更多
你好瞎i
3楼-- · 2019-01-25 06:55

If You use jQuery SWFObject you could use:

if (!$.flash.hasVersion('9')) {
 //has Flash
}
else {
 //no_flash
}
查看更多
登录 后发表回答