How can HTML5 "replace" Flash?

FlashHtmlMarkupWeb Standards

Flash Problem Overview


A topic of debate that's seen a resurgence since the unveiling of the iPad is the issue of Flash versus HTML5. There are those that suggest that HTML5 will one day supplant/replace Adobe Flash.

I do not develop software that runs in a browser, so my (limited) understanding is:

  • HTML is a pure-text markup language that is delivered over HTTP to a client browser. The client browser interprets the markup and renders (with varying degrees of success) the page according to an standard specification.
  • Adobe Flash is a propriety framework for working with audio, video, sound and raster/vector graphics. It requires special authoring tools (a compiler perhaps?) and a custom player that's available as a plug-in to most common browsers.

Could someone please explain (to this C/C++ developer) how it is possible from a technical/coding point-of-view that a text-based markup language (HTML5) could be considered a replacement to a multimedia framework (Flash)?

Please no opinionated arguments - just technical facts.

Flash Solutions


Solution 1 - Flash

What people loosely refer to HTML5 in the context of this discussion is the combination of HTML as a markup language, CSS which specifies how it is rendered, and the javascript code which manipulates the HTML and CSS dynamically.

Furthermore, HTML5 not only has the standard text elements, but also <canvas> on which 2d graphics can be drawn, and <video> elements which embeds the video (as the name suggests).

So, in a full-fledged implementation of HTML5, you can implement dynamic web sites without using Flash. An example is the HTML5 version of Youtube, recently introduced as beta for Safari/Chrome users, see here. Another is an NES emulator in javascript + HTML. (Well the latter does not really concern HTML5... it uses <canvas>.)

Solution 2 - Flash

When Steve J. made the comments about HTML5 being the future, he didn't bother to explain that this statement really refers to the most widespread use of Flash today, that being Video. Perhaps he didn't explain this purposely, so that many misinformed end users who want to watch Hulu on their iPhones would unleash their rage against Flash. Which is exactly what has been happening..It is annoying and I lost respect for Steve.

The HTML5 stack (html, css and JS) will NOT be a direct replacement for Flash. I have been developing Flash content for over 10 years, I am also very competent in JS. I cringe thinking about using JS for tasks where ActionScript can accomplish the same thing in 50% less code. There are tasks that will be very difficult if not impossible to achieve with JS and CSS. For rudimentary animations and JQuery-like functionality, sure, HTML5 can be a viable option instead Flash. But for complex games and RIAs, I just don't see it. Actionscript has evolved into a robust, full featured language.

The other important thing is that the Flash player is updated by Adobe periodically to address any issues that may arise. How will they update/improve HTML5 spec if it becomes the norm and Flash went bye-bye?? They won't. You have to wait for HTML6 and all the browsers to support it. Which means you end up waiting 5-10 years. Great way to bring us back to 1998. No thanks, I'll stick with Flash for now.

As much as open standards are a worthy goal, I don't see this panning out the way they are saying...

My two cents.

Solution 3 - Flash

I think some people here are programming snobs and aren't listening. I, too, am a beginning Flash developer and I don't want it to go away. You know why? Because CREATIVE people can use Flash to develop what's in our brains very easily. A person who likes to draw and create scenes does not necessarily like to code. Typing a bunch of "sentences" is NOT drawing and animating! What you're saying about HTML5 is like saying that Picasso and Dali should have learned a programming language in order to paint. Ridiculous, right?

That's why people prefer Flash to HTML5. It's not self-serving, it's just acknowledging that the people capable of creating cool animated web content would rather be able to create our own visions rather than learn an unrelated skill or rely on someone else to interpret for us.

Instead of ridiculing, you might want to come up with an HTML5 visual environment that rivals Flash.

Solution 4 - Flash

> how it is possible from a technical/coding point-of-view that a text-based markup language (HTML5) could be considered a replacement to a multimedia framework (Flash)?

HTML5 is the new hot name for "web technologies stack", not just a "markup language".

It has a programming language (JavaScript), like Flash does; a set of APIs, significantly expanding as part of the efforts commonly labeled as "HTML5", ways to draw graphics (SVG, <canvas>), play audio and video (<audio>, <video>).

Unlike Flash, the "HTML5 applications" are processed by the browser, not by a proprietary browser plugin, which is good - at least for browser vendors (see the relevant piece of this blog post - thanks Jotham). For example, it makes possible for a browser vendor to fix issues (and not wait for Adobe) -- IIRC Apple cited Flash as being #1 reason for crashes among all crashes on the Mac.

[edited to remove "open standards are better" claims which I am too lazy to back up]

Solution 5 - Flash

