Friday, August 31, 2007

Re: [Red5] how do I move a new client to a room at connection time?

Q: How can I move a client who connects to the main app to a different room?
A: You use the IConnection.connect( IScope scope ) method like this:

public boolean appStart( IScope app )
appScope = app;
public boolean appConnect ( IConnection conn, Object[] params )
if( !appScope.hasChildScope( "myNewRoom" )){
appScope.createChildScope( "myNewRoom" );
conn.connect( appScope.getScope( "myNewRoom" ) );

return super.appConnect( conn, params );

The ApplicationAdapter.connect method seems to do a reconnect to the main app scope instead of the newly myNewRoom scope. Not sure why that happens but this one was tricky for me , so I hope it spares you some gray matter :D

What's with this?
I've been doing Red5 dev for some time now so I'll try to post here these kind of tricky gems in case someone is interested.
Note: if you are an actionscripter and you feel that the above code looks a bit weird you are right!
It's Jaaaavaaaa :O
Bow and step back, bow and steeep baaack...


Thursday, August 23, 2007

so, how much would you pay to stream H.264 in Flash?

Well it seems that I've lived under a rock these last days. The label of the rock is CakePhp and it feels really good under there. But this should be another post...

The Flash Player 9 Update3 Beta2 has support for the H.264 and AAC+ formats !

Man this is so cool!
Check out Tinic's detailed announcement. Lots of implications and under the hood details laid down by the Flash Player daddyo.

Ok. Are you over excited towards horny yet?!
The new Flash Player will deliberately block any source of streaming of the new supported video format other than Flash Media Server!
"I am not in a position able to explain to you why we will not allow 3rd party streaming servers to stream H.264 video or AAC audio into the Flash Player. What I can tell you is that we do not allow this without proper licensing. Refer to Adobe's friendly Flash Media Server sales staff for more information."
Tinic Uro
Adobe Flash Player Engineer

Evil laughs anyone?
Well I'm a bit down...
When I heard the great news I immediately thought of the ways Red5 could benefit from it. Instead we're left stuck in the old Sorenson flv format. Good enough for casual video conferencing. Not so good for on demand high quality video streaming. But everyone will be able to progressively download and playback the new format. And I'm confident that the Red5 devs will find a workaround. They always do. Reverse engineering the format is not illegal. It's just a matter of trying hard enough.
I can understand that Adobe needs to make their Media Server profitable and I think they got to a reasonable compromise. The big TV broadcasters will shovel the cash needed for acquiring the server licenses.
We'll be left to play nice in the "rest of us" corner once more.
And M$ gets another lesson in real standards adherence.
I'm curious what On2 thinks about this. May be that their tight hold on the codec added to the final outcome. You win some, and you definitely lose some.
Nice effort Adobe!
Hope for even better news later on...
But hey, I say Europe should pay even more for this new feature!
Hehe, this time it's not "Take as much as you want!". It's rather "Pay as much as we want!".
God, I'm so hilarious!

Wednesday, August 15, 2007

the _root of some evil [buttons]

While playing with some Federated Media banners I stumbled once more upon the infamous parent property reference issue for the on handler. At least for me because I always forget about it by the time the next banner gig comes at a desktop near me...
Thing is that it differs from for buttons to movie clips.
So the FM guide was following closely the Adobe one and using a button with the sample code:

on( release ){
if (clickTAG.substr(0,5) == "http:") {
getURL( clickTAG, "_blank" );

And my beloved mantra of not using buttons unless in a life threatening situation bit me mercilessly because when using the above code on a movie clip we need to put _root explicitly when referencing the clickTAG property as in:

on( release ){
if (_root.clickTAG.substr(0,5) == "http:") {
getURL( _root.clickTAG, "_blank" );

Well it's things like these that give the adrenaline rush in a flasher's flashy day. No doubt about it :D

Friday, August 03, 2007

Yes, but will it run Vista?

The Slashdot crowd just makes my day sometimes. The above question keeps popping whenever a gadget/hw article is posted and usually turns into a snowball from there. This time is about the new 8 Core Niagara 2 Processor Sun announced. This one apparently it has Vista emulation mode.
"It has a Vista emulation mode - move the power switch to OFF and you get something just as useful but more stable."
God I hope Bill reads these posts when arriving at work :)