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...


-rob

On 11/14/06, . m a r c o s   a u g u s t o < [EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I'm trying to keep track of who is joining and leaving, so I tought about
> two functions for my app, "addUser" , "removeUser"...
> I'm lost in my Application.java .. to broadcast those events to who is
> connected. if someone can help, the code follows.
> btw, I'm using Red5's appLeave event for disconnection cuz was the only who
> seems to work now, i'm using trunk
> How I don't know java I just pasted the newstream event cuz it looked more
> like what I need..heheh but don't work...
>
>
>     public boolean appJoin(IClient client, IScope scope) {
>         log.info("Client joined app " + client.getId());
>         // If you need the connecion object you can access it via.
>     //    IConnection conn = 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 service =
> (IServiceCapableConnection) conn;
>                 service.invoke("addId",
>                         new Object[] { conn.getClient().getId() }, this);
>                 if (log.isDebugEnabled()) {
>                     log.debug("sending notification to " + conn);
>                 }
>             }
>         }
>         return true;
>     }
>
>
>
>
>
>     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);
>                 }
>             }
>         }
>
>
>
> --
> . 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
>
>
>


--
800-757-0689
http://seerobcode.com

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org



--
[  JPG  ]

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org





--
-------------------------------------------------------------------
"Nos gusta los domingos ir al parque a pinchar los globos de los niños para verlos llorar" .- Eskorbuto

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org





--
. 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