Dan Rossi wrote:
Dan Rossi wrote:
Apologies i cleaned it up a little and went back to my previous version, here is the output it keeps looping the invocation.

Ive also receieved the same result looping through the connections and getting the current client connection

public void streamSubscriberStart(ISubscriberStream stream) {
        IConnection current = Red5.getConnectionLocal();

        Object[] streams = getStreams().toArray();
       
       
        if (streams.length > 0)
        {
            String streamName = streams[0].toString();
       
            if (hasBroadcastStream(current.getScope(), streams[0].toString())) {
                log.info("Connecting to live stream: " + streamName);
               
                Iterator<IConnection> it = scope.getConnections();
                while (it.hasNext()) {
                    IConnection conn = it.next();
                   
                    if (conn.equals(current) && (conn instanceof IServiceCapableConnection))
                    {
                        ((IServiceCapableConnection) conn).invoke("onBroadcast", new Object[]{streamName}, this);
                        log.info("sending notification to "+conn);
                    }
                }
            }
        }

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

Reply via email to