Dan Rossi wrote:
hi for some odd reason this event is not being sent from the server whenever the broadcaster app is publishing a live stream. Basically what is happening is, if the client is connected to the stream before the broadcaster is on it will fire the play event then stop event. The broadcaster app seems to have to be running and then the client will connect. Was wondering if there was a way for the client to keep trying to connect to the stream or try and play again when and if ever the PublishNotify get sent. I found a work around for this issue by invoking a method to call a method on the client to switch to the live broadcast. The next problem is now, that the client will automatically connect to a server playlist stream, and it needs to work out if the live broadcast is already playing :D public void streamPublishStart(IBroadcastStream stream) { // Notify all the clients that the stream had been started log.debug("stream broadcast start: "+stream.getPublishedName()); 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("onBroadcast", new Object[]{stream.getPublishedName()}, this); log.debug("sending notification to "+conn); } } } |
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
