IndiePaivaGame / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Multiple active Flash Player installs on Mac, only the first one is detected #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
original report by MattGiger:
http://groups.google.com/group/swfobject/browse_thread/thread/87d89c47b2178eae

====

After a lot of debugging I've found that it is possible to have more
than one version of flash installed on a Mac laptop using Safari for
some reason. This may happen on other Macs and with other browsers,
but the flash player detection routine in SWFObject fails to detect
the correct version. I've made a small modification to the ua
function() section that will correctly detect the most recent player.

Here is the diff for the new version 2.1:
40,45c40,52
<                    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+
<                            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] = /r/.test(d) ?
parseInt(d.replace(/^.*r(.*)$/,
"$1"), 10) : 0;

---

>                    for(var i=0;i<nav.plugins.length;++i) {
>                            d = nav.plugins[i].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+
>                                    d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
>                                    var pv0 =
parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
>                                    var pv1 =
parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
>                                    var pv2 = /r/.test(d) ?
parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
>                                   
if((pv0>playerVersion[0])||(pv0==playerVersion[0]&&pv1>playerVersion[1])||(pv0==
playerVersion[0]&&pv1==playerVersion[1]&&pv2>playerVersion[2]))
{
>                                            playerVersion[0] = pv0;
>                                            playerVersion[1] = pv1;
>                                            playerVersion[2] = pv2;
>                                    }
>                            }

Hope this helps other people with Flash detection on the Mac.

Original issue reported on code.google.com by bobbyvandersluis on 4 Oct 2008 at 10:43

GoogleCodeExporter commented 9 years ago
I can't reproduce the issue.

My tests include:
- Mac OSX 10.4.11
- Firefox 3.0
- Safari 3.1

Test sequence:
- uninstall fp 9.124 using Adobe uninstaller
- install fp 8.24
- install fp 9.16
- install fp 9.115
- install fp 9.124
- install fp 9.16
- install fp 9.124

During every version I checked which version was detected by Flash and 
SWFObject, and
which version(s) was installed by the 2 browsers.

However no anomalies.

I can imagine that this can be caused by potential plugin switcher software or
corrupt installers (see FAQ). 

Because I can't reproduce it AND it's the first time I have heard of this 
issue, I am
going to close it for now. 

If anyone can come with more info or can reproduce this I am happy to reopen the
investigation.

Original comment by bobbyvandersluis on 8 Oct 2008 at 2:49

GoogleCodeExporter commented 9 years ago
Issue has been reopened under issue report 198:
http://code.google.com/p/swfobject/issues/detail?id=198

Original comment by bobbyvandersluis on 21 Oct 2008 at 8:22