Red5 connection not available [publishLiveCast method]

Post your questions and bug-reports about the audio/video streaming add-on based on Red5 Media Server.

Moderators: Lapo, Bax

pac00l
Posts: 8
Joined: 24 Aug 2008, 00:56

Red5 connection not available [publishLiveCast method]

Postby pac00l » 10 Oct 2008, 06:00

some times dont work and send me this message

Red5 connection not available [publishLiveCast method]

any idea?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 10 Oct 2008, 06:39

It seems Red5 can't be reached. Is it up and running?
Paolo Bax
The SmartFoxServer Team
pac00l
Posts: 8
Joined: 24 Aug 2008, 00:56

Yes it is running

Postby pac00l » 13 Oct 2008, 03:48

Yes it is running... how can i catch this error?

Red5 connection not available [subscribeLiveCast method]

like as

try{
var stream:NetStream = avCastMan.subscribeLiveCast(liveCast.id);
}catch(...){

}

or something like that
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Postby patso » 13 Oct 2008, 09:53

Maybe you're trying to subscribe for live cast before you're connected to Red 5.

When you create new AVCastManager instance it automatically calls initAVConnection(). So you have to listen for RedBoxCastEvent.onAVConnectionInited or RedBoxCastEvent.onAVConnectionError(the constructor returns before a connection with Red5 is established - the connection is established asynchronously). You can't do any action that requires connection with Red5 before onAVConnectionInited is dispatched. Of course if onAVConnectionError instead this means that error occurred while trying to connect to Red5.

The exception what is thrown when connection with Red 5 is not available( because currently is not connected, currently is connecting,connection attempt failed was connected and now it's not connected for some reason(network error for example)) is com.smartfoxserver.redbox.exceptions.NoAVConnectionException so you can catch it if you want.

p.s. The same apply for all managers - AVChatManager, AVCastManager and AVClipManager - the connection with Red 5 is established asynchronously - the constructor calls the initAVConnection method of the class so you have to listen for the corresponding onAVConnectionInited or onAVConnectionError. Also please note that onAVConnectionError is dispatched not only during the connection attempt but also for all other connection error that may occur during the communication with the Red 5 server.

Return to “RedBox”

Who is online

Users browsing this forum: No registered users and 30 guests