[Red5] Want Red5 to set stream filename

Walter Tak walter at waltertak.com
Tue Nov 6 12:30:04 PST 2007


> At the moment, I publish a video stream in record mode like this in Flash:
> ns.publish(myFileName,"record");
>
> but I would like Red5 to set the filename not setting it in Flash code.
>
> So I'm searching where in Red5 code the flash method "publish" is 
> implemented, but I did not find it yet.
> I browsed the API but I did not find, maybe I don't search in the right 
> way ... :(

Call a function on the server and let the server return the streamname.

Flash:
// listen on onStatus so we know what is going on
netconnection.onStatus = function(obj) {
 for(e in obj)
  trace(e + " : " + obj[e]);
}

netconnection.connect(etc...);

netconnection.onResult(objInfo) { // better use a new handler instead of 
netconnection ; it might be confusing if you're calling multiple functions 
on Red5
    // we got back from the server
    trace("handler_getStreamName: " + objInfo );
}

// call the function on Red5 without a parameter
netconnection.call("getStreamName",netconnection);


On Red5 inside Application:
public String getStreamName() {
    return "streamname.flv";
}


Regards,
Walter


-- 
I am using the free version of SPAMfighter for private users.
It has removed 13727 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len





More information about the Red5 mailing list