HTML5 assault on Adobe Flash heats up with ClickToFlash

Posted:
in Mac Software edited January 2014
As Adobe works to port its full Flash Player to mobile platforms and highlights its upcoming support in CS5 for building iPhone apps using Flash tools, an open source group is leading a drive to kill Flash on the desktop using a WebKit plugin named ClickToFlash.



El asalto de HTML5 a Adobe Flash se calienta con ClickToFlash



ClickToFlash allows Safari users to isolate Flash content on the web so that it only plays when they choose to allow it. Flash content is replaced with a bounding box that enables the user to ignore the item (such as with ads) or to click the placeholder to activate Flash playback as desired.



Additionally, the plugin can convert requests for YouTube Flash videos into requests for higher quality H.264 videos, allowing desktop users to bypass Flash the same way the iPhone does, and simply play any YouTube videos using the browser's own built-in HTML5 support for direct H.264 playback.



The examples below compare the same HD clip served by YouTube, first rendered using Flash with the standard grey YouTube playback controls, and then presented in H.264 using ClickToFlash to request the non-Flash version from Google. The native HTML5 version results in Safari using its own native QuickTime X playback controls rather than those created by Google using Flash. During playback, Safari's native black playback bar disappears; using the ClickToFlash plugin, the user can also present H.264 videos using full screen playback.









In addition to offering better quality video and more functional and accurate playback controls for smoothly navigating through the video clip, ClickToFlash's direct playback using HTML5 prevents the Flash plugin from ever engaging and consuming CPU cycles and notebook battery life. Outside of YouTube, this means that loading web pages won't max out your processor just to animate Flash ads in the background. Any essential Flash elements, such as navigation components, can be activated by clicking on the placeholder created by ClickToFlash as desired.



In the example below, Safari with ClickToFlash does not load Flash content on the New York Times site by default, but will load individual items at the user's request. On the iPhone, no Flash content is ever loaded nor can be. Most ad networks using Flash now sense the iPhone's user agent and supply alternative, non-Flash ad banners. As more users opt out of Flash, the ad market will follow, just as it has accommodated the iPhone. Videos will also move to H.264 in order to support modern browsers that don't need Flash just to present video clips.







"One of ClickToFlash's primary goals is to eliminate as much Flash from the web as possible, allowing users to choose only the Flash they want to see," the plugin's development website says. The group asks for help in adding direct video support for other sites that currently use Flash to facilitate video playback.



As support for H.264 video delivered by simple HTML5 video tags erodes the primary demand for Flash on the web, and as web developers become familiar with using HTML5's new Canvas feature to perform sophisticated drawing effects within web pages without using a plugin such as Flash or Silverlight, many observers report that Adobe will face an uphill battle to continue to push closed Flash development as an alternative to using open web standards, particularly as new initiatives such as WebGL hardware accelerated 3D begin to gain traction.



On page 2 of 3: Adobe's mobile strategy for Flash, creating iPhone apps.



Adobe's mobile strategy for Flash



While ClickToFlash works to kill Flash on the desktop, the existing battle between Adobe's Flash and HTML5 has been waged squarely in the mobile realm. Apple introduced the iPhone without support for either the desktop version of Flash or Flash Lite, a subset of Flash aimed at smartphone devices. As Apple became increasingly adamant in opposing Flash on the iPhone, Adobe reported that it had a Flash Player for the iPhone under wraps and nearing completion, and suggested that Apple was even involved in working on the project.



That changed with the announcement this week that Adobe would be releasing a new version of Flash Player 10 for other mobile platforms over the next year, with an initial public beta for Windows Mobile and Palm's WebOS by the end of the year, followed by betas for Android, Symbian, and RIM's BlackBerry OS sometime in 2010. Missing from those announcements was the hottest mobile device on the market: the iPhone/iPod touch.



(Updated since original publication to note that RIM is working with the Open Screen Project; Adobe says "The collaboration is expected to bring the full Flash Player browser runtime to BlackBerry smartphones.")



Adobe addressed iPhone development with the announcement that its upcoming CS5 Flash development tools would enable the production of native iPhone apps. The resulting applications are not Flash, and this does nothing to enable Flash playback on the iPhone, either within standalone apps or embedded in web pages.



