Question

I've tried out the solutions proposed here: Cross Browser Flash Detection in Javascript

but they do not seem to work in Chrome v29.0.1547 on Android v4.1.2

I'm using the code in Drupal, hence I had to escape the ' , but I do not think there is an issue with that, however here is the complete code that I've tried:

$onloadjssndsetup3 = 'jQuery(document).ready(function($){

     var isFlashExists = swfobject.getFlashPlayerVersion().major !== 0 ? true : false ;


        if (isFlashExists == false) {           
        $("#main").before("aa");};



      });
';
drupal_add_js($onloadjssndsetup3, 'inline');

This code adds the "aa" to the page. I've also tried this other code:

$onloadjssndsetup3 = 'jQuery(document).ready(function($){
 var isFlashExists = swfobject.hasFlashPlayerVersion(\'1\') ? true : false ;

    if (isFlashExists) {            
    $("#main").before("aa");};



  });
';
    drupal_add_js($onloadjssndsetup3, 'inline');

but it doesn't work either, the "aa" is not added in this case.

the funny part is that it's an Samsung Galaxy SIII the smart phone that I'm trying on, and flash is working on it with no prolem, it's just that I can't make the swfobject report it properly, it reports that flash is not installed.

Am I doing something wrong?

On Win8 on IE , FF it detects it properly.

Was it helpful?

Solution

Most probably there is no solution to this issue, people answered on the previous thread, but obviously it doesn't work on all versions of Android, or maybe it's just the Android version v4.1.2 that is a bit wired...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top