Skip to main content
January 15, 2010
Question

Flash plugin detection in Internet Explorer v7??

  • January 15, 2010
  • 1 reply
  • 992 views

I am working on MP3 player app that uses navigator.plugins array in javascript to detect

the client Shockwave Flash plugin version. This works in DOM based browsers such as

Firefox and Safari, and also in Internet Explorer 5.0 on Mac OSX. I have been looking

at the detection code that Flash generates when the file is published, but I can't see what

would be different for detecting plugin verion in Internet Explorer v7.

I have a client/friend who has a new laptop and I wanted to show her the app but it would

not load correctly due to plugin detection failure. I asked my sister who also has and uses

Windows to test it and for her it would also not work in Internet Explorer v7; plugin version

detection fails.

Q: What is different for detecting plugin verion in Internet Explorer v7 (Windows, or any

other platform it might be run on)?

Thank you for time and attention.

JK

code I use to detect plugin versions:

clientObj.getSwfPluginVers = function()
         {
          var UA = clientObj.nav_ua;
          var outStr = '';
          if(clientObj.namePat.test(UA)) // for Opera v8x (?)
            {
             for(var i = 0; i < navigator.plugins.length; i++)
                {
                 if(navigator.plugins.name == clientObj.hold)
                   {
                    continue;
                   }
                 else
                   {
                    if(navigator.plugins.name == "Shockwave Flash")
                      {
                       clientObj.swfVers = navigator.plugins.description;
                      }
                   }
                 clientObj.hold = navigator.plugins.name;
                }
            }
          else
            {
             for(var i = 0; i < navigator.plugins.length; i++)
                {
                 if(navigator.plugins.name == "Shockwave Flash")
                   {
                    clientObj.swfVers = navigator.plugins.description;
                   }
                }
            }
         }

Then more code to reduce to single digit version.

This topic has been closed for replies.

1 reply

January 15, 2010

Why not just use SWFObject? It's much simpler...

January 15, 2010

well, I will have to look into that, but unless it produces the version

of the browser plugin, it won't do what I need in this application.

Thank you for your reply;

JK

January 15, 2010

I have found an answer to this question that is provisional at

this point, but looks like the ticket:

I found it here:

http://developer.apple.com/internet/webcontent/detectplugins.html

new update here: I found exactly what I need and wanted to

share with anyone who is looking for answer to the same or

similar question:

PluginDetect v0.6.3 [ isMinVersion getVersion Flash ] by Eric Gerds

www.pinlady.net/PluginDetect

This does exactly what I was looking for: It digs out the Flash plugin

version from I.E. v7 & 8 on Windows. It is advanced javascript, but

the web site should give enough info to get it working. It does not

write out vbscripts.

Such is life.

Thanks for replies. This may help someone else with similar

issue.

JK