Earlier this week I got inspired seeing this presentation on HTML5. I’m a strong advocate of moving towards this standard and with browsers increasingly supporting it, makes it very attractive to start to learn and implement where possible.
Contrary to what I’m seeing various tech blogs claim, HTML5 is in my opinion not a replacement to Flash. It will no doubt take over some features for which we used to have to rely on the Flash Player to implement — and that is a good thing — but there are still a lot of uses cases where it makes sense to use Flash. Not just that, we can leverage both technologies for what they do best (just as we do now).
After Serge Jespers’ blog post this morning and a brief discussion on Twitter I thought I’d blog what I think would be a good move for the Flash Player, adding HTML5 support through an embedded webkit engine.
Why would you do this?
- Flash Player has limited HTML support
- Certain popular and legacy browsers do not support HTML5
- It would give a consistent set of HTML5 supported features across browsers
- Deep integration of HTML5 content within the Flash DisplayList
- Flash Player would become a catalyst for HTML5
What are the difficulties?
- Flash Player filesize
The Flash Player team is always very concious about download size of the player — an embedded HTML engine would obviously add significant file size. To address this I’d propose an approach similar to the cross-domain Flex framework caching, where they would only download and cache when first needed.
- Plugins shouldn’t render HTML
I certainly agree with that in principle and that would also be what you would typically do. In certain situations though it is a pragmatic solution and no different to what Google does with Google Chrome Frame. If you have an HTML5 capable browser and do not need to deep integration with Flash features this wouldn’t be used.
Just to be clear, I’m not suggesting the Flash Player to become the standard delivery mechanism for HTML5 content. I see it used in one two situations:
- As a reliable fallback mechanism for browsers that don’t support HTML5
- In situations where you want to integrate HTML5 content in the Flash DisplayList (visual effects etc.)
Taking this even further you could potentially even see Alchemy C/C++ code cross-compiled and applied to HTML5 content hosted through the Flash Player.
Whether or not this is technically feasible or likely to happen, I think it is something worth looking at.