How to check if Flash browser is installed in browser from javascript

I would like to check if Flash is supported on the platform on which the browser is hosted. I do not want to check if it is installed (I know how to do this). I just want to know if it is wise to suggest the user to install the Flash plugin. If the page is being viewed from an iOS device that does not support Flash, I don’t want to show the message “Please install flash memory”. Then I will show the HTML5 version for version control.

I know that one solution checks the iPad / iPhone / iPod in useragent to detect an apple, but is there any library that checks more than just an apple?

+4
source share
2 answers

Then, instead of displaying the text “Please install Flash,” specify the HTML5 control version instead. Put this HTML5 code where "Please Install Flash" is located.


It is also easier (more appropriate) to use HTML5 first, and then revert to Flash if not supported. Something like that:

<video src="html5_video_url"> <!-- contents in here are only shown when video is not supported --> <embed src="flash_video_url"/> </video> 

In addition, UA detection is not recommended as it can be modified.

+3
source

In addition to iThings, there are several problems with comparing the version with the browser and the version between the players or, rather, the versions of the player and the systems for which it is intended.

The difficulties are as follows: for Linux there is no 64-bit version (the debugger never existed, and the player, codenamed Square, afaik is just a shell around a 32-bit application).

On free systems where the provider does not tell you which software you are not allowed to install ... technically, any application can interact with NPAPI (Netscape API), can be used as a browser plug-in that implements these APIs. There is a newer version of this API that Netscape does not want to implement (in fact, no one except Google Chrome has implemented them), the version is also known as the Pepper Plugin API.

Unfortunately, there seems to be no way to use JavaScript to check for NPAPI availability. If you have this, you can filter out all browsers that technically cannot display any plugins, including Flash. I would suggest that for this there must be some indirect way, some browser functions that would be present if there was an interface or something like that, but at the moment they could not come up with anything ... Of course, there are ActiveX Thus, the course of action would have to first test the NPAPI, if not the one, then maybe AX, and if not, then of course the browser cannot launch Flash (which, unfortunately, does not guarantee Flash will really work) .

+1
source

All Articles