It is not simply HTML5, but when browser adoption of it is complete. For instance, the presence of the HTML5 <video> tag means nothing without a browser provided video player to actually present the video (At which point, the hope is, Flash Video will no longer be needed). Same goes for the <audio> tag.

Additionally, HTML5's canvas element (combined with JS) allows for far more advanced graphics inside a browser than could be achieved before.

Solution 6 - Flash

Well, to get an impression of the capabilities of HTML5/canvas + JavaScript, you may want to take a look at this which is an implementation of Wolfenstein 3D purely done in HTML5, without using any Flash (note that you need a canvas-enabled browser such as Firefox to see this working).

Solution 7 - Flash

It is not so much that HTML5 can replace Flash by matching it feature by feature. It is more that the HTML5 stack (including JavaScript and CSS) can be used to build the same sort of rich web applications for which Flash was the only viable option before. Because HTML holds the promise to also address some of the shortcoming of the Flash platform, there is a potential that it can replace Flash in this space in the future.

This discussion is very much centered around the technology that is used to render the application at the users end. It does not address the ease with which authors are actually able to create the content which will be delivered to their users. You already mentioned that Flash is associated with a set of commercial tools which are specifically built and marketed by Adobe to address the need of rich-content authors. Such solutions for HTML5 are not that much adopted yet. For developers who view authoring mostly as coding this is not a big concern and they will not have a hard time getting traction with HTML5 (and many already do). For those authors that don't have a developer/coding background, this may be another story and for them the viability of HTML5 will greatly depend upon the availability of integrated authoring tools. Maybe the Adobe Flash tools will output to HTML5 instead of SWF in a few years...

Solution 8 - Flash

What these silly non-creative people haven't realized is that HTML5/Javascript/CSS is very bloated to begin with. All of that asset is still entirely RAW text file. no compression no bytecode optimization and it will always be like that. So for game developers that is not an option having all your source in easy reach of theft. Flash allows you to compile your source code in a more compact means while still be able to create your dynamic content in a tight vector graphics manner. Ontop of that flash already supports shaders, hardware acceleration, pixel filters (Pixel bender) and Layer effects. Till this day you can't get html elements to drop a shadow with ease and simplicity. HTML5 will merely try to replace flash as a media player but since Flash's popularity is due to its consistency it will be a hard sell. MY hatred of CSS and Javascript can be surmised by the fact that 40% of javascript code is for browser compatibility and CSS implimentation is NEVER consistent on different browser vendors. Till you nerds get around this problem Flash will never be replaced. Fact is for whatever you can do in HTML5 we can do in flash faster and better.

I've already seen the Wolfenstein 3D in Canvas. Its inferior. and tiny. We can make a better 3D engine with a larger window. Beat that?

Solution 9 - Flash

There's much more to Flash than Audio/Video. Recently Flex has been very popular because of it's rich programming model and ability to develop high performance user interfaces.

if HTML 5 or anything has to become popular, first of all the in-built JavaScript engine has to be more efficient. Flex/Flash these days are popular because of robust ActionScript engine.

Solution 10 - Flash

I hope we're talking about How can HTML5 replace swf and flv. Not Flash entirely. I'm a Flash developer (amature). For me, someone who is more artistic minded rather than script programming minded, Flash is fairly easy (most of the time) to use. How do I make a cartoon character walk across the screen in HTML5? Or something simple like morphing (tweening) a circle into a square? Surely I don't have write that as code. I simply am not that clever in the are of programming to achieve that. Flash is relativley simple. Draw all your graphics in what ever app you're comfy with (illustrator for me) then stitch them together with action script. I love you both Apple and Adobe. Please come up with some sort of compromise.

Solution 11 - Flash

I doubt it's meant as a replacement for everything Flash is able to encompass. However, if you look around the web nowadays, you'll see that Flash is in widespread use for delivering video or audio content in the browser. Something that's included in HTML 5, albeit crippled by now since they couldn't agree on any standard codecs.

Surely, all those nice Flash games and ads won't go away just because of HTML 5 and HTML 5 won't be able to replace them. But it aims for being able to replace uses that actually can deliver content. For vector graphics there is also SVG which might get some special treatment.

Whether this will really be the death of Flash for video remains to be seen. The HTML 5 video codec issues might be sorted out sooner or later. However, Flash will quite likely remain the medium of choice where content deliverers will want greater control over what will be delivered, DRM and similar techniques, &c.

Solution 12 - Flash

The modern browser that support HTML5 standard have capability to playing supported media file inside the browser, without needing 3rd party plugins.

