• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

Adding flash video option to video tag

Hello, I'm trying to figure out how to add a flash video option to the following code:

<video controls="controls" height="223" id="0" tabindex="0" width="300">

<source src="http://website/images/enlightened/video/Enlightened_Style_071510.ogv" type="video/ogg" />
<source src="http://website/images/enlightened/video/Enlightened_Style_071510.webm" type="video/webm" />
<source src="http://website//images/enlightened/video/Enlightened_Style_071510.mp4" type="video/mp4" /> </video>

Essentially, each browser will look at the code and decide which file it is going to use. To accomondate for the older browsers I want to add in flash but I'm not sure how to include a flash file option into this code.
1 Solution

I found a good explanation that may be exactly what you're looking for... http://camendesign.com/code/video_for_everybody.  it shows how to write the VIDEO tag for pretty much every scenario.

Hope this helps!


PS - In case that page ever goes down, here is his code embedded so it is available with the question:
<!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise -->
<!-- warning: playback does not work on iOS3 if you include the poster attribute! fixed in iOS4.0 -->
<video width="640" height="360" controls>
	<!-- MP4 must be first for iPad! -->
	<source src="__VIDEO__.MP4" type="video/mp4" /><!-- Safari / iOS video    -->
	<source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox / Opera / Chrome10 -->
	<!-- fallback to Flash: -->
	<object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
		<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
		<param name="movie" value="__FLASH__.SWF" />
		<param name="flashvars" value="controlbar=over&amp;image=__POSTER__.JPG&amp;file=__VIDEO__.MP4" />
		<!-- fallback image. note the title field below, put the title of the video there -->
		<img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
		     title="No video playback capabilities, please download the video below" />
<!-- you *must* offer a download link as they may be able to play the file locally. customise this bit all you want -->
<p>	<strong>Download Video:</strong>
	Closed Format:	<a href="__VIDEO__.MP4">"MP4"</a>
	Open Format:	<a href="__VIDEO__.OGV">"Ogg"</a>

Open in new window

DancingFighterGAuthor Commented:
good work!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now