Monday, July 25, 2011

Writing a Flash Player in Javascript HTML5?

As the HTML5 standard consolidates into being across the various browsers, the state of JavaScript, across the browsers, could do with some more work.

Of particular concern is support (or lack thereof) for high performance byte array processing, especially when one would very much like to write efficient parsers (in JavaScript) for various binary data formats.

For example, I've been entertaining the idea of parsing a Flash swf file, through JavaScript, but I'm not filled with much confidence when looking at JavaScript and the various implementations of such in each of the available browsers.

Others have also been looking at JavaScript for similar requirements. See here for some tests on processing arrays in JavaScript:

http://blog.n01se.net/?p=248

Contrary to Steve Jobs 2010 claim that Flash is not an open standard, the format of Flash files is very much open and has been for a couple of years. Anyone can write a Flash player (if they are capable of doing so). Writing a player in Javascript would be great. But is JavaScript up to the job?

Many seem to think that HTML5 (+ Javascript) is a Flash killer. But in Flash I could, in principle, write a half decent Flash player. I'd very much like to think that was also possible in HTML5 (+ JavaScript) .