styler
styler

Reputation: 16481

html5 video flash fallback advice

I am using the html5 video tag and was wondering if you could help answer the following question. When including the different file formats .mp4, .ogg etc do I also have to include a .flv as the flash fallback or does the browser know to automatically default to a flash version?

At the moment I'm only using a .mp4:

<video width="300" height="188" type="video/mp4" src="video/video.mp4" controls preload="none" poster="img/test.png">
    </video>

Do i need to create the video tag and then have 2 src files, 1 for .mp4 and 1 for .flv?

All advice welcomed. Kyle

Upvotes: 4

Views: 2445

Answers (2)

Bas Slagter
Bas Slagter

Reputation: 9929

Check this out:

<video controls="controls" width="400" height="300" poster="girl.jpg" preload="metadata">
    <source src="beach.mp4" type="video/mp4">
    <source src="beach.ogg" type="video/ogg">
    <object id="flowplayer" width="700" height="400" data="flowplayer-3.2.7.swf" type="application/x-shockwave-flash">
        <param name="movie" value="flowplayer-3.2.7.swf">
        <param name="flashvars" value='config={"clip":"beach.mp4"}'>
    </object>
    <p>No support at all, download a new version of your browser!</p>
</video>

Upvotes: 4

Martin Risell Lilja
Martin Risell Lilja

Reputation: 652

I belive you should put the flash fallback inside the video tag.

Upvotes: 0

Related Questions