Open-Source JavaScript Flash Player (HTML5/SVG) 300
gbutler69 writes "Someone has gone and done it. Tobias Schneider has created a Flash player written in JavaScript targeting SVG/HTML5-capable browsers. It's not a complete implementation yet, but it shows real promise. A few demos have been posted online. How long before HTML5/SVG next-generation browsers like Chrome, Firefox, Opera, Safari, Epiphany, and other Web-Kit based browsers completely supplant Flash and Silverlight/Moonlight?"
Re:This is great! (Score:5, Informative)
Welcome back to 2008. There was major improvement in javascript engines during 2009 in all other browsers than IE and Firefox. Chrome and Opera have incredibly fast javascript renderers and they're pushing it even more in next Opera version.
Re:This is great! (Score:5, Informative)
Checked out the demos on my iphone (Score:5, Informative)
I checked out the posted demos [paulirish.com] on my iPhone. Although they were a tad sluggish (particularly the star fade-in on the first demo), frankly, it wasn't bad. Some of the sluggishness could have just been because the demos are getting Slashdotted.
Personally, I'm a little more interested in PhoneGap [phonegap.com], which lets you use JavaScript to create iPhone apps (outside the browser).
Re:This is great! (Score:1, Informative)
What makes it slow isn't the language it's the engine. JavaScript and Actionscript are both based off of ECMAScript. The difference is that Adobe/Macromedia has put a crap load of effort into optimizing their scripting engine.
The latest competitive point among today's browsers happens to be on the JavaScript side. Opera, Chrome, Safari, Firefox are all working hard to optimize their JS engines for top performance to do things exactly like this. Not sure where IE is in all this. Maybe with IE9 they'll work a little harder.
less than 100% is good (Score:2, Informative)
Re:Checked out the demos on my iphone (Score:3, Informative)
Javascript runs on your hardware, not on whatever server it was hosted on. A site getting slashdotted will make a page more sluggish to load, but not run.
Re:This is great! (Score:4, Informative)
Before you get all excited... (Score:5, Informative)
...according to the article his code only supports the SWF 1.0 format, and he's currently working on adding support for the SWF 2.0 file format.
Adobe Flash 1 and Flash 2 (which I'm going to guess might roughly line up with SWF 1.0 and 2.0), were released in 1996 and 1997, respectively. As in, over a decade ago.
Much larger, more long-term projects like Gnash [gnashdev.org] have been working on completing a compliant Flash client for several years and still don't have support through Flash 8, 9, and 10. It's apparently a lot of work to support all of the different pieces of Flash, especially as it turns out that the SWF spec has been completely overhauled several times over the past decade, resulting in wide differences between things like ActionScript 1, 2, and 3.
So while I wish this effort all the best, it would require a lot of time/energy/talent to make this client have the coverage necessary for, say, internet video sites to work.
Doesn't support AS3 (Score:4, Informative)
According to the list of supported swf tags (http://wiki.github.com/tobeytailor/gordon/swf-tag-support-table ), it does not support DoABC, which means that it does not support Actionscript3. So basically, it only supports the parts of flash that really annoy people: Animations. This won't let you play many neat flash games, or replace Flex, or play a movie designed for Flash9 (introduced in 2006) or later.
As an Actionscript hobbyist, I love the idea of an open source implementation of the player. But so far, none of the open source alternatives support the features I actually like: Actionscript3. It's a strongly typed language with real classes, and it's compiled to bytecode rather than interpreted (mostly). Javascript has come a long way, but it still sucks if you like strongly typed variables.
Keep trying, Tobias. And if you get that byte-level access, let the world know.
Re:This is great! (Score:2, Informative)
Re:Not SVG (Score:3, Informative)
Why shouldn't you use XHTML?
1) There's no practical advantage to using XHTML over HTML.
2) There's no XHTML2. The future is HTML5.
Re:Now if they could (Score:5, Informative)
Trivial to defeat, at least in *.nix. Just remove all write permissions to the ~/.adobe and ~/.macromedia directories, after deleting all the cookies within. Buh-bye, flash cookies. Also makes flash work noticeably faster.
Re:Sort of a good idea (Score:4, Informative)
I'm not sure what to think. I love the idea of not needing to install Flash, but I also like being able to block annoying animations by not installing Flash.
And this is why we have things such as AdBlock (and variants) and NoScript. Presumably, if and when SVG and the HTML5 media tags start being used much more, there will be browser controls for whether the media should be run or ignored.
Re:This is great! (Score:4, Informative)
Firefox 3.5 was released in June, with new Javascript improvements via Tracemonkey (a JIT compilation engine) that make it comparable with Chrome. I just tried out the demos and Firefox does not noticeable lag and it did not use more than 10% CPU, which is about the same as a normal Flash video for me.