搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Check if flash enabled/Installed in FF version 59

  • 6 回覆
  • 1 有這個問題
  • 10 次檢視
  • 最近回覆由 Happy112

more options

Hi,

Am trying to figure out how to check if flash is enabled/installed in browser. This is the code am using

try {

        hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'));
      }
      catch(exception) {
         hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']);

}

It always end up in exception and the 'hasFlash' flag turns to true even if flash is not enabled.

Please advice

Hi, Am trying to figure out how to check if flash is enabled/installed in browser. This is the code am using try { hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')); } catch(exception) { hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']); } It always end up in exception and the 'hasFlash' flag turns to true even if flash is not enabled. Please advice

所有回覆 (6)

more options

Hi,

According to your system details (to the right of your post) Shockwave Flash is enabled.

You can check (and if necessary, change) its settings :

3-bar menu (or 'Tools') => Add-ons => Plugins.

To see if Flash is enabled on your system, got to Windows Control Panel => Flash.

more options

Happy112 said

Hi, According to your system details (to the right of your post) Shockwave Flash is enabled. You can check (and if necessary, change) its settings : 3-bar menu (or 'Tools') => Add-ons => Plugins. To see if Flash is enabled on your system, got to Windows Control Panel => Flash.


I'm asking a solution to check if flash is enabled in browser programatically.

scenario: I've a swf embedded inside html page which is necessary for using application. So prior to login, I need to check and alert user to enable flash. My solution works for Chrome and other browsers. But not with latest FF.

more options

kiran0706 said

I'm asking a solution to check if flash is enabled in browser programatically.

But of course - I should have realized ('thought you were just 'showing
off' ..... ) Sorry  !

Would you take a look at this please :

https://stackoverflow.com/questions/9822495/how-to-check-with-js-if-flash-is-installed-or-not

and :

https://www.npmjs.com/package/detect-flash

Also :

https://gist.github.com/SiliconMind/49796816d41c30eb9517


Any good  ?

(Confession : I know absolutely nothing about coding ..... )

more options

Happy112 said

kiran0706 said
I'm asking a solution to check if flash is enabled in browser programatically.

But of course - I should have realized ('thought you were just 'showing
off' ..... ) Sorry  !

Would you take a look at this please :

https://stackoverflow.com/questions/9822495/how-to-check-with-js-if-flash-is-installed-or-not

and :

https://www.npmjs.com/package/detect-flash

Also :

https://gist.github.com/SiliconMind/49796816d41c30eb9517


Any good  ?

(Confession : I know absolutely nothing about coding ..... )

The code in you links match exactly what I implemented and mentioned here. This doesnt work. !

more options

kiran0706 said

The code in you links match exactly what I implemented and mentioned here. This doesnt work. !

Bummer  !

Let's hope that somebody else will come to your rescue .....

(Sorry I couldn't be more helpful)

more options

'Found this (you'll have to scroll down some) :

https://developer.mozilla.org/en-US/docs/Plugins/Flash_Activation:_Browser_Comparison

Any good  ?