You can try this by yourself. Latest version of Safary and Google Chrome, (Firefox 3.6 too) can play <video> tag in a HTML5 page directly. YouTube now support HTML5.

That's why iPad will be able to play video if the video site is using HTML5, without Adobe Flash plugins, using Safari browser that fully comply the HTML5 standard.

Solution 13 - Flash

Together with javascripts for tracking GUI events and scripting of the new HTML 5 elements, you get a lot of what Flash offers.

HTML 5 has a number of new elements. One of them is called Canvas. With it you can draw anything you want on screen, within its bounds. You use javascript to draw on it and you can catch any mouseclicks and similar with javascript too. If you are used to GUI toolkits on the desktop like Tk, GTK, you can liken these new elements to some of the widgets of those GUI toolkits.

Take a look at thejit to see an example of graphs in HTML 5

Solution 14 - Flash

Flash operates with a timeline, stage and scenes and allows loading of movies one on top of another. It also has onion skinning, tweening and other vector art tools that make cartoon animations easy via frame by frame animation. You do all of this and then control it will a very small easy amount of code/action script. HTML JAVA CSS isn't anywhere as near an artistic experience for the author and there's much more coding involved to achieve similar results - flash is much quicker and easier and user friendly. I doubt Flash will be going anywhere in a hurry.

Solution 15 - Flash

A lot of people claim HTML5 will kill off plugins like Flash and Silverlight, but that simply isn't the case.

Take for instance, this scenario.

Load a binary file over a url. For the sake of the demo, we'll use shapefile format (.shp), which contains geographical polygons in a coordinate system.

Parse the byte contents client side.

Draw the contents in an efficient manner.

Demo: http://www.libertyvanguard.com/liberty-gis

This is just one example where plugin technology won't be replace by HTML5.

Solution 16 - Flash

HTML5 is indeed far away from replacing Flash or Silverlight UI technologies. And the problem is not only that HTML5 is limited in amount of required in an app UI components, but also that it doesn't allow create custom ones in such a way that they would integrate into runtime seamlessly.

Take a look at http://www.amplesdk.com/">Ample SDK - JavaScript UI Framework, it's architecture largely inherit from what you will find in Flex, Silverlight or Gecko. One of the UI technologies it enables cross-browser is XUL, styleable in CSS and programmable in JavaScript with XUL DOM or jQuery APIs. You can also create your own UI technology on top of the framework.

Solution 17 - Flash

I sure hope that HTML5 can deliver the goods and maybe not replace flash entirely but at least when it comes to video. Although flash video is small in size it does takes up way too much processing. Go to youtube without flashblock enabled and then open task manager. Now you can see how the processes for firefox suddenly leaps off the page whenever you visit a flash driven site like youtube. My advice get Flashblock.

Solution 18 - Flash

I think that HTML5 will replace most of the flash/flex, which will probably continue as another branch because canvas is cool. New libraries will come. But as long as JS is in a fact singlethreaded it wont be so fast, especially with games, assuming adobe won't give up.

Solution 19 - Flash

I first heard the comment of "HTML replacing Flash" from Steve Jobs. (He hates Flash perhaps because it crashes on his Mac computers I'm not sure. I think he's out of touch. The proof is his ridiculous product the "iPad".)

The point is HOW GOOD IS IT FOR DEVELOPERS? Answer: not as good as Flash. Yet. Why do I say this with my limited experience? It's all that "try... catch" compatibility code you need in Javascript to work in all the browsers. WHAT A LOAD OF RUBBISH. ActionScript/Flash is ONE piece of code/app for ALL browsers.

The other thing Flash has is graphical (and non-graphical) development software tools to streamline the process.

So THE SHORT ANSWER IS THAT ADOBE WON'T LET HTML5 "replace" flash, at least for the short term. But it can compete with Flash if people make enough development tools for it particularly WYSIWYG graphical tools, like if Google develop an easy to use WYSIWYG editor for making GWT apps. And that's a big IF.

Solution 20 - Flash

It is possible the text-based markup language (HTML5) could replace a multimedia framework (Flash).

The solution is simple, just move the framework into the browser and become an open standard. Not only multimedia framework, the browser can include lot of other stuffs which belong to the operating system now.

It is possible eventually browser will be the OS (user mode). Current OS will be limited to the kernel mode, mostly deal with hardwares.

Solution 21 - Flash

A scathingly obvious and wider angle point that is rarely made, is that the vaguely referenced "flash" term actually encompasses the entire Flash Platform, and that includes the Flash IDE.

