Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html5 video flash fallback advice

Tags:

html

flash

video

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

like image 549
styler Avatar asked Oct 19 '25 20:10

styler


1 Answers

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>
like image 121
Bas Slagter Avatar answered Oct 21 '25 08:10

Bas Slagter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!