Creating iPhone apps using Flash CS5



Flash "applications" replace open and standard web content created using HTML, CSS, and JavaScript with Adobe's proprietary .swf, a closed binary file that wraps up web content files (such as graphics and movies) with the company's own variant of ECMAScript (JavaScript), called ActionScript. In CS5, the Flash development tools will allow new Flash projects to be exported as standard iPhone apps rather than .swf files.



Adobe is doing this using LLVM (Low Level Virtual Machine), an open source compiler technology supported by Apple and used in its Xcode Mac and iPhone development tools. The next version of Adobe's Flash development app will simply compile Flash ActionScript into native iPhone code, much as existing tools already allow iPhone developers to write their code using Java, Scheme, or other languages, and then compile the code into C or Objective-C as a native iPhone app.



The iPhone is designed not to support any alternative languages via any sort of virtual machine, which prevents it from running "raw" Java, Flash, .Net, Silverlight, or anything else apart from its native C/Objective-C compiled to the ARM processor. This is enforced in the terms of Apple's SDK agreement. There is however no restriction against compiling any existing code into native C/Objective-C and creating an iPhone app from it.







On page 3 of 3: Porting the many faces of Flash to mobiles.



Porting Flash to the mobile



Existing Flash projects will require some additional work to get them on the iPhone; Adobe notes the iPhone's 320x480 resolution is not the target resolution of most Flash apps aimed at web users, and that touch navigation will not work with content designed around the use of a precise mouse pointer.



"Certain behaviors that you may often employ in desktop application development will not necessarily apply to the iPhone," writes Adobe spokesman Aditya Bansod in a blog posting announcing the new tools. He also warns, "The iPhone is most decidedly not a desktop computer. It has very powerful and sophisticated hardware, but there is a wide spectrum of capabilities between the different generations of device, the amount of memory available, and the amount of processing power your application has at its disposal."



Adobe's Applications for iPhone FAQ further notes, "The iPhone and iPod touch have processors significantly slower than those found on most desktop PCs and Macs. Thus, content may run slower than it does when running on a desktop personal computer. However, the exact differences will depend on the specific content."



The many faces of Flash



Adobe also states that any Flash content intended for conversion to an iPhone app must use ActionScript 3.0, which debuted with Flash 9. Previous versions of Flash used ActionScript 1.0 or 2.0, which are run using an entirely different virtual machine compared to ActionScript 3.0. The desktop Flash plugin supplies two different virtual machines, one for playing existing ActionScript 1/2 bytecode, and a second for executing ActionScript 3.0.



Adobe's existing version of Flash Lite 3.0 for mobiles only supports ActionScript 2.0, which means Flash Lite can't run modern Flash 9 or 10 content. The new Flash 10 player Adobe is aiming at mobile users over the next year will only run ActionScript 3.0, which conversely means that legacy Flash content designed to work with Flash Lite won't work on new devices.



This diversity helps balloon the desktop version of Flash, which makes no effort to force the adoption of modern Flash content because it has the resources available to run legacy content using multiple virtual machines. But that doesn't translate to the mobile realm, where battery life and processing power constraints make the fat desktop Flash plugin and its pair of virtual machines unworkable.



Adobe's plans to ship a "full" mobile version of Flash 10 that only supports new 3.0 bytecode will suddenly obsolesce all existing Flash content that is more than a couple years old. That includes anything designed to work with Flash Lite, Adobe's current mobile strategy. That will force mobile Flash developers to rewrite all of their Flash code in order for their content to work with the new mobile player, undermining a key reason for wanting to use Flash in the first place: its wide installed base.







Additionally, with the iPhone consuming around half of all mobile web traffic, mobile Flash developers will have to contemplate whether it's worth it to rewrite all their existing Flash content in ActionScript 3.0 just to target the non-iPhone platforms that should be able to run Flash Player 10 by sometime over next year.



The alternative is to build HTML5 apps using standard JavaScript, which already runs on the iPhone and on other WebKit mobile browsers such as those for Nokia's Symbian, Google's Android, RIM's BlackBerry OS, and Palm's WebOS.