Animators and other artistic types who use the technology to create complex cartoons and animations depend almost entirely on the IDE for their work. It is just simply not possible without it. End of story. It's not just the technology at the language specification level that matters! It's also about the "supporting technologies" in this case IDEs (I say "supporting" but the Flash IDE is very much a technology integrated with the rest of the Flash Platform).

If someone builds an HTML5 IDE that has features that rival the Flash IDE, that's great, but I'm surprised the point is so rarely made. Artists are as much part of the debate as programmers, and it's unreasonable to say it is not their business.

So, to answer your question directly: HTML5 would be considered a totally reasonable alternative - or even replacement - to a multimedia framework such as Flash if and only if a proper IDE is built for it, thus elevating it to a multimedia framework also.

It is just not realistic to make an argument without taking into account IDEs. If the question is specifically "Can HTML5 in it's completed state, without an IDE, be an alternative to Flash for applications apart from manually animated complex animations?" then the answer would most likely be yes and we'd all go home.

Solution 22 - Flash

Interesting topic. I echo the sentiment of most posters here that while HTML 5 makes great leaps in basic multimedia presentation, it won't be able to replace Flash. All the online gaming sites are a good example. Flash is can run on most browsers except on certain mobile devices.

On that note, I believe battery drain was the original reason why Steve Jobs did not want to support Flash on the iPhone and iPad. This might bite Apple (no pun) down the road. Android 2.2 will have flash support (but it not clear if all the hardware manufactures will support it -they'll have be confident in their batteries).

Also, it looks like Flash 10+ will be a sure thing on Blackberry devices going forward including BB phones the upcoming BB Playbook tablet (btw, this toy has some killer specs - can't wait to get my hands on it when it comes out next year).

I am willing to bet that Flash will continue to be big in Web Dev even after HTML 5 support becomes universal.

Solution 23 - Flash

We are currently developing an LCMS, once of the areas is a fully WYSIWYG authoring tool for the development of SCORM and AICC compliant training materials that contain animation, video, audio, multiple types of assessments with interaction. The tool looks close to how a power point looks, allowing the user to easily drag and drop learning objects to the slide with pictures, resize images, move them, overlap text, add the tests etc.

This workspace is done currently in Flex and has great performance, not even Google Docs/Presentations comes close to the flexibility and performance of this application.

I wonder if an application of that scale can be developed with HTML5 without a huge amount of resources. We are a small company with small group of developers.

Solution 24 - Flash

Simply put, many are hoping that HTML5 features paired with javascript can provide a better, cheaper, more efficient graphical web experience than flash. Consider that many sophisticated websites like gmail, google maps, and youtube can run without any flash using HTML and javascript. Improvements being made to javascript and HTML allow for websites to develop even richer graphical & animation features without resorting to paying Adobe.

Solution 25 - Flash

Web developers still care for a browser like IE6 which is really old, so you can be sure that Flash and similar technologies will be around for a long long time...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMike WillekesView Question on Stackoverflow
Solution 1 - FlashYujiView Answer on Stackoverflow
Solution 2 - FlashDresden2View Answer on Stackoverflow
Solution 3 - FlashKatrynaView Answer on Stackoverflow
Solution 4 - FlashNickolayView Answer on Stackoverflow
Solution 5 - FlashDoug NeinerView Answer on Stackoverflow
Solution 6 - FlashnoneView Answer on Stackoverflow
Solution 7 - FlashVoidPointerView Answer on Stackoverflow
Solution 8 - FlashShintoView Answer on Stackoverflow
Solution 9 - FlashSatishView Answer on Stackoverflow
Solution 10 - FlashDamoView Answer on Stackoverflow
Solution 11 - FlashJoeyView Answer on Stackoverflow
Solution 12 - FlashDonny KurniaView Answer on Stackoverflow
Solution 13 - FlashjeorgenView Answer on Stackoverflow
Solution 14 - FlashanimatorView Answer on Stackoverflow
Solution 15 - FlashLiberty VanguardView Answer on Stackoverflow
Solution 16 - FlashSergey IlinskyView Answer on Stackoverflow
Solution 17 - FlashRick SavageView Answer on Stackoverflow
Solution 18 - FlashtomasbView Answer on Stackoverflow
Solution 19 - FlashNavigateurView Answer on Stackoverflow
Solution 20 - FlashJackView Answer on Stackoverflow
Solution 21 - FlashhelloworlderView Answer on Stackoverflow
Solution 22 - FlashKrigsView Answer on Stackoverflow
Solution 23 - FlashJorgeView Answer on Stackoverflow
Solution 24 - FlashDoug T.View Answer on Stackoverflow
Solution 25 - FlashDeniz AcayView Answer on Stackoverflow