简体   繁体   中英

How to check if there is macromedia flash player installed on browser?

I am using uploadify plugin to upload images. On some browsers uploadify button is not shown because of unavailability of macromedia flash player, I guess.

Is there any way to check if there is macromedia flash player installed, If not then show a link to download flash player at the place of upload button.

Thanks

http://code.google.com/p/swfobject/

var hasFlash = false;
try {
  var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
  if(fo) hasFlash = true;
}catch(e){
  if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) hasFlash = true;
}

Use the SWFObject plugin for Flash detection. The tutorial is here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM