Jump to content

Recommended Posts

Posted

I've been asked to put a video on the front page of a website. It unfortuantly isn't optional.

 

Is there a way I can embed a flash video or a video file that will play automagically (I can do that bit fine) but if the person viewing the page doesn't have flash installed for example, instead of a popup telling them so or a link it just shows an image instead?

 

For example someone using IE6 with no Video player or Flash player installed hits the site instead of the video gets an image and is none the wiser that the video isnt playing? It's not integral to the site itself you see and I dont want people hitting the front page and being redirected to adobe or told to install something they havent got etc.

 

Thanks

  • 3 weeks later...
Posted

If you can find a bit of Javascript, that can check if Flash is installed on the users system, then you can build some Javascript that runs on page load to show/hide a video block / image block of html

 

Try these

Adobe - Flash Player : Detection Kit

Javascript Show Hide Element by ID from Internet Connection

 

Write your HTML so that you have an two blocks of code

1 with an id="video"

2 with an id="image"

 

You should then be able to write some onload Javascript function -

IF Flash is available THEN

document.getElementById("image").style.display = 'none';

document.getElementById("video").style.display = 'block';

ELSE

document.getElementById("video").style.display = 'none';

document.getElementById("image").style.display = 'block';

ENDIF

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...