javascript - how to check flash plugin is blocked in Chrome -


how can check using jquery or javascript whether flash plugin blocked in chrome?

we can check disabled flash plugin using below

((typeof navigator.plugins != "undefined" && typeof navigator.plugins["shockwave flash"] == "object") || (window.activexobject && (new activexobject("shockwaveflash.shockwaveflash")) != false)); 

in chrome can disable plugin individually clicking on disable individual plugin. if disable plugin individually, above query works , return false. if block plugin return true only.hence concern how detect plugin has been blocked.

you use swfobject handle flash detection, should work;

var flashavailable = false; try {   var flash = new activexobject('shockwaveflash.shockwaveflash');   if(flash) {     flashavailable = true;   } } catch(e) {   if(navigator.mimetypes ["application/x-shockwave-flash"] != undefined) {     flashavailable = true;   } } 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -