Smokescreen, a JavaScript-Based Flash Player 356
Tumbleweed writes "How to make Steve Jobs your mortal enemy: Smokescreen, a 175KB, 8,000-line JavaScript-based Flash player written by Chris Smoak at RevShock, a mobile ad startup, and to be open-sourced 'in the near future.' From Simon's blog: 'It runs entirely in the browser, reads in SWF binaries, unzips them (in native JS), extracts images and embedded audio, and turns them into base64 encoded data: URIs, then stitches the vector graphics back together as animated SVG. ... Smokescreen even implements its own ActionScript bytecode interpreter.' Badass!"
Re:Impressive (Score:3, Interesting)
What performance issues are they?
However wrong your claim might be, it is absolutely true that dynamic HTML 5 performance (e.g. SVG/ Canvas) is horrific on the iPhone / iPad, where such a technology would have the most utility. Which is why it's a bit humorous that Jobs talks it up, while delivering a replacement technology (he was talking up HTML5, right?) that is dramatically slower than the Android implementation.
Good test of 'open platform' (Score:5, Interesting)
Adobe insisted Flash is an open platform: This will be a good test of their claims. Will they compete admirably against a JS re-implementation of their own wares (and improve their own runtime - hence Smokescreen as competition to foster improvement) or will they fight dirty?
Re:Good test of 'open platform' (Score:3, Interesting)
Re:Impressive (Score:5, Interesting)
The mobile player uses the GPU for both animation(vector, bitmap, etc.) and video playback. JavaScript also runs fast on my Nexus, but when compared to Flash 10.1, it's downright slow.
Re:Impressive (Score:5, Interesting)
> Honestly, I think this will force most people to turn Javascript off if nothing else.
Which just might be the point. Turn JS off and the browsing experience is degraded to the point of unusability on most of the current net. So now the choice is Flash delivered via the plugin or Flash delivered via this JS thing which will be REALLY slow and make i* products look underpowered when compared to competing products viewing the same content. Game, Set and Match. Flash is now going to run on Apple products, His Steveness's only remaining choice is does he want it to run well or not.
Re:No, they'll be Steve Jobs' Best Friend (Score:3, Interesting)
Who says it has anything to do with Adobe or Flash [bigzaphod.org]?
Re:no. (Score:5, Interesting)
The point was to prove HTML5+Javascript can do everything Flash can do.
Now the next step is to do it better.
Re:Impressive (Score:2, Interesting)
Re:I only wonder how the speed will be (Score:3, Interesting)
http://pastebin.com/vuRxVfbx [pastebin.com]
Here it is after running it through a javascript beautifier. ... From what I see, yeah, he implemented it.
And Adobe can't do this, why? (Score:5, Interesting)
This works pretty well under the released version of Safari for OSX 10.6. In fact, in some of the samples where the flash version is provided as well, the Flash ones use more CPU then the HTML5 ones.
There is a bit of degradation in some of the graphics, but hey its better then not seeing the graphics (ok, that really depends ... if its an ad and you prefer not to see it ... whatever).
Now the question is, why can't Adobe add a feature to the Flash authoring tool to just output the HTML5 and whatever is needed, that smokescreen does in the browser?
From some of the samples it would seem like you could just "drop in" the converted version with minimal loss of quality and reach a much larger audience.
I would still prefer Flash, for the most part, go away, and this won't help that too much (initially anyway). But it seems like this would be a good way for many web sites to start using HTML5 now, while support and implementations mature, as well as giving all the Flash devs time to learn to write natively in HTML5.
Re:No, they'll be Steve Jobs' Best Friend (Score:2, Interesting)
Re:Javascript trumps Flash? (Score:4, Interesting)
Re:More efficient?? (Score:1, Interesting)
I did not monitor the CPU usage, but on Ubuntu with Firefox, Smokescreen seems to runs FASTER than Adobe's Flash plugin does. The MS Demo on their site allows you to run Smokescreen side by side with Flash and the animation finishes 15 seconds sooner when using Smokescreen. Sure, there is some minor image degradation (alpha gradients seem unsupported) but it is better than Adobe whom cannot even implement half-assed frame skipping (let alone a decent variation).
Size (Score:3, Interesting)
Using Packer (with variable renaming and 64bit encoding) it get's down to 105,177 -over 30% reduction in size. Using Gzip [gidnetwork.com], it could easily get below 50K.
Re:More efficient?? (Score:3, Interesting)
I noticed the same thing on Windows XP, 1.8 GHz... although it was a much less drastic 2-3 sec. difference.
Re:Impressive (Score:3, Interesting)
I don’t use noscript. I use ABP.
When confronted with an annoying script, I’ll identify the script and block it in particular... and if I’m feeling particularly cranky, I’ll smack their entire site with a ##script, like this:
snopes.com##script (god damn you Snopes, for your copy protection script...)
Re:Apple just updated its EUA... (Score:2, Interesting)
Ah yes. Python, where instead of optional semicolons, we get non-optional intelligent whitespace.
Last incomprehensible python bug was caused by a mix of tab and spaces in just the wrong line causing indentation to apply to the wrong portion, causing a switch to fail, causing a DOS of our server.
Thanks Python and your arrogant refusal to even support a braces mode.
Thankfully, this idiocy can be handled to some extent with a wrapper.