Skip to Content

Flash Detection jQuery Plugin

Because SWFObject Isn’t Always the Answer

A link posted
about plugins, development & flash.
As presented by the wonderful Fred LeBlanc.
now with 892 reads

I was looking for a jQuery plugin today that could detect browser plugins. Google kept returning SWFObject as a solution, but that's not what I wanted.

The Scenario: Ustream

We’re working on a site (mobile and non-mobile) for an event that will be happening at Hill Holliday in January. Those that can’t be here in person will get to follow along at home on Ustream. I don’t need Flash on my site at all, but only want to display a “Watch LIVE” link in the navigation if they have Flash and can do so.

The jQuery Plugin plugin (so you can… detect while your render?) will show you what is and isn’t available on the page. This makes adding this link to the navigation a breeze.

<script src="jquery.js"></script>
<script src="jquery.jqplugin.js"></script>
<script>
  $(document).ready(function() {
    if (jQuery.browser.flash) {
      $('#nav').append('<li><a href="#">Watch LIVE</a></li>');
    }
  });
</script>

Fred LeBlanc is trying to make the web a better place. He develops, designs, writes, improves, constructs, invents, and creates (hopefully) interesting content and projects.

He’s reasonably well-known for his jQuery plugin, he co-runs a meet up for web folks and he’s been known to make a TextMate theme or two.

Learn More