HTML 5 <video> tag vs Flash video. What are

2019-01-16 04:24发布

IMPORTANT UPDATE

This question was made over 9 years ago. It made sense then, it doesn't make it now. Flash is hard on its way out; <video> support is ubiquitous, including mobile devices. Almost anything that Flash could do, HTML can now do too. HTML won, Flash lost. If you're pondering on how to embed video in your page, just use <video> and don't give it a second thought. This question is only preserved for historical value.

Original question

Seems like the new <video> tag is all the hype these days, especially since Firefox now supports it. News of this are popping up in blogs all over the place, and everyone seems to be excited. But what about?

As much as I searched I could not find anything that would make it better than the good old Flash video. In fact, I see only problems with it:

  • It will still be some time before all the browsers start supporting it, and much more time before most people upgrade;
  • Flash is available already and everyone has it;
  • You can couple Flash with whatever fancy UI you want for controlling the playback. I gather that the tag will be controllable as well (via JavaScript probably), but will it be able to go fullscreen?

The only two pros for a <video> tag that I can see are:

  • It is more "semantic" - which probably holds no importance to a whole lot of people, including me;
  • It is not dependent on a single commercial 3rd party entity (Adobe) - which I also don't see as a compelling reason to switch, because free players and video converters are already available, and Adobe is not hindering the whole process in any way (it's not in their interests even).

So... what's the big deal?

Added:

OK, so there is one more Pro... maybe. Support for mobile devices. Hard to say though. A number of thoughts race through my head about the subject:

  • How many mobile devices are actually able to decode video at a decent speed anyway, Flash or otherwise?
  • How long until mainstream mobile devices get the <video> support? Even if it is available through updates, how many people actually do that?
  • How many people watch videos on web pages on their mobile phones at all?

As for the semantics part - I understand that search engines might be able to detect videos better now, but... what will they do with them anyway? OK, so they know that there is a video in the page. And? They can't index a video! I'd like some more arguments here.

Added:

Just thought of another Cons. This opens up a whole new area of cross-browser incompatibility. HTML and CSS is quite messy already in this aspect. Flash at least is the same everywhere. But it's enough for at least one major browser vendor to decide against the <video> tag (can anyone say "Internet Explorer"?) and we have a nice new area of hell to explore.

Added:

A Pro just came in. More competition = more innovation. That's true. Giving Adobe more competition will probably force them to improve Flash in areas it has been lacking so far. Linux seems to be a weak spot for it, cited by many.

31条回答
SAY GOODBYE
2楼-- · 2019-01-16 04:59

One Con is the fact that the current html 5 spec has not been able to agree on a single codec due to browser vendor dissagreement.

From the article below:

"After an inordinate amount of discussions, both in public and privately, on the situation regarding codecs for and in HTML 5, I have reluctantly come to the conclusion that there is no suitable codec that all vendors are willing to implement and ship"

Browser vendor squabble

Ultimately, even if you do use the video tag, your video codec may not be supported in all browsers, even if they do support the tag.

As others have mentioned, this may not pose any real issue, but I believe having to make multiple versions of the same file available certainly negative.

查看更多
Root(大扎)
3楼-- · 2019-01-16 05:03

Seth got most of the big ones. Others I can think of:

  • the size of the test matrix blows up (I saw one bug occur only on IE7 with Flash 9.0.48 -- how many minor versions of Flash do you want to test with each browser?)
    • Even if you were to pick only one exact version to support, and force everybody else to upgrade/downgrade, it's not true that "Flash is the same everywhere": the "Flash plugin for IE" and "Flash plugin for everybody else" aren't even the same binary (and yes, it matters: they access the network in different ways, which was part of the cause of my IE7/F9 bug)
  • everybody writes their own player so UI and reliability are inconsistent
  • browsers are allowed to implement a full-screen option for HTML5 video, which means they all will soon if they don't already (many Flash video players have this but many don't)
  • no, not everybody has Flash (granted, it's more common than HTML5 video right now, but it's not all happy candy fun land)
  • scripting is a huge pain (has its own DOM, events, not-quite-ECMAscript language, etc.)
  • it has abysmal performance, if you're not on Windows (running it in a Windows virtual machine under Mac OS X uses 5-10x less CPU than running the native Mac plugin)
  • it has lousy stability (every browser crash I've seen in at least 3 years has been on a Flash page; if your video kills their whole browser, they're not coming back, even if it's really Adobe's fault)
  • it doesn't run at all in many places, e.g., in a 64-bit process (if your users happen to launch "Internet Explorer (64-bit)" instead of "Internet Explorer" by mistake, poof, no video)

In short, the only reason to use Flash is "most people have it installed today" -- which can be a pretty good reason, as long as it lasts.

查看更多
祖国的老花朵
4楼-- · 2019-01-16 05:04

My belief for pros:

  • It's catching the HTML standard up to the current practical uses of the web.
  • It seems like it would be easier/better to get mobile devices to support the video/audio tag rather than porting Flash to the devices.
  • Ogg is an open standard, while Adobe controls Flash.
  • I've already seen in some places people putting up solutions to have a fall through, meaning if your browser doesn't support video/audio tags, it will use flash.
  • Easier interaction with standard HTML elements and javascript.

My biggest con would be that Ogg is a bit behind in terms of compression and quality. But I would imagine it's being worked on. More importantly, if more people start adopting it, more people will likely join the the work on Ogg to make it better.

Competition is key as well, as there is no major player forcing Adobe to really do anything with Flash. So Adobe can control the market in terms of video content on the web.

查看更多
Summer. ? 凉城
5楼-- · 2019-01-16 05:04

I believe this will demolish Flash, as an open source standard support on iphone and android and other mobile handsets can be rapidly implemented as well as desktop OS support. The OGG format allows me to skip forward in the video file over a regular http connection. I can right click and save the file if allowed, sharing and transporting these files will be easier. As 'proper' markup it can be navigated by the literally 100's of thousands of users using specializad devices to access the Internet. As a 'proper' dom element it can communicate with javascript allowing it to fully interact with the rest of the page content, and finally, Microsoft have a track record of pretending to ignore upcoming standards while promoting their proprietary solution, as user demand peaks they throw the rudder full right and roll out an implementation to secure their user base. Flash has been the only choice for video on the web, but not for much longer, its an excellent piece of software in its own right and I see it holding some position, but for video it's only ever been an 'only choice' runner.

查看更多
Lonely孤独者°
6楼-- · 2019-01-16 05:06

For me, it'd be very nice to have the computer built-in or another third party player play the video much more efficient than Flash can do. Not all platforms have Flash: iPhone and Android (for now at least), where the tag may work sooner rather than later. Not talking about Linux either, where Flash works quite badly.

Regarding the Internet being more semantic, it may be important to you. I'm not sure how search engines likes Google and Bing find videos but probably they just know about a bunch of Flash video implementations, so third party small players have no chance. If we are all using the same standard tag, then everybody is on a level playing field.

查看更多
我欲成王,谁敢阻挡
7楼-- · 2019-01-16 05:06

64 bit, and Linux support will be nice. Flash still (in two thousand freaking nine) lacks in this area. Just having some real competition is always good. If the major video sites start using this along side Flash, or even in place of Flash; That will be one less proprietary program I will need. Open source means faster innovation. Give it time, people will create a way to deliver DRM protected videos with it.

查看更多
登录 后发表回答