Friday, 16 August 2013

How to detect flash player version by js

How to detect flash player version by js

This function always return "0" in IE
function getFlashVersion(){
var flash = 'None';
// Count down from 10.
for(var i = 10; i > 0; i--)
{
try{
flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+String(i));
}catch(e){
//console.log(e);
}
if(flash != 'None')
return flash.GetVariable("$version");
}
return 0;
}
but chrome return 11.8.r800
how to detect flash player version in IE.

No comments:

Post a Comment