Reputation: 7610
I have browser plugin built using NPAPI Lib for Safari and Firefox for Mac System. Now I have newer version plugin and I am asking user to download new plugin if user doesn't have latest plugin.
After downloading the plugin it is not getting loaded and I have to close the browser and restart it.
I am doing navigator.plugin.refresh(false)
at regular interval but no success. I can't reload the page at this moment because I am still getting old plugin version.
If go and kill the plugin in activity monitor and restart the browser it is showing new plugin version. What can I try next?
This method is called every 3 sec
function InitIEPlugin() {
plugin = navigator.plugins["MyPlug-In"];
if (plugin) {
remoteEngine = document.getElementById('MyPlugin');
if (remoteEngine) {
isMyPluginInstalled = true;
var version = remoteEngine.getAttributeByKey("plugin_version");
if ((ua.indexOf('Intel Mac OS X 10.5') >= 0) || (ua.indexOf('Intel Mac OS X 10_5') >= 0)) {
//isHarmonyPluginUpgradeRequired = CheckVersionOfPlugin(version);
}
else {
isMyPluginUpgradeRequired = CheckVersionOfMacPlugin(version);
if (isMyPluginUpgradeRequired == true)
isMyPluginInstalled = false;
}
}
}
}
Upvotes: 0
Views: 179
Reputation: 14324
Next time make sure you mention your OS in the text; I see you're on OS X from your tags, but it changes everything to know that you're on Mac.
You need to install the new version as a different filename (well, the .plugin/ bundle needs to be named differently). The easiest way to do this is just to put the version of the plugin in the filename, e.g. ~/Library/Internet\ Plug-Ins/MyPlugin_1.1.0.12.plugin
As long as the new plugin has a different filename than the old, it should work.
Upvotes: 1