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

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


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?

-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

Reply via email to