2

Chrome has bundled a "native" flashblock for a while, as has the android browser. swfobject reports that the flash player is available, even if the block is enabled for all sites. All I want to do is detect that a user is using native flashblock, and provide some messaging. Certain services, like the Facebook JS SDK, do not work without flash enabled for cross-domain communication, and do not provide methods of detecting failure. I know how to detect an extension/plugin like the original flashblock, but the native version does not appear in the navigator.plugins list.

Is there a way to detect if a user is running with a native flashblock enabled?

3

Unfortunately, there's no programatic interface to the plugin-loading system in Chrome.

The best you can do is to load a flash object, and poll it via some well-defined method (GetVariable("$version") is the canonical example) to determine success. In the case you're concerned with, flash will show up in navigator.plugins, but won't successfully load your test plugin. It's really not a bad idea to do this sort of check anyway, as there are a number of reasons that flash might not load, above and beyond flash-blocking (native or otherwise).

| improve this answer | |
  • I'd add that this sort of thing might be a reasonable feature request: new.crbug.com is the right place if you decide that it's something you'd like to ask for in a future version of Chrome. – Mike West May 18 '11 at 13:36
  • 1
    I added it as a bug, and here's how I solved it, thanks to your answer: gist.github.com/981510. Thanks again! – Andrew May 19 '11 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.