When I use swfobject.getFlashPlayerVersion() on IE11 with flash version older than current 15.0.0, I always get "0.0.0" as the result. (with version 15 it works correctly)
I have tested it with both flash player plugin on FF and active x on IE. With Firefox, everything works correctly. Swfobject FAQ states in question 3 that some versions may give incorrect results, but it does not mention returning "0.0.0" and also I have tested flash player versions 9, 10, 10.2, 10.3, 11.3 and 13 and the result in IE was always the same.
I really need to get the correct version of flash player installed in IE. Is there any solution to this problem? Are there any other options how to reliably get the correct flash player version?
EDIT: There was a question what swfobject does to look up the version. Well this is the part of the code that does it:
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
plugin = true;
ie = false; // cascaded feature detection for Internet Explorer
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
try {
var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
if (a) { // a will return null when ActiveX is disabled
d = a.GetVariable("$version");
if (d) {
ie = true; // cascaded feature detection for Internet Explorer
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
}
catch(e) {}
}
I found out that in IE10 it goes to the else if part (flash version does not matter) while in IE11 with flash 15 it goes to the first if . However, with IE11 and older flash it skips both conditions:
- window.ActiveXObject is undefined in IE11 (as it should be, or at least that's what I have found)
- but it also skips the first if and when I look at navigator.plugins there aren't any despite having the flash 11.0 installed
Where is the problem? Why the older flash is not listed in my IE11 plugins?