Apollo, why so much excitement?

In these 2 days I read only Apollo related news, post and video tutorials! I dont think there is still someone who dont know about the public alpha of Apollo 🙂
I see much more excitement than for a new Flash player release.

I’m sure Apollo will be a great product, I’m just testing it right now (even if I sill have  no idea about what to create with it… but it’s another story), but to be honest I can see anything so revolutionary there.
Unfortunately I dont have so much experience with desktop flash suff (just a couple of little projects using mdm and some experiments with XUL)
What’s the difference and innovation compared with MDM Zinc, Screenweaver, Xul Runner, and all the other flash desktop integration kits?
I just hope I can find the time to use it much more in the future to give me an answer…

XUL and XULRunner (co-starring flash)

Like you probably noteiced I got more and more interest in XUL and experimenting Firefox extensions in the last days.
After my first extension I decided to try something different and first I created a little (this time nothing new at all) and lightweight extension for grabbing flv videos while visiting youtube.com or video.google.com. It simply creates a statusbar icon and when there are availables flv on the page it will get active. Clicking on it let you save the current playing flv. You can also change the options and tell the extension to open the video using you favourite Video Player (Like VLC or FLVPlayer)

Install the getvideo-0.1-fx.xpi Firefox extension

When I did this extension comes also in my mind the idea of creating a simple Flash video player, just for practice. I was doing it using python/wxPython as usual.. but then I wanted to try using XUL  and package it with XULRunner (a runtime XUL runner, which runs xul applications like standalone applications).
First of all I have to say thanks to Darron Schall for his article on how-to embed swf files in xul. I was going crazy to understand all the steps for creating a valid xulrunner package..
As usual opensource sofware has bad and incomplete documentation. I need to look into one of the examples (chatzilla) to understand how it works.

Once I undertood that a new problem arise, the damn flash security sandbox error! When the xulrunner application starts it prompt also the security warning.. Oh my god!

After various attempts and after reading various articles on FlashplayerTrust I managed to solve the problem (or at least I think I’ve solved…).
In the installer a file named flvideoplayer.cfg will be copied inside the Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust direcory, and it’s content is

chrome:\\flvideoplayer\content\flvideoplayer.xul

In this way the embed swf file should has the correct permissions to communicate with the xul page using fscommand. I thought that my experiment was finished, but when I shown it to a friend he  asked me to add also the possibility to convert the .flv video into other formats (avi, mpeg, etc).
Well, fortunately there’s ffmpeg which does this job for everyone 🙂

Thus I included ffmpeg to enable video conversion. What I did it’s a runtime .bat file which wil invoke ffmpeg:

function execute_batch(bat) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
try
{
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(bat.path);
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
process.init(file);
process.run(true, {}, 0);
} catch(e)
{
alert(e);
}
}

Ok, how to install this application.
In order to run correctly this application you first have to:

  • download XULRunner (I did not included in the installer because it’s about 10Mb).
  • Once downloaded from a command prompt, run xulrunner.exe –register-global (to register for all users) or xulrunner.exe –register-user (to register for one user only).
  • To enable the flash plugin (the Firefox plugin isn’t used, so if you launch the application you won’t see the flash embed object) you have to copy:
    {programs}\Mozilla Firefox\plugins\NPSWF32.dll
    {programs}\Mozilla Firefox\plugins\flashplayer.xpt

    into your XULRunner\plugins\ folder
  • Now just download yougrab! and install it.

Install YouGrab! (sorry but currently Windows only)

My first Firefox extension! (FlashTracer)

Ok, it does nothing particular new, but it’s my first one 🙂

What it does?
If you have a flash debug player version you will see in the firefox sidebar all the swf trace output while running any of the swf in a browser window.
I have to say thanks to jayjam (Giuseppe Montemurro) who talks about the mm.cfg file yesterday at the From A to Web Adobe conference. I’d never read about this cool feature of the debug players.. and so I decided to make it as firefox extension.
I took 1 hour to make the XUL and js files, while the .xpi package was driving me crazy!.. the documentation is really terrible for my point of view.

Download and install FlashTracer from the Firefox extension page.

UPDATE: A new flash tracer called fbtracer has been released. This new extension is integrated into Firebug. Read more here

P.S. If you’re running the new 9,0,28 Flash plugin probably you noticed this extension wont work anymore. Adobe changed something and the plugin doesn’t read as previously the mm.cfg file so I’m invetigating on it. In the meanwhile you should tell the extension to point to this file: C:\Documents and Settings\{user}\Application Data\Macromedia\Flash Player\Logs\flashlog.txt.

For mac osx it should be: username:Library:Preferences:Macromedia:Flash Player:Logs:flashlog.txt

Using this path the flash tracer works again.

For discussing about this extension please use the forum instead of the comments here 🙂