This project is archived and is in readonly mode.

#625 ✓invalid
Olivier Couston

Browser.Plugin.Flash.version returns wrong value in Safari 3 on Window

Reported by Olivier Couston | March 20th, 2009 @ 04:21 AM | in 2.0 (closed)

Sorry if this has already been reported, I search the tickets but did not find anything about this :

Browser.Plugin.Flash.version returns 9 in Safari 3 for windows while version 10 is installed : right click on a flash object brings "about adobe flash player 10" and the way I found about it is because Harald's FancyUpload needs a special hack to work with flash 10. The plugin not to work in safari 3 because older version of flash is detected, resulting in the hack not being applied. Chromes works just fine.

I haven't uploaded any test case because it would just be something as simple as alerting Browser.Plugin.Flash.version in safari and compare it with your version of the plugin.

Maybe it's just my machine, I don't know

Comments and changes to this ticket

  • Olivier Couston

    Olivier Couston March 20th, 2009 @ 04:35 AM

    ok, my bad it's probably my version of safari : if I go to the installed plugin page, it says I have BOTH flash 9 and 10 installed, which explains the mess up during detection. Apparently, upgrading to 10 does not remove 9 in safari... weird

  • Olivier Couston

    Olivier Couston March 20th, 2009 @ 05:29 AM

    Well I did some research, and apparently "it can happen" if you install multiple browsers, update flash player and such, safari can end up with multiple version of the plugin. For example, if you have flash player 9 and 10 installed, and the movie you try to play was compiled for flash player 9 or lower, safari will use flash 9, while if the movie was compiled for flash player 10, it will use flash player 10. I think. So in the end, I think it's safe to say that the most recent version installed should be the one returned by Browser.Plugin.Flash.version. Well, in my case, flash was behaving like flash 10, but identified as version 9 because it was the first one picked from the plugin array, so this is what I came up with this fix, I'm sure it can be inproved, but you get the idea:

    
    	if(Browser.Engine.webkit){
    		var flash = {
    			version:0,
    			build:0
    		};
    		for(var i=0; i<navigator.plugins.length; i++){
    			var p = navigator.plugins[i];
    			if(p.name == "Shockwave Flash"){
    				var description = p.description.match(/\d+/g);
    				var version =parseInt(description[0] || 0 + '.' + description[1] || 0);
    				if(version>flash.version){
    					flash = {
    						version:version,
    						build:parseInt(description[2] || 0)
    					}
    				}
    			}
    		}
    		Browser.Plugins.Flash = flash;
    	}
    
  • Christoph Pojer

    Christoph Pojer March 20th, 2009 @ 09:13 AM

    • Assigned user set to “Christoph Pojer”
  • Olivier Couston

    Olivier Couston March 20th, 2009 @ 04:50 PM

    here is a discussion about it: http://code.google.com/p/swfobje... Also, I read in another ticket that chrome and safari might be differentiated in Browser.Engine. if it's the case, this fix should only apply to safari, chrome does not have this issue

  • Christoph Pojer

    Christoph Pojer March 21st, 2009 @ 12:06 PM

    • State changed from “new” to “invalid”

    We discussed adding this check to detect the right flash version and found it to be trivial. Thing is, this only affects a very very small percentage of users. On the one hand Safari3 on Windows doesn't have a big market share and on the other hand not a lot of people have several versions of Flash installed. If you rely on Flash 10 or the check of the actual version on this browser please implement this fix on your own, maybe we link to this ticket in the Documentation. The reason behind this is that it would add several lines of code in the core for only a very small percentage of users, affecting nearly noone (Think: Safari3 Win, multiple flash versions, mootools and the need to distinct between Flash9 and Flash10).

    (its actually wontfix but we don't have a wontfix ticket state yet)

  • Olivier Couston

    Olivier Couston March 22nd, 2009 @ 04:45 PM

    I agree, it's a rare case, but in seems to be on any version of safari, not only for 3 for windows. but whatever, your call, I just added this snippet in my website, just in case

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages