• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Coldfusion – detecting Flash vs HTML5

Community Beginner ,
Jul 27, 2012 Jul 27, 2012

Copy link to clipboard

Copied

Hi all – I have a dumb question – I’m not the worlds best scripter…

I’ve got a ColdFusion page, with an element in it that is either flash, or HTML5.

I need a way to detect what is happening client-side and push the client to either the Flash element, or the HTML element (or a s “you’re WAY behind the times” element if neither).

I’ve found, and used, modernizr, but it does things the wrong way round for me.  I need to direct my clients to flash 1st, then HTML5, then the sorry page.  Modernizr only gives me HTML 5 first then Flash, and this isn’t working for me.  the flash element is the preferred element.   I’ve screwed around with trying to “swap out” modernizr, but my glasses aren’t thick enough. 

Thus, I (roughly) need something that does this:

<cfif “flash”>

Direct them to flash page

<cfelseif “html5”>

Direct them to HTML 5 page

<cfelse>

So, how is life in the 18th century?

</cfif>

Help, please..  It does not have to be CFM, it can be a JavaScript or anything. 

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

Did you ever find a solution to this?

I posted a similar issue, I can't find any way to detect flash in CF. There must be a way with them both being Adobe products

Thanks

Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

Detecting flash is not a server side issue it is a client issue.  A user having / not having flash doesn't mean anything to CF.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

understood

I read there was a flash player detection script. I found a link on here

http://www.raymondcamden.com/index.cfm/2006/2/21/Ask-a-Jedi-Flash-Detection

However, when I go to the link, it does not work.

http://www.macromedia.com/software/flashplayer/download/detection_kit/

I did a search on adobe dev and can't find anything, it just runs me around in circles

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

Flash detection is all client side.  Just do a google search for flash detection.. there are tons of resources.  Just make sure you use somethign that is recent.  The post you mention from above from Ray is 8 years old and probably not relevent anymore.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

I am going to try looking at the user agent info to see if there are some indicators in there that might tell me it's in there or not. Although it would concern me that an install and uninstall might not change the header back

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

The user agent will tell you what the browser is.  You have to check browser capabilities, not what the browser can do.  Again, the detection has to be done on the client.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

I was hoping that there might have been something written into the user agent, but it looks like there isn't

I just took a look here http://useragent.cc/

I see javascript values that detect it, but they won't be any good for my purpose.

Shame that the install does not tweak up the user agent description so it could then be found server side

Looks like a lost cause

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

I would be curious to see the code the custom tag in BrowserHawk generates.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

What about just serving the file using the cfmediaplayer tag, but without the type attribute.

<cfmediaplayer name="player" source="my_music.flv"/>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 16, 2014 Apr 16, 2014

Copy link to clipboard

Copied

LATEST

In my case I'm not playing a video, I have a peel ad that runs in the corner of the page, currently in flash, but I just got a Jquery version running that does not need flash, however it does not look quite as good so I want to display the flash whenever I can, however it looks like that is going to be a problem so I think I'll just go with the Jquery on all hits

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation