tags:

views:

339

answers:

4

element is upcoming cross browser standart for playing videos, while most videos out there right now are in flash format. I am new to tag, so if it is possible a code sample of how to play flash movie with tag would be nice

+3  A: 

The tag itself does not specify what formats are supported. It is up to each browser to choose what codecs to support. I do not believe any browser supports flash video as part of their video tag support.

Peter Recore
A: 

No it's not possible. Flash movies require a different codec which isn't supported by html5. Depending on the browser you use, the h.264 codec or Google VP8 codec is supported to play movies. For example .OGG files will play with HTML5.

edit: since flash and html5 video are each other opponents i doubt .flv files will be supported in html5. Would be a nice feature though ;-)

Rob
This is not quite accurate. Yes, you're right that it's not possible at this point. But the supported video codecs depend on the browser, not the HTML5 VIDEO tag. If you wanted to, you could create a web browser that supports FLV video in the HTML5 VIDEO tag.
Jeff
This answer is blatantly incorrect.
Stu Thompson
Completely false, demonstrates a complete lack of understanding of the situation.
Myk
+1  A: 

Yes, but...

Yes, you can. I have done it myself in FF 3.6.3 on OSX with h.263 FLV files. (Remember that FLV is a container that can hold different codecs.) But since HTML5 codec and container support is browser dependent, it may not work on all browsers that support HTML5.

Stu Thompson
+1  A: 

When you say 'play Flash movies' I assume you are referring to the video 'codec' and not the Flash browser plugin technology itself.

As far as I'm aware Flash supports it's own .flv video format and H.264 format. HTML5 video doesn't specify a codec to use, some HTML5 browsers support the H.264 codec (Chrome, Safari and IE9), others support Ogg Theora (Firefox, Opera, Chrome). If you have a Flash video that is in H.264 then in theory it should work as an HTML5 <video> in Chrome, Safari and IE9, but not in other browsers.

Your best bet is to use HTML5 video in H.264, and default back to Flash video if either HTML5 isn't supported (IE8 and below), or if the video codec isn't supported. Or you could encode in H.264 and Ogg to switch between them depending on the browser, but your storage and processing requirements go up.

To add to the confusion there is a third video codec for HTML5 called VP8 (or WebM) recently acquired and Open-sourced by Google, this will be supported in Firefox, Opera, Chrome and IE9, but not Safari.

Given the confusing landscape for HTML5 video at the moment, you might be better off sticking with Flash until things clear up, unless you don't mind the extra effort, or you need your videos to play on iPods/Pads

Sunday Ironfoot
"a third video codec for HTML5 called VP8 (or WebM)". No, WebM is the container, which contains the VP8 codec video and Vorbis codec audio. (Other containers, such as MP4 and FLV, have more options as to which codecs they contain, but WebM is restricted to just those two, for simplicity. This means that a device either can play WebM or it can't: no codec confusion.) The Dive into HTML5 site contains more information. The OGG container usually holds Theora video and Vorbis audio, but I think it can hold other things too (but don't quote me on that!).
TRiG