Such open content will not only work on the iPhone and BlackBerry, but will also run on desktop browsers including WebKit browsers such as Safari and Chrome; Mozilla's Firefox; Opera; and even Internet Explorer using Google's Chrome Frame plugin.







Daniel Eran Dilger is the author of "Snow Leopard Server (Developer Reference)," a new book from Wiley available now for pre-order at a special price from Amazon.
«1345

Comments

  • Reply 1 of 100
    slapppyslapppy Posts: 331member
    I love ClickToFlash.... best thing to have and having control of weeding out the FLASH crap content.
  • Reply 2 of 100
    bobrkbobrk Posts: 36member
    ClickToFlash is great. Now they have the H.264 video redirect as well. Has anyone tried that yet?



    I just tried it, and it rocks as well...
  • Reply 3 of 100
    solipsismsolipsism Posts: 25,726member
    Nice write up. Between MS pushing Silverlight, Apple and Google pushing HTML5 and mobile devices getting more and more popular and still not being viable for full Flash, Adobe is in a tough spot. If Hulu allows for HTML5 and secure HTTP Streaming for mobiles, Adobe may have missed their opportunity to maintain their propriety and ubiquitous control over rich internet media for the future. I guess we’ll see how it all plays out. I have doubts about Adobe being able to get Flash 10 working well on so many mobile OSes in the next year considering how power hungry it still is on Mac OS X.





    PS: ClickToFlash will let you download YouTube videos, but KeepVid lists the options for the various resolutions. This is important since iDevices won’t load the HD content from YouTube.



    PPS: Anyone have any good links to HTML5 Canvas demos?
  • Reply 4 of 100
    monstrositymonstrosity Posts: 2,234member
    I have been using this for a few weeks and I can tell you it's really damn handy! Especially if you hate flash as much as I do.
  • Reply 5 of 100
    dreyfus2dreyfus2 Posts: 1,072member
    ClickToFlash has replaced MailTags as the first application I install on every new Mac and that completely empty whitelist is a thing of beauty. I did not experience a single crash since installing it, so all crashes I had in the past were clearly caused by Adobe's crapware. Good riddance.
  • Reply 6 of 100
    sflocalsflocal Posts: 6,092member
    How funny... this is really going to piss off Adobe if / when this hits critical mass, and rightfully so too!
  • Reply 7 of 100
    solipsismsolipsism Posts: 25,726member
    Is there an equivalent for other browsers/OSes?
  • Reply 8 of 100
    dluxdlux Posts: 666member
    If you don't throw your back out from cringing at this horrible pro-Flash video, you haven't been paying attention:



    http://www.youtube.com/watch?v=lzqd5mHWTHE



    What's encouraging (to me) is the growing sentiment against Flash as represented in the comments. YouTube is more a voice (for better or worse) for the technology amateur than tech-specific sites like this. When you lose the general computer-using populace (and have already lost most of the expert audience) it's time to engage in some deep introspection. Which is something that Adobe seems to be in complete denial about.
  • Reply 9 of 100
    Quote:
    Originally Posted by solipsism View Post


    Is there an equivalent for other browsers/OSes?



    Firefox has FlashBlock but as Firefox doesn't support H.264, it doesn't play YouTube videos natively like ClickToFlash does (which would be my main reason for installing it).
  • Reply 10 of 100
    solipsismsolipsism Posts: 25,726member
    Quote:
    Originally Posted by Shookster View Post


    Firefox has FlashBlock but as Firefox doesn't support H.264, it doesn't play YouTube videos natively like ClickToFlash does (which would be my main reason for installing it).



    No Firefox plug-ins for native players that support H.264 video?
  • Reply 11 of 100
    gazoobeegazoobee Posts: 3,754member
    Quote:
    Originally Posted by AppleInsider View Post


    ... The native HTML5 version results in Safari using its own native QuickTime X playback controls rather than those created by Google using Flash. ...



    I love ClickToFlash, but this highlights one big issue I have with their approach.



    The native controls have no volume control and since every douchebag that puts a video on the internet sets the volume at plus 15 or so, this is not a good thing.



    I'd really like to see someone (anyone!), focus on a solution for volume levels on web pages and internet videos. I've been on the Web since the first day, and I had problems adjusting the audio in five different locations then, and still do today.
  • Reply 12 of 100
    Unwanted flash content has essentially "killed the Golden Goose". I will skip a site entirely rather than spend time trying to speed-read the text with a border of "look-at-ME" crap going on all around.
  • Reply 13 of 100
    tofinotofino Posts: 697member
    clicktoflash has been around for a while and was one of the things that made me wait to upgrade to snow leopard. anyone on a laptop should put this in their 'must have' list: no more spinning fans, no more annoying flash ads and the whitelist features make it easy to load flash on the sites you want to (have to) see it on. which in my case is a pretty short list.
  • Reply 14 of 100
    Little bit of an overreaction, IMO. ClickToFlash (and BashFlash, which this article didn't mention) is basically a Webkit version of FlashBlock for Firefox. It's not really leading an "assault on Flash," but it does help with battery life on notebooks (especially the MacBook Air) by preventing Flash from loading in the first place.



    This really wouldn't be an issue if Flash weren't one of the biggest resource pigs in modern computing. Every day that Adobe refrains from a full-on rewrite is a day they lose mindshare.
  • Reply 15 of 100
    oneof52oneof52 Posts: 113member
    Quote:
    Originally Posted by slapppy View Post


    i love clicktoflash.... Best thing to have and having control of weeding out the flash crap content.



    agreed!
  • Reply 16 of 100
    aplnubaplnub Posts: 2,605member
    Quote:
    Originally Posted by desides View Post


    Little bit of an overreaction, IMO. ClickToFlash (and BashFlash, which this article didn't mention) is basically a Webkit version of FlashBlock for Firefox. It's not really leading an "assault on Flash," but it does help with battery life on notebooks (especially the MacBook Air) by preventing Flash from loading in the first place.



    This really wouldn't be an issue if Flash weren't one of the biggest resource pigs in modern computing. Every day that Adobe refrains from a full-on rewrite is a day they lose mindshare.



    Tru-dat!
  • Reply 17 of 100
    As a graphic designer I love flash! (except the new AS3 language)



    But I do hate stupid ads, and all that other stuff etc.
  • Reply 18 of 100
    solipsismsolipsism Posts: 25,726member
    Quote:
    Originally Posted by Gazoobee View Post


    The native controls have no volume control and since every douchebag that puts a video on the internet sets the volume at plus 15 or so, this is not a good thing.



    I'd really like to see someone (anyone!), focus on a solution for volume levels on web pages and internet videos. I've been on the Web since the first day, and I had problems adjusting the audio in five different locations then, and still do today.



    There was a rumour not too long ago about Apple including volume controls in Safari that are independent of the rest of the OS.



    Using QT X to play YT videos is great, but there are certainly some limitations and drawbacks that do make it less than ideal for every situation.





    Quote:
    Originally Posted by Tofino View Post


    clicktoflash has been around for a while and was one of the things that made me wait to upgrade to snow leopard.



    When did you upgrade to SL. I was using CTF 1.5 Betas while SL was still in Beta. I don’t recall any problems.
  • Reply 19 of 100
    bertpbertp Posts: 274member
    On previous threads, I saw mention of ClickToFlash and tried it out. For a person with poor vision, I find it a big help because it prevents uninvited videos and animations that can be quite a distraction.



    Furthermore, in the past, I've actually gotten messages from Mac OS X saying that a website script executing Flash is about to use up all the CPU and the OS will grind to a halt. I've always found that to be amazing; ClickToFlash helps to prevent that situation. I've wondered whether Flash ever off-loads the graphics to the graphic card like Mac OS X does.



    Does anyone know if using LLVM to convert CS3 code for Flash to iPhone 3.1 native code results in applications that are just as efficient in execution, or is there some variance? I am not talking about iPhone vs. desktop functionality.
  • Reply 20 of 100
    jon tjon t Posts: 131member
    As a consumer of graphic design, I loathe Flash. It is invariably over-engineered, fussy and altogether slow and useless in the real world.



    ClickToFlash has been on my MBP for some months and I encourage every other Mac user I know to install it. It makes life a pleasure to be protected from inanities produced by out of college web designers.



    Die Flash. Die.
Sign In or Register to comment.