Flash wrapper through HTML5

General discussion and chat (archived)
User avatar
tribaljet
Lunatic
Lunatic
Posts: 468
Joined: 2012-06-06, 19:45
Location: Portugal
Contact:

Flash wrapper through HTML5

Unread post by tribaljet » 2013-02-01, 06:54

I've just stumbled upon a project Mozilla seems to be developing, namely a way to render Flash content through HTML5. The project is called Shumway: https://blog.mozilla.org/research/2012/ ... e-project/

Any thoughts on the subject?
Portuguese translator of Pale Moon

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Flash wrapper through HTML5

Unread post by Moonchild » 2013-02-02, 19:28

There have been a few efforts like this in the past, Mozilla isn't the first to try this. The basics like displayed have in the demo been done before, and been done better already, in fact, so it's got a very long way to go, if ever. The problem is that Flash these days is used for a lot of things it wasn't designed for in the first place, not in the least hardware accelerated games and video playback. It's not something that HTML5 can easily, if at all, do.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
tribaljet
Lunatic
Lunatic
Posts: 468
Joined: 2012-06-06, 19:45
Location: Portugal
Contact:

Re: Flash wrapper through HTML5

Unread post by tribaljet » 2013-02-02, 23:31

Well, HTML5 does still have a lot of rough edges, including animation not being as smooth, visual wise, as Flash.

Do you think such a project could be accomplished with reasonable success anytime soon?
Portuguese translator of Pale Moon

lyceus

Re: Flash wrapper through HTML5

Unread post by lyceus » 2013-02-03, 01:51

This would be interesting if that plug-in can render one of my games or animations posted in my deviantart account. :D

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Flash wrapper through HTML5

Unread post by Moonchild » 2013-02-03, 07:31

tribaljet wrote:Well, HTML5 does still have a lot of rough edges, including animation not being as smooth, visual wise, as Flash.
Do you think such a project could be accomplished with reasonable success anytime soon?
There is a fundamental difference between the rendering models used in HTML5 Canvas and Flash which heavily influence the performance divide. The difference is, Canvas uses an immediate mode renderer while Flash uses a retained mode renderer.

When you write a line of javascript that draws a vector or bitmap to a Canvas the browser will immediately render that change before moving on to the next line of javascript. Since the browser has to block that line of javascript while rendering, it means the environment is most efficient when running on a single thread. Text rendering on the other hand occurs at the end of the event loop, behaving more like Flash.

In contrast, Flash commits all renderable changes to an internal store, and after the main event loop finishes processing user code it hands out rendering tasks to all available cores. As a result, Flash scales with both the speed of your processor cores and the number of cores available. Here’s an illustration to better understand:
flash_javascript_render_model.png
Theoretically you might achieve twice the performance in Flash on a dual core system, but in practice there is overhead that you need to take into account like z ordering, bounds checking and re-compositing, and dividing tasks between cores is never perfect. As the number of cores increases though, Flash gains large advantages over HTML5.

Without a major shift in execution processing, Javascript based animations and interactions are going to remain stagnate over the coming years. All the talks of multithreading coming from browser vendors is between the browser interface and the html view, but not the HTML rendering model. The Firefox code for the renderer is still mostly single-threaded and I don't think that will change anytime soon.

HTML5 video is largely exempt from this problem; all rendering and sound is processed under the hood on secondary threads. As a result, media performance increases with GPU and CPU cores.

Developers need to be cautious with adopting one technology or another wholesale. HTML5 may not be fast, but it is proficient at a good amount of tasks. If you need static or limited interactive content on your website, HTML5 will be your best option. If you need complex interactive content with precise timing, you’re probably better targeting Flash.

(Adopted from this blog that, even though old, is still quite valid)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

ninaholic

Re: Flash wrapper through HTML5

Unread post by ninaholic » 2013-02-04, 01:33

Interesting links and topic! :)

I've always wondered if there was an alternative to "Adobe Flash". We have tons of different browsers, but only 1 popular plug-in to play Flash content in Windows? I would certainly choose something lighter if I could. I notice that there are a lot of Youtube Downloaders, but are they any Youtube Players (that work for content that doesn't run on HTML5) besides Adobe? I noticed VLC has a Firefox plug-in, but Youtube just seems to ignore it completely. Maybe I'm missing something.

edit: Well I found this alternative, it's not free but seems pretty interesting: http://flavio.tordini.org/minitube

Locked