Little correction, appDisconnect() works too:

public void appDisconnect(IConnection conn){
ok

public void appLeave(IClient client, IScope scope){
ok

So , only public void appStop(IScope scope){ seems to not work..
But actually i don't know when red5 terminate the app... even with nobody there...


On 11/14/06, . m a r c o s a u g u s t o < [EMAIL PROTECTED]> wrote:
On 11/14/06, Storm <[EMAIL PROTECTED]> wrote:
i'm pretty sure that videoConference  notify  disconnections... i'll paste the code tomorrow if i have the time...starring this thread to remember it ;)

Cheers

I think it does not.. maybe you could use the stop of the stream as a logout, but if someone isn't streaming?

According to Joachim, there are 3 methods:
http://www.joachim-bauch.de/tutorials/red5/MigrationGuide.txt

appStop, appDisconnect, appLeave... and their counterparts for room..
In my tests, only appLeave works, i get the id of who is out... so its pretty much all I need.
I just don't know how to write it in java... a way to send the notification to all users who are on.

 

On 11/14/06, John Grden <[EMAIL PROTECTED]> wrote:
red5 does/can let the clients know when someone disconnects.  One of the apps actually has that in there - I beleive it's "test" that has that code.  but I can't remember

coulnd't find John...
 

On 11/14/06, Rob Koch <[EMAIL PROTECTED]> wrote:
Red5 broadcasts who joins and their updated status (Away, Available,
etc..), but not when someone logs off.

Seems there still needs a bit more work in the presence part, am I right?


appLeave works Rob.
 

The method to add users, I made it in flash... make a client send its name as a SO.. so i don't need...
but for the disconnect, i need that red5 notify the others.... here's the code:

This is what I got in the log:

3032 pool-1-thread-9:( org.red5.demos.fitc.Application.info ) Client LEAVE app 5
[DEBUG] 4523047 pool-1-thread-9:( org.red5.demos.fitc.Application.debug ) sending notification to RTMPMinaConnection from 127.0.0.1:3498 to localhost (in: 4059, out: 4022)
[INFO] 4523063 pool-1-thread-11:( org.red5.demos.fitc.Application.info ) Received result {level=error, code=NetConnection.Call.Failed} for removeId


    public void appLeave(IClient client, IScope scope){
       
    //    IServiceCapableConnection service = (IServiceCapableConnection) conn;
        log.info("Client DISjoined app " + client.getId());
        IConnection current = Red5.getConnectionLocal();
        Iterator<IConnection> it = scope.getConnections();
        while ( it.hasNext ()) {
            IConnection conn = it.next();
            if (conn.equals(current)) {
                // Don't notify current client
                continue;
            }

            if (conn instanceof IServiceCapableConnection) {
                ((IServiceCapableConnection) conn).invoke("removeId",
                        new Object[] { conn.getClient().getId() }, this);
                if (log.isDebugEnabled()) {
                    log.debug("sending notification to " + conn);
                }
            }
        }


but it is not calling my removeId() method inside flash...



--
. m a r c o s    a u g u s t o  ;

.e onde houver fé, que eu leve a dúvida.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to