Make sense?
one of the sample apps has a demo of how to do a new client notification - i'll see if I can dig it up and create a new app that we can connect to for the VideoConference app.
On 11/10/06, Storm <[EMAIL PROTECTED]> wrote:
I'm pretty lost right now.
Please read through and correct me if i'm wrong:
1. streamPublishStart method on server-side is called when someone do stream.publish on client-side (in this case at method onSetID inside broadcaster.as)
2. no-cam users reach that line as well as cam users
3. there's no "streamPublishStart" invocation for no-cam users :(
The reasoning is right, there SHOULD be an execution of that method everytime anyone connects, so either i've missunderstood how it works or something doesn't work properly or stream.publish does something annoying when called by no-cam users.
any takers? John? Mr. Tanembaum?
Yours
Carlos--On 11/10/06, Storm <[EMAIL PROTECTED]> wrote:Ok, i've just understood how that "streamPublichStart" works (i've been surfing the API). But i'm quite stuck now. Subscribers are nicely notified of incoming clients through the invoke of "newStream" in that method but now it's obvious for me that it won't be called when no-cam users connect. That newStream event ends calling Subscribe.subscribe at client side, method that YES, manage clients w/o cam by setting the _noStream.visible=true.
So i've thought about creating a fake "newStream" event somewhere, but it won't work 'cause for cam users it would be invoked twice. What to do???? I wonder if i can fake a stream for no-cam users so they would generate the desidered streamPublishStart call...
By the glory of the super cow powers, help a poor guy! ;) It'd be great having a perfectly-working videoconf. demo for 0.6RC2 wouldn't it? ;)
Cheers--
CarlosOn 11/9/06, Storm <[EMAIL PROTECTED]> wrote:On 11/9/06, John Grden < [EMAIL PROTECTED]> wrote:first, excellent work on following that crazy code of mine ;) i'm impressed!
Thanks John, it has been kinda hard since that has been the first AS code i've ever read, but you gotta do what you gotta do ;)second - yeah it's all coming back to me now! Instead of dealing with it at the new stream notification, we need to do it at the connection level - when someone connects, that's when everyone is notified. Then we need to match up that user's stream with their ID, and bam, I think we're in business.
Will try something in that line tomorrow (i'm in Spain, it's 21:02 now and i'm at home) but there's something i want to ask you. Where are the calls to "streamPublishStart" method generated? because i cannot see any, idk if i'm mising some AS archive somewhere or if i'm missundertanding how a Red5 app works (that's pretty possible since i have only fuzzy idea).
If you were so kind to find out that for me i'd be able to sleep tonight without having nightmares with magically called methods lol.
Thanks a bunch:
CarlosOn 11/9/06, Storm < [EMAIL PROTECTED]> wrote:Ok, let's see if i can put together what i got and where i am:_______________________________________________
At the begining when clients connected they randomly could see each other or they couldn't. Browsing the client code i found this at Suscriber.as
private function doubleCheckTime():Void
{
clearInterval(si);
if(checkTime == stream.time){
reset();
}
}
I noticed that new clients cleared incoming streams through this, so i just commented the clear(); call and then that never happens again :)
Now clients that owns cams are working ok, but already connected users cannot see the noStream picture of any new client tho newer ones will see the pics for the already connected no-cam users (this shows that the list of clients is working properly, the problem is the notification of incoming users WITHOUT cam).
So...i left the client side for a while and started to have a look at the server Application.class (you didn't break your head to name this did you? lol j/k).
I was trying to see where the "newStream" calls are generated and it's here:
public void streamPublishStart(IBroadcastStream stream) {
// Notify all the clients that the stream had been started
log.debug("stream broadcast starts: " + 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("newStream",
new Object[] { stream.getPublishedName() }, this);
log.debug("sending notification to " + conn);
}
}
}
When an user without webcam connects this method is not called (i've seen that following the logs step by step) so the current clients aren't notified of his/her arrive to the conversation.
Now that i (think that) know what happens ... how fix it? I hope someone colud help me...
Cheers
Carlos
--
-------------------------------------------------------------------
"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
--
[ 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
-------------------------------------------------------------------
"Nos gusta los domingos ir al parque a pinchar los globos de los niños para verlos llorar" .- Eskorbuto
-------------------------------------------------------------------
"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
--
[ JPG ]
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
