HTML 5 <video> tag vs Flash video. What are the pros and cons?

前端 未结 30 2162
余生分开走
余生分开走 2020-12-07 12:15

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; sup

相关标签:
30条回答
  • 2020-12-07 13:14

    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.

    0 讨论(0)
  • 2020-12-07 13:14

    My understanding is that the big deal about the tag is that it is an open standard. When only one vendor can implement Flash, you are at their mercy for implementations/ports to new platforms, browsers, or even browser versions.

    The excitement is all at that level, not down in the implementation details. Worrying about which is technically superior is sort of beside the point in the same way as concerning yourself about a fascist government's ability to make the trains run on time would be.

    0 讨论(0)
  • 2020-12-07 13:16

    Here's my pros of HTML 5 in 2012:

    1. I'm using the HTML5 trail of youtube. Now flash player doesn't crash all the time. Now my computer is stable for weeks. Now I'm happier.
    2. I don't see an "update HTML5 player" whenever I reboot my computer like I do with flash.
    3. Once embedded video everywhere works with HTML 5, I can remove flash from my computer because the only use I had for it was to play videos.
    4. This is a pro for website developers: I have a flashblocker because of how annoying flash is. I don't have an HTML5 blocker. Webmasters have a second chance to send me content.
    5. HTML5 will likely be implemented properly on browsers instead of being the #1 security hole on most computers.
    0 讨论(0)
  • 2020-12-07 13:17

    It's also an advantage the video-tag is native to html, so it integrates nicely. This sounds like a non-issue, but it's not. You can for example overlay the video with some HTML caption. And the HTML caption can use the same styles as other captions on the same page.

    You also can apply some (future) CSS transitions to the video element: look at this demo.

    0 讨论(0)
  • 2020-12-07 13:17

    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.

    0 讨论(0)
  • 2020-12-07 13:18

    Flash is slow and inefficient on non-Windows platforms. It has potential security flaws. It stores "flash cookies" on your computer that you don't know about. There is no flash on the iPhone and unlikely ever will be (as a result of its being proprietary and its high CPU consumption).

    HTML 5: Could it kill Flash and Silverlight? is an article that might answer your question.

    There are probably more reasons out there.

    0 讨论(0)
提交回复
热议问题