I am trying to check the availability of Flash Player and the version as given below
var a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
if (a) { // a will return null when ActiveX is disabled
d = a.GetVariable("$version");
if (d) {
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
It returns the correct version if available.
But, I am facing a problem during the following situation -
When does the browser load the ActiveXObject? Is there any way to get the correct flash player version without reopening the browser?
I pressume that the version will be returned correctly when you reload the browser, so you could just set a setInterval
if no flash is available and check every 30 seconds whether it has become available and reload if it did become available.
Additionally if you place a hidden flash object on the page, in a lot of browsers flash itself will reload any tabs on which it sees a flash object. Or maybe it's the browser itself doing the refreshing, not sure, but I do know at least that if such an object is on the page it will refresh in various browsers.
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.